@statelyai/sdk 0.20.0 → 0.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{editor-sync-types-D8_EZm0A.d.mts → editor-sync-types-C-zWaaVk.d.mts} +1 -0
- package/dist/{editorHostSession-CZHd22pZ.mjs → editorHostSession-CCTwvUOB.mjs} +2 -1
- package/dist/{editorHostSession-jnC5mQDN.d.mts → editorHostSession-lL7wPLnL.d.mts} +1 -1
- package/dist/editorHostSession.d.mts +1 -1
- package/dist/editorHostSession.mjs +1 -1
- package/dist/embed.d.mts +1 -1
- package/dist/embed.mjs +1 -1
- package/dist/{graph-DxeqWHC3.d.mts → graph-yDK-MM3G.d.mts} +6 -4
- package/dist/graph.d.mts +1 -1
- package/dist/{index-CKFbG_Ix.d.mts → index-BAkQThnl.d.mts} +9 -9
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +5 -5
- package/dist/{inspect-CWwLGwLq.mjs → inspect-CwN52e61.mjs} +1 -1
- package/dist/inspect.mjs +2 -2
- package/dist/oauth.mjs +1 -0
- package/dist/patchTypes.d.mts +1 -1
- package/dist/protocol.d.mts +2 -2
- package/dist/{schemas-C2raUv-n.mjs → schemas-b9wG-zYl.mjs} +15 -1
- package/dist/{statelyPragma-GN-bfuC_.mjs → statelyPragma-Cnj58Rua.mjs} +1064 -1187
- package/dist/{studio-EKd7cQN7.mjs → studio-DHGspwII.mjs} +1 -1
- package/dist/{studio-DLduJRSp.d.mts → studio-YSppd-am.d.mts} +1 -1
- package/dist/studio.d.mts +1 -1
- package/dist/studio.mjs +1 -1
- package/dist/sync.d.mts +2 -2
- package/dist/sync.mjs +12 -5
- package/dist/{version-TY9EZF0F.mjs → version-C-1n7MoR.mjs} +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as object, d as union, f as unknown, l as record, n as array, o as literal, r as boolean, s as number, t as _enum, u as string } from "./schemas-b9wG-zYl.mjs";
|
|
2
2
|
import { createAuthorizationHeader, getCredentialToken } from "./auth.mjs";
|
|
3
3
|
|
|
4
4
|
//#region ../api-contract/dist/errors.mjs
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as $strip, C as ZodObject, D as ZodUnion, E as ZodString, O as ZodUnknown, S as ZodNumber, T as ZodRecord, b as ZodLiteral, k as output, v as ZodArray, w as ZodOptional, x as ZodNullable, y as ZodEnum } from "./index-
|
|
1
|
+
import { A as $strip, C as ZodObject, D as ZodUnion, E as ZodString, O as ZodUnknown, S as ZodNumber, T as ZodRecord, b as ZodLiteral, k as output, v as ZodArray, w as ZodOptional, x as ZodNullable, y as ZodEnum } from "./index-BAkQThnl.mjs";
|
|
2
2
|
import { n as StatelyCredential, t as StatelyAuthMode } from "./auth-B0ZTKri2.mjs";
|
|
3
3
|
|
|
4
4
|
//#region ../api-contract/dist/errors.d.mts
|
package/dist/studio.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as Machine, C as StudioMachineRecord, D as VerifyApiKeyResponse, E as UpdateProjectInput, F as ProjectVisibility, I as VerifyResult, L as XStateVersion, M as Project, N as ProjectMachineSummary, O as createStatelyClient, P as ProjectSummary, R as ResourceErrorCode, S as StudioClientOptions, T as UpdateMachineInput, _ as ProjectMachine, a as CreateMachineTemplate, b as StudioApiErrorOptions, c as EnsureProjectInput, d as ExtractedMachine, f as GetMachineOptions, g as ProjectData, h as LegacyUpdateMachineInput, i as CreateMachineInput, j as MachineVersion, k as ExtractedMachines, l as ExtractMachinesInput, m as LegacyProjectVisibility, n as CreateMachineFromDefinitionInput, o as CreateProjectInput, p as LegacyExtractMachinesOptions, r as CreateMachineFromTemplateInput, s as DEFAULT_STATELY_BASE_URL, t as ConnectedRepo, u as ExtractMachinesResponse, v as RepoType, w as StudioRequestOptions, x as StudioClient, y as StudioApiError } from "./studio-
|
|
1
|
+
import { A as Machine, C as StudioMachineRecord, D as VerifyApiKeyResponse, E as UpdateProjectInput, F as ProjectVisibility, I as VerifyResult, L as XStateVersion, M as Project, N as ProjectMachineSummary, O as createStatelyClient, P as ProjectSummary, R as ResourceErrorCode, S as StudioClientOptions, T as UpdateMachineInput, _ as ProjectMachine, a as CreateMachineTemplate, b as StudioApiErrorOptions, c as EnsureProjectInput, d as ExtractedMachine, f as GetMachineOptions, g as ProjectData, h as LegacyUpdateMachineInput, i as CreateMachineInput, j as MachineVersion, k as ExtractedMachines, l as ExtractMachinesInput, m as LegacyProjectVisibility, n as CreateMachineFromDefinitionInput, o as CreateProjectInput, p as LegacyExtractMachinesOptions, r as CreateMachineFromTemplateInput, s as DEFAULT_STATELY_BASE_URL, t as ConnectedRepo, u as ExtractMachinesResponse, v as RepoType, w as StudioRequestOptions, x as StudioClient, y as StudioApiError } from "./studio-YSppd-am.mjs";
|
|
2
2
|
export { ConnectedRepo, CreateMachineFromDefinitionInput, CreateMachineFromTemplateInput, CreateMachineInput, CreateMachineTemplate, CreateProjectInput, DEFAULT_STATELY_BASE_URL, EnsureProjectInput, ExtractMachinesInput, ExtractMachinesResponse, ExtractedMachine, ExtractedMachines, GetMachineOptions, LegacyExtractMachinesOptions, LegacyProjectVisibility, LegacyUpdateMachineInput, Machine, MachineVersion, Project, ProjectData, ProjectMachine, ProjectMachineSummary, ProjectSummary, ProjectVisibility, RepoType, ResourceErrorCode, StudioApiError, StudioApiErrorOptions, StudioClient, StudioClientOptions, StudioMachineRecord, StudioRequestOptions, UpdateMachineInput, UpdateProjectInput, VerifyApiKeyResponse, VerifyResult, XStateVersion, createStatelyClient };
|
package/dist/studio.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as StudioApiError, r as createStatelyClient, t as DEFAULT_STATELY_BASE_URL } from "./studio-
|
|
1
|
+
import { n as StudioApiError, r as createStatelyClient, t as DEFAULT_STATELY_BASE_URL } from "./studio-DHGspwII.mjs";
|
|
2
2
|
|
|
3
3
|
export { DEFAULT_STATELY_BASE_URL, StudioApiError, createStatelyClient };
|
package/dist/sync.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as DigraphConfig, i as StatelyGraph } from "./graph-
|
|
2
|
-
import { C as StudioMachineRecord, L as XStateVersion, g as ProjectData, o as CreateProjectInput, x as StudioClient } from "./studio-
|
|
1
|
+
import { b as DigraphConfig, i as StatelyGraph } from "./graph-yDK-MM3G.mjs";
|
|
2
|
+
import { C as StudioMachineRecord, L as XStateVersion, g as ProjectData, o as CreateProjectInput, x as StudioClient } from "./studio-YSppd-am.mjs";
|
|
3
3
|
import { GraphDiff } from "@statelyai/graph";
|
|
4
4
|
|
|
5
5
|
//#region src/sync.d.ts
|
package/dist/sync.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as createStatelyClient } from "./studio-
|
|
2
|
-
import {
|
|
1
|
+
import { r as createStatelyClient } from "./studio-DHGspwII.mjs";
|
|
2
|
+
import { f as normalizeMachineProfile, h as xstateSourceToConfig, i as INLINE_EXPRESSION_DIRECTIVE_FIELDS, m as serializeJS, n as getStatelyPragma, r as upsertStatelyPragma, s as detectXStateSourceProfile, t as findStatelyPragmaAttachments, u as graphToXStateTS } from "./statelyPragma-Cnj58Rua.mjs";
|
|
3
3
|
import { fromStudioMachine, toStudioMachine } from "./graph.mjs";
|
|
4
4
|
import * as ts$1 from "typescript";
|
|
5
5
|
import ts from "typescript";
|
|
@@ -157,7 +157,8 @@ function collectXStateSourceLocations(sourceText, document, options = {}) {
|
|
|
157
157
|
const inferredProfile = rootProfile === "xstate-v6-alpha" || resolvedTransitionFunctions.size > 0 || [...referencedStateSymbols].some((symbol) => detectXStateSourceProfile(bindings.get(symbol)?.sourceFile.text ?? "") === "xstate-v6-alpha") ? "xstate-v6-alpha" : rootProfile;
|
|
158
158
|
return {
|
|
159
159
|
version: 1,
|
|
160
|
-
profile: packageProfile ?? inferredProfile,
|
|
160
|
+
profile: packageProfile?.profile ?? inferredProfile,
|
|
161
|
+
profileRef: packageProfile?.profileRef ?? normalizeMachineProfile(inferredProfile),
|
|
161
162
|
root: {
|
|
162
163
|
uri,
|
|
163
164
|
range: toSourceRange$1(sourceFile, root)
|
|
@@ -198,10 +199,16 @@ function detectXStatePackageProfile(packageJson) {
|
|
|
198
199
|
}
|
|
199
200
|
}
|
|
200
201
|
if (!range) return void 0;
|
|
201
|
-
const
|
|
202
|
+
const normalizedRange = range.replace(/^(?:workspace:|npm:xstate@)/, "");
|
|
203
|
+
const clauseProfiles = normalizedRange.split("||").map((clause) => detectXStateRangeClauseProfile(clause.trim()));
|
|
202
204
|
const profiles = new Set(clauseProfiles);
|
|
203
205
|
if (profiles.size !== 1 || profiles.has(void 0)) return void 0;
|
|
204
|
-
|
|
206
|
+
const profile = clauseProfiles[0];
|
|
207
|
+
if (!profile) return void 0;
|
|
208
|
+
return {
|
|
209
|
+
profile,
|
|
210
|
+
profileRef: /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(normalizedRange) ? `@statelyai/xstate@${normalizedRange}` : normalizeMachineProfile(profile)
|
|
211
|
+
};
|
|
205
212
|
}
|
|
206
213
|
function detectXStateRangeClauseProfile(clause) {
|
|
207
214
|
const normalizedClause = clause.replace(/([<>]=?)\s+/g, "$1");
|
|
@@ -328,7 +328,7 @@ function createWebSocketTransport(options) {
|
|
|
328
328
|
|
|
329
329
|
//#endregion
|
|
330
330
|
//#region src/version.ts
|
|
331
|
-
const SDK_VERSION = "0.20.
|
|
331
|
+
const SDK_VERSION = "0.20.2";
|
|
332
332
|
function inspectionRuntime() {
|
|
333
333
|
if (typeof window !== "undefined") return "browser";
|
|
334
334
|
if (typeof process !== "undefined" && process.versions?.node) return "node";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@statelyai/sdk",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"bin": {
|
|
6
6
|
"stately-sdk": "./dist/bin.mjs"
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"./schemas/xstate-json.schema.json": "./schemas/xstate.schema.json"
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@statelyai/graph": "^1.0
|
|
84
|
+
"@statelyai/graph": "^2.1.0",
|
|
85
85
|
"esbuild": "^0.27.0",
|
|
86
86
|
"typescript": "^5.9.3",
|
|
87
87
|
"ws": "^8.19.0",
|
|
@@ -93,8 +93,8 @@
|
|
|
93
93
|
"jsdom": "^27.4.0",
|
|
94
94
|
"tsdown": "0.21.0-beta.2",
|
|
95
95
|
"vitest": "^3.2.4",
|
|
96
|
-
"@statelyai/api-contract": "0.
|
|
97
|
-
"@statelyai/graph-tools": "0.0
|
|
96
|
+
"@statelyai/api-contract": "0.3.2",
|
|
97
|
+
"@statelyai/graph-tools": "0.1.0"
|
|
98
98
|
},
|
|
99
99
|
"engines": {
|
|
100
100
|
"node": ">=22.4"
|