@agoric/async-flow 0.1.1-other-dev-3eb1a1d.0 → 0.1.1-other-dev-d15096d.0.d15096d

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/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "@agoric/async-flow",
3
- "version": "0.1.1-other-dev-3eb1a1d.0+3eb1a1d",
3
+ "version": "0.1.1-other-dev-d15096d.0.d15096d",
4
4
  "description": "Upgrade async functions at await points by replay",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/Agoric/agoric-sdk",
7
7
  "main": "./index.js",
8
8
  "scripts": {
9
9
  "build": "exit 0",
10
- "prepack": "tsc --build tsconfig.build.json",
11
- "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'",
10
+ "prepack": "yarn run -T tsc --build tsconfig.build.json",
11
+ "postpack": "git clean -f '*.d.*ts*' '*.tsbuildinfo'",
12
12
  "test": "ava",
13
- "test:c8": "c8 --all $C8_OPTIONS ava",
13
+ "test:c8": "c8 --all ${C8_OPTIONS:-} ava",
14
14
  "test:xs": "exit 0",
15
15
  "lint-fix": "yarn lint:eslint --fix",
16
- "lint": "run-s --continue-on-error lint:*",
17
- "lint:types": "tsc",
18
- "lint:eslint": "eslint ."
16
+ "lint": "yarn run -T run-s --continue-on-error 'lint:*'",
17
+ "lint:eslint": "yarn run -T eslint .",
18
+ "lint:types": "yarn run -T tsc"
19
19
  },
20
20
  "exports": {
21
21
  ".": "./index.js"
@@ -24,30 +24,30 @@
24
24
  "author": "Agoric",
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@agoric/base-zone": "0.1.1-other-dev-3eb1a1d.0+3eb1a1d",
28
- "@agoric/internal": "0.3.3-other-dev-3eb1a1d.0+3eb1a1d",
29
- "@agoric/store": "0.9.3-other-dev-3eb1a1d.0+3eb1a1d",
30
- "@agoric/vow": "0.1.1-other-dev-3eb1a1d.0+3eb1a1d",
31
- "@endo/common": "^1.2.8",
32
- "@endo/errors": "^1.2.8",
33
- "@endo/eventual-send": "^1.2.8",
34
- "@endo/marshal": "^1.6.2",
35
- "@endo/pass-style": "^1.4.7",
36
- "@endo/patterns": "^1.4.7",
37
- "@endo/promise-kit": "^1.1.8"
27
+ "@agoric/base-zone": "0.1.1-other-dev-d15096d.0.d15096d",
28
+ "@agoric/internal": "0.3.3-other-dev-d15096d.0.d15096d",
29
+ "@agoric/store": "0.9.3-other-dev-d15096d.0.d15096d",
30
+ "@agoric/vow": "0.1.1-other-dev-d15096d.0.d15096d",
31
+ "@endo/common": "^1.2.13",
32
+ "@endo/errors": "^1.2.13",
33
+ "@endo/eventual-send": "^1.3.4",
34
+ "@endo/marshal": "^1.8.0",
35
+ "@endo/pass-style": "^1.6.3",
36
+ "@endo/patterns": "^1.7.0",
37
+ "@endo/promise-kit": "^1.1.13"
38
38
  },
39
39
  "devDependencies": {
40
- "@agoric/swingset-vat": "0.32.3-other-dev-3eb1a1d.0+3eb1a1d",
41
- "@agoric/zone": "0.2.3-other-dev-3eb1a1d.0+3eb1a1d",
42
- "@endo/env-options": "^1.1.8",
40
+ "@agoric/swingset-vat": "0.32.3-other-dev-d15096d.0.d15096d",
41
+ "@agoric/zone": "0.2.3-other-dev-d15096d.0.d15096d",
42
+ "@endo/env-options": "^1.1.11",
43
43
  "ava": "^5.3.0",
44
- "tsd": "^0.31.1"
44
+ "tsd": "^0.33.0"
45
45
  },
46
46
  "publishConfig": {
47
47
  "access": "public"
48
48
  },
49
49
  "engines": {
50
- "node": "^18.12 || ^20.9"
50
+ "node": "^20.9 || ^22.11"
51
51
  },
52
52
  "ava": {
53
53
  "files": [
@@ -60,7 +60,7 @@
60
60
  "workerThreads": false
61
61
  },
62
62
  "typeCoverage": {
63
- "atLeast": 77.11
63
+ "atLeast": 77.17
64
64
  },
65
- "gitHead": "3eb1a1d2d75b2b4a94807cd3bf759bc9fc531f05"
65
+ "gitHead": "d15096dc4ff8b96e9b6cd11954c20d3a9efbb393"
66
66
  }
