@protobase/workflows 0.99.15 → 0.100.0

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.
Files changed (48) hide show
  1. package/dist/definition/check-aws.js +80 -0
  2. package/dist/definition/check-definition.d.ts +4 -0
  3. package/dist/definition/check-definition.js +27 -10
  4. package/dist/definition/check-reads.js +9 -4
  5. package/dist/definition/check-schema.js +19 -7
  6. package/dist/definition/dataflow/check-dataflow.js +36 -0
  7. package/dist/definition/dataflow/dependencies.d.ts +17 -0
  8. package/dist/definition/dataflow/dependencies.js +88 -0
  9. package/dist/definition/expression-fields.d.ts +5 -0
  10. package/dist/definition/expression-fields.js +1 -0
  11. package/dist/definition/expressions.d.ts +5 -0
  12. package/dist/definition/graph.js +1 -1
  13. package/dist/definition/parts.d.ts +21 -0
  14. package/dist/definition/parts.js +21 -0
  15. package/dist/definition/pins/check-pins.js +40 -0
  16. package/dist/definition/pins/pin-sources.d.ts +33 -0
  17. package/dist/definition/pins/pin-sources.js +78 -0
  18. package/dist/definition/pins/pin-type.d.ts +19 -0
  19. package/dist/definition/pins/pin-type.js +61 -0
  20. package/dist/definition/pins/references.d.ts +32 -0
  21. package/dist/definition/pins/references.js +118 -0
  22. package/dist/definition/pins/resolve-schema.d.ts +21 -0
  23. package/dist/definition/pins/resolve-schema.js +62 -0
  24. package/dist/definition/reads.js +17 -10
  25. package/dist/definition/schema.d.ts +285 -191
  26. package/dist/definition/schema.js +275 -245
  27. package/dist/definition/types.d.ts +16 -4
  28. package/dist/definition/types.js +5 -0
  29. package/dist/definition/visible.js +6 -4
  30. package/dist/index.d.ts +11 -3
  31. package/dist/index.js +12 -3
  32. package/dist/plugin/index.d.ts +2 -1
  33. package/dist/plugin/index.js +2 -1
  34. package/dist/plugin/value-check.d.ts +9 -0
  35. package/dist/plugin/value-check.js +24 -0
  36. package/dist/run/block-state.js +1 -1
  37. package/dist/run/context.d.ts +2 -1
  38. package/dist/run/dataflow.js +183 -0
  39. package/dist/run/position.js +16 -11
  40. package/dist/run/recovery.js +22 -3
  41. package/dist/run/rerun-from.d.ts +8 -5
  42. package/dist/run/rerun-from.js +61 -5
  43. package/dist/run/rerun.d.ts +4 -3
  44. package/dist/run/rerun.js +16 -7
  45. package/dist/run/result-states.js +3 -3
  46. package/dist/run/scope.js +5 -4
  47. package/dist/run/segment.js +5 -2
  48. package/package.json +1 -1
@@ -1,194 +1,183 @@
1
1
  //#region src/definition/schema.d.ts
