eutaxy 0.16.1 → 0.17.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 +6 -6
- package/dist/aws.d.mts +2 -2
- package/dist/aws.mjs +2 -2
- package/dist/bin.mjs +1 -1
- package/dist/{cli-KACykdzJ.mjs → cli-CxbXc1j2.mjs} +22 -10
- package/dist/{cli-KACykdzJ.mjs.map → cli-CxbXc1j2.mjs.map} +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/cloudflare.d.mts +48 -5
- package/dist/cloudflare.d.mts.map +1 -1
- package/dist/cloudflare.mjs +3 -3
- 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/{delivery-invariants-BfRnb9yR.mjs → delivery-invariants-DO3j1mmD.mjs} +2 -2
- package/dist/{delivery-invariants-BfRnb9yR.mjs.map → delivery-invariants-DO3j1mmD.mjs.map} +1 -1
- package/dist/{explore-DlwIUowm.d.mts → explore-CkKiOuz6.d.mts} +10 -2
- package/dist/explore-CkKiOuz6.d.mts.map +1 -0
- package/dist/index.d.mts +6 -3
- package/dist/index.d.mts.map +1 -1
- 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-dkn6Illb.mjs → src-D_hHC_-3.mjs} +416 -98
- package/dist/src-D_hHC_-3.mjs.map +1 -0
- package/dist/{src-DWRaG5aV.mjs → src-fxWc6oGc.mjs} +18 -5
- package/dist/src-fxWc6oGc.mjs.map +1 -0
- package/dist/{workerd-9Tt0BV-3.mjs → workerd-DhrzU6AZ.mjs} +4064 -3267
- package/dist/workerd-DhrzU6AZ.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/explore-DlwIUowm.d.mts.map +0 -1
- package/dist/src-DWRaG5aV.mjs.map +0 -1
- package/dist/src-dkn6Illb.mjs.map +0 -1
- package/dist/workerd-9Tt0BV-3.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-CxbXc1j2.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-CkKiOuz6.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
|
|
@@ -383,6 +385,38 @@ export declare function service(binding: string, options?: {
|
|
|
383
385
|
};
|
|
384
386
|
readonly fetch?: readonly ServiceResponse[];
|
|
385
387
|
}): ServiceSetup;
|
|
388
|
+
/**
|
|
389
|
+
* Script the objects of a Durable Object namespace: every object of the
|
|
390
|
+
* namespace answers its RPC methods from `methods` and its `fetch()` from
|
|
391
|
+
* `fetch`, as a scripted service does (see `ServiceSetup`), and no object
|
|
392
|
+
* of the namespace is constructed or run. For a class the test's isolate
|
|
393
|
+
* cannot run (one backed by a container) or one the scenario does not
|
|
394
|
+
* explore. Each call is one effect, `DO:<binding>`, with the object's name
|
|
395
|
+
* in its arguments and the faults of a Durable Object stub call.
|
|
396
|
+
*/
|
|
397
|
+
interface ScriptedObjectSetup extends PlatformData {
|
|
398
|
+
readonly kind: "scripted_object";
|
|
399
|
+
readonly binding: string;
|
|
400
|
+
readonly methods?: {
|
|
401
|
+
readonly [method: string]: ScriptedReply;
|
|
402
|
+
};
|
|
403
|
+
readonly fetch?: readonly ServiceResponse[];
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Script a Durable Object namespace: its objects' RPC methods answer from `methods` and their `fetch()`
|
|
407
|
+
* from `fetch`, and no object of it runs. See `ScriptedObjectSetup`.
|
|
408
|
+
*/
|
|
409
|
+
export declare function scriptedObject(binding: string, options?: {
|
|
410
|
+
readonly methods?: {
|
|
411
|
+
readonly [method: string]: ScriptedReply;
|
|
412
|
+
};
|
|
413
|
+
readonly fetch?: readonly ServiceResponse[];
|
|
414
|
+
}): ScriptedObjectSetup;
|
|
415
|
+
/**
|
|
416
|
+
* Selects the calls into a Durable Object namespace that completed (real objects' or scripted ones'), one
|
|
417
|
+
* method's or all; `object` keeps those into the object of that name.
|
|
418
|
+
*/
|
|
419
|
+
export declare function objectCall(binding: string, method?: string, object?: string): EffectSelector;
|
|
386
420
|
/**
|
|
387
421
|
* The Worker behind a service binding, run for real: its module and wrangler
|
|
388
422
|
* config, relative to the scenario, in place of a script. The `name` in that
|
|
@@ -441,7 +475,7 @@ interface CloudflareScenarioInput {
|
|
|
441
475
|
readonly queue: string;
|
|
442
476
|
readonly messages: readonly QueueMessage[];
|
|
443
477
|
};
|
|
444
|
-
readonly setup?: readonly (CalleeSetup | D1Setup | DurableObjectSetup | R2Setup | WorkflowSetup | ServiceSetup)[];
|
|
478
|
+
readonly setup?: readonly (CalleeSetup | D1Setup | DurableObjectSetup | R2Setup | WorkflowSetup | ServiceSetup | ScriptedObjectSetup)[];
|
|
445
479
|
readonly externals?: readonly ExternalDecl[];
|
|
446
480
|
readonly invariants: readonly Invariant[];
|
|
447
481
|
readonly bounds?: Partial<Bounds>;
|
|
@@ -544,6 +578,14 @@ interface CalleeModule {
|
|
|
544
578
|
readonly exports: Readonly<Record<string, unknown>>;
|
|
545
579
|
readonly entrypoint?: string;
|
|
546
580
|
readonly props?: Readonly<Record<string, JsonValue>>;
|
|
581
|
+
/**
|
|
582
|
+
* The module is the scenario's own Worker, reached back through a
|
|
583
|
+
* callee's binding (the Worker it called calls it in turn): it runs with
|
|
584
|
+
* the scenario's env as it is, under its own names, not with a view
|
|
585
|
+
* qualified by `name`, so what it reads and writes there is what the
|
|
586
|
+
* scenario's events read and write.
|
|
587
|
+
*/
|
|
588
|
+
readonly self?: boolean;
|
|
547
589
|
}
|
|
548
590
|
/**
|
|
549
591
|
* The callee's `env`: the scenario's env seen under the callee's own names,
|
|
@@ -687,6 +729,7 @@ interface CheckTransport {
|
|
|
687
729
|
readonly name: string;
|
|
688
730
|
readonly entrypoint?: string;
|
|
689
731
|
readonly props?: Readonly<Record<string, unknown>>;
|
|
732
|
+
readonly self?: boolean;
|
|
690
733
|
}>>;
|
|
691
734
|
/** The aliases the platform ran with, for the regression test. */
|
|
692
735
|
readonly aliases?: Readonly<Record<string, string>>;
|
|
@@ -739,5 +782,5 @@ interface WorkerdCheckInput {
|
|
|
739
782
|
}
|
|
740
783
|
/** Run the scenario's check, with its specs observed, and return what the CLI reads back. */
|
|
741
784
|
export declare function checkInWorkerd(input: WorkerdCheckInput): Promise<CheckTransport>;
|
|
742
|
-
export { type CalleeModule, type CalleeSetup, type CheckTransport, type CloudflarePlatformOptions, type CloudflareRegressionOptions, type CloudflareScenarioInput, type CronDrive, type CronOptions, type CronTickSpec, type D1Setup, type DifferentialResult, type DurableObjectSetup, type DurableObjectSqlSeed, type DurableObjectTestHelpers, type HttpCallerOptions, type HttpDrive, type HttpRequestInput, type HttpRequestSpec, type QueueDrive, type QueueMessage, type R2Setup, type RpcCallInput, type RpcCallSpec, type RpcCallerOptions, type RpcDrive, type ScriptedReply, type ServiceResponse, type ServiceSetup, type SpecEntry, type SqlRow, type WebSocketConnectionInput, type WebSocketDrive, type WebSocketMessageInput, type WorkerEntrypointClass, type WorkerHandler, type WorkerdCheckInput, type WorkflowSetup, atLeastOnce, atMostOncePerKey };
|
|
785
|
+
export { type CalleeModule, type CalleeSetup, type CheckTransport, type CloudflarePlatformOptions, type CloudflareRegressionOptions, type CloudflareScenarioInput, type CronDrive, type CronOptions, type CronTickSpec, type D1Setup, type DifferentialResult, type DurableObjectSetup, type DurableObjectSqlSeed, type DurableObjectTestHelpers, type HttpCallerOptions, type HttpDrive, type HttpRequestInput, type HttpRequestSpec, type QueueDrive, type QueueMessage, type R2Setup, type RpcCallInput, type RpcCallSpec, type RpcCallerOptions, type RpcDrive, type ScriptedObjectSetup, type ScriptedReply, type ServiceResponse, type ServiceSetup, type SpecEntry, type SqlRow, type WebSocketConnectionInput, type WebSocketDrive, type WebSocketMessageInput, type WorkerEntrypointClass, type WorkerHandler, type WorkerdCheckInput, type WorkflowSetup, atLeastOnce, atMostOncePerKey };
|
|
743
786
|
//# sourceMappingURL=cloudflare.d.mts.map
|
|
@@ -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;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BAAmB;WACnB;cACG;gBAA8B,yBAAyB;;;;;UAKpD;;WAEN;WACA,QAAQ;WACR,KAAK;WACL;;WAEA;;;wBAkcW,gBACpB,MAAM,cACN,SAAS,4BACR,QAAQ;;UCvgBM;WACN;;WAEA,sBAAsB;WACtB;aAAmB;aAAwB;;WAC3C;aAA2B;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 r2Bucket, B as
|
|
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
|
+
import { r as atMostOncePerKey, t as atLeastOnce } from "./delivery-invariants-DO3j1mmD.mjs";
|
|
2
|
+
import { A as r2Bucket, B as unique, C as fetchCall, D as objectCall, E as implies, F as rpc, G as workflowStep, H as websocket, I as rpcResponse, K as snapshotD1, L as scriptedObject, M as r2Rows, N as references, O as queue, P as refines, R as service, S as external, T as httpResponse, U as workflow, V as webSocketReceived, W as workflowRows, _ 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 r2Op, k as queueAck, l as atLeastOncePerMessage, m as d1Rows, o as check, p as d1Read, q as cloudflareRegressionTest, s as expectHolds, t as checkInWorkerd, u as callee, v as durableObject, w as http, x as everyRow, y as durableObjectRows, z as serviceCall } from "./workerd-DhrzU6AZ.mjs";
|
|
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, objectCall, queue, queueAck, r2Bucket, r2Op, r2Rows, references, refines, rpc, rpcResponse, runDifferential, scriptedObject, service, serviceCall, snapshotD1, unique, webSocketReceived, websocket, workflow, workflowRows, workflowStep };
|
|
@@ -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 { F as getPath } from "./src-
|
|
1
|
+
import { F as getPath } from "./src-D_hHC_-3.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-DO3j1mmD.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery-invariants-
|
|
1
|
+
{"version":3,"file":"delivery-invariants-DO3j1mmD.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 { 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;
|
|
@@ -50,6 +50,14 @@ interface Unsupported extends VerdictBase {
|
|
|
50
50
|
readonly kind: "UNSUPPORTED";
|
|
51
51
|
readonly cause: UnsupportedCause;
|
|
52
52
|
readonly reason: string;
|
|
53
|
+
/**
|
|
54
|
+
* The schedule of the run that reached it, to replay; absent where no run
|
|
55
|
+
* was made (`unsupported_bounds`). It is the run's own, not shrunk. A run
|
|
56
|
+
* that ended on real time (an effect that outlasted the budget, code
|
|
57
|
+
* waiting on something outside the simulation) may not end at the same
|
|
58
|
+
* place when replayed.
|
|
59
|
+
*/
|
|
60
|
+
readonly schedule?: Schedule;
|
|
53
61
|
}
|
|
54
62
|
/** A scenario's verdict: `VIOLATED`, `BOUNDED` or `UNSUPPORTED`. */
|
|
55
63
|
type ScenarioVerdict = Violated | Bounded | Unsupported;
|
|
@@ -241,4 +249,4 @@ declare function replay(spec: ScenarioSpec, platform: Platform, schedule: Schedu
|
|
|
241
249
|
*/
|
|
242
250
|
declare function explore(scenario: ScenarioSpec, platform: Platform, options: ExploreOptions): Promise<ScenarioVerdict>;
|
|
243
251
|
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-
|
|
252
|
+
//# sourceMappingURL=explore-CkKiOuz6.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"explore-CkKiOuz6.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;;;;;;;;WAQA,WAAW;;;KAIV,kBAAkB,WAAW,UAAU;;iBAGnC,gBAAgB,GAAG;;;;;;;;;;;KCvEvB;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-CkKiOuz6.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.
|
|
@@ -294,7 +294,10 @@ export declare function renderJson(verdict: ScenarioVerdict, specs?: readonly Sp
|
|
|
294
294
|
export declare function renderSpecs(specs: readonly SpecVerdict[]): string;
|
|
295
295
|
/** The trace as a fixed-width table; evidence rows are marked with `*`. */
|
|
296
296
|
export declare function renderTrace(log: EffectLog, evidence?: readonly number[]): string;
|
|
297
|
-
/**
|
|
297
|
+
/**
|
|
298
|
+
* A readable report: verdict, what it rests on, for a violation the schedule and trace, and for a
|
|
299
|
+
* scenario that could not be decided the schedule of the run that reached that.
|
|
300
|
+
*/
|
|
298
301
|
export declare function renderText(verdict: ScenarioVerdict): string;
|
|
299
302
|
export { type Arrow, type AtLeastOnce, type AtMostOncePerKey, type Binder, type Bounded, type Bounds, type BoundsReached, type Checked, type Conflict, type CoreObserver, type Counterexample, type EffectLog, type EffectRecord, type EffectSelector, type EngineId, type EngineReport, type EventRef, type EveryRow, type ExploreOptions, type FaultDecision, type FaultKind, type FunctionSpec, type Hint, type Implies, type Invariant, type LadderOptions, type ModuleProofs, type ModuleSpecs, type ObservedCall, type Platform, type ProofOutcome, type Property, type PropertyProof, type ProveInput, type Proven, type Prover, type Refines, type Refuted, type RegressionTestOptions, type RowCondition, type ScenarioSpec, type ScenarioVerdict, type Schedule, type SpecType, type SpecUnknown, type SpecVerdict, type StateQuery, type Tested, type TestedOptions, type Unique, type Unsupported, type Violated, type Violation, checkInvariant, checkInvariants, describeVerdict, explore, replay, validateScenario };
|
|
300
303
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../core/src/spec-verdict.ts","../../prover/src/checked.ts","../../prover/src/tested.ts","../../prover/src/ladder.ts","../../prover/src/provers.ts","../../engine/src/observe.ts","../../engine/src/shrink.ts","../../report/src/regression.ts","../../report/src/render.ts"],"mappings":";;;;;;;;;;UAQU;;WAEC;WACA;;WAEA;;WAEA;WACA;;;UAIM,gBAAgB;WACtB;;WAEA;;WAEA;;;UAIM,eAAe;WACrB;;WAEA;;WAEA;;WAEA;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wBCE9D,aACd,UAAU,UACV,MAAM,cACN,6BACC;;UC5Bc;;WAEN;;WAEA;;WAEA;;WAEA;WACA;;;;;;WAMA;aACE;aACA;;;;;;;wBAQG,mBAAmB,SAAS,UAAU,SAAS;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../core/src/spec-verdict.ts","../../prover/src/checked.ts","../../prover/src/tested.ts","../../prover/src/ladder.ts","../../prover/src/provers.ts","../../engine/src/observe.ts","../../engine/src/shrink.ts","../../report/src/regression.ts","../../report/src/render.ts"],"mappings":";;;;;;;;;;UAQU;;WAEC;WACA;;WAEA;;WAEA;WACA;;;UAIM,gBAAgB;WACtB;;WAEA;;WAEA;;;UAIM,eAAe;WACrB;;WAEA;;WAEA;;WAEA;;WAEA;;;UAIM;;WAEN;aAA6B;aAAuB;;;WAEpD;;WAEA;;;UAIM,gBAAgB;WACtB;;WAEA;;WAEA;aAAoB;aAAuB;;WAC3C,gBAAgB;;;UAIV,eAAe;WACrB;WACA;aAAmB;aAAuB;;;WAE1C;;WAEA;;;UAIM,iBAAiB;WACvB;WACA;aAAmB;aAAuB;;WAC1C;aACE;aACA;aACA,iBAAiB;;;KAIlB;;UAGK,oBAAoB;WAC1B;WACA,OAAO;WACP;;;KAIC,cAAc,UAAU,SAAS,SAAS,UAAU,WAAW;;wBAG3D,oBAAoB,GAAG;UC7BtB;WACN;WACA,IAAI;WACJ,UAAU;;WAEV;aAA2B;;;WAE3B,MAAM,OAAO;;WAEb;;;wBAIK,YAAY,OAAO,eAAe;;UCvDjC;;WAEN;;WAEA;;UAGM,oBAAoB;WAC1B;WACA,IAAI;WACJ,UAAU;;WAEV,MAAM,OAAO;;;wBAIR,WAAW,OAAO,cAAc;;UC3B/B;;WAEN,SAAS;;WAET;;;wBAIK,WAAW,OAAO,cAAc,UAAS,gBAAqB;;UCL7D;WACN;WACA;;;KAIC;WACG;WAAyB,QAAQ;WAAmB;;WAEpD;WACA,QAAQ;WACR,iBAAiB;WACjB;;WAGA;WACA;WACA;;;UAIE;WACN;;WAEA;WACA,SAAS;;;UAIH;WACN;WACA;;WAEA;;WAEA;;;UAIM;WACN,kBAAkB;;WAElB,qBAAqB;;;;;WAKrB,iBAAiB;;;UAIX;;WAEN;;WAEA,OAAO;;WAEP;;WAEA;;WAEA;WACA;;;UAIM;WACN;;EAET,aAAa;aAAmB;;aAA+B;;EAC/D,MAAM,OAAO,aAAa,QAAQ;;;UAInB;WACN;WACA,QAAQ;;;;;;;;;;;wBAYH,UACd,gBACA,mBAAmB,eACnB,kBAAkB,iBACjB;;;;;;;;;;;;;;;UCzFc;WACN;;WAEA;WACA;;;UAIM;WACN,gBAAgB;;WAEhB;cAA0B;;;EAEnC;;;wBAIc,YAAY,mBAAmB,+BAA+B;;wBCE9D,aACd,UAAU,UACV,MAAM,cACN,6BACC;;UC5Bc;;WAEN;;WAEA;;WAEA;;WAEA;WACA;;;;;;WAMA;aACE;aACA;;;;;;;wBAQG,mBAAmB,SAAS,UAAU,SAAS;;;;;wBCnB/C,WAAW,SAAS,iBAAiB,iBAAgB;;wBAarD,YAAY,gBAAgB;;wBA6G5B,YAAY,KAAK,WAAW;;;;;wBAkC5B,WAAW,SAAS"}
|
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-D_hHC_-3.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-fxWc6oGc.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;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