@agoric/notifier 0.6.3-upgrade-14-dev-c8f9e7b.0 → 0.6.3-upgrade-16-fi-dev-8879538.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/src/subscriber.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // @jessie-check
2
2
 
3
- /// <reference types="ses"/>
3
+ /// <reference types="ses" />
4
4
 
5
5
  import { E, Far } from '@endo/far';
6
6
  import { subscribeEach } from './subscribe.js';
@@ -8,7 +8,9 @@ import { makePublishKit } from './publish-kit.js';
8
8
 
9
9
  import { makePinnedHistoryTopic } from './topic.js';
10
10
 
11
- import './types-ambient.js';
11
+ /**
12
+ * @import {EachTopic, IterationObserver, LatestTopic, Notifier, NotifierRecord, SubscriptionRecord, Publisher, PublishKit, StoredPublishKit, StoredSubscription, StoredSubscriber, Subscriber, Subscription, UpdateRecord} from '../src/types.js';
13
+ */
12
14
 
13
15
  /**
14
16
  * @template T
package/src/topic.d.ts CHANGED
@@ -1,2 +1,4 @@
1
1
  export function makePinnedHistoryTopic<T>(topic: EachTopic<T> & LatestTopic<T>): EachTopic<T> & LatestTopic<T>;
2
+ import type { EachTopic } from '../src/types.js';
3
+ import type { LatestTopic } from '../src/types.js';
2
4
  //# sourceMappingURL=topic.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"topic.d.ts","sourceRoot":"","sources":["topic.js"],"names":[],"mappings":"AAcO,+GAkBN"}
1
+ {"version":3,"file":"topic.d.ts","sourceRoot":"","sources":["topic.js"],"names":[],"mappings":"AAiBO,uCAFiC,CAAC,uEAoBxC;+BA9BwC,iBAAiB;iCAAjB,iBAAiB"}
package/src/topic.js CHANGED
@@ -1,7 +1,10 @@
1
1
  // @jessie-check
2
2
 
3
3
  import { Far } from '@endo/far';
4
- import './types-ambient.js';
4
+
5
+ /**
6
+ * @import {EachTopic, LatestTopic} from '../src/types.js';
7
+ */
5
8
 
6
9
  /**
7
10
  * @deprecated A pinned-history topic preserves all of its published values in
@@ -9,7 +12,7 @@ import './types-ambient.js';
9
12
  *
10
13
  * @template T
11
14
  * @param {EachTopic<T> & LatestTopic<T>} topic needs to be near in order to
12
- * preserve subscription timings. TODO: drop LatestTopic<T> requirement
15
+ * preserve subscription timings. TODO: drop `LatestTopic<T>` requirement
13
16
  * @returns {EachTopic<T> & LatestTopic<T>}
14
17
  */