2
- /**
3
- * The JSON Schema of a workflow definition: its trigger, and a state machine in the States Language with JSONata
4
- * expressions, in the named-reads profile. It checks the shape; `checkDefinition` also checks the edges and what each expression reads.
5
- */
2
+ /** The JSON Schema of a workflow definition whose states run in sequence, the States Language's own order. */
6
3
  export declare const definitionSchema: {
7
- readonly $schema: "http://json-schema.org/draft-07/schema#";
8
- readonly $id: "https://docs.protobase.net/schemas/workflow-definition.json";
9
- readonly $ref: "#/definitions/definition";
10
- readonly definitions: {
11
- readonly machine: {
12
- readonly type: "object";
13
- readonly required: readonly ["StartAt", "States"];
14
- readonly properties: {
15
- readonly StartAt: {
4
+ $schema: string;
5
+ $id: string;
6
+ $ref: string;
7
+ definitions: {
8
+ machine: {
9
+ type: string;
10
+ required: string[];
11
+ properties: {
12
+ StartAt: {
16
13
  type: string;
17
14
  minLength: number;
18
15
  maxLength: number;
19
16
  };
20
- readonly Comment: {
21
- readonly type: "string";
17
+ Comment: {
18
+ type: string;
22
19
  };
23
- readonly States: {
24
- readonly type: "object";
25
- readonly minProperties: 1;
26
- readonly propertyNames: {
20
+ States: {
21
+ type: string;
22
+ minProperties: number;
23
+ propertyNames: {
27
24
  type: string;
28
25
  minLength: number;
29
26
  maxLength: number;
30
27
  };
31
- readonly additionalProperties: {
32
- readonly $ref: "#/definitions/state";
28
+ additionalProperties: {
29
+ $ref: string;
33
30
  };
34
31
  };
35
32
  };
33
+ } | {
34
+ type: string;
35
+ required: string[];
36
+ properties: {
37
+ Comment: {
38
+ type: string;
39
+ };
40
+ States: {
41
+ type: string;
42
+ minProperties: number;
43
+ propertyNames: {
44
+ type: string;
45
+ minLength: number;
46
+ maxLength: number;
47
+ };
48
+ additionalProperties: {
49
+ $ref: string;
50
+ };
51
+ };
52
+ StartAt?: undefined;
53
+ };
36
54
  };
37
- readonly definition: {
38
- readonly type: "object";
39
- readonly additionalProperties: false;
40
- readonly required: readonly ["trigger", "stateMachine"];
41
- readonly properties: {
42
- readonly trigger: {
43
- readonly $ref: "#/definitions/trigger";
55
+ definition: {
56
+ type: string;
57
+ additionalProperties: boolean;
58
+ required: string[];
59
+ properties: {
60
+ trigger: {
61
+ $ref: string;
62
+ };
63
+ order: {
64
+ enum: string[];
44
65
  };
45
- readonly stateMachine: {
46
- readonly $ref: "#/definitions/stateMachine";
66
+ stateMachine: {
67
+ $ref: string;
47
68
  };
48
- readonly connections: {
49
- readonly $ref: "#/definitions/connections";
69
+ connections: {
70
+ $ref: string;
50
71
  };
51
- readonly trace: {
52
- readonly enum: readonly ["all", "failed", "none"];
72
+ trace: {
73
+ enum: string[];
53
74
  };
54
75
  };
55
76
  };
56
- readonly connections: {
57
- readonly type: "object";
58
- readonly propertyNames: {
59
- readonly pattern: "^[a-z][a-z0-9_]*:[a-z][a-z0-9_]*$";
77
+ connections: {
78
+ type: string;
79
+ propertyNames: {
80
+ pattern: string;
60
81
  };
61
- readonly additionalProperties: {
62
- readonly type: "string";
63
- readonly minLength: 1;
64
- readonly maxLength: 255;
82
+ additionalProperties: {
83
+ type: string;
84
+ minLength: number;
85
+ maxLength: number;
65
86
  };
66
87
  };
67
- readonly trigger: {
68
- readonly type: "object";
69
- readonly minProperties: 1;
70
- readonly maxProperties: 1;
71
- readonly propertyNames: {
72
- readonly pattern: "^(manual|[a-z][a-z0-9_]*:[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*)$";
88
+ trigger: {
89
+ type: string;
90
+ minProperties: number;
91
+ maxProperties: number;
92
+ propertyNames: {
93
+ pattern: string;
73
94
  };
74
- readonly properties: {
75
- readonly manual: {
76
- readonly type: "object";
77
- readonly maxProperties: 0;
95
+ properties: {
96
+ manual: {
97
+ type: string;
98
+ maxProperties: number;
78
99
  };
79
100
  };
80
- readonly additionalProperties: {
81
- readonly type: "object";
101
+ additionalProperties: {
102
+ type: string;
82
103
  };
83
104
  };
84
- readonly stateMachine: {
85
- readonly allOf: readonly [{
86
- readonly $ref: "#/definitions/machine";
87
- }];
88
- readonly required: readonly ["QueryLanguage"];
89
- readonly properties: {
90
- readonly QueryLanguage: {
91
- readonly const: "JSONata";
92
- };
93
- readonly StartAt: {};
94
- readonly States: {};
95
- readonly Comment: {};
105
+ stateMachine: {
106
+ allOf: {
107
+ $ref: string;
108
+ }[];
109
+ required: string[];
110
+ properties: {
111
+ States: {};
112
+ Comment: {};
113
+ Version: {
114
+ type: string;
115
+ };
116
+ StartAt?: {} | undefined;
117
+ QueryLanguage: {
118
+ const: string;
119
+ };
96
120
  };
97
- readonly additionalProperties: false;
121
+ additionalProperties: boolean;
98
122
  };
99
- readonly processor: {
100
- readonly allOf: readonly [{
101
- readonly $ref: "#/definitions/machine";
102
- }];
103
- readonly properties: {
104
- readonly ProcessorConfig: {
105
- readonly type: "object";
106
- readonly additionalProperties: false;
107
- readonly properties: {
108
- readonly Mode: {
109
- readonly const: "INLINE";
123
+ processor: {
124
+ allOf: {
125
+ $ref: string;
126
+ }[];
127
+ properties: {
128
+ States: {};
129
+ Comment: {};
130
+ Version: {
131
+ type: string;
132
+ };
133
+ StartAt?: {} | undefined;
134
+ ProcessorConfig: {
135
+ type: string;
136
+ additionalProperties: boolean;
137
+ properties: {
138
+ Mode: {
139
+ const: string;
110
140
  };
111
141
  };
112
142
  };
113
- readonly StartAt: {};
114
- readonly States: {};
115
- readonly Comment: {};
116
143
  };
117
- readonly additionalProperties: false;
144
+ additionalProperties: boolean;
118
145
  };
119
- readonly state: {
120
- readonly type: "object";
121
- readonly required: readonly ["Type"];
122
- readonly discriminator: {
123
- readonly propertyName: "Type";
146
+ state: {
147
+ type: string;
148
+ required: string[];
149
+ discriminator: {
150
+ propertyName: string;
124
151
  };
125
- readonly oneOf: readonly [{
126
- properties: {
127
- Type: {
128
- const: string;
129
- };
130
- Comment: {
131
- type: string;
132
- };
133
- Output: {};
134
- Assign: {
135
- type: string;
136
- propertyNames: {
137
- pattern: string;
138
- };
139
- };
140
- QueryLanguage: {
141
- const: string;
142
- };
143
- };
152
+ oneOf: ({
144
153
  type: string;
145
154
  additionalProperties: boolean;
146
155
  required: string[];
147
- }, {
148
156
  properties: {
149
- Type: {
150
- const: string;
151
- };
152
- Comment: {
157
+ Error: {
153
158
  type: string;
154
159
  };
155
- Output: {};
156
- Assign: {
160
+ Cause: {
157
161
  type: string;
158
- propertyNames: {
159
- pattern: string;
160
- };
161
162
  };
162
- QueryLanguage: {
163
- const: string;
164
- };
165
- };
166
- type: string;
167
- additionalProperties: boolean;
168
- required: string[];
169
- }, {
170
- properties: {
163
+ Condition?: {
164
+ type: string;
165
+ pattern: string;
166
+ } | undefined;
171
167
  Type: {
172
168
  const: string;
173
169
  };
174
170
  Comment: {
175
171
  type: string;
176
172
  };
177
- Output: {};
178
- Assign: {
179
- type: string;
180
- propertyNames: {
181
- pattern: string;
182
- };
183
- };
184
173
  QueryLanguage: {
185
174
  const: string;
186
175
  };
187
176
  };
177
+ } | {
188
178
  type: string;
189
179
  additionalProperties: boolean;
190
180
  required: string[];
191
- }, {
192
181
  properties: {
193
182
  Type: {
194
183
  const: string;
@@ -197,79 +186,193 @@ export declare const definitionSchema: {
197
186
  type: string;
198
187
  };
199
188
  Output: {};
200
- Assign: {
201
- type: string;
202
- propertyNames: {
203
- pattern: string;
204
- };
205
- };
206
189
  QueryLanguage: {
207
190
  const: string;
208
191
  };
209
192
  };
210
- type: string;
211
- additionalProperties: boolean;
212
- required: string[];
213
- }, {
214
- readonly type: "object";
215
- readonly additionalProperties: false;
216
- readonly required: readonly ["Type"];
217
- readonly properties: {
218
- readonly Type: {
219
- readonly const: "Succeed";
220
- };
221
- readonly Comment: {
222
- readonly type: "string";
223
- };
224
- readonly Output: {};
225
- readonly QueryLanguage: {
226
- readonly const: "JSONata";
227
- };
193
+ })[];
194
+ };
195
+ };
196
+ };
197
+ /** The JSON Schema of a workflow definition whose states run in the order their reads give: `"order": "data"`. */
198
+ export declare const dataflowDefinitionSchema: {
199
+ $schema: string;
200
+ $id: string;
201
+ $ref: string;
202
+ definitions: {
203
+ machine: {
204
+ type: string;
205
+ required: string[];
206
+ properties: {
207
+ StartAt: {
208
+ type: string;
209
+ minLength: number;
210
+ maxLength: number;
211
+ };
212
+ Comment: {
213
+ type: string;
228
214
  };
229
- }, {
230
- readonly type: "object";
231
- readonly additionalProperties: false;
232
- readonly required: readonly ["Type"];
233
- readonly properties: {
234
- readonly Type: {
235
- readonly const: "Fail";
215
+ States: {
216
+ type: string;
217
+ minProperties: number;
218
+ propertyNames: {
219
+ type: string;
220
+ minLength: number;
221
+ maxLength: number;
236
222
  };
237
- readonly Comment: {
238
- readonly type: "string";
223
+ additionalProperties: {
224
+ $ref: string;
239
225
  };
240
- readonly QueryLanguage: {
241
- readonly const: "JSONata";
226
+ };
227
+ };
228
+ } | {
229
+ type: string;
230
+ required: string[];
231
+ properties: {
232
+ Comment: {
233
+ type: string;
234
+ };
235
+ States: {
236
+ type: string;
237
+ minProperties: number;
238
+ propertyNames: {
239
+ type: string;
240
+ minLength: number;
241
+ maxLength: number;
242
242
  };
243
- readonly Error: {
244
- readonly type: "string";
243
+ additionalProperties: {
244
+ $ref: string;
245
245
  };
246
- readonly Cause: {
247
- readonly type: "string";
246
+ };
247
+ StartAt?: undefined;
248
+ };
249
+ };
250
+ definition: {
251
+ type: string;
252
+ additionalProperties: boolean;
253
+ required: string[];
254
+ properties: {
255
+ trigger: {
256
+ $ref: string;
257
+ };
258
+ order: {
259
+ enum: string[];
260
+ };
261
+ stateMachine: {
262
+ $ref: string;
263
+ };
264
+ connections: {
265
+ $ref: string;
266
+ };
267
+ trace: {
268
+ enum: string[];
269
+ };
270
+ };
271
+ };
272
+ connections: {
273
+ type: string;
274
+ propertyNames: {
275
+ pattern: string;
276
+ };
277
+ additionalProperties: {
278
+ type: string;
279
+ minLength: number;
280
+ maxLength: number;
281
+ };
282
+ };
283
+ trigger: {
284
+ type: string;
285
+ minProperties: number;
286
+ maxProperties: number;
287
+ propertyNames: {
288
+ pattern: string;
289
+ };
290
+ properties: {
291
+ manual: {
292
+ type: string;
293
+ maxProperties: number;
294
+ };
295
+ };
296
+ additionalProperties: {
297
+ type: string;
298
+ };
299
+ };
300
+ stateMachine: {
301
+ allOf: {
302
+ $ref: string;
303
+ }[];
304
+ required: string[];
305
+ properties: {
306
+ States: {};
307
+ Comment: {};
308
+ Version: {
309
+ type: string;
310
+ };
311
+ StartAt?: {} | undefined;
312
+ QueryLanguage: {
313
+ const: string;
314
+ };
315
+ };
316
+ additionalProperties: boolean;
317
+ };
318
+ processor: {
319
+ allOf: {
320
+ $ref: string;
321
+ }[];
322
+ properties: {
323
+ States: {};
324
+ Comment: {};
325
+ Version: {
326
+ type: string;
327
+ };
328
+ StartAt?: {} | undefined;
329
+ ProcessorConfig: {
330
+ type: string;
331
+ additionalProperties: boolean;
332
+ properties: {
333
+ Mode: {
334
+ const: string;
335
+ };
248
336
  };
249
337
  };
250
- }, {
338
+ };
339
+ additionalProperties: boolean;
340
+ };
341
+ state: {
342
+ type: string;
343
+ required: string[];
344
+ discriminator: {
345
+ propertyName: string;
346
+ };
347
+ oneOf: ({
348
+ type: string;
349
+ additionalProperties: boolean;
350
+ required: string[];
251
351
  properties: {
352
+ Error: {
353
+ type: string;
354
+ };
355
+ Cause: {
356
+ type: string;
357
+ };
358
+ Condition?: {
359
+ type: string;
360
+ pattern: string;
361
+ } | undefined;
252
362
  Type: {
253
363
  const: string;
254
364
  };
255
365
  Comment: {
256
366
  type: string;
257
367
  };
258
- Output: {};
259
- Assign: {
260
- type: string;
261
- propertyNames: {
262
- pattern: string;
263
- };
264
- };
265
368
  QueryLanguage: {
266
369
  const: string;
267
370
  };
268
371
  };
372
+ } | {
269
373
  type: string;
270
374
  additionalProperties: boolean;
271
375
  required: string[];
272
- }, {
273
376
  properties: {
274
377
  Type: {
275
378
  const: string;
@@ -278,20 +381,11 @@ export declare const definitionSchema: {
278
381
  type: string;
279
382
  };
280
383
  Output: {};
281
- Assign: {
282
- type: string;
283
- propertyNames: {
284
- pattern: string;
285
- };
286
- };
287
384
  QueryLanguage: {
288
385
  const: string;
289
386
  };
290
387
  };
291
- type: string;
292
- additionalProperties: boolean;
293
- required: string[];
294
- }];
388
+ })[];
295
389
  };
296
390
  };
297
391
  };