statelyai 0.11.4 → 0.11.6
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/README.md +11 -6
- package/dist/bin.mjs +1 -1
- package/dist/cli-Du92Y4VA.mjs +16826 -0
- package/dist/index.d.mts +202 -1
- package/dist/index.mjs +1 -1
- package/package.json +4 -3
- package/dist/cli-D8HHGEMs.mjs +0 -3073
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command } from "@oclif/core";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { ConnectedRepo, CreateProjectInput, OAuthAuthorizationServerMetadata, OAuthProtectedResourceMetadata, ProjectData, ProjectMachineSummary, StudioClient } from "@statelyai/sdk";
|
|
4
|
-
import {
|
|
4
|
+
import { StatelyGraph } from "@statelyai/sdk/graph";
|
|
5
5
|
import * as _oclif_core_interfaces0 from "@oclif/core/interfaces";
|
|
6
6
|
|
|
7
7
|
//#region src/verifyCommand.d.ts
|
|
@@ -71,6 +71,207 @@ declare function createStatelyProjectConfig(options: {
|
|
|
71
71
|
defaultXStateVersion?: number;
|
|
72
72
|
}): StatelyProjectConfig;
|
|
73
73
|
//#endregion
|
|
74
|
+
//#region ../../node_modules/.pnpm/@statelyai+graph@2.1.0_@statelyai+layout@0.1.2_cytoscape@3.34.0_d3-force@3.0.0_d3-hiera_3600605a69f548f83255fd3d12957cf4/node_modules/@statelyai/graph/dist/types-BAEQTwK_.d.mts
|
|
75
|
+
//#region src/types.d.ts
|
|
76
|
+
/**
|
|
77
|
+
* Directedness of a graph or an individual edge.
|
|
78
|
+
*
|
|
79
|
+
* - `'directed'` — edge points from source to target.
|
|
80
|
+
* - `'undirected'` — edge has no direction; traversable both ways.
|
|
81
|
+
* - `'bidirectional'` — edge points both ways (arrows on both ends).
|
|
82
|
+
*
|
|
83
|
+
* Set at the graph level as the default ({@link Graph.mode}); individual edges
|
|
84
|
+
* may override it ({@link GraphEdge.mode}).
|
|
85
|
+
*/
|
|
86
|
+
type GraphMode = 'directed' | 'undirected' | 'bidirectional';
|
|
87
|
+
/** A 2D point, used for edge routing waypoints. */
|
|
88
|
+
interface Point {
|
|
89
|
+
x: number;
|
|
90
|
+
y: number;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* How an edge's {@link GraphEdge.points} should be interpreted by renderers:
|
|
94
|
+
*
|
|
95
|
+
* - `'polyline'` — straight segments through the points.
|
|
96
|
+
* - `'orthogonal'` — axis-aligned segments (ELK layered routing).
|
|
97
|
+
* - `'splines'` — bezier control points (Graphviz convention: 3n+1 chained
|
|
98
|
+
* cubic curves, tail → head).
|
|
99
|
+
*/
|
|
100
|
+
type EdgeRouting = 'polyline' | 'orthogonal' | 'splines';
|
|
101
|
+
/** Shared optional visual/style props for nodes, edges, ports. */
|
|
102
|
+
interface GraphEntity {
|
|
103
|
+
x?: number;
|
|
104
|
+
y?: number;
|
|
105
|
+
width?: number;
|
|
106
|
+
height?: number;
|
|
107
|
+
style?: Record<string, string | number | boolean>;
|
|
108
|
+
}
|
|
109
|
+
/** Visual entity base — required position/size. */
|
|
110
|
+
type PortDirection = 'in' | 'out' | 'inout';
|
|
111
|
+
interface PortConfig<TPortData = any> extends GraphEntity {
|
|
112
|
+
name: string;
|
|
113
|
+
direction?: PortDirection;
|
|
114
|
+
label?: string;
|
|
115
|
+
data?: TPortData;
|
|
116
|
+
}
|
|
117
|
+
interface GraphPort<TPortData = any> extends GraphEntity {
|
|
118
|
+
name: string;
|
|
119
|
+
direction: PortDirection;
|
|
120
|
+
label?: string;
|
|
121
|
+
data: TPortData;
|
|
122
|
+
}
|
|
123
|
+
interface NodeConfig<TNodeData = any, TPortData = any> extends GraphEntity {
|
|
124
|
+
id: string;
|
|
125
|
+
parentId?: string | null;
|
|
126
|
+
initialNodeId?: string | null;
|
|
127
|
+
label?: string | null;
|
|
128
|
+
data?: TNodeData;
|
|
129
|
+
ports?: PortConfig<TPortData>[];
|
|
130
|
+
shape?: string;
|
|
131
|
+
color?: string;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Note on edge geometry: an edge's `x`/`y`/`width`/`height` are canonically
|
|
135
|
+
* the **label rect** (top-left + size). Layout adapters write computed edge
|
|
136
|
+
* label positions here, and engines that need label dimensions as input
|
|
137
|
+
* (dagre, ELK) read `width`/`height`. The edge's *route* lives in
|
|
138
|
+
* {@link EdgeConfig.points}.
|
|
139
|
+
*/
|
|
140
|
+
interface EdgeConfig<TEdgeData = any> extends GraphEntity {
|
|
141
|
+
/**
|
|
142
|
+
* The id of the edge.
|
|
143
|
+
*/
|
|
144
|
+
id: string;
|
|
145
|
+
/**
|
|
146
|
+
* The id of the source node.
|
|
147
|
+
*/
|
|
148
|
+
sourceId: string;
|
|
149
|
+
/**
|
|
150
|
+
* The id of the target node.
|
|
151
|
+
*/
|
|
152
|
+
targetId: string;
|
|
153
|
+
/**
|
|
154
|
+
* The label of the edge.
|
|
155
|
+
*/
|
|
156
|
+
label?: string | null;
|
|
157
|
+
/**
|
|
158
|
+
* Optional numeric weight for the edge.
|
|
159
|
+
* Used by pathfinding, MST, and other weighted algorithms.
|
|
160
|
+
* When `getWeight` is not provided, algorithms default to `edge.weight ?? 1`.
|
|
161
|
+
*/
|
|
162
|
+
weight?: number;
|
|
163
|
+
/** Port name on the source node this edge connects from. */
|
|
164
|
+
sourcePort?: string;
|
|
165
|
+
/** Port name on the target node this edge connects to. */
|
|
166
|
+
targetPort?: string;
|
|
167
|
+
/**
|
|
168
|
+
* Per-edge directedness override. When absent, the edge inherits the graph's
|
|
169
|
+
* {@link GraphConfig.mode}.
|
|
170
|
+
*/
|
|
171
|
+
mode?: GraphMode;
|
|
172
|
+
/**
|
|
173
|
+
* Edge route waypoints (including endpoints, tail → head), as computed by a
|
|
174
|
+
* layout engine. Interpretation is governed by {@link EdgeConfig.routing}.
|
|
175
|
+
*/
|
|
176
|
+
points?: Point[];
|
|
177
|
+
/** How {@link EdgeConfig.points} should be interpreted. Default: polyline. */
|
|
178
|
+
routing?: EdgeRouting;
|
|
179
|
+
data?: TEdgeData;
|
|
180
|
+
color?: string;
|
|
181
|
+
}
|
|
182
|
+
interface GraphNode<TNodeData = any, TPortData = any> extends GraphEntity {
|
|
183
|
+
type: 'node';
|
|
184
|
+
id: string;
|
|
185
|
+
parentId?: string | null;
|
|
186
|
+
initialNodeId?: string | null;
|
|
187
|
+
label?: string | null;
|
|
188
|
+
data: TNodeData;
|
|
189
|
+
ports?: GraphPort<TPortData>[];
|
|
190
|
+
shape?: string;
|
|
191
|
+
color?: string;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Note on edge geometry: an edge's `x`/`y`/`width`/`height` are canonically
|
|
195
|
+
* the **label rect** (top-left + size); the edge's *route* lives in
|
|
196
|
+
* {@link GraphEdge.points}. See {@link EdgeConfig} for details.
|
|
197
|
+
*/
|
|
198
|
+
interface GraphEdge<TEdgeData = any> extends GraphEntity {
|
|
199
|
+
type: 'edge';
|
|
200
|
+
id: string;
|
|
201
|
+
sourceId: string;
|
|
202
|
+
targetId: string;
|
|
203
|
+
label?: string | null;
|
|
204
|
+
/**
|
|
205
|
+
* Optional numeric weight for the edge.
|
|
206
|
+
* Used by pathfinding, MST, and other weighted algorithms.
|
|
207
|
+
* When `getWeight` is not provided, algorithms default to `edge.weight ?? 1`.
|
|
208
|
+
*/
|
|
209
|
+
weight?: number;
|
|
210
|
+
/** Port name on the source node this edge connects from. */
|
|
211
|
+
sourcePort?: string;
|
|
212
|
+
/** Port name on the target node this edge connects to. */
|
|
213
|
+
targetPort?: string;
|
|
214
|
+
/**
|
|
215
|
+
* Per-edge directedness override. When absent, the edge inherits the graph's
|
|
216
|
+
* {@link Graph.mode}.
|
|
217
|
+
*/
|
|
218
|
+
mode?: GraphMode;
|
|
219
|
+
/**
|
|
220
|
+
* Edge route waypoints (including endpoints, tail → head), as computed by a
|
|
221
|
+
* layout engine. Interpretation is governed by {@link GraphEdge.routing}.
|
|
222
|
+
*/
|
|
223
|
+
points?: Point[];
|
|
224
|
+
/** How {@link GraphEdge.points} should be interpreted. Default: polyline. */
|
|
225
|
+
routing?: EdgeRouting;
|
|
226
|
+
data: TEdgeData;
|
|
227
|
+
color?: string;
|
|
228
|
+
}
|
|
229
|
+
interface NodeChange<TNodeData = any> {
|
|
230
|
+
id: string;
|
|
231
|
+
old: Partial<GraphNode<TNodeData>>;
|
|
232
|
+
new: Partial<GraphNode<TNodeData>>;
|
|
233
|
+
}
|
|
234
|
+
interface EdgeChange<TEdgeData = any> {
|
|
235
|
+
id: string;
|
|
236
|
+
old: Partial<GraphEdge<TEdgeData>>;
|
|
237
|
+
new: Partial<GraphEdge<TEdgeData>>;
|
|
238
|
+
}
|
|
239
|
+
interface GraphDiff<TNodeData = any, TEdgeData = any> {
|
|
240
|
+
nodes: {
|
|
241
|
+
added: NodeConfig<TNodeData>[];
|
|
242
|
+
removed: NodeConfig<TNodeData>[];
|
|
243
|
+
updated: NodeChange<TNodeData>[];
|
|
244
|
+
};
|
|
245
|
+
edges: {
|
|
246
|
+
added: EdgeConfig<TEdgeData>[];
|
|
247
|
+
removed: EdgeConfig<TEdgeData>[];
|
|
248
|
+
updated: EdgeChange<TEdgeData>[];
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
//#endregion
|
|
252
|
+
//#region ../editor-sync/dist/sync.d.mts
|
|
253
|
+
type ResolvedSyncInputKind = 'local-file' | 'studio-machine-id' | 'studio-url';
|
|
254
|
+
type SyncInputFormat = 'digraph' | 'graph' | 'xstate';
|
|
255
|
+
interface ResolvedSyncInput {
|
|
256
|
+
kind: ResolvedSyncInputKind;
|
|
257
|
+
locator: string;
|
|
258
|
+
format: SyncInputFormat;
|
|
259
|
+
graph: StatelyGraph;
|
|
260
|
+
remoteMachineId?: string;
|
|
261
|
+
}
|
|
262
|
+
interface SyncPlanSummary {
|
|
263
|
+
hasChanges: boolean;
|
|
264
|
+
nodeChanges: number;
|
|
265
|
+
edgeChanges: number;
|
|
266
|
+
}
|
|
267
|
+
interface SyncPlan {
|
|
268
|
+
source: ResolvedSyncInput;
|
|
269
|
+
target: ResolvedSyncInput;
|
|
270
|
+
diff: GraphDiff;
|
|
271
|
+
summary: SyncPlanSummary;
|
|
272
|
+
warnings: string[];
|
|
273
|
+
}
|
|
274
|
+
//#endregion
|
|
74
275
|
//#region src/cli.d.ts
|
|
75
276
|
interface InitProjectOptions {
|
|
76
277
|
apiKey?: string;
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as scanProjectMachines, D as formatVerificationJUnit, E as verifyProject, O as createStatelyProjectConfig, S as run, T as resolveVerificationRequest, _ as isFileGitDirty, a as discoverMachinesInSource, b as resolveCredentialStatus, c as formatDiscoveredMachines, d as formatProjectStatus, f as formatStoredCredentialSource, g as initProject, h as inferInitProjectName, i as discoverLinkedPullTargets, l as formatMissingNewMachineDirMessage, m as getEnvCredential, n as buildOAuthLoginStart, o as discoverOAuthLogin, p as getEnvApiKey, r as classifyPushCandidates, s as discoverRemoteProjectMachineTargets, t as COMMANDS, u as formatPlanSummary, v as resolveApiKey, w as scanProjectSources, x as resolveProjectStatus, y as resolveConfiguredPullTargets } from "./cli-
|
|
1
|
+
import { C as scanProjectMachines, D as formatVerificationJUnit, E as verifyProject, O as createStatelyProjectConfig, S as run, T as resolveVerificationRequest, _ as isFileGitDirty, a as discoverMachinesInSource, b as resolveCredentialStatus, c as formatDiscoveredMachines, d as formatProjectStatus, f as formatStoredCredentialSource, g as initProject, h as inferInitProjectName, i as discoverLinkedPullTargets, l as formatMissingNewMachineDirMessage, m as getEnvCredential, n as buildOAuthLoginStart, o as discoverOAuthLogin, p as getEnvApiKey, r as classifyPushCandidates, s as discoverRemoteProjectMachineTargets, t as COMMANDS, u as formatPlanSummary, v as resolveApiKey, w as scanProjectSources, x as resolveProjectStatus, y as resolveConfiguredPullTargets } from "./cli-Du92Y4VA.mjs";
|
|
2
2
|
|
|
3
3
|
export { COMMANDS, buildOAuthLoginStart, classifyPushCandidates, createStatelyProjectConfig, discoverLinkedPullTargets, discoverMachinesInSource, discoverOAuthLogin, discoverRemoteProjectMachineTargets, formatDiscoveredMachines, formatMissingNewMachineDirMessage, formatPlanSummary, formatProjectStatus, formatStoredCredentialSource, formatVerificationJUnit, getEnvApiKey, getEnvCredential, inferInitProjectName, initProject, isFileGitDirty, resolveApiKey, resolveConfiguredPullTargets, resolveCredentialStatus, resolveProjectStatus, resolveVerificationRequest, run, scanProjectMachines, scanProjectSources, verifyProject };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "statelyai",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.6",
|
|
4
4
|
"description": "Command-line tools for Stately",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -24,13 +24,14 @@
|
|
|
24
24
|
"typescript": "^5.9.3",
|
|
25
25
|
"ws": "^8.21.0",
|
|
26
26
|
"zod": "^4.4.1",
|
|
27
|
-
"@statelyai/sdk": "0.
|
|
27
|
+
"@statelyai/sdk": "0.35.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/ws": "^8.18.1",
|
|
31
31
|
"tsdown": "0.21.0-beta.2",
|
|
32
32
|
"vitest": "^3.2.4",
|
|
33
|
-
"@statelyai/api-contract": "0.5.
|
|
33
|
+
"@statelyai/api-contract": "0.5.2",
|
|
34
|
+
"@statelyai/editor-sync": "0.1.40"
|
|
34
35
|
},
|
|
35
36
|
"oclif": {
|
|
36
37
|
"bin": "statelyai",
|