@agoric/vow 0.1.1-dev-5d70529.0 → 0.1.1-dev-c87930e.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 +4 -4
- package/src/when.d.ts.map +1 -1
- package/src/when.js +20 -18
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/vow",
|
|
3
|
-
"version": "0.1.1-dev-
|
|
3
|
+
"version": "0.1.1-dev-c87930e.0+c87930e",
|
|
4
4
|
"description": "Remote (shortening and disconnection-tolerant) Promise-likes",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"lint:types": "tsc"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@agoric/base-zone": "0.1.1-dev-
|
|
24
|
-
"@agoric/internal": "0.3.3-dev-
|
|
23
|
+
"@agoric/base-zone": "0.1.1-dev-c87930e.0+c87930e",
|
|
24
|
+
"@agoric/internal": "0.3.3-dev-c87930e.0+c87930e",
|
|
25
25
|
"@endo/env-options": "^1.1.4",
|
|
26
26
|
"@endo/errors": "^1.2.2",
|
|
27
27
|
"@endo/eventual-send": "^1.2.2",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"typeCoverage": {
|
|
57
57
|
"atLeast": 89.93
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "c87930eadf94cb146f054d5f31429c5156c7dacd"
|
|
60
60
|
}
|
package/src/when.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"when.d.ts","sourceRoot":"","sources":["when.js"],"names":[],"mappings":"AAQO,
|
|
1
|
+
{"version":3,"file":"when.d.ts","sourceRoot":"","sources":["when.js"],"names":[],"mappings":"AAQO,8EAiEQ,CAAC,EACA,QAAQ,eACR,QAAQ,qBACX,CAAC,yBACO,QAAQ,CAAC,CAAC,KAAK,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,sCAC9C,GAAG,KAAK,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,kBAC/C,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAc1C;mBAIa,UAAU,CAAC,OAAO,QAAQ,CAAC;uCA9FO,YAAY;6BAAZ,YAAY"}
|
package/src/when.js
CHANGED
|
@@ -36,24 +36,26 @@ export const makeWhen = (
|
|
|
36
36
|
if (seenPayloads.has(vowV0)) {
|
|
37
37
|
throw Error('Vow resolution cycle detected');
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
39
|
+
|
|
40
|
+
try {
|
|
41
|
+
// Shorten the vow to the "next step", whether another vow or a final
|
|
42
|
+
// result.
|
|
43
|
+
const res = await basicE(vowV0).shorten();
|
|
44
|
+
|
|
45
|
+
// Prevent cycles in the resolution graph.
|
|
46
|
+
seenPayloads.add(vowV0);
|
|
47
|
+
priorRetryValue = undefined;
|
|
48
|
+
result = res;
|
|
49
|
+
} catch (e) {
|
|
50
|
+
const nextRetryValue = isRetryableReason(e, priorRetryValue);
|
|
51
|
+
if (!nextRetryValue) {
|
|
52
|
+
// Not a retry, so just reject with the reason.
|
|
53
|
+
throw e;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Shorten the same specimen to try again.
|
|
57
|
+
priorRetryValue = nextRetryValue;
|
|
58
|
+
}
|
|
57
59
|
// Advance to the next vow.
|
|
58
60
|
payload = getVowPayload(result);
|
|
59
61
|
}
|