@agoric/internal 0.3.3-dev-d355030.0 → 0.3.3-dev-7cead9c.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/internal",
3
- "version": "0.3.3-dev-d355030.0+d355030",
3
+ "version": "0.3.3-dev-7cead9c.0+7cead9c",
4
4
  "description": "Externally unsupported utilities internal to agoric-sdk",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -20,19 +20,19 @@
20
20
  "lint:types": "tsc"
21
21
  },
22
22
  "dependencies": {
23
- "@agoric/assert": "0.6.1-dev-d355030.0+d355030",
24
- "@agoric/base-zone": "0.1.1-dev-d355030.0+d355030",
25
- "@endo/far": "^0.2.19",
26
- "@endo/init": "^0.5.57",
27
- "@endo/marshal": "^0.8.6",
28
- "@endo/patterns": "^0.2.3",
29
- "@endo/promise-kit": "^0.2.57",
30
- "@endo/stream": "^0.3.26",
23
+ "@agoric/assert": "0.6.1-dev-7cead9c.0+7cead9c",
24
+ "@agoric/base-zone": "0.1.1-dev-7cead9c.0+7cead9c",
25
+ "@endo/far": "^0.2.21",
26
+ "@endo/init": "^0.5.59",
27
+ "@endo/marshal": "^0.8.8",
28
+ "@endo/patterns": "^0.2.5",
29
+ "@endo/promise-kit": "^0.2.59",
30
+ "@endo/stream": "^0.3.28",
31
31
  "anylogger": "^0.21.0",
32
32
  "jessie.js": "^0.3.2"
33
33
  },
34
34
  "devDependencies": {
35
- "@endo/init": "^0.5.57",
35
+ "@endo/init": "^0.5.59",
36
36
  "ava": "^5.3.0",
37
37
  "tsd": "^0.28.1"
38
38
  },
@@ -49,5 +49,5 @@
49
49
  "publishConfig": {
50
50
  "access": "public"
51
51
  },
52
- "gitHead": "d35503027f8de03dfedf7bc3a5adce00d0985435"
52
+ "gitHead": "7cead9c21830d2936f08849568d65a131af3a2fd"
53
53
  }
package/src/callback.d.ts CHANGED
@@ -6,14 +6,14 @@ export function makeSyncMethodCallback<I extends (...args: unknown[]) => any, P
6
6
  export function makeMethodCallback<I extends (...args: unknown[]) => any, P extends PropertyKey, T extends import("@endo/far").ERef<{ [x in P]: (...args: [...B, ...Parameters<I>]) => ReturnType<I>; }> = import("@endo/far").ERef<{ [x_1 in P]: I; }>, B extends unknown[] = []>(target: T, methodName: P, ...bound: B): import("./types").Callback<I>;
7
7
  export function isCallback(callback: any): callback is import("./types").Callback<any>;
8
8
  export function prepareAttenuator<M extends PropertyKey>(zone: import('@agoric/base-zone').Zone, methodNames: M[], { interfaceGuard, tag }?: {
9
- interfaceGuard?: import("@endo/patterns").InterfaceGuard<Record<string | symbol, import("@endo/patterns").MethodGuard>> | undefined;
9
+ interfaceGuard?: import("@endo/patterns").InterfaceGuard<{ [K in M]: import("@endo/patterns").MethodGuard; }> | undefined;
10
10
  tag?: string | undefined;
11
11
  }): (args_0: {
12
12
  target?: any;
13
13
  isSync?: boolean | undefined;
14
- overrides?: { [K in M]?: import("./types").Callback<any> | null | undefined; } | undefined;
15
- }) => { [K_1 in M]: (this: any, ...args: unknown[]) => any; } & import("@endo/eventual-send").RemotableBrand<{}, { [K_1 in M]: (this: any, ...args: unknown[]) => any; }>;
16
- export function prepareGuardedAttenuator(zone: import('@agoric/base-zone').Zone, interfaceGuard: import('@endo/patterns').InterfaceGuard, opts?: {
14
+ overrides?: { [K_1 in M]?: import("./types").Callback<any> | null | undefined; } | undefined;
15
+ }) => { [K_2 in M]: (this: any, ...args: unknown[]) => any; } & import("@endo/eventual-send").RemotableBrand<{}, { [K_2 in M]: (this: any, ...args: unknown[]) => any; }>;
16
+ export function prepareGuardedAttenuator<G extends import("@endo/patterns").InterfaceGuard<Record<PropertyKey, import("@endo/patterns").MethodGuard>>>(zone: import('@agoric/base-zone').Zone, interfaceGuard: G, opts?: {
17
17
  tag?: string | undefined;
18
18
  } | undefined): MakeAttenuator<any>;
