@agoric/notifier 0.7.0-upgrade-16-dev-12b78e3.0 → 0.7.0-upgrade-17-dev-a61cdab.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 -16
- package/src/notifier.d.ts +2 -1
- package/src/notifier.d.ts.map +1 -1
- package/src/notifier.js +3 -2
- package/src/publish-kit.d.ts.map +1 -1
- package/src/publish-kit.js +4 -5
- package/src/subscribe.d.ts.map +1 -1
- package/src/subscribe.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/notifier",
|
|
3
|
-
"version": "0.7.0-upgrade-
|
|
3
|
+
"version": "0.7.0-upgrade-17-dev-a61cdab.0+a61cdab",
|
|
4
4
|
"description": "Notifier allows services to update clients about state changes using a stream of promises",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -33,21 +33,21 @@
|
|
|
33
33
|
},
|
|
34
34
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@agoric/
|
|
37
|
-
"@agoric/
|
|
38
|
-
"@
|
|
39
|
-
"@endo/far": "^1.1.
|
|
40
|
-
"@endo/marshal": "^1.5.
|
|
41
|
-
"@endo/patterns": "^1.4.
|
|
42
|
-
"@endo/promise-kit": "^1.1.
|
|
36
|
+
"@agoric/internal": "0.4.0-upgrade-17-dev-a61cdab.0+a61cdab",
|
|
37
|
+
"@agoric/vat-data": "0.5.3-upgrade-17-dev-a61cdab.0+a61cdab",
|
|
38
|
+
"@endo/errors": "^1.2.5",
|
|
39
|
+
"@endo/far": "^1.1.5",
|
|
40
|
+
"@endo/marshal": "^1.5.3",
|
|
41
|
+
"@endo/patterns": "^1.4.3",
|
|
42
|
+
"@endo/promise-kit": "^1.1.5"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@agoric/kmarshal": "0.1.1-upgrade-
|
|
46
|
-
"@agoric/swing-store": "0.9.2-upgrade-
|
|
47
|
-
"@agoric/swingset-liveslots": "0.10.3-upgrade-
|
|
48
|
-
"@agoric/swingset-vat": "0.33.0-upgrade-
|
|
49
|
-
"@endo/init": "^1.1.
|
|
50
|
-
"@endo/ses-ava": "^1.2.
|
|
45
|
+
"@agoric/kmarshal": "0.1.1-upgrade-17-dev-a61cdab.0+a61cdab",
|
|
46
|
+
"@agoric/swing-store": "0.9.2-upgrade-17-dev-a61cdab.0+a61cdab",
|
|
47
|
+
"@agoric/swingset-liveslots": "0.10.3-upgrade-17-dev-a61cdab.0+a61cdab",
|
|
48
|
+
"@agoric/swingset-vat": "0.33.0-upgrade-17-dev-a61cdab.0+a61cdab",
|
|
49
|
+
"@endo/init": "^1.1.4",
|
|
50
|
+
"@endo/ses-ava": "^1.2.5",
|
|
51
51
|
"ava": "^5.3.0",
|
|
52
52
|
"c8": "^9.1.0"
|
|
53
53
|
},
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"timeout": "2m"
|
|
77
77
|
},
|
|
78
78
|
"typeCoverage": {
|
|
79
|
-
"atLeast": 90.
|
|
79
|
+
"atLeast": 90.33
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "a61cdabb23bd2c846e003dee7326018a7462a929"
|
|
82
82
|
}
|
package/src/notifier.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export function makeNotifier<T>(sharableInternalsP: ERef<LatestTopic<T>>): Notifier<T>;
|
|
2
|
-
export function makeNotifierFromSubscriber<T>(subscriber: ERef<Subscriber<T>>): Notifier<T>;
|
|
2
|
+
export function makeNotifierFromSubscriber<T>(subscriber: ERef<Subscriber<T>> | Remote<Subscriber<T>>): Notifier<T>;
|
|
3
3
|
export function makeNotifierKit<T>(...initialStateArr: [] | [T]): NotifierRecord<T>;
|
|
4
4
|
export function makeNotifierFromAsyncIterable<T>(asyncIterableP: ERef<AsyncIterable<T>>): Notifier<T>;
|
|
5
5
|
import type { LatestTopic } from './types.js';
|
|
6
6
|
import type { Notifier } from './types.js';
|
|
7
7
|
import type { Subscriber } from './types.js';
|
|
8
|
+
import type { Remote } from '@agoric/internal';
|
|
8
9
|
import type { NotifierRecord } from './types.js';
|
|
9
10
|
//# sourceMappingURL=notifier.d.ts.map
|
package/src/notifier.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifier.d.ts","sourceRoot":"","sources":["notifier.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"notifier.d.ts","sourceRoot":"","sources":["notifier.js"],"names":[],"mappings":"AAkBO,6BAJM,CAAC,sBACH,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,GAClB,SAAS,CAAC,CAAC,CAwBvB;AAOM,2CAJM,CAAC,cACH,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,OAAO,WAAW,CAAC,CAAC,CAAC,GACzC,SAAS,CAAC,CAAC,CAiBvB;AAoBM,gCAJM,CAAC,sBACH,EAAE,GAAG,CAAC,CAAC,CAAC,GACN,eAAe,CAAC,CAAC,CAsB7B;AAcM,8CAJM,CAAC,kBACH,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,GACpB,SAAS,CAAC,CAAC,CAuEvB;iCA/K6F,YAAY;8BAAZ,YAAY;gCAAZ,YAAY;4BADjF,kBAAkB;oCACmD,YAAY"}
|
package/src/notifier.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/// <reference types="ses" />
|
|
2
2
|
|
|
3
|
-
import { assert } from '@
|
|
3
|
+
import { assert } from '@endo/errors';
|
|
4
4
|
import { E, Far } from '@endo/far';
|
|
5
5
|
|
|
6
6
|
import { makePublishKit } from './publish-kit.js';
|
|
7
7
|
import { subscribeLatest } from './subscribe.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
+
* @import {Remote} from '@agoric/internal';
|
|
10
11
|
* @import {LatestTopic, Notifier, NotifierRecord, PublishKit, Subscriber, UpdateRecord} from './types.js';
|
|
11
12
|
*/
|
|
12
13
|
|
|
@@ -41,7 +42,7 @@ export const makeNotifier = sharableInternalsP => {
|
|
|
41
42
|
|
|
42
43
|
/**
|
|
43
44
|
* @template T
|
|
44
|
-
* @param {ERef<Subscriber<T>>} subscriber
|
|
45
|
+
* @param {ERef<Subscriber<T>> | Remote<Subscriber<T>>} subscriber
|
|
45
46
|
* @returns {Notifier<T>}
|
|
46
47
|
*/
|
|
47
48
|
export const makeNotifierFromSubscriber = subscriber => {
|
package/src/publish-kit.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-kit.d.ts","sourceRoot":"","sources":["publish-kit.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"publish-kit.d.ts","sourceRoot":"","sources":["publish-kit.js"],"names":[],"mappings":"AAuBA;;;;GAIG;AAGH,gEAA6D;AAC7D;;;GAGG;;;;;AAMH;;;;GAOE;AAEF;;;GAMG;AAEH;;;GAMG;AA+CI,+BA2CQ,CAAC,KA7CH,WAAW,CAAC,CAAC,CA4FzB;AA6MM,kDAHI,OAAO,4BAA4B,EAAE,OAAO,YAC5C,MAAM;;yBA3JsB,WAAW;;;;;;;;;;GAsOjD;AAGD,+DAAyD;4CAlP3C,UAAU,GAAC,CAAC;;;;;;cASZ,OAAO,CAAC,GAAC,CAAC,GAAG,SAAS;;;;WAEtB,OAAO,CAAC,GAAC,CAAC;;;;;WACV,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC,GAAG,SAAS;;gCAjPsI,iBAAiB;+BAAjB,iBAAiB"}
|
package/src/publish-kit.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/// <reference types="ses" />
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Fail, q } from '@endo/errors';
|
|
4
4
|
import { E, Far } from '@endo/far';
|
|
5
|
-
import { M, getInterfaceGuardPayload } from '@endo/patterns';
|
|
6
5
|
import { makePromiseKit } from '@endo/promise-kit';
|
|
6
|
+
import { M, getInterfaceGuardPayload } from '@endo/patterns';
|
|
7
|
+
import { canBeDurable, prepareExoClassKit } from '@agoric/vat-data';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* @import {ERef} from '@endo/far';
|
|
10
11
|
* @import {DurablePublishKitState, DurablePublishKitValueDurability, LatestTopic, Notifier, NotifierRecord, PublicationRecord, Publisher, PublishKit, Subscriber, UpdateRecord} from '../src/types.js';
|
|
11
12
|
*/
|
|
12
13
|
|
|
13
|
-
const { Fail, quote: q } = assert;
|
|
14
|
-
|
|
15
14
|
const sink = () => {};
|
|
16
15
|
const makeQuietRejection = reason => {
|
|
17
16
|
const rejection = harden(Promise.reject(reason));
|
|
@@ -19,7 +18,7 @@ const makeQuietRejection = reason => {
|
|
|
19
18
|
return rejection;
|
|
20
19
|
};
|
|
21
20
|
const tooFarRejection = makeQuietRejection(
|
|
22
|
-
harden(
|
|
21
|
+
harden(Error('Cannot read past end of iteration.')),
|
|
23
22
|
);
|
|
24
23
|
|
|
25
24
|
export const PublisherI = M.interface('Publisher', {
|
package/src/subscribe.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscribe.d.ts","sourceRoot":"","sources":["subscribe.js"],"names":[],"mappings":"AAqEO,0BAHM,CAAC,OACH,KAAK,qBAAqB,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;GAYrC;AAuEG,8BAHM,CAAC,SACH,KAAK,UAAU,CAAC,CAAC,CAAC;;;;GAU5B;AAsGM,gCAHM,CAAC,SACH,KAAK,YAAY,CAAC,CAAC,CAAC;;;;GAO9B;
|
|
1
|
+
{"version":3,"file":"subscribe.d.ts","sourceRoot":"","sources":["subscribe.js"],"names":[],"mappings":"AAqEO,0BAHM,CAAC,OACH,KAAK,qBAAqB,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;GAYrC;AAuEG,8BAHM,CAAC,SACH,KAAK,UAAU,CAAC,CAAC,CAAC;;;;GAU5B;AAsGM,gCAHM,CAAC,SACH,KAAK,YAAY,CAAC,CAAC,CAAC;;;;GAO9B;0BAnQsB,WAAW;+BAC6N,iBAAiB;mDAAjB,iBAAiB;iCAAjB,iBAAiB"}
|
package/src/subscribe.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { X, Fail, annotateError } from '@endo/errors';
|
|
1
2
|
import { E, Far } from '@endo/far';
|
|
2
3
|
import { isObject } from '@endo/marshal';
|
|
3
4
|
import { isUpgradeDisconnection } from '@agoric/internal/src/upgrade-api.js';
|
|
@@ -7,7 +8,6 @@ import { isUpgradeDisconnection } from '@agoric/internal/src/upgrade-api.js';
|
|
|
7
8
|
* @import {IterationObserver, LatestTopic, Notifier, NotifierRecord, PublicationRecord, Publisher, PublishKit, StoredPublishKit, StoredSubscription, StoredSubscriber, Subscriber, Subscription, UpdateRecord, EachTopic, ForkableAsyncIterableIterator} from '../src/types.js';
|
|
8
9
|
*/
|
|
9
10
|
|
|
10
|
-
const { details: X, Fail } = assert;
|
|
11
11
|
const sink = () => {};
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -48,7 +48,7 @@ const reconnectAsNeeded = async (getter, seed = []) => {
|
|
|
48
48
|
// for which it is a result.
|
|
49
49
|
if (isObject(err) && disconnection && disconnection !== err) {
|
|
50
50
|
try {
|
|
51
|
-
|
|
51
|
+
annotateError(
|
|
52
52
|
err,
|
|
53
53
|
X`Attempting to recover from disconnection: ${disconnection}`,
|
|
54
54
|
);
|