@@ -1,7 +1,7 @@
1
- export function prepareAsyncFlowTools(outerZone: Zone, outerOptions?: PreparationOptions | undefined): {
1
+ export function prepareAsyncFlowTools(outerZone: Zone, outerOptions?: PreparationOptions): {
2
2
  prepareAsyncFlowKit: (zone: Zone, tag: string, guestAsyncFunc: GuestAsyncFunc, options?: {
3
3
  startEager?: boolean;
4
- } | undefined) => (activationArgs: any) => import("@endo/exo").GuardedKit<{
4
+ }) => (activationArgs: any) => import("@endo/exo").GuardedKit<{
5
5
  flow: {
6
6
  /**
7
7
  * @returns {FlowState}
@@ -13,7 +13,7 @@ export function prepareAsyncFlowTools(outerZone: Zone, outerOptions?: Preparatio
13
13
  *
14
14
  * @param {boolean} [eager]
15
15
  */
16
- restart(eager?: boolean | undefined): void;
16
+ restart(eager?: boolean): void;
17
17
  wake(): void;
18
18
  getOutcome(): import("@agoric/vow").Vow<any>;
19
19
  dump(): ([op: "doFulfill", vow: import("@agoric/vow").Vow<import("@endo/pass-style").Passable>, fulfillment: import("@endo/pass-style").Passable] | [op: "doReject", vow: import("@agoric/vow").Vow<import("@endo/pass-style").Passable>, reason: import("@endo/pass-style").Passable] | [op: "doReturn", callIndex: number, result: import("@endo/pass-style").Passable] | [op: "doThrow", callIndex: number, problem: import("@endo/pass-style").Passable] | [op: "checkCall", target: import("@endo/pass-style").Passable, optVerb: PropertyKey | undefined, args: import("@endo/pass-style").Passable[], callIndex: number] | [op: "checkSendOnly", target: import("@endo/pass-style").Passable, optVerb: PropertyKey | undefined, args: import("@endo/pass-style").Passable[], callIndex: number] | [op: "checkSend", target: import("@endo/pass-style").Passable, optVerb: PropertyKey | undefined, args: import("@endo/pass-style").Passable[], callIndex: number])[];
@@ -31,7 +31,7 @@ export function prepareAsyncFlowTools(outerZone: Zone, outerOptions?: Preparatio
31
31
  }>;
32
32
  asyncFlow: <F extends GuestAsyncFunc>(zone: Zone, tag: string, guestFunc: F, options?: {
33
33
  startEager?: boolean;
34
- } | undefined) => HostOf<F>;
34
+ }) => HostOf<F>;
35
35
  adminAsyncFlow: import("@endo/exo").Guarded<{
36
36
  getFailures(): import("@endo/patterns").CopyMap<any, import("@endo/pass-style").Passable>;
37
37
  wakeAll(): void;
@@ -40,48 +40,7 @@ export function prepareAsyncFlowTools(outerZone: Zone, outerOptions?: Preparatio
40
40
  allWokenP: Promise<void>;
41
41
  prepareEndowment: (zone: Zone, tag: string, e: unknown) => any;
42
42
  };
43
- export type AsyncFlowTools = ReturnType<(outerZone: Zone, outerOptions?: PreparationOptions | undefined) => {
44
- prepareAsyncFlowKit: (zone: Zone, tag: string, guestAsyncFunc: GuestAsyncFunc, options?: {
45
- startEager?: boolean;
46
- } | undefined) => (activationArgs: any) => import("@endo/exo").GuardedKit<{
47
- flow: {
48
- /**
49
- * @returns {FlowState}
50
- */
51
- getFlowState(): FlowState;
52
- /**
53
- * Calls the guest function, either for the initial run or at the
54
- * start of a replay.
55
- *
56
- * @param {boolean} [eager]
57
- */
58
- restart(eager?: boolean | undefined): void;
59
- wake(): void;
60
- getOutcome(): import("@agoric/vow").Vow<any>;
61
- dump(): ([op: "doFulfill", vow: import("@agoric/vow").Vow<import("@endo/pass-style").Passable>, fulfillment: import("@endo/pass-style").Passable] | [op: "doReject", vow: import("@agoric/vow").Vow<import("@endo/pass-style").Passable>, reason: import("@endo/pass-style").Passable] | [op: "doReturn", callIndex: number, result: import("@endo/pass-style").Passable] | [op: "doThrow", callIndex: number, problem: import("@endo/pass-style").Passable] | [op: "checkCall", target: import("@endo/pass-style").Passable, optVerb: PropertyKey | undefined, args: import("@endo/pass-style").Passable[], callIndex: number] | [op: "checkSendOnly", target: import("@endo/pass-style").Passable, optVerb: PropertyKey | undefined, args: import("@endo/pass-style").Passable[], callIndex: number] | [op: "checkSend", target: import("@endo/pass-style").Passable, optVerb: PropertyKey | undefined, args: import("@endo/pass-style").Passable[], callIndex: number])[];
62
- getOptFatalProblem(): any;
63
- };
64
- admin: {
65
- reset(): void;
66
- complete(): void;
67
- panic(fatalProblem: any): never;
68
- };
69
- wakeWatcher: {
70
- onFulfilled(_fulfillment: any): void;
71
- onRejected(_fulfillment: any): void;
72
- };
73
- }>;
74
- asyncFlow: <F extends GuestAsyncFunc>(zone: Zone, tag: string, guestFunc: F, options?: {
75
- startEager?: boolean;
76
- } | undefined) => HostOf<F>;
77
- adminAsyncFlow: import("@endo/exo").Guarded<{
78
- getFailures(): import("@endo/patterns").CopyMap<any, import("@endo/pass-style").Passable>;
79
- wakeAll(): void;
80
- getFlowForOutcomeVow(outcomeVow: any): any;
81
- }>;
82
- allWokenP: Promise<void>;
83
- prepareEndowment: (zone: Zone, tag: string, e: unknown) => any;
84
- }>;
43
+ export type AsyncFlowTools = ReturnType<typeof prepareAsyncFlowTools>;
85
44
  export type AdminAsyncFlow = AsyncFlowTools["adminAsyncFlow"];
86
45
  export type MakeAsyncFlowKit = ReturnType<AsyncFlowTools["prepareAsyncFlowKit"]>;
87
46
  export type AsyncFlowKit = ReturnType<MakeAsyncFlowKit>;
@@ -1 +1 @@
1
- {"version":3,"file":"async-flow.d.ts","sourceRoot":"","sources":["async-flow.js"],"names":[],"mappings":"AAgDO,iDAHI,IAAI;gCAgDF,IAAI,OACJ,MAAM,kBACN,cAAc;qBACC,OAAO;;;YA4BzB;;eAEG;4BADU,SAAS;YAkCtB;;;;;eAKG;;;;;;;;;;;;;;;;;gBA4TmB,CAAC,SAAlB,cAAgB,QAClB,IAAI,OACJ,MAAM,aACN,CAAC;qBACc,OAAO;sBACpB,OAAO,CAAC,CAAC;;;;;;;;EAsDvB;6BAIY,UAAU,aAlfZ,IAAI;gCAgDF,IAAI,OACJ,MAAM,kBACN,cAAc;qBACC,OAAO;;;YA4BzB;;eAEG;4BADU,SAAS;YAkCtB;;;;;eAKG;;;;;;;;;;;;;;;;;gBA4TmB,CAAC,SAAlB,cAAgB,QAClB,IAAI,OACJ,MAAM,aACN,CAAC;qBACc,OAAO;sBACpB,OAAO,CAAC,CAAC;;;;;;;;EA0DsB;6BAIjC,cAAc,CAAC,gBAAgB,CAAC;+BAIhC,UAAU,CAAC,cAAc,CAAC,qBAAqB,CAAC,CAAC;2BAIjD,UAAU,CAAC,gBAAgB,CAAC;wBAI5B,YAAY,CAAC,MAAM,CAAC;0BAjiBV,mBAAmB;wCACoD,iBAAiB;oCAAjB,iBAAiB;+BAAjB,iBAAiB;4BAAjB,iBAAiB"}
1
+ {"version":3,"file":"async-flow.d.ts","sourceRoot":"","sources":["async-flow.js"],"names":[],"mappings":"AAgDO,iDAHI,IAAI,iBACJ,kBAAkB;gCA+ChB,IAAI,OACJ,MAAM,kBACN,cAAc,YACd;QAAE,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE;;YA4B3B;;eAEG;4BADU,SAAS;YAkCtB;;;;;eAKG;4BADQ,OAAO;;;;;;;;;;;;;;;;gBA6TI,CAAC,SAAlB,cAAgB,QAClB,IAAI,OACJ,MAAM,aACN,CAAC,YACD;QAAE,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE,KACtB,OAAO,CAAC,CAAC;;;;;;;;EAsDvB;6BAIY,UAAU,CAAC,OAAO,qBAAqB,CAAC;6BAIxC,cAAc,CAAC,gBAAgB,CAAC;+BAIhC,UAAU,CAAC,cAAc,CAAC,qBAAqB,CAAC,CAAC;2BAIjD,UAAU,CAAC,gBAAgB,CAAC;wBAI5B,YAAY,CAAC,MAAM,CAAC;0BAjiBV,mBAAmB;wCACoD,iBAAiB;oCAAjB,iBAAiB;+BAAjB,iBAAiB;4BAAjB,iBAAiB"}
package/src/async-flow.js CHANGED
@@ -541,7 +541,7 @@ export const prepareAsyncFlowTools = (outerZone, outerOptions = {}) => {
541
541
  harden(prepareAsyncFlowTools);
542
542
 
543
543
  /**
544
- * @typedef {ReturnType<prepareAsyncFlowTools>} AsyncFlowTools
544
+ * @typedef {ReturnType<typeof prepareAsyncFlowTools>} AsyncFlowTools
545
545
  */
546
546
 
547
547
  /**
@@ -1,4 +1,4 @@
1
- export function prepareBijection(zone: Zone, unwrap?: ((hostWrapper: PassableCap | Vow, guestWrapper: PassableCap) => unknown) | undefined): () => import("@endo/exo").Guarded<{
1
+ export function prepareBijection(zone: Zone, unwrap?: (hostWrapper: PassableCap | Vow, guestWrapper: PassableCap) => unknown): () => import("@endo/exo").Guarded<{
2
2
  reset(): void;
3
3
  unwrapInit(g: any, h: any): unknown;
4
4
  hasGuest(g: any): boolean;
@@ -7,7 +7,19 @@ export function prepareBijection(zone: Zone, unwrap?: ((hostWrapper: PassableCap
7
7
  guestToHost(g: any): any;
8
8
  hostToGuest(h: any): any;
9
9
  }>;
10
- export type VowishStore = ReturnType<(name: string) => {
10
+ export type VowishStore = ReturnType<typeof makeVowishStore>;
11
+ export type Bijection = ReturnType<ReturnType<typeof prepareBijection>>;
12
+ import type { Zone } from '@agoric/base-zone';
13
+ import type { PassableCap } from '@endo/pass-style';
14
+ import type { Vow } from '@agoric/vow';
15
+ /**
16
+ * Makes a store like a WeakMapStore except that Promises and Vows can also be
17
+ * used as keys.
18
+ * NOTE: This depends on promise identity being stable!
19
+ *
20
+ * @param {string} name
21
+ */
22
+ declare function makeVowishStore(name: string): {
11
23
  init: (k: any, v: any) => void;
12
24
  has: (k: any) => boolean;
13
25
  get: (k: any) => any;
@@ -15,17 +27,6 @@ export type VowishStore = ReturnType<(name: string) => {
15
27
  init: (k: any, v: any) => void;
16
28
  has: (k: any) => boolean;
17
29
  get: (k: any) => any;
18
- }>>;
19
- export type Bijection = ReturnType<ReturnType<(zone: Zone, unwrap?: ((hostWrapper: PassableCap | Vow, guestWrapper: PassableCap) => unknown) | undefined) => () => import("@endo/exo").Guarded<{
20
- reset(): void;
21
- unwrapInit(g: any, h: any): unknown;
22
- hasGuest(g: any): boolean;
23
- hasHost(h: any): boolean;
24
- has(g: any, h: any): boolean;
25
- guestToHost(g: any): any;
26
- hostToGuest(h: any): any;
27
- }>>>;
28
- import type { Zone } from '@agoric/base-zone';
29
- import type { PassableCap } from '@endo/pass-style';
30
- import type { Vow } from '@agoric/vow';
30
+ }>;
31
+ export {};
31
32
  //# sourceMappingURL=bijection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bijection.d.ts","sourceRoot":"","sources":["bijection.js"],"names":[],"mappings":"AA+GO,uCAJI,IAAI,0BACU,WAAW,GAAG,GAAG,gBAAgB,WAAW,KAAK,OAAO;;;;;;;;GA6FhF;0BAtIa,UAAU,QAhCb,MAAM;;;;;;;;GAgCwB;wBA0I5B,UAAU,CAAC,UAAU,QAlGvB,IAAI,0BACU,WAAW,GAAG,GAAG,gBAAgB,WAAW,KAAK,OAAO;;;;;;;;GAiG7B,CAAC;0BArM9B,mBAAmB;iCADZ,kBAAkB;yBAE1B,aAAa"}
1
+ {"version":3,"file":"bijection.d.ts","sourceRoot":"","sources":["bijection.js"],"names":[],"mappings":"AA+GO,uCAJI,IAAI,WACJ,CAAC,WAAW,EAAE,WAAW,GAAG,GAAG,EAAE,YAAY,EAAE,WAAW,KAAK,OAAO;;;;;;;;GA6FhF;0BAtIa,UAAU,CAAC,OAAO,eAAe,CAAC;wBA0InC,UAAU,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;0BArMrC,mBAAmB;iCADZ,kBAAkB;yBAE1B,aAAa;AAqBnC;;;;;;GAMG;AACH,uCAFW,MAAM;;;;;;;;GA8BhB"}
package/src/bijection.js CHANGED
@@ -65,7 +65,7 @@ const makeVowishStore = name => {
65
65
  });
66
66
  };
67
67
 
68
- /** @typedef {ReturnType<makeVowishStore>} VowishStore */
68
+ /** @typedef {ReturnType<typeof makeVowishStore>} VowishStore */
69
69
 
70
70
  /**
71
71
  * As suggested by the name, this *mostly* represents a mathematical bijection,
@@ -203,5 +203,5 @@ export const prepareBijection = (
203
203
  harden(prepareBijection);
204
204
 
205
205
  /**
206
- * @typedef {ReturnType<ReturnType<prepareBijection>>} Bijection
206
+ * @typedef {ReturnType<ReturnType<typeof prepareBijection>>} Bijection
207
207
  */
package/src/convert.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export function makeConvertKit(bijection: any, makeGuestForHostRemotable: any, makeGuestForHostVow: any): {
2
- guestToHost: (specimen: Passable, label?: string | undefined) => any;
3
- hostToGuest: (specimen: Passable, label?: string | undefined) => any;
2
+ guestToHost: (specimen: Passable, label?: string) => any;
3
+ hostToGuest: (specimen: Passable, label?: string) => any;
4
4
  };
5
5
  import type { Passable } from '@endo/pass-style';
6
6
  //# sourceMappingURL=convert.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["convert.js"],"names":[],"mappings":"AA6EO;4BARM,QAAQ;4BAAR,QAAQ;EA4DpB;8BApH0B,kBAAkB"}
1
+ {"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["convert.js"],"names":[],"mappings":"AA6EO;4BARM,QAAQ,UACR,MAAM;4BADN,QAAQ,UACR,MAAM;EA2DlB;8BApH0B,kBAAkB"}
package/src/convert.js CHANGED
@@ -4,7 +4,7 @@ import { objectMap } from '@endo/common/object-map.js';
4
4
  import {
5
5
  getErrorConstructor,
6
6
  getTag,
7
- isObject,
7
+ isPrimitive,
8
8
  makeTagged,
9
9
  passStyleOf,
10
10
  } from '@endo/pass-style';
@@ -32,7 +32,7 @@ const makeConvert = (convertRemotable, convertPromiseOrVow, convertError) => {
32
32
  };
33
33
 
34
34
  const innerConvert = specimen => {
35
- if (!isObject(specimen)) {
35
+ if (isPrimitive(specimen)) {
36
36
  return specimen;
37
37
  }
38
38
  const passStyle = passStyleOf(specimen);
@@ -1,15 +1,12 @@
1
1
  export function forwardingMethods(rem: any): {
2
2
  [k: string]: any;
3
3
  };
4
- export function prepareEndowmentTools(outerZone: Zone, outerOptions?: PreparationOptions | undefined): {
4
+ export function prepareEndowmentTools(outerZone: Zone, outerOptions?: PreparationOptions): {
5
5
  prepareEndowment: (zone: Zone, tag: string, e: unknown) => any;
6
6
  unwrap: (wrapped: any, guestWrapped: any) => any;
7
7
  };
8
8
  export type EndowmentKind = "promise" | "storable" | "far" | "function" | "array" | "record" | "state";
9
- export type EndowmentTools = ReturnType<(outerZone: Zone, outerOptions?: PreparationOptions | undefined) => {
10
- prepareEndowment: (zone: Zone, tag: string, e: unknown) => any;
11
- unwrap: (wrapped: any, guestWrapped: any) => any;
12
- }>;
9
+ export type EndowmentTools = ReturnType<typeof prepareEndowmentTools>;
13
10
  import type { Zone } from '@agoric/base-zone';
14
11
  import type { PreparationOptions } from '../src/types.js';
15
12
  //# sourceMappingURL=endowments.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"endowments.d.ts","sourceRoot":"","sources":["endowments.js"],"names":[],"mappings":"AAiDO;;EASN;AAMM,iDAHI,IAAI;6BA4GF,IAAI,OACJ,MAAM,KACN,OAAO;;EAyFnB;4BA7OY,SAAS,GAAG,UAAU,GAAG,KAAK,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO;6BAiP1E,UAAU,aA3MZ,IAAI;6BA4GF,IAAI,OACJ,MAAM,KACN,OAAO;;EA6F0B;0BAvPvB,mBAAmB;wCAEL,iBAAiB"}
1
+ {"version":3,"file":"endowments.d.ts","sourceRoot":"","sources":["endowments.js"],"names":[],"mappings":"AAiDO;;EASN;AAMM,iDAHI,IAAI,iBACJ,kBAAkB;6BA2GhB,IAAI,OACJ,MAAM,KACN,OAAO;;EAyFnB;4BA7OY,SAAS,GAAG,UAAU,GAAG,KAAK,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO;6BAiP1E,UAAU,CAAC,OAAO,qBAAqB,CAAC;0BAvP9B,mBAAmB;wCAEL,iBAAiB"}
package/src/endowments.js CHANGED
@@ -262,5 +262,5 @@ export const prepareEndowmentTools = (outerZone, outerOptions = {}) => {
262
262
  harden(prepareEndowmentTools);
263
263
 
264
264
  /**
265
- * @typedef {ReturnType<prepareEndowmentTools>} EndowmentTools
265
+ * @typedef {ReturnType<typeof prepareEndowmentTools>} EndowmentTools
266
266
  */
package/src/equate.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Fail, X, annotateError, q } from '@endo/errors';
2
2
  import { throwLabeled } from '@endo/common/throw-labeled.js';
3
- import { getTag, isObject, passStyleOf } from '@endo/pass-style';
3
+ import { getTag, isPrimitive, passStyleOf } from '@endo/pass-style';
4
4
  import { recordNames } from '@endo/marshal';
5
5
  import { isVow } from '@agoric/vow/src/vow-utils.js';
6
6
 
@@ -23,7 +23,7 @@ export const makeEquate = bijection => {
23
23
  };
24
24
 
25
25
  const innerEquate = (g, h) => {
26
- if (!isObject(g)) {
26
+ if (isPrimitive(g)) {
27
27
  is(g, h) ||
28
28
  // separate line so I can set a breakpoint
29
29
  Fail`unequal ${g} vs ${h}`;
@@ -29,36 +29,7 @@ export function prepareLogStore(zone: Zone): () => import("@endo/exo").Guarded<{
29
29
  dump(): ([op: "doFulfill", vow: import("@agoric/vow").Vow<import("@endo/pass-style").Passable>, fulfillment: import("@endo/pass-style").Passable] | [op: "doReject", vow: import("@agoric/vow").Vow<import("@endo/pass-style").Passable>, reason: import("@endo/pass-style").Passable] | [op: "doReturn", callIndex: number, result: import("@endo/pass-style").Passable] | [op: "doThrow", callIndex: number, problem: import("@endo/pass-style").Passable] | [op: "checkCall", target: import("@endo/pass-style").Passable, optVerb: PropertyKey | undefined, args: import("@endo/pass-style").Passable[], callIndex: number] | [op: "checkSendOnly", target: import("@endo/pass-style").Passable, optVerb: PropertyKey | undefined, args: import("@endo/pass-style").Passable[], callIndex: number] | [op: "checkSend", target: import("@endo/pass-style").Passable, optVerb: PropertyKey | undefined, args: import("@endo/pass-style").Passable[], callIndex: number])[];
30
30
  promiseReplayDone(): Promise<undefined>;
31
31
  }>;
32
- export type LogStore = ReturnType<ReturnType<(zone: Zone) => () => import("@endo/exo").Guarded<{
33
- reset(): void;
34
- dispose(): void;
35
- getUnfilteredIndex(): number;
36
- getIndex(): number;
37
- getLength(): number;
38
- isReplaying(): boolean;
39
- /**
40
- * @returns {LogEntry}
41
- */
42
- peekEntry(): LogEntry;
43
- /**
44
- * @returns {LogEntry}
45
- */
46
- nextUnfilteredEntry(): LogEntry;
47
- /**
48
- * @returns {LogEntry}
49
- */
50
- nextEntry(): LogEntry;
51
- /**
52
- * @param {LogEntry} latestEntry
53
- */
54
- pushEntry(latestEntry: LogEntry): number;
55
- /**
56
- * @returns {LogEntry[]}
57
- */
58
- dumpUnfiltered(): LogEntry[];
59
- dump(): ([op: "doFulfill", vow: import("@agoric/vow").Vow<import("@endo/pass-style").Passable>, fulfillment: import("@endo/pass-style").Passable] | [op: "doReject", vow: import("@agoric/vow").Vow<import("@endo/pass-style").Passable>, reason: import("@endo/pass-style").Passable] | [op: "doReturn", callIndex: number, result: import("@endo/pass-style").Passable] | [op: "doThrow", callIndex: number, problem: import("@endo/pass-style").Passable] | [op: "checkCall", target: import("@endo/pass-style").Passable, optVerb: PropertyKey | undefined, args: import("@endo/pass-style").Passable[], callIndex: number] | [op: "checkSendOnly", target: import("@endo/pass-style").Passable, optVerb: PropertyKey | undefined, args: import("@endo/pass-style").Passable[], callIndex: number] | [op: "checkSend", target: import("@endo/pass-style").Passable, optVerb: PropertyKey | undefined, args: import("@endo/pass-style").Passable[], callIndex: number])[];
60
- promiseReplayDone(): Promise<undefined>;
61
- }>>>;
32
+ export type LogStore = ReturnType<ReturnType<typeof prepareLogStore>>;
62
33
  import type { Zone } from '@agoric/base-zone';
63
34
  import type { LogEntry } from './types.js';
64
35
  //# sourceMappingURL=log-store.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"log-store.d.ts","sourceRoot":"","sources":["log-store.js"],"names":[],"mappings":"AAmCO,qCAHI,IAAI,GACF,MAAM,CAgBlB;AAOM,sCAFI,IAAI;;;;;;;IAoGT;;OAEG;iBADU,QAAQ;IAcrB;;OAEG;2BADU,QAAQ;IAgBrB;;OAEG;iBADU,QAAQ;IAWrB;;OAEG;2BADQ,QAAQ;IAuCnB;;OAEG;sBADU,QAAQ,EAAE;;;GAwB5B;uBAGY,UAAU,CAAC,UAAU,QApNvB,IAAI;;;;;;;IAoGT;;OAEG;iBADU,QAAQ;IAcrB;;OAEG;2BADU,QAAQ;IAgBrB;;OAEG;iBADU,QAAQ;IAWrB;;OAEG;2BADQ,QAAQ;IAuCnB;;OAEG;sBADU,QAAQ,EAAE;;;GA2BsB,CAAC;0BAlQ7B,mBAAmB;8BAEL,YAAY"}
1
+ {"version":3,"file":"log-store.d.ts","sourceRoot":"","sources":["log-store.js"],"names":[],"mappings":"AAmCO,qCAHI,IAAI,GACF,MAAM,CAgBlB;AAOM,sCAFI,IAAI;;;;;;;IAoGT;;OAEG;iBADU,QAAQ;IAcrB;;OAEG;2BADU,QAAQ;IAgBrB;;OAEG;iBADU,QAAQ;IAWrB;;OAEG;2BADQ,QAAQ;IAuCnB;;OAEG;sBADU,QAAQ,EAAE;;;GAwB5B;uBAGY,UAAU,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;0BAlQpC,mBAAmB;8BAEL,YAAY"}
package/src/log-store.js CHANGED
@@ -264,5 +264,5 @@ export const prepareLogStore = zone => {
264
264
  };
265
265
 
266
266
  /**
267
- * @typedef {ReturnType<ReturnType<prepareLogStore>>} LogStore
267
+ * @typedef {ReturnType<ReturnType<typeof prepareLogStore>>} LogStore
268
268
  */
@@ -5,13 +5,13 @@ export function makeReplayMembrane(arg: {
5
5
  watchWake: (vowish: Promise<any> | Vow) => void;
6
6
  panic: (problem: Error) => never;
7
7
  }): {
8
- hostToGuest: (specimen: Passable, label?: string | undefined) => any;
9
- guestToHost: (specimen: Passable, label?: string | undefined) => any;
8
+ hostToGuest: (specimen: Passable, label?: string) => any;
9
+ guestToHost: (specimen: Passable, label?: string) => any;
10
10
  wake: () => void;
11
11
  stop: () => void;
12
12
  } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & RemotableBrand<{}, {
13
- hostToGuest: (specimen: Passable, label?: string | undefined) => any;
14
- guestToHost: (specimen: Passable, label?: string | undefined) => any;
13
+ hostToGuest: (specimen: Passable, label?: string) => any;
14
+ guestToHost: (specimen: Passable, label?: string) => any;
15
15
  wake: () => void;
16
16
  stop: () => void;
17
17
  }>;
@@ -23,33 +23,17 @@ export function makeReplayMembraneForTesting({ log, bijection, vowTools, watchWa
23
23
  panic: (problem: Error) => never;
24
24
  __eventualSendForTesting?: boolean | undefined;
25
25
  }): {
26
- hostToGuest: (specimen: Passable, label?: string | undefined) => any;
27
- guestToHost: (specimen: Passable, label?: string | undefined) => any;
26
+ hostToGuest: (specimen: Passable, label?: string) => any;
27
+ guestToHost: (specimen: Passable, label?: string) => any;
28
28
  wake: () => void;
29
29
  stop: () => void;
30
30
  } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & RemotableBrand<{}, {
31
- hostToGuest: (specimen: Passable, label?: string | undefined) => any;
32
- guestToHost: (specimen: Passable, label?: string | undefined) => any;
31
+ hostToGuest: (specimen: Passable, label?: string) => any;
32
+ guestToHost: (specimen: Passable, label?: string) => any;
33
33
  wake: () => void;
34
34
  stop: () => void;
35
35
  }>;
36
- export type ReplayMembrane = ReturnType<(arg: {
37
- log: LogStore;
38
- bijection: Bijection;
39
- vowTools: VowTools;
40
- watchWake: (vowish: Promise<any> | Vow) => void;
41
- panic: (problem: Error) => never;
42
- }) => {
43
- hostToGuest: (specimen: Passable, label?: string | undefined) => any;
44
- guestToHost: (specimen: Passable, label?: string | undefined) => any;
45
- wake: () => void;
46
- stop: () => void;
47
- } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & RemotableBrand<{}, {
48
- hostToGuest: (specimen: Passable, label?: string | undefined) => any;
49
- guestToHost: (specimen: Passable, label?: string | undefined) => any;
50
- wake: () => void;
51
- stop: () => void;
52
- }>>;
36
+ export type ReplayMembrane = ReturnType<typeof makeReplayMembrane>;
53
37
  import type { LogStore } from '../src/log-store.js';
54
38
  import type { Bijection } from '../src/bijection.js';
55
39
  import type { VowTools } from '@agoric/vow';
@@ -1 +1 @@
1
- {"version":3,"file":"replay-membrane.d.ts","sourceRoot":"","sources":["replay-membrane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B,SAAS,EAA9C,CAAC,MAAM,EAAE,eAAU,GAAG,KAAK,IAAI;IACA,KAAK,EAApC,CAAC,OAAO,EAAE,KAAK,KAAK,KAAK;IACX,wBAAwB;CAChD;;;;;;;;;;GA4pBA;6BAGa,UAAU,CAAC,OAAO,kBAAkB,CAAC;8BA7rBxB,qBAAqB;+BACpB,qBAAqB;8BAFT,aAAa;yBAAb,aAAa;8BADH,kBAAkB;oCADnC,qBAAqB"}
@@ -714,4 +714,4 @@ export const makeReplayMembraneForTesting = ({
714
714
  };
715
715
  harden(makeReplayMembrane);
716
716
 
717
- /** @typedef {ReturnType<makeReplayMembrane>} ReplayMembrane */
717
+ /** @typedef {ReturnType<typeof makeReplayMembrane>} ReplayMembrane */
package/src/types.d.ts CHANGED
@@ -11,7 +11,7 @@ export type FlowState = 'Running' | 'Sleeping' | 'Replaying' | 'Failed' | 'Done'
11
11
  * but since they still could not be made durable, in this context
12
12
  * it'd be pointless.)
13
13
  */
14
- export type Guest<T extends unknown = any> = T;
14
+ export type Guest<T = any> = T;
15
15
  export type Host<T extends Passable = Passable> = T;
16
16
  /**
17
17
  * A HostVow must be durably storable. It corresponds to an
@@ -39,7 +39,7 @@ export type HostInterface<T> = {
39
39
  * Convert an entire Host interface into what the Guest will receive.
40
40
  */
41
41
  export type GuestInterface<T> = {
42
- [K in keyof T]: T[K] extends (...args: any[]) => Vow<infer R> ? (...args: Parameters<T[K]>) => Promise<R> : T[K] extends HostAsyncFuncWrapper ? GuestOf<T[K]> : T[K] extends (...args: any[]) => infer R ? T[K] : T[K] extends object ? GuestInterface<T[K]> : T[K];
42
+ [K in keyof T]: T[K] extends (...args: any[]) => Vow<infer R> ? (...args: Parameters<T[K]>) => Promise<R> : T[K] extends HostAsyncFuncWrapper ? GuestOf<T[K]> : T[K] extends (...args: any[]) => any ? T[K] : T[K] extends object ? GuestInterface<T[K]> : T[K];
43
43
  };
44
44
  /**
45
45
  * The function the host must provide to match an interface the guest expects.
@@ -65,7 +65,7 @@ export type Outcome = {
65
65
  kind: 'throw';
66
66
  problem: any;
67
67
  };
68
- export type Ephemera<S extends WeakKey = WeakKey, V extends unknown = any> = {
68
+ export type Ephemera<S extends WeakKey = WeakKey, V = any> = {
69
69
  for: (self: S) => V;
70
70
  resetFor: (self: S) => void;
71
71
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,UAAU,GACV,WAAW,GACX,QAAQ,GACR,MAAM,CAAC;AAEX;;;;;;GAMG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,SAAS,OAAO,GAAG,GAAG,IAAI,CAAC,CAAC;AAC/C,MAAM,MAAM,IAAI,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ,IAAI,CAAC,CAAC;AAEpD;;;GAGG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAElE,MAAM,MAAM,cAAc,GAAG,CAC3B,GAAG,cAAc,EAAE,KAAK,EAAE,KACvB,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;AAEzB,MAAM,MAAM,oBAAoB,GAAG,CACjC,GAAG,cAAc,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,KAC3B,OAAO,CAAC,GAAG,CAAC,CAAC;AAElB;;;;GAIG;AACH,MAAM,MAA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EAAE,IAAI,EAAE;IACZ,SAAS,EAAE,MAAM;CAClB,GACD;IACE,EAAE,EAAE,WAAW;IACf,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,WAAW,GAAG,SAAS;IAChC,IAAI,EAAE,IAAI,EAAE;IACZ,SAAS,EAAE,MAAM;CAClB,GACD,CAAC,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,GACpD,CAAC,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC"}
package/src/types.ts CHANGED
@@ -18,7 +18,7 @@ export type FlowState =
18
18
  * but since they still could not be made durable, in this context
19
19
  * it'd be pointless.)
20
20
  */
21
- export type Guest<T extends unknown = any> = T;
21
+ export type Guest<T = any> = T;
22
22
  export type Host<T extends Passable = Passable> = T;
23
23
 
24
24
  /**
@@ -68,7 +68,7 @@ export type GuestInterface<T> = {
68
68
  ? (...args: Parameters<T[K]>) => Promise<R>
69
69
  : T[K] extends HostAsyncFuncWrapper
70
70
  ? GuestOf<T[K]>
71
- : T[K] extends (...args: any[]) => infer R
71
+ : T[K] extends (...args: any[]) => any
72
72
  ? T[K]
73
73
  : T[K] extends object
74
74
  ? GuestInterface<T[K]>
@@ -109,7 +109,7 @@ export type Outcome =
109
109
  problem: any;
110
110
  };
111
111
 
112
- export type Ephemera<S extends WeakKey = WeakKey, V extends unknown = any> = {
112
+ export type Ephemera<S extends WeakKey = WeakKey, V = any> = {
113
113
  for: (self: S) => V;
114
114
  resetFor: (self: S) => void;
115
115
  };
@@ -48,7 +48,7 @@ const prepareOrchestra = (zone, k = 1) =>
48
48
  },
49
49
  );
50
50
 
51
- /** @typedef {ReturnType<ReturnType<prepareOrchestra>>} Orchestra */
51
+ /** @typedef {ReturnType<ReturnType<typeof prepareOrchestra>>} Orchestra */
52
52
 
53
53
  const firstLogLen = 7;
54
54
 
@@ -51,7 +51,7 @@ const prepareOrchestra = (zone, k = 1) =>
51
51
  },
52
52
  );
53
53
 
54
- /** @typedef {ReturnType<ReturnType<prepareOrchestra>>} Orchestra */
54
+ /** @typedef {ReturnType<ReturnType<typeof prepareOrchestra>>} Orchestra */
55
55
 
56
56
  const firstLogLen = 7;
57
57
 
@@ -42,7 +42,7 @@ const prepareBadHost = zone =>
42
42
  },
43
43
  );
44
44
 
45
- /** @typedef {ReturnType<ReturnType<prepareBadHost>>} BadHost */
45
+ /** @typedef {ReturnType<ReturnType<typeof prepareBadHost>>} BadHost */
46
46
 
47
47
  /**
48
48
  * @param {any} t
@@ -37,7 +37,7 @@ const preparePingee = zone =>
37
37
  });
38
38
 
39
39
  /**
40
- * @typedef {ReturnType<ReturnType<preparePingee>>} Pingee
40
+ * @typedef {ReturnType<ReturnType<typeof preparePingee>>} Pingee
41
41
  */
42
42
 
43
43
  const testMode = /** @type {const} */ ({
@@ -1 +1 @@
1
- {"root":["./index.js","./src/async-flow.js","./src/bijection.js","./src/convert.js","./src/endowments.js","./src/ephemera.js","./src/equate.js","./src/log-store.js","./src/replay-membrane.js","./src/type-guards.js","./src/types-index.d.ts","./src/types.ts"],"version":"5.6.3"}
1
+ {"root":["./index.js","./src/async-flow.js","./src/bijection.js","./src/convert.js","./src/endowments.js","./src/ephemera.js","./src/equate.js","./src/log-store.js","./src/replay-membrane.js","./src/type-guards.js","./src/types-index.d.ts","./src/types.ts"],"version":"5.9.3"}