eutaxy 0.16.0 → 0.17.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-DbLlYHTY.mjs → cli-dK6w25AU.mjs} +39 -16
- package/dist/{cli-DbLlYHTY.mjs.map → cli-dK6w25AU.mjs.map} +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/cloudflare.d.mts +16 -3
- package/dist/cloudflare.d.mts.map +1 -1
- package/dist/cloudflare.mjs +2 -2
- package/dist/{delivery-invariants-90c5xBcd.mjs → delivery-invariants-BXCuv43L.mjs} +2 -2
- package/dist/{delivery-invariants-90c5xBcd.mjs.map → delivery-invariants-BXCuv43L.mjs.map} +1 -1
- package/dist/{delivery-invariants-B8ZZnCZg.d.mts → delivery-invariants-D7DI7i8x.d.mts} +2 -2
- package/dist/{delivery-invariants-B8ZZnCZg.d.mts.map → delivery-invariants-D7DI7i8x.d.mts.map} +1 -1
- package/dist/{explore-DlwIUowm.d.mts → explore-Ci-xVeKU.d.mts} +2 -2
- package/dist/{explore-DlwIUowm.d.mts.map → explore-Ci-xVeKU.d.mts.map} +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{platform-DPJTjpSr.d.mts → platform-D4hlJjm3.d.mts} +26 -1
- package/dist/{platform-DPJTjpSr.d.mts.map → platform-D4hlJjm3.d.mts.map} +1 -1
- package/dist/{src-CmHdPsZy.mjs → src-BiX530QY.mjs} +235 -24
- package/dist/src-BiX530QY.mjs.map +1 -0
- package/dist/{src-Dz9Wn2vL.mjs → src-DVqL5Rk_.mjs} +2 -2
- package/dist/{src-Dz9Wn2vL.mjs.map → src-DVqL5Rk_.mjs.map} +1 -1
- package/dist/{workerd-D9cUGjYv.mjs → workerd-b1sqOnVc.mjs} +3786 -3218
- package/dist/workerd-b1sqOnVc.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/src-CmHdPsZy.mjs.map +0 -1
- package/dist/workerd-D9cUGjYv.mjs.map +0 -1
package/dist/cli.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as main } from "./cli-
|
|
1
|
+
export { t as main } from "./cli-dK6w25AU.mjs";
|
package/dist/cloudflare.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as EffectSelector, S as Refines, _ as Implies, a as PlatformData, b as StateQuery, c as WorkerRef, f as Invariant, g as EveryRow, i as ExternalDecl, k as JsonValue, n as Platform, o as ScenarioSpec, r as Bounds, s as ScriptedResponse, u as AtLeastOnce, v as References, x as Unique, y as RowCondition } from "./platform-
|
|
2
|
-
import { n as atMostOncePerKey, t as atLeastOnce } from "./delivery-invariants-
|
|
3
|
-
import { c as ModuleSpecs, g as Violated, m as ScenarioVerdict, t as ExploreOptions } from "./explore-
|
|
1
|
+
import { C as EffectSelector, S as Refines, _ as Implies, a as PlatformData, b as StateQuery, c as WorkerRef, f as Invariant, g as EveryRow, i as ExternalDecl, k as JsonValue, n as Platform, o as ScenarioSpec, r as Bounds, s as ScriptedResponse, u as AtLeastOnce, v as References, x as Unique, y as RowCondition } from "./platform-D4hlJjm3.mjs";
|
|
2
|
+
import { n as atMostOncePerKey, t as atLeastOnce } from "./delivery-invariants-D7DI7i8x.mjs";
|
|
3
|
+
import { c as ModuleSpecs, g as Violated, m as ScenarioVerdict, t as ExploreOptions } from "./explore-Ci-xVeKU.mjs";
|
|
4
4
|
/**
|
|
5
5
|
* What `cloudflareRegressionTest` needs to write the test: import paths of the scenario, the Worker and its
|
|
6
6
|
* schema files, relative to the emitted file, and what the platform was given when the check ran.
|
|
@@ -38,6 +38,8 @@ interface CloudflareRegressionOptions {
|
|
|
38
38
|
readonly path: string;
|
|
39
39
|
readonly entrypoint?: string;
|
|
40
40
|
readonly props?: Readonly<Record<string, unknown>>;
|
|
41
|
+
/** The callee is the scenario's own Worker, called back by a Worker it called. */
|
|
42
|
+
readonly self?: boolean;
|
|
41
43
|
}>>;
|
|
42
44
|
/**
|
|
43
45
|
* The qualified names the callees' bindings had in the check's isolate: the
|
|
@@ -544,6 +546,14 @@ interface CalleeModule {
|
|
|
544
546
|
readonly exports: Readonly<Record<string, unknown>>;
|
|
545
547
|
readonly entrypoint?: string;
|
|
546
548
|
readonly props?: Readonly<Record<string, JsonValue>>;
|
|
549
|
+
/**
|
|
550
|
+
* The module is the scenario's own Worker, reached back through a
|
|
551
|
+
* callee's binding (the Worker it called calls it in turn): it runs with
|
|
552
|
+
* the scenario's env as it is, under its own names, not with a view
|
|
553
|
+
* qualified by `name`, so what it reads and writes there is what the
|
|
554
|
+
* scenario's events read and write.
|
|
555
|
+
*/
|
|
556
|
+
readonly self?: boolean;
|
|
547
557
|
}
|
|
548
558
|
/**
|
|
549
559
|
* The callee's `env`: the scenario's env seen under the callee's own names,
|
|
@@ -687,6 +697,7 @@ interface CheckTransport {
|
|
|
687
697
|
readonly name: string;
|
|
688
698
|
readonly entrypoint?: string;
|
|
689
699
|
readonly props?: Readonly<Record<string, unknown>>;
|
|
700
|
+
readonly self?: boolean;
|
|
690
701
|
}>>;
|
|
691
702
|
/** The aliases the platform ran with, for the regression test. */
|
|
692
703
|
readonly aliases?: Readonly<Record<string, string>>;
|
|
@@ -724,6 +735,8 @@ interface WorkerdCheckInput {
|
|
|
724
735
|
readonly modules: ModuleGlob;
|
|
725
736
|
/** The generated `specs.ts` entries, by module key. */
|
|
726
737
|
readonly specEntries: Readonly<Record<string, SpecEntry>>;
|
|
738
|
+
/** The Worker's module, imported by the generated test when its entry lies outside the scenario's directory. */
|
|
739
|
+
readonly worker?: Readonly<Record<string, unknown>>;
|
|
727
740
|
/** The callees the scenario names, by binding: each one's Worker name and module exports, imported by the generated test. */
|
|
728
741
|
readonly callees?: Readonly<Record<string, CalleeModule>>;
|
|
729
742
|
/** SQL files outside the scenario's directory, by the key `schemasFor` looks up. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloudflare.d.mts","names":[],"sources":["../../cli/src/regression.ts","../../cloudflare/src/r2.ts","../../cloudflare/src/scenario.ts","../../cloudflare/src/callees.ts","../../cloudflare/src/check.ts","../../cloudflare/src/d1.ts","../../cloudflare/src/durable-objects.ts","../../cloudflare/src/platform.ts","../../cloudflare/src/differential.ts","../../cli/src/workerd.ts"],"mappings":";;;;;;;UAOiB;;WAEN;;WAEA;;WAEA,aAAa,SAAS;;;;;WAKtB;;WAEA;;WAEA;;;;;WAKA;;WAEA;;;;;;WAMA,UAAU,SACjB;aAGa;aACA;aACA;aACA,QAAQ,SAAS;;;;;;
|
|
1
|
+
{"version":3,"file":"cloudflare.d.mts","names":[],"sources":["../../cli/src/regression.ts","../../cloudflare/src/r2.ts","../../cloudflare/src/scenario.ts","../../cloudflare/src/callees.ts","../../cloudflare/src/check.ts","../../cloudflare/src/d1.ts","../../cloudflare/src/durable-objects.ts","../../cloudflare/src/platform.ts","../../cloudflare/src/differential.ts","../../cli/src/workerd.ts"],"mappings":";;;;;;;UAOiB;;WAEN;;WAEA;;WAEA,aAAa,SAAS;;;;;WAKtB;;WAEA;;WAEA;;;;;WAKA;;WAEA;;;;;;WAMA,UAAU,SACjB;aAGa;aACA;aACA;aACA,QAAQ,SAAS;;aAEjB;;;;;;WAQN;;WAEA,UAAU,SAAS;WACnB;WACA;;WAEA;aACE;aACA;;;;wBA0BG,yBACd,SAAS,UACT,SAAS;;KCoJC;WAGG;WACA,iBAAiB,SAAS;WAC1B,eAAe,SAAS;;;UC9MtB;WACN;WACA,MAAM;;;UAIA,mBAAmB;WACzB;WACA;WACA;aAA8B;aAAqB,MAAM;;;;UAInD;WACN;WACA;WACA;WACA;cAAsB;;;WAEtB,OAAO;;;KAIN;WACD;WACA;WACA;WACA;cAAqB;;;WAErB,OAAO;;;;;;;;;;;;UAaD,kBAAkB;WACxB;WACA,mBAAmB;WACnB;WACA;WACA;WACA;;;;;;;UAQ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cAAwB;;;WAEnD;aAAmB;cAAwB;;;;WAG3C,UAAU,SACjB;aAGa;aACA;aACA,QAAQ,SAAS;aACjB;;;WAKN,UAAU,SAAS;WACnB;aAA+B;aAAyB;;;UAGlD;WACN;WACA;WACA;;;UAIM;WACN,OAAO;WACP,YAAY;;;KAIX,aAAa,SAAS,qBAAqB;;;;;UA8FtC;;WAEN,UAAU;;WAEV;;WAEA,gBAAgB;;WAEhB,UAAU,SAAS;;WAEnB,SAAS;;WAET,aAAa,SAAS,eAAe;;WAErC,SAAS,SAAS;;WAElB,UAAU,SAAS,eAAe;;WAElC,WAAW,SAAS;;WAEpB,UAAU,SAAS;WACnB;WACA;WACA;WACA;;;wBAIW,eAAe,OAAO,oBAAoB,QAAQ"}
|
package/dist/cloudflare.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { r as atMostOncePerKey, t as atLeastOnce } from "./delivery-invariants-
|
|
2
|
-
import { A as
|
|
1
|
+
import { r as atMostOncePerKey, t as atLeastOnce } from "./delivery-invariants-BXCuv43L.mjs";
|
|
2
|
+
import { A as r2Op, B as websocket, C as fetchCall, D as queue, E as implies, F as rpcResponse, G as cloudflareRegressionTest, H as workflowRows, I as service, L as serviceCall, M as references, N as refines, O as queueAck, P as rpc, R as unique, S as external, T as httpResponse, U as workflowStep, V as workflow, W as snapshotD1, _ as defineScenario, a as createCloudflarePlatform, b as durableObjectTable, c as calleeEnv, d as cron, f as d1Param, g as d1Write, h as d1Schema, i as runDifferential, j as r2Rows, k as r2Bucket, l as atLeastOncePerMessage, m as d1Rows, o as check, p as d1Read, s as expectHolds, t as checkInWorkerd, u as callee, v as durableObject, w as http, x as everyRow, y as durableObjectRows, z as webSocketReceived } from "./workerd-b1sqOnVc.mjs";
|
|
3
3
|
export { atLeastOnce, atLeastOncePerMessage, atMostOncePerKey, callee, calleeEnv, check, checkInWorkerd, cloudflareRegressionTest, createCloudflarePlatform, cron, d1Param, d1Read, d1Rows, d1Schema, d1Write, defineScenario, durableObject, durableObjectRows, durableObjectTable, everyRow, expectHolds, external, fetchCall, http, httpResponse, implies, queue, queueAck, r2Bucket, r2Op, r2Rows, references, refines, rpc, rpcResponse, runDifferential, service, serviceCall, snapshotD1, unique, webSocketReceived, websocket, workflow, workflowRows, workflowStep };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as getPath } from "./src-
|
|
1
|
+
import { F as getPath } from "./src-BiX530QY.mjs";
|
|
2
2
|
// packages/core/src/delivery-invariants.ts
|
|
3
3
|
/**
|
|
4
4
|
* No two selected effects share the value at `key` (a dot path into the effect's payload): nothing
|
|
@@ -41,4 +41,4 @@ function atLeastOncePerMessage(name, events, effect, key, bodyKey) {
|
|
|
41
41
|
}
|
|
42
42
|
export { atLeastOncePerMessage as n, atMostOncePerKey as r, atLeastOnce as t };
|
|
43
43
|
|
|
44
|
-
//# sourceMappingURL=delivery-invariants-
|
|
44
|
+
//# sourceMappingURL=delivery-invariants-BXCuv43L.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery-invariants-
|
|
1
|
+
{"version":3,"file":"delivery-invariants-BXCuv43L.mjs","names":[],"sources":["../../core/src/delivery-invariants.ts"],"sourcesContent":["/**\n * Constructors for the delivery invariants every platform's scenarios use:\n * nothing delivered twice, nothing lost. Platforms wrap them to take their\n * own drive shapes.\n */\n\nimport type { JsonValue } from \"./canonical-json.ts\";\nimport type { AtLeastOnce, AtMostOncePerKey } from \"./invariants.ts\";\nimport { type EffectSelector, getPath } from \"./selectors.ts\";\n\n/**\n * No two selected effects share the value at `key` (a dot path into the effect's payload): nothing\n * happened twice for one key, a payment recorded twice, a message sent twice.\n */\nexport function atMostOncePerKey(\n name: string,\n effect: EffectSelector,\n key: string,\n): AtMostOncePerKey {\n return { kind: \"atMostOncePerKey\", name, effect, key };\n}\n\n/** Every value in `expected` appears at least once as `key` in a selected effect: nothing was lost. */\nexport function atLeastOnce(\n name: string,\n effect: EffectSelector,\n key: string,\n expected: readonly JsonValue[],\n): AtLeastOnce {\n return { kind: \"atLeastOnce\", name, effect, key, expected };\n}\n\n/**\n * Every event's `bodyKey` value must appear at least once as `key` in a\n * selected effect. The expected keys are re-derived from the bodies that\n * remain when shrinking removes events.\n */\nexport function atLeastOncePerMessage(\n name: string,\n events: readonly { readonly id: string; readonly body: JsonValue }[],\n effect: EffectSelector,\n key: string,\n bodyKey: string,\n): AtLeastOnce {\n const expected: JsonValue[] = [];\n for (const e of events) {\n const v = getPath(e.body, bodyKey);\n if (v === undefined)\n throw new Error(`event ${e.id} has no ${JSON.stringify(bodyKey)} in its body`);\n expected.push(v);\n }\n return { ...atLeastOnce(name, effect, key, expected), perMessage: { bodyKey } };\n}\n"],"mappings":";;;;;;AAcA,SAAgB,iBACd,MACA,QACA,KACkB;CAClB,OAAO;EAAE,MAAM;EAAoB;EAAM;EAAQ;CAAI;AACvD;;AAGA,SAAgB,YACd,MACA,QACA,KACA,UACa;CACb,OAAO;EAAE,MAAM;EAAe;EAAM;EAAQ;EAAK;CAAS;AAC5D;;;;;;AAOA,SAAgB,sBACd,MACA,QACA,QACA,KACA,SACa;CACb,MAAM,WAAwB,CAAC;CAC/B,KAAK,MAAM,KAAK,QAAQ;EACtB,MAAM,IAAI,QAAQ,EAAE,MAAM,OAAO;EACjC,IAAI,MAAM,KAAA,GACR,MAAM,IAAI,MAAM,SAAS,EAAE,GAAG,UAAU,KAAK,UAAU,OAAO,EAAE,aAAa;EAC/E,SAAS,KAAK,CAAC;CACjB;CACA,OAAO;EAAE,GAAG,YAAY,MAAM,QAAQ,KAAK,QAAQ;EAAG,YAAY,EAAE,QAAQ;CAAE;AAChF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as EffectSelector, d as AtMostOncePerKey, k as JsonValue, u as AtLeastOnce } from "./platform-
|
|
1
|
+
import { C as EffectSelector, d as AtMostOncePerKey, k as JsonValue, u as AtLeastOnce } from "./platform-D4hlJjm3.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* No two selected effects share the value at `key` (a dot path into the effect's payload): nothing
|
|
4
4
|
* happened twice for one key, a payment recorded twice, a message sent twice.
|
|
@@ -7,4 +7,4 @@ declare function atMostOncePerKey(name: string, effect: EffectSelector, key: str
|
|
|
7
7
|
/** Every value in `expected` appears at least once as `key` in a selected effect: nothing was lost. */
|
|
8
8
|
declare function atLeastOnce(name: string, effect: EffectSelector, key: string, expected: readonly JsonValue[]): AtLeastOnce;
|
|
9
9
|
export { atMostOncePerKey as n, atLeastOnce as t };
|
|
10
|
-
//# sourceMappingURL=delivery-invariants-
|
|
10
|
+
//# sourceMappingURL=delivery-invariants-D7DI7i8x.d.mts.map
|
package/dist/{delivery-invariants-B8ZZnCZg.d.mts.map → delivery-invariants-D7DI7i8x.d.mts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery-invariants-
|
|
1
|
+
{"version":3,"file":"delivery-invariants-D7DI7i8x.d.mts","names":[],"sources":["../../core/src/delivery-invariants.ts"],"mappings":";;;;;iBAcgB,iBACd,cACA,QAAQ,gBACR,cACC;;iBAKa,YACd,cACA,QAAQ,gBACR,aACA,mBAAmB,cAClB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as Schedule, n as Platform, o as ScenarioSpec, p as Violation, r as Bounds, w as EffectLog } from "./platform-
|
|
1
|
+
import { O as Schedule, n as Platform, o as ScenarioSpec, p as Violation, r as Bounds, w as EffectLog } from "./platform-D4hlJjm3.mjs";
|
|
2
2
|
/** How far exploration got: runs, effect points, faults injected and time taken, and coverage when exhaustive. */
|
|
3
3
|
interface BoundsReached {
|
|
4
4
|
readonly runs: number;
|
|
@@ -241,4 +241,4 @@ declare function replay(spec: ScenarioSpec, platform: Platform, schedule: Schedu
|
|
|
241
241
|
*/
|
|
242
242
|
declare function explore(scenario: ScenarioSpec, platform: Platform, options: ExploreOptions): Promise<ScenarioVerdict>;
|
|
243
243
|
export { describeVerdict as _, Binder as a, ModuleSpecs as c, SpecType as d, Bounded as f, Violated as g, Unsupported as h, Arrow as i, Property as l, ScenarioVerdict as m, explore as n, FunctionSpec as o, BoundsReached as p, replay as r, Hint as s, ExploreOptions as t, SpecError as u };
|
|
244
|
-
//# sourceMappingURL=explore-
|
|
244
|
+
//# sourceMappingURL=explore-Ci-xVeKU.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explore-
|
|
1
|
+
{"version":3,"file":"explore-Ci-xVeKU.d.mts","names":[],"sources":["../../core/src/verdict.ts","../../spec/src/ir.ts","../../engine/src/explore.ts"],"mappings":";;UAQiB;WACN;WACA;WACA;WACA;;;;;;;WAOA;aACE;aACA;aACA;;;UAIH;WACC;WACA;WACA,SAAS;WACT;;UAGM;WACN;WACA;WACA;;;UAIM,iBAAiB;WACvB;WACA,WAAW;;WAEX,OAAO;WACP,UAAU;;WAEV;WACA,QAAQ;;;UAIF,gBAAgB;WACtB;WACA,QAAQ;;KAGP;;UAOK,oBAAoB;WAC1B;WACA,OAAO;WACP;;;KAIC,kBAAkB,WAAW,UAAU;;iBAGnC,gBAAgB,GAAG;;;;;;;;;;;KC/DvB;WACG;;WACA;;WACA;;WACA;;WACA;WAA0B;;WAC1B;;WACA;;WAEA;;WAEA;WACA,iBAAiB;;WAEjB;WAAwB,kBAAkB;;;;WAE1C;WAAwB,SAAS;;WACjC;WAA0B;;UAExB;WACN;WACA,MAAM;;;UAIA;WACN;WACA;;;;;;;UAQM;WACN;WACA,QAAQ;WACR,QAAQ;WACR;aAAmB;aAA0B;;;;UAIvC;;WAEN;WACA,MAAM;;;UAIA;WACN;WACA,MAAM;WACN,OAAO;;;UAID;;WAEN;;WAEA;WACA;;WAEA;;;;;;;UAQM;;WAEN;WACA;;WAEA,kBAAkB;;WAElB,SAAS;WACT,OAAO;WACP,UAAU;;;;;WAKV;aAA6B;aAAwB;;;WAErD;;WAEA;;;UAIM;WACN;WACA,iBAAiB;WACjB,qBAAqB;;WAErB;;WAEA;;;UAIM;WACN;WACA;WACA;;;UAIM;WACN,oBAAoB;WACpB,iBAAiB;;;UC3FX;WACN;;WAEA;;;;;;;;WAQA;;;;;;;WAOA;;WAEA;;WAEA;;;;;;WAMA;;;;;;;;WAQA;aAAkC;;;;iBAqQvB,OACpB,MAAM,cACN,UAAU,UACV,UAAU,WACT,QAAQ;;;;;;iBASW,QACpB,UAAU,cACV,UAAU,UACV,SAAS,iBACR,QAAQ"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as EffectSelector, D as FaultKind, E as FaultDecision, O as Schedule, S as Refines, T as EffectRecord, _ as Implies, b as StateQuery, d as AtMostOncePerKey, f as Invariant, g as EveryRow, h as checkInvariants, l as validateScenario, m as checkInvariant, n as Platform, o as ScenarioSpec, p as Violation, r as Bounds, t as EventRef, u as AtLeastOnce, w as EffectLog, x as Unique, y as RowCondition } from "./platform-
|
|
2
|
-
import { _ as describeVerdict, a as Binder, c as ModuleSpecs, d as SpecType, f as Bounded, g as Violated, h as Unsupported, i as Arrow, l as Property, m as ScenarioVerdict, n as explore, o as FunctionSpec, p as BoundsReached, r as replay, s as Hint, t as ExploreOptions, u as SpecError } from "./explore-
|
|
1
|
+
import { C as EffectSelector, D as FaultKind, E as FaultDecision, O as Schedule, S as Refines, T as EffectRecord, _ as Implies, b as StateQuery, d as AtMostOncePerKey, f as Invariant, g as EveryRow, h as checkInvariants, l as validateScenario, m as checkInvariant, n as Platform, o as ScenarioSpec, p as Violation, r as Bounds, t as EventRef, u as AtLeastOnce, w as EffectLog, x as Unique, y as RowCondition } from "./platform-D4hlJjm3.mjs";
|
|
2
|
+
import { _ as describeVerdict, a as Binder, c as ModuleSpecs, d as SpecType, f as Bounded, g as Violated, h as Unsupported, i as Arrow, l as Property, m as ScenarioVerdict, n as explore, o as FunctionSpec, p as BoundsReached, r as replay, s as Hint, t as ExploreOptions, u as SpecError } from "./explore-Ci-xVeKU.mjs";
|
|
3
3
|
import { n as Forall, t as Fn } from "./combinators-BecOKcmi.mjs";
|
|
4
4
|
/**
|
|
5
5
|
* Spec verdicts: what is known about one property of one pure function.
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as checkInvariants, E as checkInvariant, T as validateScenario, a as explore, o as replay, s as restrictSpec, t as observeCore } from "./src-
|
|
2
|
-
import { a as renderText, f as checkedRung, i as renderSpecs, l as specLadder, o as renderTrace, s as emitRegressionTest, t as renderJson, u as testedRung, y as describeVerdict } from "./src-
|
|
1
|
+
import { D as checkInvariants, E as checkInvariant, T as validateScenario, a as explore, o as replay, s as restrictSpec, t as observeCore } from "./src-BiX530QY.mjs";
|
|
2
|
+
import { a as renderText, f as checkedRung, i as renderSpecs, l as specLadder, o as renderTrace, s as emitRegressionTest, t as renderJson, u as testedRung, y as describeVerdict } from "./src-DVqL5Rk_.mjs";
|
|
3
3
|
import { t as aggregate } from "./provers-DS44OeEm.mjs";
|
|
4
4
|
// packages/core/src/spec-verdict.ts
|
|
5
5
|
/** One line per spec verdict, for error messages; full rendering lives in `report`. */
|
|
@@ -384,6 +384,22 @@ interface RunHooks {
|
|
|
384
384
|
* invocations only one runs at a time, so this is always the caller.
|
|
385
385
|
*/
|
|
386
386
|
running(): string;
|
|
387
|
+
/**
|
|
388
|
+
* Whether the invocation has set a virtual timer that has not fired or
|
|
389
|
+
* been cleared: work it left running, for a platform that must know
|
|
390
|
+
* before it treats the invocation's work as done.
|
|
391
|
+
*/
|
|
392
|
+
timersPending(invocation: string): boolean;
|
|
393
|
+
/**
|
|
394
|
+
* Run `code` as `host`'s own while a call is still on its way into the
|
|
395
|
+
* host: what an object's constructor does before the method the call
|
|
396
|
+
* names can run (work behind its input gate). The code is the host's,
|
|
397
|
+
* its timers virtual and the host's to be woken by, and the effects it
|
|
398
|
+
* makes the entering call's; it is not the call itself, which starts
|
|
399
|
+
* with `hostedCode`. While it runs, the entering call counts as code
|
|
400
|
+
* that may be awaiting a timer of its own.
|
|
401
|
+
*/
|
|
402
|
+
hostEntering<T>(host: string, code: () => T): T;
|
|
387
403
|
/**
|
|
388
404
|
* Run `code` as `host`'s own (see `EffectOptions.host`), where the runtime
|
|
389
405
|
* does not carry async context into it: an object's method about to be
|
|
@@ -468,10 +484,19 @@ interface Platform {
|
|
|
468
484
|
deliver(event: EventRef, hooks: RunHooks, spec: ScenarioSpec): Promise<DeliveryResult>;
|
|
469
485
|
/** The same scenario driven only by the events with these ids (for shrinking and regression tests). */
|
|
470
486
|
restrictEvents(spec: ScenarioSpec, keepIds: readonly string[]): ScenarioSpec;
|
|
487
|
+
/**
|
|
488
|
+
* Events of the platform's own that the end of the run calls for. Asked
|
|
489
|
+
* each time every event has been delivered and nothing is left to move;
|
|
490
|
+
* what it answers is delivered like any other event, and it is asked
|
|
491
|
+
* again until it answers none. (A stateful resource a crash reset and
|
|
492
|
+
* nothing entered since is woken here, inside the run, so the end-of-run
|
|
493
|
+
* snapshot reads it as its next event would find it.)
|
|
494
|
+
*/
|
|
495
|
+
closingEvents?(spec: ScenarioSpec): readonly EventRef[];
|
|
471
496
|
/** Called once all events are delivered; the place to record end-of-run state snapshots. */
|
|
472
497
|
finish?(spec: ScenarioSpec, hooks: RunHooks): Promise<void>;
|
|
473
498
|
/** Called when a run ends for any reason, after `finish` or after a failure: undo any per-run patching. */
|
|
474
499
|
cleanup?(spec: ScenarioSpec): Promise<void>;
|
|
475
500
|
}
|
|
476
501
|
export { EffectSelector as C, FaultKind as D, FaultDecision as E, Schedule as O, Refines as S, EffectRecord as T, Implies as _, PlatformData as a, StateQuery as b, WorkerRef as c, AtMostOncePerKey as d, Invariant as f, EveryRow as g, checkInvariants as h, ExternalDecl as i, JsonValue as k, validateScenario as l, checkInvariant as m, Platform as n, ScenarioSpec as o, Violation as p, Bounds as r, ScriptedResponse as s, EventRef as t, AtLeastOnce as u, References as v, EffectLog as w, Unique as x, RowCondition as y };
|
|
477
|
-
//# sourceMappingURL=platform-
|
|
502
|
+
//# sourceMappingURL=platform-D4hlJjm3.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-
|
|
1
|
+
{"version":3,"file":"platform-D4hlJjm3.d.mts","names":[],"sources":["../../core/src/canonical-json.ts","../../core/src/faults.ts","../../core/src/effect-log.ts","../../core/src/selectors.ts","../../core/src/refines.ts","../../core/src/state.ts","../../core/src/invariants.ts","../../core/src/scenario.ts","../../core/src/platform.ts"],"mappings":";;;;;KAMY,wDAKC;YACG,cAAc;;;;;;;KCAlB;;UAoBK;;WAEN;;WAEA;WACA,OAAO;;WAEP;WACA;;;UAIM;;WAEN;WACA,iBAAiB;;;;;;;WAOjB;;;KC3CC;;UAGK;;WAEN;WACA,MAAM;;WAEN;;WAEA;;WAEA;;WAEA,SAAS;;;UAIH;WACN,kBAAkB;;;UCxBZ;WACN;WACA;WACA,OAAO;;WAEP;cAAoB,eAAe;;;WAEnC;cAAsB;;;;;;;;;;;;;;UCYhB;WACN;WACA;;WAEA;WACA,QAAQ;WACR;aAA8B;aAAyB;;WACvD;aACE,MAAM;aACN,OAAO;;aAEP;;;;KC5BD;WACG;WAAyB;WAA2B,OAAO;;WAC3D;WAAyB;WAA0C;;WACnE;WAAyB;WAAmB,gBAAgB;;WAC5D;WAAyB;;;UAGvB;;WAEN;WACA;WACA,iBAAiB;;;UAIX;WACN;WACA;WACA,OAAO;WACP,gBAAgB;;;;;;;UAQV;WACN;WACA;WACA,MAAM;;WAEN;WACA,OAAO;WACP;;;;;;;;UASM;WACN;WACA;WACA,OAAO;WACP;;;;;;;;UASM;WACN;WACA;WACA,OAAO;WACP;WACA,IAAI;WACJ;;;UChDM;WACN;WACA;WACA,QAAQ;;WAER;;;UAIM;WACN;WACA;WACA,QAAQ;WACR;WACA,mBAAmB;;WAEnB;aAAwB;;;;KAqBvB,YACR,mBACA,cACA,WACA,UACA,SACA,aACA;;UAGa;WACN;WACA;;WAEA;;WAEA;;;iBAaK,eAAe,KAAK,WAAW,KAAK,YAAY;;iB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