@endo/eventual-send 1.3.0 → 1.3.2
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/LICENSE +1 -1
- package/SECURITY.md +2 -2
- package/package.json +5 -6
- package/src/E.d.ts +2 -2
- package/src/E.d.ts.map +1 -1
- package/src/E.js +8 -0
- package/src/no-shim.d.ts +11 -1
- package/src/no-shim.d.ts.map +1 -1
- package/src/no-shim.js +11 -0
- package/src/track-turns.d.ts.map +1 -1
- package/src/track-turns.js +2 -1
- package/src/exports.test-d.d.ts +0 -2
- package/src/exports.test-d.d.ts.map +0 -1
package/LICENSE
CHANGED
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright
|
|
189
|
+
Copyright 2022 Endo Contributors
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
package/SECURITY.md
CHANGED
|
@@ -8,9 +8,9 @@ be made for the most recent branch only.
|
|
|
8
8
|
|
|
9
9
|
## Coordinated Vulnerability Disclosure of Security Bugs
|
|
10
10
|
|
|
11
|
-
SES stands for fearless cooperation, and strong security requires strong collaboration with security researchers. If you believe that you have found a security sensitive bug that should not be disclosed until a fix has been made available, we encourage you to report it. To report a bug in HardenedJS, you have several options that include:
|
|
11
|
+
SES stands for fearless cooperation, and strong security requires strong collaboration with security researchers. If you believe that you have found a security sensitive bug that should not be disclosed until a fix has been made available, we encourage you to report it. To report a bug in HardenedJS, you have several options that include:
|
|
12
12
|
|
|
13
|
-
* Reporting the issue to the [Agoric HackerOne vulnerability rewards program](https://hackerone.com/agoric).
|
|
13
|
+
* Reporting the issue to the [Agoric HackerOne vulnerability rewards program](https://hackerone.com/agoric).
|
|
14
14
|
|
|
15
15
|
* Sending an email to security at (@) agoric.com., encrypted or unencrypted. To encrypt, please use @Warner’s personal GPG key [A476E2E6 11880C98 5B3C3A39 0386E81B 11CAA07A](http://www.lothar.com/warner-gpg.html) .
|
|
16
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@endo/eventual-send",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "Extend a Promise class to implement the eventual-send API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/no-shim.js",
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
"prepack": "tsc --build tsconfig.build.json",
|
|
14
14
|
"postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'",
|
|
15
15
|
"lint-fix": "yarn lint:eslint --fix && yarn lint:types",
|
|
16
|
-
"lint-check": "yarn lint",
|
|
17
16
|
"lint": "yarn lint:types && yarn lint:eslint",
|
|
18
17
|
"lint:types": "tsc",
|
|
19
18
|
"lint:eslint": "eslint '**/*.js'"
|
|
@@ -36,14 +35,14 @@
|
|
|
36
35
|
},
|
|
37
36
|
"homepage": "https://github.com/endojs/endo#readme",
|
|
38
37
|
"dependencies": {
|
|
39
|
-
"@endo/env-options": "^1.1.
|
|
38
|
+
"@endo/env-options": "^1.1.9"
|
|
40
39
|
},
|
|
41
40
|
"devDependencies": {
|
|
42
|
-
"@endo/lockdown": "^1.0.
|
|
41
|
+
"@endo/lockdown": "^1.0.16",
|
|
43
42
|
"ava": "^6.1.3",
|
|
44
43
|
"c8": "^7.14.0",
|
|
45
44
|
"tsd": "^0.31.2",
|
|
46
|
-
"typescript": "~5.
|
|
45
|
+
"typescript": "~5.8.3"
|
|
47
46
|
},
|
|
48
47
|
"keywords": [
|
|
49
48
|
"eventual send",
|
|
@@ -77,5 +76,5 @@
|
|
|
77
76
|
"typeCoverage": {
|
|
78
77
|
"atLeast": 77.81
|
|
79
78
|
},
|
|
80
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "571b7803cf10df7cb4fa9d70e4d53a0b53767fa8"
|
|
81
80
|
}
|
package/src/E.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export type EProxy = ReturnType<(HandledPromise: HandledPromiseConstructor) => (
|
|
|
48
48
|
* @returns {Promise<U>}
|
|
49
49
|
* @readonly
|
|
50
50
|
*/
|
|
51
|
-
readonly when: <T, U = T>(x: T | PromiseLike<T>, onfulfilled?: (
|
|
51
|
+
readonly when: <T, U = T>(x: T | PromiseLike<T>, onfulfilled?: (value: T) => ERef<U>, onrejected?: (reason: any) => ERef<U>) => Promise<U>;
|
|
52
52
|
}>;
|
|
53
53
|
/**
|
|
54
54
|
* Declare an object that is potentially a far reference of type Primary whose
|
|
@@ -163,7 +163,7 @@ declare function makeE(HandledPromise: HandledPromiseConstructor): (<T>(x: T) =>
|
|
|
163
163
|
* @returns {Promise<U>}
|
|
164
164
|
* @readonly
|
|
165
165
|
*/
|
|
166
|
-
readonly when: <T, U = T>(x: T | PromiseLike<T>, onfulfilled?: (
|
|
166
|
+
readonly when: <T, U = T>(x: T | PromiseLike<T>, onfulfilled?: (value: T) => ERef<U>, onrejected?: (reason: any) => ERef<U>) => Promise<U>;
|
|
167
167
|
};
|
|
168
168
|
import type { HandledPromiseConstructor } from './types.js';
|
|
169
169
|
//# sourceMappingURL=E.d.ts.map
|
package/src/E.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"E.d.ts","sourceRoot":"","sources":["E.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"E.d.ts","sourceRoot":"","sources":["E.js"],"names":[],"mappings":";qBAiRc,UAAU,kBAtFb,yBAAyB,OAkBjB,CAAC,KACH,CAAC,KACC,kBAAkB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAKjD;;;;;;;;;;OAUG;mBAJU,CAAC,KACH,CAAC,KACC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAMrC;;;;;;;;OAQG;;;;;;IAGH;;;;;;;;OAQG;wBA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C5D,GACG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,OAAO,YAAY,EAAE,QAAQ,GACtD,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACrE,CAAC,CAAC,CAAC,CAAC,GACT,GACD,CAAC,CACN;AAvQJ;;GAEG;AACH,uCAFW,yBAAyB,KAkBjB,CAAC,KACH,CAAC,KACC,kBAAkB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAKjD;;;;;;;;;;OAUG;mBAJU,CAAC,KACH,CAAC,KACC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAMrC;;;;;;;;OAQG;;;;;;IAGH;;;;;;;;OAQG;wBAJU,CAAC,KACH,CAAC,KACC,0BAA0B,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAO3D;;;;;;;;;;;OAWG;oBAPU,CAAC,EACA,CAAC,SACJ,CAAC,GAAC,WAAW,CAAC,CAAC,CAAC,gBAChB,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,eACrB,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,KACtB,OAAO,CAAC,CAAC,CAAC;EAU9B;+CAtQ6C,YAAY"}
|
package/src/E.js
CHANGED
|
@@ -195,6 +195,14 @@ const makeE = HandledPromise => {
|
|
|
195
195
|
* method calls returns a promise. The method will be invoked on whatever
|
|
196
196
|
* 'x' designates (or resolves to) in a future turn, not this one.
|
|
197
197
|
*
|
|
198
|
+
* An example call would be
|
|
199
|
+
*
|
|
200
|
+
* E(zoe).install(bundle)
|
|
201
|
+
* .then(installationHandle => { ... })
|
|
202
|
+
* .catch(err => { ... });
|
|
203
|
+
*
|
|
204
|
+
* See https://endojs.github.io/endo/functions/_endo_far.E.html for details.
|
|
205
|
+
*
|
|
198
206
|
* @template T
|
|
199
207
|
* @param {T} x target for method/function call
|
|
200
208
|
* @returns {ECallableOrMethods<RemoteFunctions<T>>} method/function call proxy
|
package/src/no-shim.d.ts
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* E(x) returns a proxy on which you can call arbitrary methods. Each of these method calls returns a promise.
|
|
3
|
+
* The method will be invoked on whatever 'x' designates (or resolves to) in a future turn, not this one.
|
|
4
|
+
*
|
|
5
|
+
* E.get(x) returns a proxy on which you can get arbitrary properties. Each of these properties returns a
|
|
6
|
+
* promise for the property. The promise value will be the property fetched from whatever 'x' designates (or
|
|
7
|
+
* resolves to) in a future turn, not this one.
|
|
8
|
+
*
|
|
9
|
+
* E.when(x, res, rej) is equivalent to HandledPromise.resolve(x).then(res, rej)
|
|
10
|
+
*/
|
|
1
11
|
export const E: (<T>(x: T) => ECallableOrMethods<RemoteFunctions<T>>) & {
|
|
2
12
|
readonly get: <T>(x: T) => EGetters<LocalRecord<T>>;
|
|
3
13
|
readonly resolve: {
|
|
@@ -6,7 +16,7 @@ export const E: (<T>(x: T) => ECallableOrMethods<RemoteFunctions<T>>) & {
|
|
|
6
16
|
<T>(value: T | PromiseLike<T>): Promise<Awaited<T>>;
|
|
7
17
|
};
|
|
8
18
|
readonly sendOnly: <T>(x: T) => ESendOnlyCallableOrMethods<RemoteFunctions<T>>;
|
|
9
|
-
readonly when: <T, U = T>(x: T | PromiseLike<T>, onfulfilled?: (
|
|
19
|
+
readonly when: <T, U = T>(x: T | PromiseLike<T>, onfulfilled?: (value: T) => ERef<U>, onrejected?: (reason: any) => ERef<U>) => Promise<U>;
|
|
10
20
|
};
|
|
11
21
|
export { hp as HandledPromise };
|
|
12
22
|
export * from "./exports.js";
|
package/src/no-shim.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-shim.d.ts","sourceRoot":"","sources":["no-shim.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"no-shim.d.ts","sourceRoot":"","sources":["no-shim.js"],"names":[],"mappings":"AAQA;;;;;;;;;GASG;AACH;;;;;;;;;EAA2B;;;qCAduG,QAAQ;wCAAR,QAAQ;iCAAR,QAAQ;8BAAR,QAAQ;gDAAR,QAAQ;0BAAR,QAAQ;AAD1I,qEAAqE;AACrE,6IAA6I;AAE7I;;;oFAA0B;qCAHkB,sBAAsB;6BAAtB,sBAAsB"}
|
package/src/no-shim.js
CHANGED
|
@@ -5,6 +5,17 @@ import makeE from './E.js';
|
|
|
5
5
|
/** @import {ECallableOrMethods, EGetters, ERef, ERemoteFunctions, ESendOnlyCallableOrMethods, LocalRecord, RemoteFunctions} from './E.js' */
|
|
6
6
|
|
|
7
7
|
const hp = HandledPromise;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* E(x) returns a proxy on which you can call arbitrary methods. Each of these method calls returns a promise.
|
|
11
|
+
* The method will be invoked on whatever 'x' designates (or resolves to) in a future turn, not this one.
|
|
12
|
+
*
|
|
13
|
+
* E.get(x) returns a proxy on which you can get arbitrary properties. Each of these properties returns a
|
|
14
|
+
* promise for the property. The promise value will be the property fetched from whatever 'x' designates (or
|
|
15
|
+
* resolves to) in a future turn, not this one.
|
|
16
|
+
*
|
|
17
|
+
* E.when(x, res, rej) is equivalent to HandledPromise.resolve(x).then(res, rej)
|
|
18
|
+
*/
|
|
8
19
|
export const E = makeE(hp);
|
|
9
20
|
export { hp as HandledPromise };
|
|
10
21
|
|
package/src/track-turns.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"track-turns.d.ts","sourceRoot":"","sources":["track-turns.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"track-turns.d.ts","sourceRoot":"","sources":["track-turns.js"],"names":[],"mappings":"AA4FO,2BAJwB,CAAC,SAAlB,aAAa,EAAG,SACnB,CAAC,GACC,CAAC,CAmBb;;;;;4BAMY,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,GAAG,SAAS"}
|
package/src/track-turns.js
CHANGED
|
@@ -27,7 +27,8 @@ const VERBOSE = environmentOptionsListHas('DEBUG', 'track-turns');
|
|
|
27
27
|
// Track-turns is disabled by default and can be enabled by an environment
|
|
28
28
|
// option.
|
|
29
29
|
const ENABLED =
|
|
30
|
-
|
|
30
|
+
/** @type {'disabled' | 'enabled'} */
|
|
31
|
+
(getEnvironmentOption('TRACK_TURNS', 'disabled', ['enabled'])) === 'enabled';
|
|
31
32
|
|
|
32
33
|
// We hoist the following functions out of trackTurns() to discourage the
|
|
33
34
|
// closures from holding onto 'args' or 'func' longer than necessary,
|
package/src/exports.test-d.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exports.test-d.d.ts","sourceRoot":"","sources":["exports.test-d.ts"],"names":[],"mappings":""}
|