19
19
  export type MakeAttenuator<T> = (args_0: {
@@ -1 +1 @@
1
- {"version":3,"file":"callback.d.ts","sourceRoot":"","sources":["callback.js"],"names":[],"mappings":"AAuDO,6CALiB,OAAO,EAAE,KAAK,GAAG,sFAWxC;AAWM,0CALiB,OAAO,EAAE,KAAK,GAAG,oGAWxC;AAaM,6DAPiB,OAAO,EAAE,KAAK,GAAG,2JAaxC;AAeM,yDATiB,OAAO,EAAE,KAAK,GAAG,2MAexC;AAiBM,2DAXiB,OAAO,EAAE,KAAK,GAAG,iOAoBxC;AAiBM,uDAXiB,OAAO,EAAE,KAAK,GAAG,iRAmBxC;AAOM,qCAHI,GAAG,+CAeb;AAcM,+DAPI,OAAO,mBAAmB,EAAE,IAAI;IAGe,cAAc;IAE/C,GAAG;;aAkEb,GAAG;;;2BAxDgB,GAAG,WAAW,OAAO,EAAE,KAAK,GAAG,4EAA/B,GAAG,WAAW,OAAO,EAAE,KAAK,GAAG,KA2FhE;AAWM,+CALI,OAAO,mBAAmB,EAAE,IAAI,kBAChC,OAAO,gBAAgB,EAAE,cAAc;;oCAYjD;;;;;;;;;MAhToE,QAAQ,CAAC,CAAC;yCAIvD,OAAO,EAAE,KAAK,GAAG,IAC5B,OAAO,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;6CAIlB,OAAO,EAAE,KAAK,GAAG,IAC5B,OAAO,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;yBAGpB,OAAO,qBAAqB,EAAE,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC"}
1
+ {"version":3,"file":"callback.d.ts","sourceRoot":"","sources":["callback.js"],"names":[],"mappings":"AAuDO,6CALiB,OAAO,EAAE,KAAK,GAAG,sFAWxC;AAWM,0CALiB,OAAO,EAAE,KAAK,GAAG,oGAWxC;AAaM,6DAPiB,OAAO,EAAE,KAAK,GAAG,2JAaxC;AAeM,yDATiB,OAAO,EAAE,KAAK,GAAG,2MAexC;AAiBM,2DAXiB,OAAO,EAAE,KAAK,GAAG,iOAoBxC;AAiBM,uDAXiB,OAAO,EAAE,KAAK,GAAG,iRAmBxC;AAOM,qCAHI,GAAG,+CAeb;AAgBM,+DATI,OAAO,mBAAmB,EAAE,IAAI;IAK9B,cAAc;IAEF,GAAG;;aAkEb,GAAG;;;2BAxDgB,GAAG,WAAW,OAAO,EAAE,KAAK,GAAG,4EAA/B,GAAG,WAAW,OAAO,EAAE,KAAK,GAAG,KA2FhE;AAYM,6JALI,OAAO,mBAAmB,EAAE,IAAI;;oCAc1C;;;;;;;;;MApToE,QAAQ,CAAC,CAAC;yCAIvD,OAAO,EAAE,KAAK,GAAG,IAC5B,OAAO,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;6CAIlB,OAAO,EAAE,KAAK,GAAG,IAC5B,OAAO,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;yBAGpB,OAAO,qBAAqB,EAAE,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC"}
package/src/callback.js CHANGED
@@ -196,7 +196,9 @@ harden(isCallback);
196
196
  * @param {import('@agoric/base-zone').Zone} zone The zone in which to allocate attenuators.
197
197
  * @param {M[]} methodNames Methods to forward.
198
198
  * @param {object} opts
199
- * @param {import('@endo/patterns').InterfaceGuard} [opts.interfaceGuard] An interface guard for the
199
+ * @param {import('@endo/patterns').InterfaceGuard<{
200
+ * [K in M]: import('@endo/patterns').MethodGuard
201
+ * }>} [opts.interfaceGuard] An interface guard for the
200
202
  * new attenuator.
201
203
  * @param {string} [opts.tag] A tag for the new attenuator exoClass.
202
204
  */
@@ -305,12 +307,14 @@ harden(prepareAttenuator);
305
307
  /**
306
308
  * Prepare an attenuator whose methodNames are derived from the interfaceGuard.
307
309
  *
310
+ * @template {import('@endo/patterns').InterfaceGuard} G
308
311
  * @param {import('@agoric/base-zone').Zone} zone
309
- * @param {import('@endo/patterns').InterfaceGuard} interfaceGuard
312
+ * @param {G} interfaceGuard
310
313
  * @param {object} [opts]
311
314
  * @param {string} [opts.tag]
312
315
  */
313
316
  export const prepareGuardedAttenuator = (zone, interfaceGuard, opts = {}) => {
317
+ // TODO: Handle symbolMethodGuards too?
314
318
  const { methodGuards } = interfaceGuard;
315
319
  const methodNames = ownKeys(methodGuards);
316
320
  const makeAttenuator = prepareAttenuator(zone, methodNames, {
@@ -1,4 +1,4 @@
1
1
  export const StorageNodeShape: import("@endo/patterns").Matcher;
2
2
  /** To be used only for 'helper' facets where the calls are from trusted code. */
3
- export const UnguardedHelperI: import("@endo/patterns").InterfaceGuard<any>;
3
+ export const UnguardedHelperI: import("@endo/patterns").InterfaceGuard<Record<PropertyKey, import("@endo/patterns").MethodGuard>>;
4
4
  //# sourceMappingURL=typeGuards.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAIA,gEAA2D;AAE3D,iFAAiF;AACjF,4EAKE"}
1
+ {"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAIA,gEAA2D;AAE3D,iFAAiF;AACjF,kIAKE"}