@endo/eventual-send 0.17.5 → 1.0.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 +16 -7
- package/src/E.d.ts +9 -1
- package/src/E.d.ts.map +1 -1
- package/src/E.js +3 -3
- package/src/handled-promise.js +2 -2
- package/utils.d.ts +2 -0
- package/utils.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@endo/eventual-send",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Extend a Promise class to implement the eventual-send API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/no-shim.js",
|
|
@@ -10,14 +10,20 @@
|
|
|
10
10
|
"test:xs": "exit 0",
|
|
11
11
|
"build": "exit 0",
|
|
12
12
|
"clean": "git clean -f '*.d.ts*'",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
13
|
+
"build:types": "tsc --build tsconfig.build.json",
|
|
14
|
+
"clean:types": "git clean -f '*.d.ts*'",
|
|
15
15
|
"lint-fix": "yarn lint:eslint --fix && yarn lint:types",
|
|
16
16
|
"lint-check": "yarn lint",
|
|
17
17
|
"lint": "yarn lint:types && yarn lint:eslint",
|
|
18
18
|
"lint:types": "tsc",
|
|
19
19
|
"lint:eslint": "eslint '**/*.js'"
|
|
20
20
|
},
|
|
21
|
+
"exports": {
|
|
22
|
+
"./package.json": "./package.json",
|
|
23
|
+
".": "./src/no-shim.js",
|
|
24
|
+
"./shim.js": "./shim.js",
|
|
25
|
+
"./utils.js": "./utils.js"
|
|
26
|
+
},
|
|
21
27
|
"repository": {
|
|
22
28
|
"type": "git",
|
|
23
29
|
"url": "git+https://github.com/endojs/endo.git"
|
|
@@ -29,11 +35,11 @@
|
|
|
29
35
|
},
|
|
30
36
|
"homepage": "https://github.com/endojs/endo#readme",
|
|
31
37
|
"dependencies": {
|
|
32
|
-
"@endo/env-options": "^0.
|
|
38
|
+
"@endo/env-options": "^1.0.0"
|
|
33
39
|
},
|
|
34
40
|
"devDependencies": {
|
|
35
|
-
"@endo/lockdown": "^0.
|
|
36
|
-
"@endo/ses-ava": "^0.
|
|
41
|
+
"@endo/lockdown": "^1.0.0",
|
|
42
|
+
"@endo/ses-ava": "^1.0.0",
|
|
37
43
|
"ava": "^5.3.0",
|
|
38
44
|
"c8": "^7.14.0",
|
|
39
45
|
"tsd": "^0.28.1"
|
|
@@ -63,5 +69,8 @@
|
|
|
63
69
|
],
|
|
64
70
|
"timeout": "2m"
|
|
65
71
|
},
|
|
66
|
-
"
|
|
72
|
+
"typeCoverage": {
|
|
73
|
+
"atLeast": 77.79
|
|
74
|
+
},
|
|
75
|
+
"gitHead": "6aa22009bf8128575c446aebceb0f9a01459d165"
|
|
67
76
|
}
|
package/src/E.d.ts
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
export default makeE;
|
|
2
2
|
export type EProxy = ReturnType<(HandledPromise: {
|
|
3
3
|
new <R>(executor: import("./handled-promise.js").HandledExecutor<R>, unfulfilledHandler?: import("./handled-promise.js").Handler<Promise<unknown>> | undefined): Promise<R>;
|
|
4
|
-
prototype: Promise<unknown>;
|
|
4
|
+
prototype: Promise<unknown>; /**
|
|
5
|
+
* E.sendOnly returns a proxy similar to E, but for which the results
|
|
6
|
+
* are ignored (undefined is returned).
|
|
7
|
+
*
|
|
8
|
+
* @template T
|
|
9
|
+
* @param {T} x target for method/function call
|
|
10
|
+
* @returns {ESendOnlyCallableOrMethods<RemoteFunctions<T>>} method/function call proxy
|
|
11
|
+
* @readonly
|
|
12
|
+
*/
|
|
5
13
|
} & PromiseConstructor & import("./handled-promise.js").HandledPromiseStaticMethods) => (<T>(x: T) => ECallableOrMethods<RemoteFunctions<T>>) & {
|
|
6
14
|
/**
|
|
7
15
|
* E.get(x) returns a proxy on which you can get arbitrary properties.
|
package/src/E.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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;AA3OxE;;GAEG;AACH,uCAFW,OAAO,SAAS,EAAE,yBAAyB;IAgB9C;;;;;;;;;;OAUG;;IAMH;;;;;;;;OAQG;;;;;;IAGH;;;;;;;;OAQG;;IAMH;;;;;;;;;;;OAWG;yIAHiB,GAAG;EAW9B"}
|
package/src/E.js
CHANGED
|
@@ -31,7 +31,7 @@ const baseFreezableProxyHandler = {
|
|
|
31
31
|
/**
|
|
32
32
|
* A Proxy handler for E(x).
|
|
33
33
|
*
|
|
34
|
-
* @param {
|
|
34
|
+
* @param {any} x Any value passed to E(x)
|
|
35
35
|
* @param {import('./types').HandledPromiseConstructor} HandledPromise
|
|
36
36
|
* @returns {ProxyHandler} the Proxy handler
|
|
37
37
|
*/
|
|
@@ -74,7 +74,7 @@ const makeEProxyHandler = (x, HandledPromise) =>
|
|
|
74
74
|
* A Proxy handler for E.sendOnly(x)
|
|
75
75
|
* It is a variant on the E(x) Proxy handler.
|
|
76
76
|
*
|
|
77
|
-
* @param {
|
|
77
|
+
* @param {any} x Any value passed to E.sendOnly(x)
|
|
78
78
|
* @param {import('./types').HandledPromiseConstructor} HandledPromise
|
|
79
79
|
* @returns {ProxyHandler} the Proxy handler
|
|
80
80
|
*/
|
|
@@ -115,7 +115,7 @@ const makeESendOnlyProxyHandler = (x, HandledPromise) =>
|
|
|
115
115
|
* A Proxy handler for E.get(x)
|
|
116
116
|
* It is a variant on the E(x) Proxy handler.
|
|
117
117
|
*
|
|
118
|
-
* @param {
|
|
118
|
+
* @param {any} x Any value passed to E.get(x)
|
|
119
119
|
* @param {import('./types').HandledPromiseConstructor} HandledPromise
|
|
120
120
|
* @returns {ProxyHandler} the Proxy handler
|
|
121
121
|
*/
|
package/src/handled-promise.js
CHANGED
|
@@ -73,8 +73,8 @@ export const makeHandledPromise = () => {
|
|
|
73
73
|
* to propagate changes down to the children efficiently:
|
|
74
74
|
* https://en.wikipedia.org/wiki/Disjoint-set_data_structure
|
|
75
75
|
*
|
|
76
|
-
* @param {
|
|
77
|
-
* @returns {
|
|
76
|
+
* @param {any} target Any value.
|
|
77
|
+
* @returns {any} If the target was a HandledPromise, the most-resolved parent
|
|
78
78
|
* of it, otherwise the target.
|
|
79
79
|
*/
|
|
80
80
|
const shorten = target => {
|
package/utils.d.ts
ADDED
package/utils.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getMethodNames } from './src/local.js';
|