@agoric/notifier 0.6.3-dev-0610edb.0.0610edb → 0.6.3-dev-6cba6bb.0.6cba6bb
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 +8 -8
- package/src/stored-notifier.d.ts +2 -1
- package/src/stored-notifier.d.ts.map +1 -1
- package/src/stored-notifier.js +4 -3
- package/src/storesub.d.ts +5 -7
- package/src/storesub.d.ts.map +1 -1
- package/src/storesub.js +11 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/notifier",
|
|
3
|
-
"version": "0.6.3-dev-
|
|
3
|
+
"version": "0.6.3-dev-6cba6bb.0.6cba6bb",
|
|
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,8 +33,8 @@
|
|
|
33
33
|
},
|
|
34
34
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@agoric/internal": "0.3.3-dev-
|
|
37
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
36
|
+
"@agoric/internal": "0.3.3-dev-6cba6bb.0.6cba6bb",
|
|
37
|
+
"@agoric/vat-data": "0.5.3-dev-6cba6bb.0.6cba6bb",
|
|
38
38
|
"@endo/errors": "^1.2.13",
|
|
39
39
|
"@endo/far": "^1.1.14",
|
|
40
40
|
"@endo/marshal": "^1.8.0",
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"@endo/promise-kit": "^1.1.13"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@agoric/kmarshal": "0.1.1-dev-
|
|
46
|
-
"@agoric/swing-store": "0.9.2-dev-
|
|
47
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
48
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
45
|
+
"@agoric/kmarshal": "0.1.1-dev-6cba6bb.0.6cba6bb",
|
|
46
|
+
"@agoric/swing-store": "0.9.2-dev-6cba6bb.0.6cba6bb",
|
|
47
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-6cba6bb.0.6cba6bb",
|
|
48
|
+
"@agoric/swingset-vat": "0.32.3-dev-6cba6bb.0.6cba6bb",
|
|
49
49
|
"@endo/init": "^1.1.12",
|
|
50
50
|
"@endo/ses-ava": "^1.3.2",
|
|
51
51
|
"ava": "^5.3.0",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"typeCoverage": {
|
|
79
79
|
"atLeast": 90.92
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "6cba6bb0285dfcd39d88f4833c151963ea70dd33"
|
|
82
82
|
}
|
package/src/stored-notifier.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export function makeStoredNotifier<T extends PassableCap>(notifier: ERef<Notifier<T>>, storageNode:
|
|
1
|
+
export function makeStoredNotifier<T extends PassableCap>(notifier: ERef<Notifier<T>>, storageNode: ERemote<StorageNode>, marshaller: ERemote<Marshaller>): StoredNotifier<T>;
|
|
2
2
|
export type StoredNotifier<T> = BaseNotifier<T> & Omit<StoredFacet, "getStoreKey">;
|
|
3
3
|
import type { PassableCap } from '@endo/pass-style';
|
|
4
4
|
import type { Notifier } from './types.js';
|
|
5
5
|
import type { ERef } from '@endo/far';
|
|
6
6
|
import type { StorageNode } from '@agoric/internal/src/lib-chainStorage.js';
|
|
7
|
+
import type { ERemote } from '@agoric/internal';
|
|
7
8
|
import type { Marshaller } from '@agoric/internal/src/lib-chainStorage.js';
|
|
8
9
|
import type { BaseNotifier } from './types.js';
|
|
9
10
|
import type { StoredFacet } from '@agoric/internal/src/lib-chainStorage.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stored-notifier.d.ts","sourceRoot":"","sources":["stored-notifier.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stored-notifier.d.ts","sourceRoot":"","sources":["stored-notifier.js"],"names":[],"mappings":"AAmCO,mCANoB,CAAC,SAAf,WAAa,YACf,KAAK,SAAS,CAAC,CAAC,CAAC,eACjB,QAAQ,WAAW,CAAC,cACpB,QAAQ,UAAU,CAAC,GACjB,cAAc,CAAC,CAAC,CAAC,CAiC7B;2BAlDY,CAAC,IACD,aAAa,CAAC,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC;iCALjC,kBAAkB;8BAHP,YAAY;0BAD9B,WAAW;iCAGmC,0CAA0C;6BADrF,kBAAkB;gCACyB,0CAA0C;kCAFtE,YAAY;iCAEgB,0CAA0C"}
|
package/src/stored-notifier.js
CHANGED
|
@@ -8,8 +8,9 @@ import { observeNotifier } from './asyncIterableAdaptor.js';
|
|
|
8
8
|
/**
|
|
9
9
|
* @import {ERef} from '@endo/far';
|
|
10
10
|
* @import {BaseNotifier, Notifier} from './types.js';
|
|
11
|
+
* @import {ERemote} from '@agoric/internal';
|
|
11
12
|
* @import {Marshaller, StoredFacet, StorageNode, Unserializer} from '@agoric/internal/src/lib-chainStorage.js';
|
|
12
|
-
* @import {PassableCap
|
|
13
|
+
* @import {PassableCap} from '@endo/pass-style';
|
|
13
14
|
*/
|
|
14
15
|
|
|
15
16
|
/**
|
|
@@ -28,8 +29,8 @@ import { observeNotifier } from './asyncIterableAdaptor.js';
|
|
|
28
29
|
*
|
|
29
30
|
* @template {PassableCap} T
|
|
30
31
|
* @param {ERef<Notifier<T>>} notifier
|
|
31
|
-
* @param {
|
|
32
|
-
* @param {
|
|
32
|
+
* @param {ERemote<StorageNode>} storageNode
|
|
33
|
+
* @param {ERemote<Marshaller>} marshaller
|
|
33
34
|
* @returns {StoredNotifier<T>}
|
|
34
35
|
*/
|
|
35
36
|
export const makeStoredNotifier = (notifier, storageNode, marshaller) => {
|
package/src/storesub.d.ts
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
export function forEachPublicationRecord<T>(subscriber: Subscriber<T>, consumeValue: (v: T) => void): Promise<void>;
|
|
2
|
-
export function makeStoredSubscriber<T extends import("@endo/marshal").PassableCap>(subscriber: Subscriber<T>, storageNode:
|
|
3
|
-
export function makeStoredSubscription<T>(subscription: Subscription<T>, storageNode?:
|
|
4
|
-
export function makeStoredPublisherKit<T = unknown>(storageNode?:
|
|
5
|
-
export function makeStoredPublishKit<T = unknown>(storageNode:
|
|
2
|
+
export function makeStoredSubscriber<T extends import("@endo/marshal").PassableCap>(subscriber: Subscriber<T>, storageNode: ERemote<StorageNode>, marshaller: ERemote<Marshaller>): StoredSubscriber<T>;
|
|
3
|
+
export function makeStoredSubscription<T>(subscription: Subscription<T>, storageNode?: ERemote<StorageNode> | null, marshaller?: ERemote<Marshaller>): StoredSubscription<T>;
|
|
4
|
+
export function makeStoredPublisherKit<T = unknown>(storageNode?: ERemote<StorageNode> | null, marshaller?: ERemote<Marshaller>, childPath?: string): StoredPublisherKit<T>;
|
|
5
|
+
export function makeStoredPublishKit<T = unknown>(storageNode: ERemote<StorageNode>, marshaller: ERemote<Marshaller>): StoredPublishKit<T>;
|
|
6
6
|
export type StoredPublisherKit<T> = {
|
|
7
7
|
subscriber: StoredSubscription<T>;
|
|
8
8
|
publisher: IterationObserver<T>;
|
|
9
9
|
};
|
|
10
10
|
import type { Subscriber } from '../src/types.js';
|
|
11
11
|
import type { StorageNode } from '@agoric/internal/src/lib-chainStorage.js';
|
|
12
|
-
import type {
|
|
13
|
-
import { makeMarshal } from '@endo/marshal';
|
|
12
|
+
import type { ERemote } from '@agoric/internal';
|
|
14
13
|
import type { StoredSubscriber } from '../src/types.js';
|
|
15
14
|
import type { Subscription } from '../src/types.js';
|
|
16
15
|
import type { StoredSubscription } from '../src/types.js';
|
|
17
|
-
import type { Marshaller } from '@agoric/internal/src/lib-chainStorage.js';
|
|
18
16
|
import type { StoredPublishKit } from '../src/types.js';
|
|
19
17
|
import type { IterationObserver } from '../src/types.js';
|
|
20
18
|
//# sourceMappingURL=storesub.d.ts.map
|
package/src/storesub.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storesub.d.ts","sourceRoot":"","sources":["storesub.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"storesub.d.ts","sourceRoot":"","sources":["storesub.js"],"names":[],"mappings":"AAwBO,yCAJM,CAAC,cACH,WAAW,CAAC,CAAC,gBACb,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,iBAcxB;AAiBM,qCAN4C,CAAC,SAAvC,OAAQ,eAAe,EAAE,WAAY,cACvC,WAAW,CAAC,CAAC,eACb,QAAQ,WAAW,CAAC,cACpB,QAAQ,UAAU,CAAC,GACjB,iBAAiB,CAAC,CAAC,CA6B/B;AAkBM,uCANM,CAAC,gBACH,aAAa,CAAC,CAAC,gBACf,QAAQ,WAAW,CAAC,GAAG,IAAI,eAC3B,QAAQ,UAAU,CAAC,GACjB,mBAAmB,CAAC,CAAC,CAqEjC;AAoBM,uCANO,CAAC,0BACJ,QAAQ,WAAW,CAAC,GAAG,IAAI,eAC3B,QAAQ,UAAU,CAAC,cACnB,MAAM,GACJ,kBAAkB,CAAC,CAAC,CAAC,CAoBjC;AAgBM,qCALO,CAAC,yBACJ,QAAQ,WAAW,CAAC,cACpB,QAAQ,UAAU,CAAC,GACjB,iBAAiB,CAAC,CAAC,CAU/B;+BAzDY,CAAC;gBAEA,mBAAmB,CAAC,CAAC;eACrB,kBAAkB,CAAC,CAAC;;gCAjKmL,iBAAiB;iCAC1L,0CAA0C;6BAH5D,kBAAkB;sCAEyK,iBAAiB;kCAAjB,iBAAiB;wCAAjB,iBAAiB;sCAAjB,iBAAiB;uCAAjB,iBAAiB"}
|
package/src/storesub.js
CHANGED
|
@@ -8,9 +8,10 @@ import { makeSubscriptionKit } from './subscriber.js';
|
|
|
8
8
|
import { subscribeEach } from './subscribe.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
+
* @import {ERemote} from '@agoric/internal';
|
|
11
12
|
* @import {ERef} from '@endo/far';
|
|
12
13
|
* @import {IterationObserver, LatestTopic, Notifier, NotifierRecord, PublicationRecord, Publisher, PublishKit, StoredPublishKit, StoredSubscription, StoredSubscriber, Subscriber, Subscription, UpdateRecord} from '../src/types.js';
|
|
13
|
-
* @import {
|
|
14
|
+
* @import {StorageNode, Unserializer} from '@agoric/internal/src/lib-chainStorage.js';
|
|
14
15
|
*/
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -46,8 +47,8 @@ export const forEachPublicationRecord = async (subscriber, consumeValue) => {
|
|
|
46
47
|
*
|
|
47
48
|
* @template {import('@endo/marshal').PassableCap} T
|
|
48
49
|
* @param {Subscriber<T>} subscriber
|
|
49
|
-
* @param {
|
|
50
|
-
* @param {
|
|
50
|
+
* @param {ERemote<StorageNode>} storageNode
|
|
51
|
+
* @param {ERemote<Marshaller>} marshaller
|
|
51
52
|
* @returns {StoredSubscriber<T>}
|
|
52
53
|
*/
|
|
53
54
|
export const makeStoredSubscriber = (subscriber, storageNode, marshaller) => {
|
|
@@ -91,8 +92,8 @@ export const makeStoredSubscriber = (subscriber, storageNode, marshaller) => {
|
|
|
91
92
|
*
|
|
92
93
|
* @template T
|
|
93
94
|
* @param {Subscription<T>} subscription
|
|
94
|
-
* @param {
|
|
95
|
-
* @param {
|
|
95
|
+
* @param {ERemote<StorageNode> | null} [storageNode]
|
|
96
|
+
* @param {ERemote<Marshaller>} [marshaller]
|
|
96
97
|
* @returns {StoredSubscription<T>}
|
|
97
98
|
*/
|
|
98
99
|
export const makeStoredSubscription = (
|
|
@@ -103,7 +104,7 @@ export const makeStoredSubscription = (
|
|
|
103
104
|
serializeBodyFormat: 'smallcaps',
|
|
104
105
|
}),
|
|
105
106
|
) => {
|
|
106
|
-
/** @type {
|
|
107
|
+
/** @type {Unserializer} */
|
|
107
108
|
const unserializer = Far('unserializer', {
|
|
108
109
|
fromCapData: data => E(marshaller).fromCapData(data),
|
|
109
110
|
unserialize: data => E(marshaller).fromCapData(data),
|
|
@@ -177,8 +178,8 @@ harden(makeStoredSubscription);
|
|
|
177
178
|
* @deprecated incompatible with durability; instead handle vstorage ephemerally on a durable PublishKit
|
|
178
179
|
*
|
|
179
180
|
* @template [T=unknown]
|
|
180
|
-
* @param {
|
|
181
|
-
* @param {
|
|
181
|
+
* @param {ERemote<StorageNode> | null} [storageNode]
|
|
182
|
+
* @param {ERemote<Marshaller>} [marshaller]
|
|
182
183
|
* @param {string} [childPath]
|
|
183
184
|
* @returns {StoredPublisherKit<T>}
|
|
184
185
|
*/
|
|
@@ -212,8 +213,8 @@ export const makeStoredPublisherKit = (storageNode, marshaller, childPath) => {
|
|
|
212
213
|
* What's different is `subscriber` tees records, writing out to storageNode.
|
|
213
214
|
*
|
|
214
215
|
* @template [T=unknown]
|
|
215
|
-
* @param {
|
|
216
|
-
* @param {
|
|
216
|
+
* @param {ERemote<StorageNode>} storageNode
|
|
217
|
+
* @param {ERemote<Marshaller>} marshaller
|
|
217
218
|
* @returns {StoredPublishKit<T>}
|
|
218
219
|
*/
|
|
219
220
|
export const makeStoredPublishKit = (storageNode, marshaller) => {
|