@fluidgrids/workflows 2026.1028.2 → 2026.1029.1
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 +72 -10
- package/dist/{activation-DnhG7SmF.d.ts → activation-BnVQMv9y.d.ts} +1 -1
- package/dist/{activation-BBh1p82z.d.cts → activation-CESehfYi.d.cts} +1 -1
- package/dist/{chunk-XHXIDVEC.js → chunk-25BKWR2O.js} +1 -1
- package/dist/{chunk-UK3WM7YZ.cjs → chunk-2B37XAFQ.cjs} +44 -8
- package/dist/{chunk-DJYMDLV5.js → chunk-2DDULZFM.js} +93 -1
- package/dist/{chunk-623FVQSN.cjs → chunk-3FIDHONL.cjs} +104 -0
- package/dist/chunk-6QPOJZT6.cjs +1180 -0
- package/dist/chunk-7ILGCUI6.js +154 -0
- package/dist/chunk-A2OHX3UQ.js +1156 -0
- package/dist/{chunk-VOKMAAJP.js → chunk-A36CCOWS.js} +188 -19
- package/dist/{chunk-FMSW2HDF.cjs → chunk-ELL2RBML.cjs} +0 -14
- package/dist/{chunk-JD2VQIDZ.cjs → chunk-EWYADREB.cjs} +2 -2
- package/dist/{chunk-HWJZVOG7.js → chunk-FQSJI5NV.js} +1 -1
- package/dist/{chunk-ABFZWYHT.js → chunk-FWBRQWRX.js} +156 -48
- package/dist/{chunk-PZCVF76Q.cjs → chunk-I47EENR4.cjs} +209 -40
- package/dist/chunk-J3PYFGKA.cjs +166 -0
- package/dist/{chunk-C5OLWZ42.js → chunk-KXJDRQ6G.js} +1 -13
- package/dist/chunk-M272AHEX.js +25 -0
- package/dist/{chunk-VRHHBPT6.js → chunk-MJ5TGYVG.js} +333 -65
- package/dist/{chunk-SAOBPYYJ.cjs → chunk-NXFBVDOI.cjs} +3 -3
- package/dist/{chunk-XKJA7KX3.js → chunk-OIX4O6UR.js} +38 -2
- package/dist/{chunk-FEW3JBYA.cjs → chunk-OKX3FYIM.cjs} +3 -3
- package/dist/{chunk-M4BBAERY.cjs → chunk-OMY3CKUZ.cjs} +404 -136
- package/dist/chunk-PWIUEWC3.js +81 -0
- package/dist/chunk-Q4MWQNJK.cjs +28 -0
- package/dist/{chunk-P6TA5EZT.cjs → chunk-RUQIMTN5.cjs} +171 -57
- package/dist/{chunk-IISBRUWJ.js → chunk-WXXNCHUY.js} +1 -1
- package/dist/chunk-YHBVMOMK.cjs +87 -0
- package/dist/codegen/index.d.cts +2 -2
- package/dist/codegen/index.d.ts +2 -2
- package/dist/collect-BTHjQaSp.d.ts +86 -0
- package/dist/collect-CSyOg5XC.d.cts +86 -0
- package/dist/{file-BOoHZgoQ.d.cts → file-cgL9l9l8.d.cts} +765 -14
- package/dist/{file-yuPCFU5b.d.ts → file-olQudcx5.d.ts} +765 -14
- package/dist/history/index.cjs +198 -86
- package/dist/history/index.d.cts +49 -10
- package/dist/history/index.d.ts +49 -10
- package/dist/history/index.js +49 -4
- package/dist/index.cjs +64 -51
- package/dist/index.d.cts +9 -53
- package/dist/index.d.ts +9 -53
- package/dist/index.js +5 -4
- package/dist/ir/index.cjs +24 -3
- package/dist/ir/index.d.cts +43 -4
- package/dist/ir/index.d.ts +43 -4
- package/dist/ir/index.js +24 -3
- package/dist/{lower-BzmUz0sq.d.cts → lower-3S6PsqjJ.d.cts} +40 -6
- package/dist/{lower-_-iT4HYs.d.ts → lower-DmZpQ8hJ.d.ts} +40 -6
- package/dist/{manifest-C8N6HDYl.d.ts → manifest-BJjrQt77.d.ts} +1 -1
- package/dist/{manifest-0OLw0i7k.d.cts → manifest-gRI2Q5Fj.d.cts} +1 -1
- package/dist/node-evaluator-SOADN23V.js +14 -0
- package/dist/node-evaluator-YGDEXK4U.cjs +24 -0
- package/dist/quickjs/index.cjs +25 -24
- package/dist/quickjs/index.d.cts +6 -6
- package/dist/quickjs/index.d.ts +6 -6
- package/dist/quickjs/index.js +8 -7
- package/dist/roundtrip/index.cjs +245 -43
- package/dist/roundtrip/index.d.cts +86 -9
- package/dist/roundtrip/index.d.ts +86 -9
- package/dist/roundtrip/index.js +172 -8
- package/dist/runtime/index.cjs +21 -20
- package/dist/runtime/index.d.cts +49 -7
- package/dist/runtime/index.d.ts +49 -7
- package/dist/runtime/index.js +8 -7
- package/dist/testing/index.cjs +514 -74
- package/dist/testing/index.d.cts +127 -10
- package/dist/testing/index.d.ts +127 -10
- package/dist/testing/index.js +480 -42
- package/dist/{types-BGoPzgcl.d.ts → types-Bb2wRnJ5.d.cts} +20 -1
- package/dist/{types-BGoPzgcl.d.cts → types-Bb2wRnJ5.d.ts} +20 -1
- package/dist/{types-DV-HX_Gt.d.ts → types-CQKOhPTa.d.cts} +122 -14
- package/dist/{types-CpBBjaGX.d.cts → types-CnIOinoz.d.ts} +122 -14
- package/dist/{workflow-Bpr3vnA_.d.ts → workflow-8uRU9rhL.d.ts} +2 -2
- package/dist/{workflow-FXUkpIBc.d.cts → workflow-CZOXUlQ5.d.cts} +2 -2
- package/dist/{workflow-C2a05WUJ.d.ts → workflow-DWTPHFbt.d.ts} +124 -12
- package/dist/{workflow-J-yYixny.d.cts → workflow-O6e64ZcG.d.cts} +124 -12
- package/fixtures/histories/auto-upgrade-patched.history.json +276 -0
- package/fixtures/histories/benign-failure.history.json +146 -0
- package/fixtures/histories/cancel-activity-try-cancel.history.json +150 -0
- package/fixtures/histories/child-cancel-wait-requested.history.json +217 -0
- package/fixtures/histories/child-options-roundtrip.history.json +192 -0
- package/fixtures/histories/continue-as-new-last-result.history.json +86 -0
- package/fixtures/histories/continue-as-new-options.history.json +99 -0
- package/fixtures/histories/continue-as-new-r1-long-task-queue.history.json +78 -0
- package/fixtures/histories/continue-as-new-r1-retry-options.history.json +83 -0
- package/fixtures/histories/execution-timeout-chain.history.json +98 -0
- package/fixtures/histories/external-cancel-resolved.history.json +123 -0
- package/fixtures/histories/external-cancel-unknown-target.history.json +127 -0
- package/fixtures/histories/failure-error-types-fails-run.history.json +144 -0
- package/fixtures/histories/handler-drain-warn.history.json +222 -0
- package/fixtures/histories/heartbeat-details-on-retry.history.json +145 -0
- package/fixtures/histories/local-activity-abandoned-at-completion.history.json +73 -0
- package/fixtures/histories/local-activity-cancelled-in-scope.history.json +118 -0
- package/fixtures/histories/local-activity-completed.history.json +157 -0
- package/fixtures/histories/local-activity-failed.history.json +93 -0
- package/fixtures/histories/local-activity-retry-in-task.history.json +88 -0
- package/fixtures/histories/run-retry-last-failure.history.json +90 -0
- package/fixtures/histories/run-timeout.history.json +159 -0
- package/fixtures/histories/schedule-to-start-timeout.history.json +132 -0
- package/fixtures/histories/start-delay-signal-ends-delay.history.json +155 -0
- package/fixtures/histories/typeerror-task-retry-100.history.json +137 -0
- package/package.json +1 -1
- package/schema/history-file.schema.json +283 -2
- package/schema/ir-v2.schema.json +45 -0
- package/schema/run-event.schema.json +264 -2
- package/schema/workflow-command.schema.json +178 -1
- package/schema/workflow-task.schema.json +392 -4
- package/dist/assemble-BLqQ8lSu.d.cts +0 -39
- package/dist/assemble-DWgaXHd-.d.ts +0 -39
- package/dist/chunk-2J6TF7YI.cjs +0 -86
- package/dist/chunk-BO6OVILK.js +0 -79
- package/dist/chunk-DHTLALBL.cjs +0 -80
- package/dist/chunk-I5LR3D2K.js +0 -869
- package/dist/chunk-N23SKIG4.js +0 -73
- package/dist/chunk-QQ6ULXHI.cjs +0 -885
- package/dist/node-evaluator-4MSDKWOG.cjs +0 -22
- package/dist/node-evaluator-SX4LEYQC.js +0 -12
package/dist/ir/index.cjs
CHANGED
|
@@ -212,7 +212,18 @@ var IR_V2_SCHEMA = {
|
|
|
212
212
|
type: ["number", "string"],
|
|
213
213
|
description: "Seconds or a duration string."
|
|
214
214
|
},
|
|
215
|
-
versioningBehavior: { enum: ["PINNED", "AUTO_UPGRADE"] }
|
|
215
|
+
versioningBehavior: { enum: ["PINNED", "AUTO_UPGRADE"] },
|
|
216
|
+
retry: {
|
|
217
|
+
type: "object",
|
|
218
|
+
description: "Run-level retry of DURABLE_FN runs (11 \xA72.17); delays are seconds or duration strings. Graph runs keep their own meaning of retry.",
|
|
219
|
+
properties: {
|
|
220
|
+
maxAttempts: { type: "integer", minimum: 1 },
|
|
221
|
+
initialDelay: { type: ["number", "string"] },
|
|
222
|
+
backoffMultiplier: { type: "number", minimum: 1 },
|
|
223
|
+
maxDelay: { type: ["number", "string"] },
|
|
224
|
+
nonRetryableErrorTypes: { type: "array", items: { type: "string" } }
|
|
225
|
+
}
|
|
226
|
+
}
|
|
216
227
|
}
|
|
217
228
|
},
|
|
218
229
|
interface: {
|
|
@@ -285,7 +296,11 @@ var IR_V2_SCHEMA = {
|
|
|
285
296
|
type: "object",
|
|
286
297
|
properties: {
|
|
287
298
|
interface: { $ref: "#/$defs/interface" },
|
|
288
|
-
taskQueue: { type: "string" }
|
|
299
|
+
taskQueue: { type: "string" },
|
|
300
|
+
config: {
|
|
301
|
+
$ref: "#/$defs/config",
|
|
302
|
+
description: "R2: the run-level settings of this function's workflow() declaration (retry, timeout, executionTimeout, workflowTaskTimeout, versioningBehavior). The service resolves run options per workflowFn from this table, never from the definition-level config, so a same-bundle child started on its parent's definition gets its own settings. Absent: the function declares none."
|
|
303
|
+
}
|
|
289
304
|
}
|
|
290
305
|
}
|
|
291
306
|
},
|
|
@@ -302,7 +317,13 @@ var IR_V2_SCHEMA = {
|
|
|
302
317
|
}
|
|
303
318
|
}
|
|
304
319
|
},
|
|
305
|
-
determinism: { enum: ["isolate", "worker"] }
|
|
320
|
+
determinism: { enum: ["isolate", "worker"] },
|
|
321
|
+
features: {
|
|
322
|
+
type: "array",
|
|
323
|
+
items: { type: "string", minLength: 1 },
|
|
324
|
+
uniqueItems: true,
|
|
325
|
+
description: "Runtime features the bundle uses (C-FEATURES, SDK R2): localActivity, externalCancel, childOptions, canOptions, autoUpgrade, runRetry, timeouts; Phase C adds userActivity, updates, queries, searchAttributes, dynamic and interceptors. A bundle without the field was built before R2 and uses none."
|
|
326
|
+
}
|
|
306
327
|
}
|
|
307
328
|
},
|
|
308
329
|
authoring: {
|
package/dist/ir/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { C as CodeBundleActivityExport, c as CodeBundleWorkflowExport, d as ConnectionRef, E as ErrorType, e as ExecutionSettings,
|
|
1
|
+
import { W as WorkflowDefinition, b as WorkflowInterface, a as JsonObject, P as Position } from '../types-Bb2wRnJ5.cjs';
|
|
2
|
+
export { C as CodeBundleActivityExport, c as CodeBundleWorkflowExport, d as ConnectionRef, E as ErrorType, e as ExecutionSettings, J as Json, L as LegacyCredentialRef, N as NodeArgs, f as NodeErrorConfig, g as NodeTimeout, R as RetryConfig, h as RunOnSetting, i as WorkflowAuthoring, j as WorkflowCode, k as WorkflowConfig, l as WorkflowEdge, m as WorkflowNode, n as WorkflowRunRetryConfig } from '../types-Bb2wRnJ5.cjs';
|
|
3
3
|
export { S as SourceFile, b as buildIdOf, h as hashedProjection, i as irHash, s as sourceHash } from '../hash-CZkTXPCX.cjs';
|
|
4
|
-
import { N as NodeManifest } from '../manifest-
|
|
5
|
-
export { M as ManifestField, a as ManifestHandles, b as ManifestOperation, f as fieldSchema, c as fieldsSchema, d as findManifest, i as isTriggerOperation, o as operationsOf } from '../manifest-
|
|
4
|
+
import { N as NodeManifest } from '../manifest-gRI2Q5Fj.cjs';
|
|
5
|
+
export { M as ManifestField, a as ManifestHandles, b as ManifestOperation, f as fieldSchema, c as fieldsSchema, d as findManifest, i as isTriggerOperation, o as operationsOf } from '../manifest-gRI2Q5Fj.cjs';
|
|
6
6
|
export { P as PathSegment, R as RefRoot, T as TemplatePart, V as ValueRefModel, f as formatRefExpression, a as formatRefTemplate, p as parseRefExpression, b as parseTemplate } from '../expressions-DhHaqyar.cjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -412,6 +412,32 @@ declare const IR_V2_SCHEMA: {
|
|
|
412
412
|
readonly versioningBehavior: {
|
|
413
413
|
readonly enum: readonly ["PINNED", "AUTO_UPGRADE"];
|
|
414
414
|
};
|
|
415
|
+
readonly retry: {
|
|
416
|
+
readonly type: "object";
|
|
417
|
+
readonly description: "Run-level retry of DURABLE_FN runs (11 §2.17); delays are seconds or duration strings. Graph runs keep their own meaning of retry.";
|
|
418
|
+
readonly properties: {
|
|
419
|
+
readonly maxAttempts: {
|
|
420
|
+
readonly type: "integer";
|
|
421
|
+
readonly minimum: 1;
|
|
422
|
+
};
|
|
423
|
+
readonly initialDelay: {
|
|
424
|
+
readonly type: readonly ["number", "string"];
|
|
425
|
+
};
|
|
426
|
+
readonly backoffMultiplier: {
|
|
427
|
+
readonly type: "number";
|
|
428
|
+
readonly minimum: 1;
|
|
429
|
+
};
|
|
430
|
+
readonly maxDelay: {
|
|
431
|
+
readonly type: readonly ["number", "string"];
|
|
432
|
+
};
|
|
433
|
+
readonly nonRetryableErrorTypes: {
|
|
434
|
+
readonly type: "array";
|
|
435
|
+
readonly items: {
|
|
436
|
+
readonly type: "string";
|
|
437
|
+
};
|
|
438
|
+
};
|
|
439
|
+
};
|
|
440
|
+
};
|
|
415
441
|
};
|
|
416
442
|
};
|
|
417
443
|
readonly interface: {
|
|
@@ -531,6 +557,10 @@ declare const IR_V2_SCHEMA: {
|
|
|
531
557
|
readonly taskQueue: {
|
|
532
558
|
readonly type: "string";
|
|
533
559
|
};
|
|
560
|
+
readonly config: {
|
|
561
|
+
readonly $ref: "#/$defs/config";
|
|
562
|
+
readonly description: "R2: the run-level settings of this function's workflow() declaration (retry, timeout, executionTimeout, workflowTaskTimeout, versioningBehavior). The service resolves run options per workflowFn from this table, never from the definition-level config, so a same-bundle child started on its parent's definition gets its own settings. Absent: the function declares none.";
|
|
563
|
+
};
|
|
534
564
|
};
|
|
535
565
|
};
|
|
536
566
|
};
|
|
@@ -556,6 +586,15 @@ declare const IR_V2_SCHEMA: {
|
|
|
556
586
|
readonly determinism: {
|
|
557
587
|
readonly enum: readonly ["isolate", "worker"];
|
|
558
588
|
};
|
|
589
|
+
readonly features: {
|
|
590
|
+
readonly type: "array";
|
|
591
|
+
readonly items: {
|
|
592
|
+
readonly type: "string";
|
|
593
|
+
readonly minLength: 1;
|
|
594
|
+
};
|
|
595
|
+
readonly uniqueItems: true;
|
|
596
|
+
readonly description: "Runtime features the bundle uses (C-FEATURES, SDK R2): localActivity, externalCancel, childOptions, canOptions, autoUpgrade, runRetry, timeouts; Phase C adds userActivity, updates, queries, searchAttributes, dynamic and interceptors. A bundle without the field was built before R2 and uses none.";
|
|
597
|
+
};
|
|
559
598
|
};
|
|
560
599
|
};
|
|
561
600
|
readonly authoring: {
|
package/dist/ir/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { C as CodeBundleActivityExport, c as CodeBundleWorkflowExport, d as ConnectionRef, E as ErrorType, e as ExecutionSettings,
|
|
1
|
+
import { W as WorkflowDefinition, b as WorkflowInterface, a as JsonObject, P as Position } from '../types-Bb2wRnJ5.js';
|
|
2
|
+
export { C as CodeBundleActivityExport, c as CodeBundleWorkflowExport, d as ConnectionRef, E as ErrorType, e as ExecutionSettings, J as Json, L as LegacyCredentialRef, N as NodeArgs, f as NodeErrorConfig, g as NodeTimeout, R as RetryConfig, h as RunOnSetting, i as WorkflowAuthoring, j as WorkflowCode, k as WorkflowConfig, l as WorkflowEdge, m as WorkflowNode, n as WorkflowRunRetryConfig } from '../types-Bb2wRnJ5.js';
|
|
3
3
|
export { S as SourceFile, b as buildIdOf, h as hashedProjection, i as irHash, s as sourceHash } from '../hash-CZkTXPCX.js';
|
|
4
|
-
import { N as NodeManifest } from '../manifest-
|
|
5
|
-
export { M as ManifestField, a as ManifestHandles, b as ManifestOperation, f as fieldSchema, c as fieldsSchema, d as findManifest, i as isTriggerOperation, o as operationsOf } from '../manifest-
|
|
4
|
+
import { N as NodeManifest } from '../manifest-BJjrQt77.js';
|
|
5
|
+
export { M as ManifestField, a as ManifestHandles, b as ManifestOperation, f as fieldSchema, c as fieldsSchema, d as findManifest, i as isTriggerOperation, o as operationsOf } from '../manifest-BJjrQt77.js';
|
|
6
6
|
export { P as PathSegment, R as RefRoot, T as TemplatePart, V as ValueRefModel, f as formatRefExpression, a as formatRefTemplate, p as parseRefExpression, b as parseTemplate } from '../expressions-DhHaqyar.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -412,6 +412,32 @@ declare const IR_V2_SCHEMA: {
|
|
|
412
412
|
readonly versioningBehavior: {
|
|
413
413
|
readonly enum: readonly ["PINNED", "AUTO_UPGRADE"];
|
|
414
414
|
};
|
|
415
|
+
readonly retry: {
|
|
416
|
+
readonly type: "object";
|
|
417
|
+
readonly description: "Run-level retry of DURABLE_FN runs (11 §2.17); delays are seconds or duration strings. Graph runs keep their own meaning of retry.";
|
|
418
|
+
readonly properties: {
|
|
419
|
+
readonly maxAttempts: {
|
|
420
|
+
readonly type: "integer";
|
|
421
|
+
readonly minimum: 1;
|
|
422
|
+
};
|
|
423
|
+
readonly initialDelay: {
|
|
424
|
+
readonly type: readonly ["number", "string"];
|
|
425
|
+
};
|
|
426
|
+
readonly backoffMultiplier: {
|
|
427
|
+
readonly type: "number";
|
|
428
|
+
readonly minimum: 1;
|
|
429
|
+
};
|
|
430
|
+
readonly maxDelay: {
|
|
431
|
+
readonly type: readonly ["number", "string"];
|
|
432
|
+
};
|
|
433
|
+
readonly nonRetryableErrorTypes: {
|
|
434
|
+
readonly type: "array";
|
|
435
|
+
readonly items: {
|
|
436
|
+
readonly type: "string";
|
|
437
|
+
};
|
|
438
|
+
};
|
|
439
|
+
};
|
|
440
|
+
};
|
|
415
441
|
};
|
|
416
442
|
};
|
|
417
443
|
readonly interface: {
|
|
@@ -531,6 +557,10 @@ declare const IR_V2_SCHEMA: {
|
|
|
531
557
|
readonly taskQueue: {
|
|
532
558
|
readonly type: "string";
|
|
533
559
|
};
|
|
560
|
+
readonly config: {
|
|
561
|
+
readonly $ref: "#/$defs/config";
|
|
562
|
+
readonly description: "R2: the run-level settings of this function's workflow() declaration (retry, timeout, executionTimeout, workflowTaskTimeout, versioningBehavior). The service resolves run options per workflowFn from this table, never from the definition-level config, so a same-bundle child started on its parent's definition gets its own settings. Absent: the function declares none.";
|
|
563
|
+
};
|
|
534
564
|
};
|
|
535
565
|
};
|
|
536
566
|
};
|
|
@@ -556,6 +586,15 @@ declare const IR_V2_SCHEMA: {
|
|
|
556
586
|
readonly determinism: {
|
|
557
587
|
readonly enum: readonly ["isolate", "worker"];
|
|
558
588
|
};
|
|
589
|
+
readonly features: {
|
|
590
|
+
readonly type: "array";
|
|
591
|
+
readonly items: {
|
|
592
|
+
readonly type: "string";
|
|
593
|
+
readonly minLength: 1;
|
|
594
|
+
};
|
|
595
|
+
readonly uniqueItems: true;
|
|
596
|
+
readonly description: "Runtime features the bundle uses (C-FEATURES, SDK R2): localActivity, externalCancel, childOptions, canOptions, autoUpgrade, runRetry, timeouts; Phase C adds userActivity, updates, queries, searchAttributes, dynamic and interceptors. A bundle without the field was built before R2 and uses none.";
|
|
597
|
+
};
|
|
559
598
|
};
|
|
560
599
|
};
|
|
561
600
|
readonly authoring: {
|
package/dist/ir/index.js
CHANGED
|
@@ -213,7 +213,18 @@ var IR_V2_SCHEMA = {
|
|
|
213
213
|
type: ["number", "string"],
|
|
214
214
|
description: "Seconds or a duration string."
|
|
215
215
|
},
|
|
216
|
-
versioningBehavior: { enum: ["PINNED", "AUTO_UPGRADE"] }
|
|
216
|
+
versioningBehavior: { enum: ["PINNED", "AUTO_UPGRADE"] },
|
|
217
|
+
retry: {
|
|
218
|
+
type: "object",
|
|
219
|
+
description: "Run-level retry of DURABLE_FN runs (11 \xA72.17); delays are seconds or duration strings. Graph runs keep their own meaning of retry.",
|
|
220
|
+
properties: {
|
|
221
|
+
maxAttempts: { type: "integer", minimum: 1 },
|
|
222
|
+
initialDelay: { type: ["number", "string"] },
|
|
223
|
+
backoffMultiplier: { type: "number", minimum: 1 },
|
|
224
|
+
maxDelay: { type: ["number", "string"] },
|
|
225
|
+
nonRetryableErrorTypes: { type: "array", items: { type: "string" } }
|
|
226
|
+
}
|
|
227
|
+
}
|
|
217
228
|
}
|
|
218
229
|
},
|
|
219
230
|
interface: {
|
|
@@ -286,7 +297,11 @@ var IR_V2_SCHEMA = {
|
|
|
286
297
|
type: "object",
|
|
287
298
|
properties: {
|
|
288
299
|
interface: { $ref: "#/$defs/interface" },
|
|
289
|
-
taskQueue: { type: "string" }
|
|
300
|
+
taskQueue: { type: "string" },
|
|
301
|
+
config: {
|
|
302
|
+
$ref: "#/$defs/config",
|
|
303
|
+
description: "R2: the run-level settings of this function's workflow() declaration (retry, timeout, executionTimeout, workflowTaskTimeout, versioningBehavior). The service resolves run options per workflowFn from this table, never from the definition-level config, so a same-bundle child started on its parent's definition gets its own settings. Absent: the function declares none."
|
|
304
|
+
}
|
|
290
305
|
}
|
|
291
306
|
}
|
|
292
307
|
},
|
|
@@ -303,7 +318,13 @@ var IR_V2_SCHEMA = {
|
|
|
303
318
|
}
|
|
304
319
|
}
|
|
305
320
|
},
|
|
306
|
-
determinism: { enum: ["isolate", "worker"] }
|
|
321
|
+
determinism: { enum: ["isolate", "worker"] },
|
|
322
|
+
features: {
|
|
323
|
+
type: "array",
|
|
324
|
+
items: { type: "string", minLength: 1 },
|
|
325
|
+
uniqueItems: true,
|
|
326
|
+
description: "Runtime features the bundle uses (C-FEATURES, SDK R2): localActivity, externalCancel, childOptions, canOptions, autoUpgrade, runRetry, timeouts; Phase C adds userActivity, updates, queries, searchAttributes, dynamic and interceptors. A bundle without the field was built before R2 and uses none."
|
|
327
|
+
}
|
|
307
328
|
}
|
|
308
329
|
},
|
|
309
330
|
authoring: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { S as SourceFile } from './hash-CZkTXPCX.cjs';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { W as WorkflowDefinition, b as WorkflowInterface, k as WorkflowConfig } from './types-Bb2wRnJ5.cjs';
|
|
3
|
+
import { d as ConnectionResolver, a as CollectedDurableWorkflow } from './collect-CSyOg5XC.cjs';
|
|
4
4
|
import { E as EsbuildApi, L as LowerError } from './lower-types-DQNBfWQn.cjs';
|
|
5
5
|
|
|
6
6
|
/** One vendored package: its version and its files (paths relative to the package root). */
|
|
@@ -20,6 +20,12 @@ interface BuildBundleOptions {
|
|
|
20
20
|
maxSourceBytes?: number;
|
|
21
21
|
/** Largest bundle, in UTF-8 bytes. Default 1.5 MiB (4 MiB with vendored deps). */
|
|
22
22
|
maxBundleBytes?: number;
|
|
23
|
+
/**
|
|
24
|
+
* `external` also returns a source map of the bundle (C-SOURCEMAP) in
|
|
25
|
+
* `map`. The bundle bytes, and so `buildId`, are the same as without it:
|
|
26
|
+
* no `sourceMappingURL` comment is added.
|
|
27
|
+
*/
|
|
28
|
+
sourcemap?: 'external';
|
|
23
29
|
}
|
|
24
30
|
interface BuiltBundle {
|
|
25
31
|
/** The ES module. */
|
|
@@ -33,6 +39,13 @@ interface BuiltBundle {
|
|
|
33
39
|
*/
|
|
34
40
|
sourceHash: string;
|
|
35
41
|
entries: string[];
|
|
42
|
+
/**
|
|
43
|
+
* With `sourcemap: 'external'`: the source map (version 3 JSON) of the
|
|
44
|
+
* bundle. Sources are named like build messages (`workflows/order.ts`,
|
|
45
|
+
* `node_modules/<package>/<path>`, `@fluidgrids/workflows`); the map holds
|
|
46
|
+
* no source contents, which the source archive already has.
|
|
47
|
+
*/
|
|
48
|
+
map?: string;
|
|
36
49
|
}
|
|
37
50
|
/** Node built-in module names (without the `node:` prefix). */
|
|
38
51
|
declare const NODE_BUILTINS: ReadonlySet<string>;
|
|
@@ -87,7 +100,7 @@ interface LowerOptions {
|
|
|
87
100
|
}
|
|
88
101
|
/** A problem `lower()` found in tier-2 sources without running them. */
|
|
89
102
|
interface LowerIssue {
|
|
90
|
-
code: 'durable.phaseC' | 'durable.activityTypeNotAllowed';
|
|
103
|
+
code: 'durable.phaseC' | 'durable.activityTypeNotAllowed' | 'durable.localActivityTimeout';
|
|
91
104
|
message: string;
|
|
92
105
|
module: string;
|
|
93
106
|
}
|
|
@@ -108,9 +121,16 @@ interface LowerResult {
|
|
|
108
121
|
durableExports: Record<string, {
|
|
109
122
|
interface: WorkflowInterface;
|
|
110
123
|
taskQueue: string;
|
|
124
|
+
config?: WorkflowConfig;
|
|
111
125
|
}>;
|
|
112
126
|
/** Findings in tier-2 sources (Phase C features, refused activity node types). */
|
|
113
127
|
issues: LowerIssue[];
|
|
128
|
+
/**
|
|
129
|
+
* Runtime features the bundle uses (C-FEATURES), sorted; written as
|
|
130
|
+
* `code.features` when not empty. The service refuses a feature its
|
|
131
|
+
* workspace flags do not enable.
|
|
132
|
+
*/
|
|
133
|
+
features: string[];
|
|
114
134
|
}
|
|
115
135
|
/**
|
|
116
136
|
* Bundle a project. Exported so services can compute `buildId` without
|
|
@@ -118,12 +138,26 @@ interface LowerResult {
|
|
|
118
138
|
*/
|
|
119
139
|
declare function bundleProject(files: ReadonlyMap<string, string>, entries: readonly string[], esbuild: EsbuildApi): Promise<string>;
|
|
120
140
|
/**
|
|
121
|
-
* Find Phase C features
|
|
122
|
-
*
|
|
141
|
+
* Find Phase C features, refused activity node types and local-activity
|
|
142
|
+
* timeouts over the cap in the modules a tier-2 workflow may run (see
|
|
143
|
+
* {@link durableScanModules}), without running them. The runtime and the service
|
|
123
144
|
* refuse both as well; this reports them before a push.
|
|
124
145
|
*/
|
|
125
146
|
declare function scanDurableSources(files: ReadonlyMap<string, string>, modules: Iterable<string>): LowerIssue[];
|
|
147
|
+
/**
|
|
148
|
+
* The modules a tier-2 workflow may run code from: every source module of a
|
|
149
|
+
* project that declares one (the declaring modules and every helper they may
|
|
150
|
+
* import), sorted. A project without tier-2 workflows has none.
|
|
151
|
+
*/
|
|
152
|
+
declare function durableScanModules(files: ReadonlyMap<string, string>, durable: readonly Pick<CollectedDurableWorkflow, 'module'>[]): string[];
|
|
153
|
+
/**
|
|
154
|
+
* The runtime features (C-FEATURES) of a bundle: what the call sites of every
|
|
155
|
+
* module a tier-2 workflow may run show (project helpers and vendored
|
|
156
|
+
* packages included), and what its declarations' options use, sorted and
|
|
157
|
+
* without duplicates.
|
|
158
|
+
*/
|
|
159
|
+
declare function durableFeatures(files: ReadonlyMap<string, string>, durable: readonly CollectedDurableWorkflow[], deps?: VendoredDeps): string[];
|
|
126
160
|
/** Lower TypeScript sources (tier 1 and tier 2) to IR v2. */
|
|
127
161
|
declare function lower(files: readonly SourceFile[] | Readonly<Record<string, string>>, options?: LowerOptions): Promise<LowerResult>;
|
|
128
162
|
|
|
129
|
-
export { type BuildBundleOptions as B, DeterminismViolationError as D, type Evaluator as E, type LowerIssue as L, NODE_BUILTINS as N, type VendoredDeps as V, type VendoredPackage as a, type BuiltBundle as b, ESBUILD_VERSION as c, EVALUATION_GLOBAL as d, type LowerOptions as e, type LowerResult as f, type LoweredWorkflow as g, buildBundle as h, bundleProject as i, bundleSourceHash as j, defaultEntries as k,
|
|
163
|
+
export { type BuildBundleOptions as B, DeterminismViolationError as D, type Evaluator as E, type LowerIssue as L, NODE_BUILTINS as N, type VendoredDeps as V, type VendoredPackage as a, type BuiltBundle as b, ESBUILD_VERSION as c, EVALUATION_GLOBAL as d, type LowerOptions as e, type LowerResult as f, type LoweredWorkflow as g, buildBundle as h, bundleProject as i, bundleSourceHash as j, defaultEntries as k, durableFeatures as l, durableScanModules as m, lower as n, splitSpecifier as o, resolvePackageEntry as r, scanDurableSources as s };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { S as SourceFile } from './hash-CZkTXPCX.js';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { W as WorkflowDefinition, b as WorkflowInterface, k as WorkflowConfig } from './types-Bb2wRnJ5.js';
|
|
3
|
+
import { d as ConnectionResolver, a as CollectedDurableWorkflow } from './collect-BTHjQaSp.js';
|
|
4
4
|
import { E as EsbuildApi, L as LowerError } from './lower-types-DQNBfWQn.js';
|
|
5
5
|
|
|
6
6
|
/** One vendored package: its version and its files (paths relative to the package root). */
|
|
@@ -20,6 +20,12 @@ interface BuildBundleOptions {
|
|
|
20
20
|
maxSourceBytes?: number;
|
|
21
21
|
/** Largest bundle, in UTF-8 bytes. Default 1.5 MiB (4 MiB with vendored deps). */
|
|
22
22
|
maxBundleBytes?: number;
|
|
23
|
+
/**
|
|
24
|
+
* `external` also returns a source map of the bundle (C-SOURCEMAP) in
|
|
25
|
+
* `map`. The bundle bytes, and so `buildId`, are the same as without it:
|
|
26
|
+
* no `sourceMappingURL` comment is added.
|
|
27
|
+
*/
|
|
28
|
+
sourcemap?: 'external';
|
|
23
29
|
}
|
|
24
30
|
interface BuiltBundle {
|
|
25
31
|
/** The ES module. */
|
|
@@ -33,6 +39,13 @@ interface BuiltBundle {
|
|
|
33
39
|
*/
|
|
34
40
|
sourceHash: string;
|
|
35
41
|
entries: string[];
|
|
42
|
+
/**
|
|
43
|
+
* With `sourcemap: 'external'`: the source map (version 3 JSON) of the
|
|
44
|
+
* bundle. Sources are named like build messages (`workflows/order.ts`,
|
|
45
|
+
* `node_modules/<package>/<path>`, `@fluidgrids/workflows`); the map holds
|
|
46
|
+
* no source contents, which the source archive already has.
|
|
47
|
+
*/
|
|
48
|
+
map?: string;
|
|
36
49
|
}
|
|
37
50
|
/** Node built-in module names (without the `node:` prefix). */
|
|
38
51
|
declare const NODE_BUILTINS: ReadonlySet<string>;
|
|
@@ -87,7 +100,7 @@ interface LowerOptions {
|
|
|
87
100
|
}
|
|
88
101
|
/** A problem `lower()` found in tier-2 sources without running them. */
|
|
89
102
|
interface LowerIssue {
|
|
90
|
-
code: 'durable.phaseC' | 'durable.activityTypeNotAllowed';
|
|
103
|
+
code: 'durable.phaseC' | 'durable.activityTypeNotAllowed' | 'durable.localActivityTimeout';
|
|
91
104
|
message: string;
|
|
92
105
|
module: string;
|
|
93
106
|
}
|
|
@@ -108,9 +121,16 @@ interface LowerResult {
|
|
|
108
121
|
durableExports: Record<string, {
|
|
109
122
|
interface: WorkflowInterface;
|
|
110
123
|
taskQueue: string;
|
|
124
|
+
config?: WorkflowConfig;
|
|
111
125
|
}>;
|
|
112
126
|
/** Findings in tier-2 sources (Phase C features, refused activity node types). */
|
|
113
127
|
issues: LowerIssue[];
|
|
128
|
+
/**
|
|
129
|
+
* Runtime features the bundle uses (C-FEATURES), sorted; written as
|
|
130
|
+
* `code.features` when not empty. The service refuses a feature its
|
|
131
|
+
* workspace flags do not enable.
|
|
132
|
+
*/
|
|
133
|
+
features: string[];
|
|
114
134
|
}
|
|
115
135
|
/**
|
|
116
136
|
* Bundle a project. Exported so services can compute `buildId` without
|
|
@@ -118,12 +138,26 @@ interface LowerResult {
|
|
|
118
138
|
*/
|
|
119
139
|
declare function bundleProject(files: ReadonlyMap<string, string>, entries: readonly string[], esbuild: EsbuildApi): Promise<string>;
|
|
120
140
|
/**
|
|
121
|
-
* Find Phase C features
|
|
122
|
-
*
|
|
141
|
+
* Find Phase C features, refused activity node types and local-activity
|
|
142
|
+
* timeouts over the cap in the modules a tier-2 workflow may run (see
|
|
143
|
+
* {@link durableScanModules}), without running them. The runtime and the service
|
|
123
144
|
* refuse both as well; this reports them before a push.
|
|
124
145
|
*/
|
|
125
146
|
declare function scanDurableSources(files: ReadonlyMap<string, string>, modules: Iterable<string>): LowerIssue[];
|
|
147
|
+
/**
|
|
148
|
+
* The modules a tier-2 workflow may run code from: every source module of a
|
|
149
|
+
* project that declares one (the declaring modules and every helper they may
|
|
150
|
+
* import), sorted. A project without tier-2 workflows has none.
|
|
151
|
+
*/
|
|
152
|
+
declare function durableScanModules(files: ReadonlyMap<string, string>, durable: readonly Pick<CollectedDurableWorkflow, 'module'>[]): string[];
|
|
153
|
+
/**
|
|
154
|
+
* The runtime features (C-FEATURES) of a bundle: what the call sites of every
|
|
155
|
+
* module a tier-2 workflow may run show (project helpers and vendored
|
|
156
|
+
* packages included), and what its declarations' options use, sorted and
|
|
157
|
+
* without duplicates.
|
|
158
|
+
*/
|
|
159
|
+
declare function durableFeatures(files: ReadonlyMap<string, string>, durable: readonly CollectedDurableWorkflow[], deps?: VendoredDeps): string[];
|
|
126
160
|
/** Lower TypeScript sources (tier 1 and tier 2) to IR v2. */
|
|
127
161
|
declare function lower(files: readonly SourceFile[] | Readonly<Record<string, string>>, options?: LowerOptions): Promise<LowerResult>;
|
|
128
162
|
|
|
129
|
-
export { type BuildBundleOptions as B, DeterminismViolationError as D, type Evaluator as E, type LowerIssue as L, NODE_BUILTINS as N, type VendoredDeps as V, type VendoredPackage as a, type BuiltBundle as b, ESBUILD_VERSION as c, EVALUATION_GLOBAL as d, type LowerOptions as e, type LowerResult as f, type LoweredWorkflow as g, buildBundle as h, bundleProject as i, bundleSourceHash as j, defaultEntries as k,
|
|
163
|
+
export { type BuildBundleOptions as B, DeterminismViolationError as D, type Evaluator as E, type LowerIssue as L, NODE_BUILTINS as N, type VendoredDeps as V, type VendoredPackage as a, type BuiltBundle as b, ESBUILD_VERSION as c, EVALUATION_GLOBAL as d, type LowerOptions as e, type LowerResult as f, type LoweredWorkflow as g, buildBundle as h, bundleProject as i, bundleSourceHash as j, defaultEntries as k, durableFeatures as l, durableScanModules as m, lower as n, splitSpecifier as o, resolvePackageEntry as r, scanDurableSources as s };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { createNodeVmEvaluator } from './chunk-25BKWR2O.js';
|
|
2
|
+
import './chunk-A2OHX3UQ.js';
|
|
3
|
+
import './chunk-OIX4O6UR.js';
|
|
4
|
+
import './chunk-FQSJI5NV.js';
|
|
5
|
+
import './chunk-BD7ZPG53.js';
|
|
6
|
+
import './chunk-5LUIDMF4.js';
|
|
7
|
+
import './chunk-JZ4TOOLN.js';
|
|
8
|
+
import './chunk-E2VK7J2C.js';
|
|
9
|
+
import './chunk-7AAZGVKD.js';
|
|
10
|
+
import './chunk-PMCM2OH4.js';
|
|
11
|
+
import './chunk-7ILGCUI6.js';
|
|
12
|
+
import './chunk-LNUQE6D6.js';
|
|
13
|
+
import './chunk-2DDULZFM.js';
|
|
14
|
+
import './chunk-PWIUEWC3.js';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkOKX3FYIM_cjs = require('./chunk-OKX3FYIM.cjs');
|
|
4
|
+
require('./chunk-6QPOJZT6.cjs');
|
|
5
|
+
require('./chunk-2B37XAFQ.cjs');
|
|
6
|
+
require('./chunk-NXFBVDOI.cjs');
|
|
7
|
+
require('./chunk-GBQ33SIZ.cjs');
|
|
8
|
+
require('./chunk-G4UEPUGO.cjs');
|
|
9
|
+
require('./chunk-GVTZMA5C.cjs');
|
|
10
|
+
require('./chunk-QKZL3ONM.cjs');
|
|
11
|
+
require('./chunk-TBDXTV22.cjs');
|
|
12
|
+
require('./chunk-SAENRNBJ.cjs');
|
|
13
|
+
require('./chunk-J3PYFGKA.cjs');
|
|
14
|
+
require('./chunk-FR7KYWRO.cjs');
|
|
15
|
+
require('./chunk-3FIDHONL.cjs');
|
|
16
|
+
require('./chunk-YHBVMOMK.cjs');
|
|
17
|
+
require('./chunk-Z2Y65YOY.cjs');
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
Object.defineProperty(exports, "createNodeVmEvaluator", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return chunkOKX3FYIM_cjs.createNodeVmEvaluator; }
|
|
24
|
+
});
|
package/dist/quickjs/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
var
|
|
6
|
-
require('../chunk-
|
|
3
|
+
var chunk6QPOJZT6_cjs = require('../chunk-6QPOJZT6.cjs');
|
|
4
|
+
require('../chunk-2B37XAFQ.cjs');
|
|
5
|
+
var chunkEWYADREB_cjs = require('../chunk-EWYADREB.cjs');
|
|
6
|
+
require('../chunk-NXFBVDOI.cjs');
|
|
7
7
|
var chunkGBQ33SIZ_cjs = require('../chunk-GBQ33SIZ.cjs');
|
|
8
8
|
require('../chunk-G4UEPUGO.cjs');
|
|
9
9
|
require('../chunk-GVTZMA5C.cjs');
|
|
@@ -11,9 +11,10 @@ require('../chunk-QKZL3ONM.cjs');
|
|
|
11
11
|
require('../chunk-TBDXTV22.cjs');
|
|
12
12
|
var chunkSAENRNBJ_cjs = require('../chunk-SAENRNBJ.cjs');
|
|
13
13
|
require('../chunk-L24YIZY7.cjs');
|
|
14
|
-
require('../chunk-
|
|
15
|
-
require('../chunk-
|
|
16
|
-
require('../chunk-
|
|
14
|
+
require('../chunk-J3PYFGKA.cjs');
|
|
15
|
+
require('../chunk-FR7KYWRO.cjs');
|
|
16
|
+
require('../chunk-3FIDHONL.cjs');
|
|
17
|
+
require('../chunk-YHBVMOMK.cjs');
|
|
17
18
|
var chunkZ2Y65YOY_cjs = require('../chunk-Z2Y65YOY.cjs');
|
|
18
19
|
var module$1 = require('module');
|
|
19
20
|
var url = require('url');
|
|
@@ -33,7 +34,7 @@ function quickjsModuleUrl() {
|
|
|
33
34
|
}
|
|
34
35
|
function parseResult(outcome) {
|
|
35
36
|
if (!chunkSAENRNBJ_cjs.isRecord(outcome))
|
|
36
|
-
return
|
|
37
|
+
return chunkEWYADREB_cjs.failedTaskResult("INTERNAL", "The task worker returned no outcome");
|
|
37
38
|
const typed = outcome;
|
|
38
39
|
if (typed.ok === true && typeof typed.resultJson === "string") {
|
|
39
40
|
try {
|
|
@@ -42,11 +43,11 @@ function parseResult(outcome) {
|
|
|
42
43
|
return parsed;
|
|
43
44
|
} catch {
|
|
44
45
|
}
|
|
45
|
-
return
|
|
46
|
+
return chunkEWYADREB_cjs.failedTaskResult("INTERNAL", "The runtime returned an invalid result");
|
|
46
47
|
}
|
|
47
48
|
if (typed.ok === false && typeof typed.cause === "string")
|
|
48
|
-
return
|
|
49
|
-
return
|
|
49
|
+
return chunkEWYADREB_cjs.failedTaskResult(typed.cause, String(typed.message));
|
|
50
|
+
return chunkEWYADREB_cjs.failedTaskResult("INTERNAL", "The task worker returned an invalid outcome");
|
|
50
51
|
}
|
|
51
52
|
function createWorkflowTaskRunner(options = {}) {
|
|
52
53
|
const poolSize = Math.max(1, Math.floor(options.poolSize ?? 4));
|
|
@@ -89,7 +90,7 @@ function createWorkflowTaskRunner(options = {}) {
|
|
|
89
90
|
if (slots.some((entry) => entry.ready)) return;
|
|
90
91
|
for (const job of queue.splice(0))
|
|
91
92
|
job.resolve(
|
|
92
|
-
|
|
93
|
+
chunkEWYADREB_cjs.failedTaskResult("INTERNAL", `The workflow task threads could not start: ${reason}`)
|
|
93
94
|
);
|
|
94
95
|
};
|
|
95
96
|
const spawn = () => {
|
|
@@ -121,7 +122,7 @@ function createWorkflowTaskRunner(options = {}) {
|
|
|
121
122
|
startFailed(slot, String(message["message"]));
|
|
122
123
|
return;
|
|
123
124
|
}
|
|
124
|
-
if (slot.job) finish(slot,
|
|
125
|
+
if (slot.job) finish(slot, chunkEWYADREB_cjs.failedTaskResult("INTERNAL", String(message["message"])));
|
|
125
126
|
replace(slot);
|
|
126
127
|
}
|
|
127
128
|
});
|
|
@@ -131,7 +132,7 @@ function createWorkflowTaskRunner(options = {}) {
|
|
|
131
132
|
if (slot.job)
|
|
132
133
|
finish(
|
|
133
134
|
slot,
|
|
134
|
-
|
|
135
|
+
chunkEWYADREB_cjs.failedTaskResult(
|
|
135
136
|
outOfMemory ? "ISOLATE_MEMORY" : "INTERNAL",
|
|
136
137
|
outOfMemory ? "The workflow task ran out of memory" : `The task thread failed: ${error.message}`
|
|
137
138
|
)
|
|
@@ -144,7 +145,7 @@ function createWorkflowTaskRunner(options = {}) {
|
|
|
144
145
|
startFailed(slot, "the thread exited while starting");
|
|
145
146
|
return;
|
|
146
147
|
}
|
|
147
|
-
if (slot.job) finish(slot,
|
|
148
|
+
if (slot.job) finish(slot, chunkEWYADREB_cjs.failedTaskResult("INTERNAL", "The task thread exited"));
|
|
148
149
|
replace(slot);
|
|
149
150
|
});
|
|
150
151
|
};
|
|
@@ -159,7 +160,7 @@ function createWorkflowTaskRunner(options = {}) {
|
|
|
159
160
|
slot.timer = setTimeout(() => {
|
|
160
161
|
finish(
|
|
161
162
|
slot,
|
|
162
|
-
|
|
163
|
+
chunkEWYADREB_cjs.failedTaskResult(
|
|
163
164
|
"TASK_TIMEOUT",
|
|
164
165
|
`The workflow task ran past its ${job.timeoutMs} ms budget`
|
|
165
166
|
)
|
|
@@ -194,19 +195,19 @@ function createWorkflowTaskRunner(options = {}) {
|
|
|
194
195
|
};
|
|
195
196
|
return {
|
|
196
197
|
run(bundle, request, runOptions = {}) {
|
|
197
|
-
if (closed) return Promise.resolve(
|
|
198
|
+
if (closed) return Promise.resolve(chunkEWYADREB_cjs.failedTaskResult("INTERNAL", "The task runner is closed"));
|
|
198
199
|
const code = typeof bundle === "string" ? bundle : bundle.code;
|
|
199
200
|
const buildId = typeof bundle === "string" ? void 0 : bundle.buildId;
|
|
200
201
|
if (buildId !== void 0 && !verify(code, buildId))
|
|
201
202
|
return Promise.resolve(
|
|
202
|
-
|
|
203
|
+
chunkEWYADREB_cjs.failedTaskResult("BUNDLE_INTEGRITY", `The bundle does not hash to ${buildId}`)
|
|
203
204
|
);
|
|
204
205
|
let requestJson;
|
|
205
206
|
try {
|
|
206
207
|
requestJson = JSON.stringify(request);
|
|
207
208
|
} catch (error) {
|
|
208
209
|
return Promise.resolve(
|
|
209
|
-
|
|
210
|
+
chunkEWYADREB_cjs.failedTaskResult(
|
|
210
211
|
"INVALID_REQUEST",
|
|
211
212
|
error instanceof Error ? error.message : String(error)
|
|
212
213
|
)
|
|
@@ -226,10 +227,10 @@ function createWorkflowTaskRunner(options = {}) {
|
|
|
226
227
|
async close() {
|
|
227
228
|
closed = true;
|
|
228
229
|
for (const job of queue.splice(0))
|
|
229
|
-
job.resolve(
|
|
230
|
+
job.resolve(chunkEWYADREB_cjs.failedTaskResult("INTERNAL", "The task runner is closed"));
|
|
230
231
|
const all = slots.splice(0);
|
|
231
232
|
for (const slot of all)
|
|
232
|
-
if (slot.job) finish(slot,
|
|
233
|
+
if (slot.job) finish(slot, chunkEWYADREB_cjs.failedTaskResult("INTERNAL", "The task runner is closed"));
|
|
233
234
|
await Promise.all(all.map((slot) => slot.worker.terminate()));
|
|
234
235
|
}
|
|
235
236
|
};
|
|
@@ -240,7 +241,7 @@ function quickjsModuleUrl2() {
|
|
|
240
241
|
try {
|
|
241
242
|
return url.pathToFileURL(module$1.createRequire(chunkZ2Y65YOY_cjs.importMetaUrl).resolve("quickjs-emscripten")).href;
|
|
242
243
|
} catch (error) {
|
|
243
|
-
throw new
|
|
244
|
+
throw new chunk6QPOJZT6_cjs.LowerError(
|
|
244
245
|
`quickjs-emscripten cannot be resolved: ${error instanceof Error ? error.message : String(error)}`,
|
|
245
246
|
"crashed"
|
|
246
247
|
);
|
|
@@ -255,12 +256,12 @@ function createQuickJSEvaluator(options = {}) {
|
|
|
255
256
|
return {
|
|
256
257
|
format: "esm",
|
|
257
258
|
async evaluate(code) {
|
|
258
|
-
const outcome = await
|
|
259
|
+
const outcome = await chunk6QPOJZT6_cjs.runIsolateWorker({
|
|
259
260
|
source: QUICKJS_WORKER_SOURCE,
|
|
260
261
|
workerData: { code, limits, moduleUrl: quickjsModuleUrl2() },
|
|
261
262
|
timeoutMs: limits.timeoutMs
|
|
262
263
|
});
|
|
263
|
-
return
|
|
264
|
+
return chunk6QPOJZT6_cjs.outcomeToCollection(outcome);
|
|
264
265
|
}
|
|
265
266
|
};
|
|
266
267
|
}
|