15
18
  export const makePinnedHistoryTopic = topic => {
package/src/types.d.ts CHANGED
@@ -1,9 +1,3 @@
1
- export type ERef<T> = import('@endo/far').ERef<T>;
2
- export type PromiseKit<T> = import('@endo/promise-kit').PromiseKit<T>;
3
- /**
4
- * Deprecated. Use PromiseKit instead.
5
- */
6
- export type PromiseRecord<T> = import('@endo/promise-kit').PromiseRecord<T>;
7
1
  /**
8
2
  * An AsyncIterator that can be forked at a given position
9
3
  * into multiple independent ForkableAsyncIterators starting from that position.
@@ -25,7 +19,6 @@ export type ForkableAsyncIterable<T, TReturn = any, TNext = undefined> = {
25
19
  [Symbol.asyncIterator]: () => ForkableAsyncIterator<T, TReturn, TNext>;
26
20
  };
27
21
  /**
28
- * <T>
29
22
  * A valid sequence of calls to the methods of an `IterationObserver`
30
23
  * represents an iteration. A valid sequence consists of any number of calls
31
24
  * to `updateState` with the successive non-final values, followed by a
@@ -119,16 +112,10 @@ export type Publisher<T> = {
119
112
  fail: (reason: any) => void;
120
113
  };
121
114
  export type PublishObserver<T> = Partial<Publisher<T>>;
122
- /**
123
- * <T>
124
- */
125
115
  export type PublishKit<T> = {
126
116
  publisher: Publisher<T>;
127
117
  subscriber: Subscriber<T>;
128
118
  };
129
- /**
130
- * <T>
131
- */
132
119
  export type StoredPublishKit<T> = {
133
120
  publisher: Publisher<T>;
134
121
  subscriber: StoredSubscriber<T>;
@@ -148,11 +135,11 @@ export type StoredPublishKit<T> = {
148
135
  * 'mandatory' is the only currently-supported value, and others must not be
149
136
  * enabled without test coverage.
150
137
  */
151
- export type DurablePublishKitValueDurability = 'mandatory' | 'opportunistic' | 'ignored';
138
+ export type DurablePublishKitValueDurability = "mandatory" | "opportunistic" | "ignored";
152
139
  export type DurablePublishKitState = {
153
140
  valueDurability: DurablePublishKitValueDurability;
154
141
  publishCount: bigint;
155
- status: 'live' | 'finished' | 'failed';
142
+ status: "live" | "finished" | "failed";
156
143
  /**
157
144
  * hasValue indicates the presence of value. It starts off false,
158
145
  * and can be reset to false when a durable publish kit is restored and
@@ -165,9 +152,6 @@ export type DurablePublishKitState = {
165
152
  */
166
153
  value: any;
167
154
  };
168
- /**
169
- * <T>
170
- */
171
155
  export type UpdateRecord<T> = {
172
156
  /**
173
157
  * is whatever state the service wants to publish
@@ -186,9 +170,9 @@ export type UpdateRecord<T> = {
186
170
  */
187
171
  export type NotifierInternals<T> = BaseNotifier<T>;
188
172
  /**
189
- * <T> an object that can be used to get the current state or updates
173
+ * an object that can be used to get the current state or updates
190
174
  */
191
- export type Notifier<T> = NotifierInternals<T> & ForkableAsyncIterable<T, T> & SharableNotifier<T>;
175
+ export type Notifier<T> = import("@endo/marshal").RemotableObject & NotifierInternals<T> & ForkableAsyncIterable<T, T> & SharableNotifier<T>;
192
176
  export type SharableNotifier<T> = {
193
177
  /**
194
178
  * Used to replicate the multicast values at other sites. To manually create a
@@ -203,20 +187,19 @@ export type SharableNotifier<T> = {
203
187
  getSharableNotifierInternals: () => Promise<NotifierInternals<T>>;
204
188
  };
205
189
  /**
206
- * <T> the produced notifier/updater pair
190
+ * the produced notifier/updater pair
207
191
  */
208
192
  export type NotifierRecord<T> = {
209
193
  /**
210
194
  * the (closely-held) notifier producer
211
195
  */
212
- updater: IterationObserver<T>;
196
+ updater: import("@endo/marshal").RemotableObject & IterationObserver<T>;
213
197
  /**
214
198
  * the (widely-held) notifier consumer
215
199
  */
216
200
  notifier: Notifier<T>;
217
201
  };
218
202
  /**
219
- * <T>
220
203
  * A form of AsyncIterable supporting distributed and multicast usage.
221
204
  */
222
205
  export type Subscription<T> = IterableEachTopic<T> & EachTopic<T> & SharableSubscription<T>;
@@ -233,69 +216,17 @@ export type SharableSubscription<T> = {
233
216
  */
234
217
  getSharableSubscriptionInternals: () => Promise<EachTopic<T>>;
235
218
  };
236
- /**
237
- * <T>
238
- */
239
219
  export type SubscriptionRecord<T> = {
240
220
  publication: IterationObserver<T>;
241
221
  subscription: Subscription<T>;
242
222
  };
243
- export type Marshaller<Slot = unknown> = import('@endo/marshal').Marshal<Slot>;
244
- export type Unserializer = Pick<Marshaller, 'fromCapData'>;
245
- /**
246
- * Defined by vstorageStoreKey in vstorage.go
247
- */
248
- export type VStorageKey = {
249
- storeName: string;
250
- storeSubkey: string;
251
- dataPrefixBytes: string;
252
- noDataValue?: string | undefined;
253
- };
254
- /**
255
- * This represents a node in an IAVL tree.
256
- *
257
- * The active implementation is x/vstorage, an Agoric extension of the Cosmos SDK.
258
- *
259
- * Vstorage is a hierarchical externally-reachable storage structure that
260
- * identifies children by restricted ASCII name and is associated with arbitrary
261
- * string-valued data for each node, defaulting to the empty string.
262
- */
263
- export type StorageNode = {
264
- /**
265
- * publishes some data (append to the node)
266
- */
267
- setValue: (data: string) => Promise<void>;
268
- /**
269
- * the chain storage path at which the node was constructed
270
- */
271
- getPath: () => string;
272
- /**
273
- * DEPRECATED use getPath
274
- */
275
- getStoreKey: () => Promise<VStorageKey>;
276
- makeChildNode: (subPath: string, options?: {
277
- sequence?: boolean;
278
- }) => StorageNode;
279
- };
280
- export type StoredFacet = {
281
- /**
282
- * the chain storage path at which the node was constructed
283
- */
284
- getPath: () => Promise<string>;
285
- /**
286
- * DEPRECATED use getPath
287
- */
288
- getStoreKey: StorageNode['getStoreKey'];
289
- /**
290
- * get the unserializer for the stored data
291
- */
292
- getUnserializer: () => Unserializer;
293
- };
294
- export type StoredSubscription<T> = Subscription<T> & {
223
+ export type StoredSubscription<T> = ForkableAsyncIterable<T, T, undefined> & EachTopic<T> & SharableSubscription<T> & {
295
224
  getStoreKey: () => Promise<VStorageKey & {
296
225
  subscription: Subscription<T>;
297
226
  }>;
298
227
  getUnserializer: () => Unserializer;
299
228
  };
300
- export type StoredSubscriber<T> = Subscriber<T> & StoredFacet;
229
+ export type StoredSubscriber<T> = LatestTopic<T> & EachTopic<T> & StoredFacet;
230
+ import type { Unserializer } from '@agoric/internal/src/lib-chainStorage.js';
231
+ import type { StoredFacet } from '@agoric/internal/src/lib-chainStorage.js';
301
232
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.js"],"names":[],"mappings":"sBAKa,OAAO,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC;4BAK3B,OAAO,mBAAmB,EAAE,UAAU,CAAC,CAAC,CAAC;;;;+BAOzC,OAAO,mBAAmB,EAAE,aAAa,CAAC,CAAC,CAAC;;;;;yEAO5C,cAAc,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,GAAG;IAC/C,IAAQ,IAAI,sBAAsB,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,CAAA;CACjD;qEAQS;IAAE,CAAC,OAAO,aAAa,CAAC,IAAI,sBAAsB,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,CAAA;CAAE;iFAOtE;IACZ,CAAK,OAAO,aAAa,CAAC,IAAI,8BAA8B,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IAC/E,IAAQ,IAAI,8BAA8B,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,CAAA;CAAE,GAC9D,sBAA0B,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC;;;;yEAQhC;IACZ,CAAK,OAAO,aAAa,CAAC,EAAE,MAAM,sBAAsB,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,CAAA;CACvE;;;;;;;;;;;;iCAc0B,CAAC,KAAK,IAAI;yBACb,CAAC,KAAK,IAAI;mBACd,OAAO,KAAK,IAAI;;;;;;;;UAWzB,eAAe,CAAC,CAAC;;;;;kBACjB,MAAM;UAEN,QAAQ,kBAAkB,CAAC,CAAC,C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ed,CAAC;iBADd,iBAAiB,CACJ,CAAC,AADK,CAAC;kBACpB,YAAY,CAAC,CAAC,CAAC;;+BAS8C,CAAC;iBAA1D,MAAM,OAAO,CAAC,WAAW,GAAG;QAAE,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;KAAE,CAAC;;;6BAOxD,CAAC;kCAvSmB,0CAA0C;iCAA1C,0CAA0C"}
package/src/types.js CHANGED
@@ -1,22 +1,11 @@
1
- export {};
2
1
  // @jessie-check
3
2
 
4
3
  /**
5
- * @template T
6
- * @typedef {import('@endo/far').ERef<T>} ERef
7
- */
8
-
9
- /**
10
- * @template T
11
- * @typedef {import('@endo/promise-kit').PromiseKit<T>} PromiseKit
4
+ * @import {StoredFacet, Unserializer} from '@agoric/internal/src/lib-chainStorage.js';
12
5
  */
13
6
 
14
- /**
15
- * Deprecated. Use PromiseKit instead.
16
- *
17
- * @template T
18
- * @typedef {import('@endo/promise-kit').PromiseRecord<T>} PromiseRecord
19
- */
7
+ // Ensure this is a module.
8
+ export {};
20
9
 
21
10
  /**
22
11
  * @template T
@@ -58,7 +47,7 @@ export {};
58
47
 
59
48
  /**
60
49
  * @template T
61
- * @typedef {object} IterationObserver<T>
50
+ * @typedef {object} IterationObserver
62
51
  * A valid sequence of calls to the methods of an `IterationObserver`
63
52
  * represents an iteration. A valid sequence consists of any number of calls
64
53
  * to `updateState` with the successive non-final values, followed by a
@@ -167,14 +156,14 @@ export {};
167
156
 
168
157
  /**
169
158
  * @template T
170
- * @typedef {object} PublishKit<T>
159
+ * @typedef {object} PublishKit
171
160
  * @property {Publisher<T>} publisher
172
161
  * @property {Subscriber<T>} subscriber
173
162
  */
174
163
 
175
164
  /**
176
165
  * @template T
177
- * @typedef {object} StoredPublishKit<T>
166
+ * @typedef {object} StoredPublishKit
178
167
  * @property {Publisher<T>} publisher
179
168
  * @property {StoredSubscriber<T>} subscriber
180
169
  */
@@ -222,7 +211,7 @@ export {};
222
211
 
223
212
  /**
224
213
  * @template T
225
- * @typedef {object} UpdateRecord<T>
214
+ * @typedef {object} UpdateRecord
226
215
  * @property {T} value is whatever state the service wants to publish
227
216
  * @property {bigint} [updateCount] is a value that identifies the update. For
228
217
  * the last update, it is `undefined`.
@@ -237,10 +226,10 @@ export {};
237
226
 
238
227
  /**
239
228
  * @template T
240
- * @typedef {NotifierInternals<T> &
229
+ * @typedef {import('@endo/marshal').RemotableObject & NotifierInternals<T> &
241
230
  * ForkableAsyncIterable<T, T> &
242
231
  * SharableNotifier<T>
243
- * } Notifier<T> an object that can be used to get the current state or updates
232
+ * } Notifier an object that can be used to get the current state or updates
244
233
  */
245
234
 
246
235
  /**
@@ -259,8 +248,8 @@ export {};
259
248
 
260
249
  /**
261
250
  * @template T
262
- * @typedef {object} NotifierRecord<T> the produced notifier/updater pair
263
- * @property {IterationObserver<T>} updater the (closely-held) notifier producer
251
+ * @typedef {object} NotifierRecord the produced notifier/updater pair
252
+ * @property {import('@endo/marshal').RemotableObject & IterationObserver<T>} updater the (closely-held) notifier producer
264
253
  * @property {Notifier<T>} notifier the (widely-held) notifier consumer
265
254
  */
266
255
 
@@ -269,7 +258,7 @@ export {};
269
258
  /**
270
259
  * @template T
271
260
  * @typedef {IterableEachTopic<T> & EachTopic<T> &
272
- * SharableSubscription<T>} Subscription<T>
261
+ * SharableSubscription<T>} Subscription
273
262
  * A form of AsyncIterable supporting distributed and multicast usage.
274
263
  */
275
264
 
@@ -289,49 +278,13 @@ export {};
289
278
 
290
279
  /**
291
280
  * @template T
292
- * @typedef {object} SubscriptionRecord<T>
281
+ * @typedef {object} SubscriptionRecord
293
282
  * @property {IterationObserver<T>} publication
294
283
  * @property {Subscription<T>} subscription
295
284
  */
296
285
 
297
286
  // /////////////////////////////////////////////////////////////////////////////
298
287
 
299
- /** @template [Slot=unknown] @typedef {import('@endo/marshal').Marshal<Slot>} Marshaller */
300
- /** @typedef {Pick<Marshaller, 'fromCapData'>} Unserializer */
301
-
302
- /**
303
- * Defined by vstorageStoreKey in vstorage.go
304
- *
305
- * @typedef VStorageKey
306
- * @property {string} storeName
307
- * @property {string} storeSubkey
308
- * @property {string} dataPrefixBytes
309
- * @property {string} [noDataValue]
310
- */
311
-
312
- /**
313
- * This represents a node in an IAVL tree.
314
- *
315
- * The active implementation is x/vstorage, an Agoric extension of the Cosmos SDK.
316
- *
317
- * Vstorage is a hierarchical externally-reachable storage structure that
318
- * identifies children by restricted ASCII name and is associated with arbitrary
319
- * string-valued data for each node, defaulting to the empty string.
320
- *
321
- * @typedef {object} StorageNode
322
- * @property {(data: string) => Promise<void>} setValue publishes some data (append to the node)
323
- * @property {() => string} getPath the chain storage path at which the node was constructed
324
- * @property {() => Promise<VStorageKey>} getStoreKey DEPRECATED use getPath
325
- * @property {(subPath: string, options?: {sequence?: boolean}) => StorageNode} makeChildNode
326
- */
327
-
328
- /**
329
- * @typedef {object} StoredFacet
330
- * @property {() => Promise<string>} getPath the chain storage path at which the node was constructed
331
- * @property {StorageNode['getStoreKey']} getStoreKey DEPRECATED use getPath
332
- * @property {() => Unserializer} getUnserializer get the unserializer for the stored data
333
- */
334
-
335
288
  /**
336
289
  * @deprecated use StoredSubscriber
337
290
  * @template T
@@ -3,9 +3,11 @@ export function makeFakeStorage(path: string, publication?: IterationObserver<un
3
3
  countSetValueCalls: () => number;
4
4
  };
5
5
  export function makeFakeMarshaller(): {
6
- toCapData: import("@endo/marshal/src/marshal.js").ToCapData<any>;
7
- fromCapData: import("@endo/marshal/src/marshal.js").FromCapData<any>;
8
- serialize: import("@endo/marshal/src/marshal.js").ToCapData<any>;
9
- unserialize: import("@endo/marshal/src/marshal.js").FromCapData<any>;
6
+ toCapData: import("@endo/marshal").ToCapData<any>;
7
+ fromCapData: import("@endo/marshal").FromCapData<any>;
8
+ serialize: import("@endo/marshal").ToCapData<any>;
9
+ unserialize: import("@endo/marshal").FromCapData<any>;
10
10
  };
11
+ import type { IterationObserver } from '../src/types.js';
12
+ import type { StorageNode } from '@agoric/internal/src/lib-chainStorage.js';
11
13
  //# sourceMappingURL=testSupports.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"testSupports.d.ts","sourceRoot":"","sources":["testSupports.js"],"names":[],"mappings":";AAWO,sCAHI,MAAM;wBAWgC,MAAM,MAAM;EAe5D;AAGM;;;;;EAGH"}
1
+ {"version":3,"file":"testSupports.d.ts","sourceRoot":"","sources":["testSupports.js"],"names":[],"mappings":";AAaO,sCAHI,MAAM;wBAWgC,MAAM,MAAM;EAe5D;AAGM;;;;;EAGH;uCAvCgC,iBAAiB;iCACvB,0CAA0C"}
@@ -1,7 +1,9 @@
1
- // eslint-disable-next-line import/order
2
1
  import { Far, makeMarshal } from '@endo/marshal';
3
2
 
4
- import '../src/types-ambient.js';
3
+ /**
4
+ * @import {IterationObserver} from '../src/types.js';
5
+ * @import {StorageNode} from '@agoric/internal/src/lib-chainStorage.js';
6
+ */
5
7
 
6
8
  export { eventLoopIteration } from '@agoric/internal/src/testing-utils.js';
7
9