eutaxy 0.17.1 → 0.18.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.
- package/README.md +6 -6
- package/dist/aws.d.mts +2 -2
- package/dist/aws.mjs +2 -2
- package/dist/bin.mjs +1 -1
- package/dist/{cli-CxbXc1j2.mjs → cli-DyA7uTBg.mjs} +801 -449
- package/dist/cli-DyA7uTBg.mjs.map +1 -0
- package/dist/cli.d.mts.map +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/cloudflare.d.mts +22 -3
- package/dist/cloudflare.d.mts.map +1 -1
- package/dist/cloudflare.mjs +3 -3
- package/dist/{delivery-invariants-DO3j1mmD.mjs → delivery-invariants-BRwfZJrs.mjs} +2 -2
- package/dist/{delivery-invariants-DO3j1mmD.mjs.map → delivery-invariants-BRwfZJrs.mjs.map} +1 -1
- package/dist/{delivery-invariants-D7DI7i8x.d.mts → delivery-invariants-D-_GPOqE.d.mts} +2 -2
- package/dist/{delivery-invariants-D7DI7i8x.d.mts.map → delivery-invariants-D-_GPOqE.d.mts.map} +1 -1
- package/dist/{explore-CkKiOuz6.d.mts → explore-D33RP9hF.d.mts} +43 -8
- package/dist/explore-D33RP9hF.d.mts.map +1 -0
- package/dist/index.d.mts +11 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{platform-D4hlJjm3.d.mts → platform-CawKCUru.d.mts} +69 -2
- package/dist/platform-CawKCUru.d.mts.map +1 -0
- package/dist/{src-fxWc6oGc.mjs → src-H1Q8ytEx.mjs} +50 -6
- package/dist/src-H1Q8ytEx.mjs.map +1 -0
- package/dist/{src-D_hHC_-3.mjs → src-Whn0RMSh.mjs} +406 -51
- package/dist/src-Whn0RMSh.mjs.map +1 -0
- package/dist/{workerd-DhrzU6AZ.mjs → workerd-tI8INa6v.mjs} +43 -9
- package/dist/workerd-tI8INa6v.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/cli-CxbXc1j2.mjs.map +0 -1
- package/dist/explore-CkKiOuz6.d.mts.map +0 -1
- package/dist/platform-D4hlJjm3.d.mts.map +0 -1
- package/dist/src-D_hHC_-3.mjs.map +0 -1
- package/dist/src-fxWc6oGc.mjs.map +0 -1
- package/dist/workerd-DhrzU6AZ.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { n as atLeastOncePerMessage$1 } from "./delivery-invariants-
|
|
3
|
-
import { c as checkSpecModule, s as emitRegressionTest, t as renderJson
|
|
1
|
+
import { A as readFaults, E as validateScenario, I as getPath, L as invocationOf, R as redelivery, S as virtualEpoch, T as defaultBounds, _ as parseBody, a as explore, b as withoutNetwork, d as note, f as runInvocation, g as isRedirect, h as findResponse, i as rawRun, j as writeFaults, k as decisionFaults, l as decide, m as InjectedEffectError, n as compareSides, p as CrashSignal, r as proxiedSide, t as observeCore, u as hostInvocation, v as replyOf, w as toJson, x as realTick, y as toResponse, z as canonicalJson } from "./src-Whn0RMSh.mjs";
|
|
2
|
+
import { n as atLeastOncePerMessage$1 } from "./delivery-invariants-BRwfZJrs.mjs";
|
|
3
|
+
import { b as describeVerdict, c as emitUnsupportedTest, l as checkSpecModule, s as emitRegressionTest, t as renderJson } from "./src-H1Q8ytEx.mjs";
|
|
4
4
|
// packages/cli/src/regression.ts
|
|
5
5
|
/**
|
|
6
6
|
* Identifiers for binding names: a qualified name (`orders/DB`) becomes
|
|
@@ -23,6 +23,20 @@ function identifiers(names) {
|
|
|
23
23
|
const key = (binding) => /^[A-Za-z_$][\w$]*$/.test(binding) ? binding : JSON.stringify(binding);
|
|
24
24
|
/** A Vitest regression test for a Cloudflare scenario, to run under the Cloudflare Vitest plugin. */
|
|
25
25
|
function cloudflareRegressionTest(verdict, options) {
|
|
26
|
+
return emitRegressionTest(verdict, {
|
|
27
|
+
...cloudflareTestParts(options),
|
|
28
|
+
...options.expect ? { expect: options.expect } : {}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A Vitest test for a Cloudflare scenario that replays the run that made the check `UNSUPPORTED`
|
|
33
|
+
* (see `emitUnsupportedTest`), to run under the Cloudflare Vitest plugin; `expect` is not used.
|
|
34
|
+
*/
|
|
35
|
+
function cloudflareUnsupportedTest(verdict, options) {
|
|
36
|
+
return emitUnsupportedTest(verdict, cloudflareTestParts(options));
|
|
37
|
+
}
|
|
38
|
+
/** The imports, the platform and scenario expressions and the observers both kinds of test use. */
|
|
39
|
+
function cloudflareTestParts(options) {
|
|
26
40
|
const bindings = Object.keys(options.schemaPaths).sort();
|
|
27
41
|
const callees = Object.keys(options.callees ?? {}).sort();
|
|
28
42
|
/**
|
|
@@ -66,17 +80,16 @@ function cloudflareRegressionTest(verdict, options) {
|
|
|
66
80
|
const retries = options.maxRetries === void 0 ? "" : `, maxRetries: ${options.maxRetries}`;
|
|
67
81
|
const aliases = options.aliases === void 0 || Object.keys(options.aliases).length === 0 ? "" : `, aliases: ${JSON.stringify(options.aliases)}`;
|
|
68
82
|
const objects = options.durableObjects ? ", durableObjects: cloudflareTest" : "";
|
|
69
|
-
return
|
|
83
|
+
return {
|
|
70
84
|
imports,
|
|
71
85
|
platform: `createCloudflarePlatform({ env, ${withExports ? "handler: worker.default" : "handler"}, schemas: ${schemas}${retries}${objects}${withExports ? ", exports: worker" : ""}${calleeOption}${aliases} })`,
|
|
72
86
|
scenario: options.budgetMs === void 0 ? "scenario" : `{ ...scenario, bounds: { ...scenario.bounds, budgetMs: ${options.budgetMs} } }`,
|
|
73
|
-
...options.expect ? { expect: options.expect } : {},
|
|
74
87
|
...options.engineModule ? { engineModule: options.engineModule } : {},
|
|
75
88
|
...options.specModules && options.specModules.length > 0 ? { observe: options.specModules.map((m, i) => ({
|
|
76
89
|
namespace: `core_${i}`,
|
|
77
90
|
functions: m.functions
|
|
78
91
|
})) } : {}
|
|
79
|
-
}
|
|
92
|
+
};
|
|
80
93
|
}
|
|
81
94
|
// packages/cloudflare/src/background.ts
|
|
82
95
|
const CUT_OFF = ["cut_off"];
|
|
@@ -3549,6 +3562,26 @@ function workflowStep(binding, step) {
|
|
|
3549
3562
|
...step === void 0 ? {} : { where: { "args.step": step } }
|
|
3550
3563
|
};
|
|
3551
3564
|
}
|
|
3565
|
+
/**
|
|
3566
|
+
* A fault site (for `bounds.faultsAt`) on a Workflow step's attempts: the
|
|
3567
|
+
* point where an attempt starts (`crash_before`, `ambiguous`) and the one
|
|
3568
|
+
* where its result is persisted (`crash_after`, `ambiguous`), of every
|
|
3569
|
+
* attempt or only `attempt` (from 1), of the kinds `faults` lists or every
|
|
3570
|
+
* kind those points allow. It matches every step of that name in every
|
|
3571
|
+
* instance of the binding's Workflow.
|
|
3572
|
+
*/
|
|
3573
|
+
function stepFaults(binding, step, options = {}) {
|
|
3574
|
+
const { attempt } = options;
|
|
3575
|
+
if (attempt !== void 0 && !(Number.isInteger(attempt) && attempt >= 1)) throw new RangeError(`stepFaults: attempt counts from 1, got ${attempt}`);
|
|
3576
|
+
return {
|
|
3577
|
+
target: `Workflow:${binding}`,
|
|
3578
|
+
where: {
|
|
3579
|
+
"args.step": step,
|
|
3580
|
+
...options.attempt === void 0 ? {} : { "args.attempt": options.attempt }
|
|
3581
|
+
},
|
|
3582
|
+
...options.faults === void 0 ? {} : { faults: options.faults }
|
|
3583
|
+
};
|
|
3584
|
+
}
|
|
3552
3585
|
/** A Workflow's instances at the end of the run as rows `{ id, status, params, output?, error? }`. */
|
|
3553
3586
|
function workflowRows(binding, where) {
|
|
3554
3587
|
const target = `Workflow:${binding}`;
|
|
@@ -3928,7 +3961,8 @@ function defineScenario(input) {
|
|
|
3928
3961
|
...defaultBounds,
|
|
3929
3962
|
...input.bounds
|
|
3930
3963
|
},
|
|
3931
|
-
...input.specs ? { specs: input.specs } : {}
|
|
3964
|
+
...input.specs ? { specs: input.specs } : {},
|
|
3965
|
+
...input.pinned ? { pinned: input.pinned } : {}
|
|
3932
3966
|
};
|
|
3933
3967
|
const errors = [
|
|
3934
3968
|
...validateScenario(spec),
|
|
@@ -6295,6 +6329,6 @@ async function checkInWorkerd(input) {
|
|
|
6295
6329
|
}))
|
|
6296
6330
|
};
|
|
6297
6331
|
}
|
|
6298
|
-
export { r2Bucket as A,
|
|
6332
|
+
export { r2Bucket as A, stepFaults as B, fetchCall as C, objectCall as D, implies as E, rpc as F, workflowRows as G, webSocketReceived as H, rpcResponse as I, cloudflareRegressionTest as J, workflowStep as K, scriptedObject as L, r2Rows as M, references as N, queue as O, refines as P, service as R, external as S, httpResponse as T, websocket as U, unique as V, workflow as W, cloudflareUnsupportedTest as Y, defineScenario as _, createCloudflarePlatform as a, durableObjectTable as b, calleeEnv as c, cron as d, d1Param as f, d1Write as g, d1Schema as h, runDifferential as i, r2Op as j, queueAck as k, atLeastOncePerMessage as l, d1Rows as m, globKey as n, check as o, d1Read as p, snapshotD1 as q, specKey as r, expectHolds as s, checkInWorkerd as t, callee as u, durableObject as v, http as w, everyRow as x, durableObjectRows as y, serviceCall as z };
|
|
6299
6333
|
|
|
6300
|
-
//# sourceMappingURL=workerd-
|
|
6334
|
+
//# sourceMappingURL=workerd-tI8INa6v.mjs.map
|