@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 +11 -11
- package/src/callback.d.ts +4 -4
- package/src/callback.d.ts.map +1 -1
- package/src/callback.js +6 -2
- package/src/typeGuards.d.ts +1 -1
- package/src/typeGuards.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/internal",
|
|
3
|
-
"version": "0.3.3-dev-
|
|
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-
|
|
24
|
-
"@agoric/base-zone": "0.1.1-dev-
|
|
25
|
-
"@endo/far": "^0.2.
|
|
26
|
-
"@endo/init": "^0.5.
|
|
27
|
-
"@endo/marshal": "^0.8.
|
|
28
|
-
"@endo/patterns": "^0.2.
|
|
29
|
-
"@endo/promise-kit": "^0.2.
|
|
30
|
-
"@endo/stream": "^0.3.
|
|
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.
|
|
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": "
|
|
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<
|
|
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?: { [
|
|
15
|
-
}) => { [
|
|
16
|
-
export function prepareGuardedAttenuator(zone: import('@agoric/base-zone').Zone, interfaceGuard:
|
|
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: {
|
package/src/callback.d.ts.map
CHANGED
|
@@ -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;
|
|
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
|
|
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 {
|
|
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, {
|
package/src/typeGuards.d.ts
CHANGED
|
@@ -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<
|
|
3
|
+
export const UnguardedHelperI: import("@endo/patterns").InterfaceGuard<Record<PropertyKey, import("@endo/patterns").MethodGuard>>;
|
|
4
4
|
//# sourceMappingURL=typeGuards.d.ts.map
|
package/src/typeGuards.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAIA,gEAA2D;AAE3D,iFAAiF;AACjF,
|
|
1
|
+
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAIA,gEAA2D;AAE3D,iFAAiF;AACjF,kIAKE"}
|