@inlang/sdk
Advanced tools
Comparing version 0.24.1 to 0.25.0
@@ -8,2 +8,3 @@ import type { InlangProject, MessageLintReportsQueryApi } from "../api.js"; | ||
export type InlangProjectWithSolidAdapter = { | ||
id: InlangProject["id"]; | ||
customApi: () => ReturnType<InlangProject["customApi"]>; | ||
@@ -10,0 +11,0 @@ installed: { |
@@ -7,2 +7,3 @@ import { observable } from "../reactivity/solid.js"; | ||
return { | ||
id: project.id, | ||
customApi: convert(project.customApi), | ||
@@ -9,0 +10,0 @@ settings: convert(project.settings), |
@@ -26,2 +26,6 @@ import type { Result } from "@inlang/result"; | ||
export type InlangProject = { | ||
/** | ||
* The project's id. | ||
*/ | ||
id?: string; | ||
installed: { | ||
@@ -28,0 +32,0 @@ plugins: Subscribable<InstalledPlugin[]>; |
@@ -18,2 +18,3 @@ import { resolveModules } from "./resolve-modules/index.js"; | ||
import { capture } from "./telemetry/capture.js"; | ||
import { identifyProject } from "./telemetry/groupIdentify.js"; | ||
const settingsCompiler = TypeCompiler.Compile(ProjectSettings); | ||
@@ -198,2 +199,10 @@ export async function loadProject(args) { | ||
// TODO ensure that capture is "awaited" without blocking the the app from starting | ||
await identifyProject({ | ||
projectId, | ||
properties: { | ||
// using the id for now as a name but can be changed in the future | ||
// we need at least one property to make a project visible in the dashboard | ||
name: projectId, | ||
}, | ||
}); | ||
await capture("SDK loaded project", { | ||
@@ -211,2 +220,3 @@ projectId, | ||
return { | ||
id: projectId, | ||
installed: { | ||
@@ -213,0 +223,0 @@ plugins: createSubscribable(() => installedPlugins()), |
{ | ||
"name": "@inlang/sdk", | ||
"type": "module", | ||
"version": "0.24.1", | ||
"version": "0.25.0", | ||
"license": "Apache-2.0", | ||
@@ -28,13 +28,13 @@ "publishConfig": { | ||
"throttle-debounce": "^5.0.0", | ||
"@inlang/language-tag": "1.4.0", | ||
"@inlang/message": "2.0.1", | ||
"@inlang/json-types": "1.1.0", | ||
"@inlang/language-tag": "1.4.0", | ||
"@inlang/module": "1.2.3", | ||
"@inlang/message-lint-rule": "1.4.1", | ||
"@inlang/module": "1.2.3", | ||
"@inlang/plugin": "2.4.3", | ||
"@inlang/project-settings": "2.2.1", | ||
"@inlang/result": "1.1.0", | ||
"@inlang/project-settings": "2.2.1", | ||
"@inlang/message": "2.0.1", | ||
"@inlang/translatable": "1.2.1", | ||
"@lix-js/fs": "0.6.0", | ||
"@lix-js/client": "0.7.0", | ||
"@inlang/translatable": "1.2.1" | ||
"@lix-js/client": "0.7.0" | ||
}, | ||
@@ -41,0 +41,0 @@ "devDependencies": { |
@@ -16,2 +16,3 @@ import type { InlangProject, MessageLintReportsQueryApi } from "../api.js" | ||
return { | ||
id: project.id, | ||
customApi: convert(project.customApi), | ||
@@ -49,2 +50,3 @@ settings: convert(project.settings), | ||
export type InlangProjectWithSolidAdapter = { | ||
id: InlangProject["id"] | ||
customApi: () => ReturnType<InlangProject["customApi"]> | ||
@@ -51,0 +53,0 @@ installed: { |
@@ -37,2 +37,7 @@ import type { Result } from "@inlang/result" | ||
export type InlangProject = { | ||
/** | ||
* The project's id. | ||
*/ | ||
// TODO #2063 make project id non-optional when every project is guaranteed to a project id | ||
id?: string | ||
installed: { | ||
@@ -39,0 +44,0 @@ plugins: Subscribable<InstalledPlugin[]> |
@@ -33,2 +33,3 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */ | ||
import { capture } from "./telemetry/capture.js" | ||
import { identifyProject } from "./telemetry/groupIdentify.js" | ||
@@ -323,2 +324,10 @@ const settingsCompiler = TypeCompiler.Compile(ProjectSettings) | ||
// TODO ensure that capture is "awaited" without blocking the the app from starting | ||
await identifyProject({ | ||
projectId, | ||
properties: { | ||
// using the id for now as a name but can be changed in the future | ||
// we need at least one property to make a project visible in the dashboard | ||
name: projectId, | ||
}, | ||
}) | ||
await capture("SDK loaded project", { | ||
@@ -337,2 +346,3 @@ projectId, | ||
return { | ||
id: projectId, | ||
installed: { | ||
@@ -339,0 +349,0 @@ plugins: createSubscribable(() => installedPlugins()), |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
435802
244
11163
3