@agoric/notifier 0.6.3-dev-d7e3856.0.d7e3856 → 0.6.3-dev-cbcb2b4.0.cbcb2b4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/notifier",
3
- "version": "0.6.3-dev-d7e3856.0.d7e3856",
3
+ "version": "0.6.3-dev-cbcb2b4.0.cbcb2b4",
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-d7e3856.0.d7e3856",
37
- "@agoric/vat-data": "0.5.3-dev-d7e3856.0.d7e3856",
36
+ "@agoric/internal": "0.3.3-dev-cbcb2b4.0.cbcb2b4",
37
+ "@agoric/vat-data": "0.5.3-dev-cbcb2b4.0.cbcb2b4",
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-d7e3856.0.d7e3856",
46
- "@agoric/swing-store": "0.9.2-dev-d7e3856.0.d7e3856",
47
- "@agoric/swingset-liveslots": "0.10.3-dev-d7e3856.0.d7e3856",
48
- "@agoric/swingset-vat": "0.32.3-dev-d7e3856.0.d7e3856",
45
+ "@agoric/kmarshal": "0.1.1-dev-cbcb2b4.0.cbcb2b4",
46
+ "@agoric/swing-store": "0.9.2-dev-cbcb2b4.0.cbcb2b4",
47
+ "@agoric/swingset-liveslots": "0.10.3-dev-cbcb2b4.0.cbcb2b4",
48
+ "@agoric/swingset-vat": "0.32.3-dev-cbcb2b4.0.cbcb2b4",
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": "d7e38564101d310f8646d4dca377f518a75de579"
81
+ "gitHead": "cbcb2b45335dbc3e56238b85021ded728d402003"
82
82
  }
@@ -1,9 +1,10 @@
1
- export function makeStoredNotifier<T extends PassableCap>(notifier: ERef<Notifier<T>>, storageNode: ERef<StorageNode>, marshaller: ERef<Marshaller>): StoredNotifier<T>;
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":"AAkCO,mCANoB,CAAC,SAAf,WAAa,YACf,KAAK,SAAS,CAAC,CAAC,CAAC,eACjB,KAAK,WAAW,CAAC,cACjB,KAAK,UAAU,CAAC,GACd,cAAc,CAAC,CAAC,CAAC,CAiC7B;2BAlDY,CAAC,IACD,aAAa,CAAC,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC;iCALhB,kBAAkB;8BAFxB,YAAY;0BAD9B,WAAW;iCAEmC,0CAA0C;gCAA1C,0CAA0C;kCADtE,YAAY;iCACgB,0CAA0C"}
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"}
@@ -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, RemotableObject} from '@endo/pass-style';
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 {ERef<StorageNode>} storageNode
32
- * @param {ERef<Marshaller>} marshaller
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: ERef<StorageNode>, marshaller: ERef<ReturnType<typeof makeMarshal>>): StoredSubscriber<T>;
3
- export function makeStoredSubscription<T>(subscription: Subscription<T>, storageNode?: ERef<StorageNode>, marshaller?: ERef<ReturnType<typeof makeMarshal>>): StoredSubscription<T>;
4
- export function makeStoredPublisherKit<T = unknown>(storageNode?: ERef<StorageNode>, marshaller?: ERef<Marshaller>, childPath?: string): StoredPublisherKit<T>;
5
- export function makeStoredPublishKit<T = unknown>(storageNode: ERef<StorageNode>, marshaller: ERef<Marshaller>): StoredPublishKit<T>;
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 { ERef } from '@endo/far';
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
@@ -1 +1 @@
1
- {"version":3,"file":"storesub.d.ts","sourceRoot":"","sources":["storesub.js"],"names":[],"mappings":"AAuBO,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,KAAK,WAAW,CAAC,cACjB,KAAK,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,GAClC,iBAAiB,CAAC,CAAC,CA6B/B;AAkBM,uCANM,CAAC,gBACH,aAAa,CAAC,CAAC,gBACf,KAAK,WAAW,CAAC,eACjB,KAAK,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,GAClC,mBAAmB,CAAC,CAAC,CAqEjC;AAoBM,uCANO,CAAC,0BACJ,KAAK,WAAW,CAAC,eACjB,KAAK,UAAU,CAAC,cAChB,MAAM,GACJ,kBAAkB,CAAC,CAAC,CAAC,CAoBjC;AAgBM,qCALO,CAAC,yBACJ,KAAK,WAAW,CAAC,cACjB,KAAK,UAAU,CAAC,GACd,iBAAiB,CAAC,CAAC,CAU/B;+BAzDY,CAAC;gBAEA,mBAAmB,CAAC,CAAC;eACrB,kBAAkB,CAAC,CAAC;;gCAjKmL,iBAAiB;iCAC9K,0CAA0C;0BAF3E,WAAW;4BATN,eAAe;sCAU0K,iBAAiB;kCAAjB,iBAAiB;wCAAjB,iBAAiB;gCAC9K,0CAA0C;sCADmH,iBAAiB;uCAAjB,iBAAiB"}
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 {Marshaller, StorageNode, Unserializer} from '@agoric/internal/src/lib-chainStorage.js';
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 {ERef<StorageNode>} storageNode
50
- * @param {ERef<ReturnType<typeof makeMarshal>>} marshaller
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 {ERef<StorageNode>} [storageNode]
95
- * @param {ERef<ReturnType<typeof makeMarshal>>} [marshaller]
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 {import('@agoric/internal/src/lib-chainStorage.js').Unserializer} */
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 {ERef<StorageNode>} [storageNode]
181
- * @param {ERef<Marshaller>} [marshaller]
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 {ERef<StorageNode>} storageNode
216
- * @param {ERef<Marshaller>} marshaller
216
+ * @param {ERemote<StorageNode>} storageNode
217
+ * @param {ERemote<Marshaller>} marshaller
217
218
  * @returns {StoredPublishKit<T>}
218
219
  */
219
220
  export const makeStoredPublishKit = (storageNode, marshaller) => {