@voyantjs/workflows-orchestrator-node 0.107.7 → 0.107.9
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-standalone-driver.d.ts","sourceRoot":"","sources":["../src/node-standalone-driver.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EACV,aAAa,EAOd,MAAM,4BAA4B,CAAA;AAInC,OAAO,EAML,KAAK,SAAS,EAId,KAAK,WAAW,EAEjB,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAWxD,KAAK,EAAE,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAA;AAIpC,MAAM,WAAW,2BAA2B;IAC1C,4EAA4E;IAC5E,EAAE,EAAE,EAAE,CAAA;IACN,wEAAwE;IACxE,kBAAkB,CAAC,EAAE,YAAY,GAAG,SAAS,GAAG,aAAa,CAAA;IAC7D,wDAAwD;IACxD,UAAU,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC,CAAA;IACpC,gDAAgD;IAChD,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,2DAA2D;IAC3D,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,2EAA2E;IAC3E,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC;
|
|
1
|
+
{"version":3,"file":"node-standalone-driver.d.ts","sourceRoot":"","sources":["../src/node-standalone-driver.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EACV,aAAa,EAOd,MAAM,4BAA4B,CAAA;AAInC,OAAO,EAML,KAAK,SAAS,EAId,KAAK,WAAW,EAEjB,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAWxD,KAAK,EAAE,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAA;AAIpC,MAAM,WAAW,2BAA2B;IAC1C,4EAA4E;IAC5E,EAAE,EAAE,EAAE,CAAA;IACN,wEAAwE;IACxE,kBAAkB,CAAC,EAAE,YAAY,GAAG,SAAS,GAAG,aAAa,CAAA;IAC7D,wDAAwD;IACxD,UAAU,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC,CAAA;IACpC,gDAAgD;IAChD,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,2DAA2D;IAC3D,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,2EAA2E;IAC3E,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC;AA+FD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,2BAA2B,GAAG,aAAa,CAuX3F"}
|
|
@@ -35,13 +35,14 @@ function serializeWorkflowManifest(manifest) {
|
|
|
35
35
|
return { ...manifest };
|
|
36
36
|
}
|
|
37
37
|
function deserializeWorkflowManifest(manifest) {
|
|
38
|
-
const { schemaVersion, projectId, versionId, builtAt, builderVersion, capabilities, workflows, eventFilters, bindings, environments, } = manifest;
|
|
38
|
+
const { schemaVersion, projectId, versionId, builtAt, builderVersion, capabilities, workflows, eventFilters, diagnostics, bindings, environments, } = manifest;
|
|
39
|
+
const normalizedCapabilities = normalizeManifestCapabilities(capabilities);
|
|
39
40
|
if (schemaVersion !== 1 ||
|
|
40
41
|
typeof projectId !== "string" ||
|
|
41
42
|
typeof versionId !== "string" ||
|
|
42
43
|
typeof builtAt !== "number" ||
|
|
43
44
|
typeof builderVersion !== "string" ||
|
|
44
|
-
!
|
|
45
|
+
!normalizedCapabilities ||
|
|
45
46
|
!Array.isArray(workflows) ||
|
|
46
47
|
!Array.isArray(eventFilters) ||
|
|
47
48
|
!isRecord(bindings) ||
|
|
@@ -54,9 +55,10 @@ function deserializeWorkflowManifest(manifest) {
|
|
|
54
55
|
versionId,
|
|
55
56
|
builtAt,
|
|
56
57
|
builderVersion,
|
|
57
|
-
capabilities,
|
|
58
|
+
capabilities: normalizedCapabilities,
|
|
58
59
|
workflows: workflows,
|
|
59
60
|
eventFilters: eventFilters,
|
|
61
|
+
diagnostics: Array.isArray(diagnostics) ? diagnostics : [],
|
|
60
62
|
bindings: bindings,
|
|
61
63
|
environments: environments,
|
|
62
64
|
};
|
|
@@ -64,8 +66,33 @@ function deserializeWorkflowManifest(manifest) {
|
|
|
64
66
|
function isRecord(value) {
|
|
65
67
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
66
68
|
}
|
|
67
|
-
function
|
|
68
|
-
|
|
69
|
+
function normalizeManifestCapabilities(value) {
|
|
70
|
+
if (isRecord(value)) {
|
|
71
|
+
return {
|
|
72
|
+
trigger: value.trigger === true,
|
|
73
|
+
events: value.events === true,
|
|
74
|
+
schedules: value.schedules === true,
|
|
75
|
+
rerun: value.rerun === true,
|
|
76
|
+
resume: value.resume === true,
|
|
77
|
+
cancel: value.cancel === true,
|
|
78
|
+
humanApproval: value.humanApproval === true,
|
|
79
|
+
stepRerun: value.stepRerun === true,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
if (Array.isArray(value) && value.every((item) => typeof item === "string")) {
|
|
83
|
+
const legacy = new Set(value);
|
|
84
|
+
return {
|
|
85
|
+
trigger: legacy.has("trigger"),
|
|
86
|
+
events: legacy.has("events") || legacy.has("events:v1"),
|
|
87
|
+
schedules: legacy.has("schedules"),
|
|
88
|
+
rerun: legacy.has("rerun"),
|
|
89
|
+
resume: legacy.has("resume"),
|
|
90
|
+
cancel: legacy.has("cancel"),
|
|
91
|
+
humanApproval: legacy.has("human-approval"),
|
|
92
|
+
stepRerun: legacy.has("step-rerun"),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
return undefined;
|
|
69
96
|
}
|
|
70
97
|
/**
|
|
71
98
|
* Build the Mode 2 driver factory. The factory closes over its options
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/workflows-orchestrator-node",
|
|
3
|
-
"version": "0.107.
|
|
3
|
+
"version": "0.107.9",
|
|
4
4
|
"description": "Node/Docker runtime primitives for @voyantjs/workflows-orchestrator, including a file-backed run store and local scheduler.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"drizzle-orm": "^0.45.2",
|
|
31
31
|
"pg": "^8.20.0",
|
|
32
|
-
"@voyantjs/workflows-orchestrator": "^0.107.
|
|
33
|
-
"@voyantjs/workflows": "^0.107.
|
|
32
|
+
"@voyantjs/workflows-orchestrator": "^0.107.9",
|
|
33
|
+
"@voyantjs/workflows": "^0.107.9"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/node": "^20.12.0",
|
|
37
37
|
"@types/pg": "^8.20.0",
|
|
38
38
|
"drizzle-kit": "^0.31.10",
|
|
39
39
|
"typescript": "^5.9.2",
|
|
40
|
-
"vitest": "^3.2.
|
|
40
|
+
"vitest": "^3.2.6",
|
|
41
41
|
"@voyantjs/voyant-typescript-config": "^0.1.0"
|
|
42
42
|
},
|
|
43
43
|
"publishConfig": {
|
|
@@ -140,9 +140,11 @@ function deserializeWorkflowManifest(manifest: Record<string, unknown>): Workflo
|
|
|
140
140
|
capabilities,
|
|
141
141
|
workflows,
|
|
142
142
|
eventFilters,
|
|
143
|
+
diagnostics,
|
|
143
144
|
bindings,
|
|
144
145
|
environments,
|
|
145
146
|
} = manifest
|
|
147
|
+
const normalizedCapabilities = normalizeManifestCapabilities(capabilities)
|
|
146
148
|
|
|
147
149
|
if (
|
|
148
150
|
schemaVersion !== 1 ||
|
|
@@ -150,7 +152,7 @@ function deserializeWorkflowManifest(manifest: Record<string, unknown>): Workflo
|
|
|
150
152
|
typeof versionId !== "string" ||
|
|
151
153
|
typeof builtAt !== "number" ||
|
|
152
154
|
typeof builderVersion !== "string" ||
|
|
153
|
-
!
|
|
155
|
+
!normalizedCapabilities ||
|
|
154
156
|
!Array.isArray(workflows) ||
|
|
155
157
|
!Array.isArray(eventFilters) ||
|
|
156
158
|
!isRecord(bindings) ||
|
|
@@ -165,9 +167,10 @@ function deserializeWorkflowManifest(manifest: Record<string, unknown>): Workflo
|
|
|
165
167
|
versionId,
|
|
166
168
|
builtAt,
|
|
167
169
|
builderVersion,
|
|
168
|
-
capabilities,
|
|
170
|
+
capabilities: normalizedCapabilities,
|
|
169
171
|
workflows: workflows as WorkflowManifest["workflows"],
|
|
170
172
|
eventFilters: eventFilters as WorkflowManifest["eventFilters"],
|
|
173
|
+
diagnostics: Array.isArray(diagnostics) ? (diagnostics as WorkflowManifest["diagnostics"]) : [],
|
|
171
174
|
bindings: bindings as WorkflowManifest["bindings"],
|
|
172
175
|
environments: environments as WorkflowManifest["environments"],
|
|
173
176
|
}
|
|
@@ -177,8 +180,35 @@ function isRecord(value: unknown): value is Record<string, unknown> {
|
|
|
177
180
|
return typeof value === "object" && value !== null && !Array.isArray(value)
|
|
178
181
|
}
|
|
179
182
|
|
|
180
|
-
function
|
|
181
|
-
|
|
183
|
+
function normalizeManifestCapabilities(
|
|
184
|
+
value: unknown,
|
|
185
|
+
): WorkflowManifest["capabilities"] | undefined {
|
|
186
|
+
if (isRecord(value)) {
|
|
187
|
+
return {
|
|
188
|
+
trigger: value.trigger === true,
|
|
189
|
+
events: value.events === true,
|
|
190
|
+
schedules: value.schedules === true,
|
|
191
|
+
rerun: value.rerun === true,
|
|
192
|
+
resume: value.resume === true,
|
|
193
|
+
cancel: value.cancel === true,
|
|
194
|
+
humanApproval: value.humanApproval === true,
|
|
195
|
+
stepRerun: value.stepRerun === true,
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
if (Array.isArray(value) && value.every((item) => typeof item === "string")) {
|
|
199
|
+
const legacy = new Set(value)
|
|
200
|
+
return {
|
|
201
|
+
trigger: legacy.has("trigger"),
|
|
202
|
+
events: legacy.has("events") || legacy.has("events:v1"),
|
|
203
|
+
schedules: legacy.has("schedules"),
|
|
204
|
+
rerun: legacy.has("rerun"),
|
|
205
|
+
resume: legacy.has("resume"),
|
|
206
|
+
cancel: legacy.has("cancel"),
|
|
207
|
+
humanApproval: legacy.has("human-approval"),
|
|
208
|
+
stepRerun: legacy.has("step-rerun"),
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return undefined
|
|
182
212
|
}
|
|
183
213
|
|
|
184
214
|
/**
|