@agoric/notifier 0.6.3-other-dev-3eb1a1d.0 → 0.6.3-other-dev-d15096d.0.d15096d

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,23 +1,23 @@
1
1
  {
2
2
  "name": "@agoric/notifier",
3
- "version": "0.6.3-other-dev-3eb1a1d.0+3eb1a1d",
3
+ "version": "0.6.3-other-dev-d15096d.0.d15096d",
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",
7
7
  "engines": {
8
- "node": "^18.12 || ^20.9"
8
+ "node": "^20.9 || ^22.11"
9
9
  },
10
10
  "scripts": {
11
11
  "build": "exit 0",
12
- "prepack": "tsc --build tsconfig.build.json",
13
- "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'",
12
+ "prepack": "yarn run -T tsc --build tsconfig.build.json",
13
+ "postpack": "git clean -f '*.d.*ts*' '*.tsbuildinfo'",
14
14
  "test": "ava",
15
- "test:c8": "c8 --all $C8_OPTIONS ava",
15
+ "test:c8": "c8 --all ${C8_OPTIONS:-} ava",
16
16
  "test:xs": "exit 0",
17
17
  "lint-fix": "yarn lint:eslint --fix",
18
- "lint": "run-s --continue-on-error lint:*",
19
- "lint:eslint": "eslint .",
20
- "lint:types": "tsc"
18
+ "lint": "yarn run -T run-s --continue-on-error 'lint:*'",
19
+ "lint:eslint": "yarn run -T eslint .",
20
+ "lint:types": "yarn run -T tsc"
21
21
  },
22
22
  "repository": {
23
23
  "type": "git",
@@ -33,23 +33,23 @@
33
33
  },
34
34
  "homepage": "https://github.com/Agoric/agoric-sdk#readme",
35
35
  "dependencies": {
36
- "@agoric/internal": "0.3.3-other-dev-3eb1a1d.0+3eb1a1d",
37
- "@agoric/vat-data": "0.5.3-other-dev-3eb1a1d.0+3eb1a1d",
38
- "@endo/errors": "^1.2.8",
39
- "@endo/far": "^1.1.9",
40
- "@endo/marshal": "^1.6.2",
41
- "@endo/patterns": "^1.4.7",
42
- "@endo/promise-kit": "^1.1.8"
36
+ "@agoric/internal": "0.3.3-other-dev-d15096d.0.d15096d",
37
+ "@agoric/vat-data": "0.5.3-other-dev-d15096d.0.d15096d",
38
+ "@endo/errors": "^1.2.13",
39
+ "@endo/far": "^1.1.14",
40
+ "@endo/marshal": "^1.8.0",
41
+ "@endo/patterns": "^1.7.0",
42
+ "@endo/promise-kit": "^1.1.13"
43
43
  },
44
44
  "devDependencies": {
45
- "@agoric/kmarshal": "0.1.1-other-dev-3eb1a1d.0+3eb1a1d",
46
- "@agoric/swing-store": "0.9.2-other-dev-3eb1a1d.0+3eb1a1d",
47
- "@agoric/swingset-liveslots": "0.10.3-other-dev-3eb1a1d.0+3eb1a1d",
48
- "@agoric/swingset-vat": "0.32.3-other-dev-3eb1a1d.0+3eb1a1d",
49
- "@endo/init": "^1.1.7",
50
- "@endo/ses-ava": "^1.2.8",
45
+ "@agoric/kmarshal": "0.1.1-other-dev-d15096d.0.d15096d",
46
+ "@agoric/swing-store": "0.9.2-other-dev-d15096d.0.d15096d",
47
+ "@agoric/swingset-liveslots": "0.10.3-other-dev-d15096d.0.d15096d",
48
+ "@agoric/swingset-vat": "0.32.3-other-dev-d15096d.0.d15096d",
49
+ "@endo/init": "^1.1.12",
50
+ "@endo/ses-ava": "^1.3.2",
51
51
  "ava": "^5.3.0",
52
- "c8": "^10.1.2"
52
+ "c8": "^10.1.3"
53
53
  },
54
54
  "exports": {
55
55
  ".": "./src/index.js",
@@ -76,7 +76,7 @@
76
76
  "timeout": "2m"
77
77
  },
78
78
  "typeCoverage": {
79
- "atLeast": 90.77
79
+ "atLeast": 90.92
80
80
  },
81
- "gitHead": "3eb1a1d2d75b2b4a94807cd3bf759bc9fc531f05"
81
+ "gitHead": "d15096dc4ff8b96e9b6cd11954c20d3a9efbb393"
82
82
  }
package/src/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // @jessie-check
2
- /// <reference types="@agoric/internal/exported" />
2
+ /// <reference types="@agoric/internal/exported.js" />
3
3
 
4
4
  export {
5
5
  makePublishKit,
@@ -26,19 +26,7 @@ export const IterableLatestTopicI: import("@endo/patterns").InterfaceGuard<{
26
26
  [Symbol.asyncIterator]: import("@endo/patterns").MethodGuard;
27
27
  }>;
28
28
  export function makePublishKit<T>(): PublishKit<T>;
29
- export function prepareDurablePublishKit(baggage: import("@agoric/swingset-liveslots").Baggage, kindName: string): (options?: {
30
- valueDurability?: "mandatory" | undefined;
31
- } | undefined) => import("@endo/exo").GuardedKit<{
32
- publisher: {
33
- publish(value: any): void;
34
- finish(finalValue: any): void;
35
- fail(reason: any): void;
36
- };
37
- subscriber: {
38
- subscribeAfter(publishCount?: bigint): Promise<any>;
39
- getUpdateSince(updateCount: any): any;
40
- };
41
- }>;
29
+ export function prepareDurablePublishKit(baggage: Baggage, kindName: string): <T>(options?: Parameters<typeof initDurablePublishKitState>[0]) => PublishKit<T>;
42
30
  export const SubscriberShape: import("@endo/patterns").Matcher;
43
31
  export type DurablePublishKitEphemeralKey = Publisher<any>;
44
32
  export type DurablePublishKitEphemeralData = {
@@ -58,5 +46,16 @@ export type DurablePublishKitEphemeralData = {
58
46
  tailR: ((value: any) => void) | undefined;
59
47
  };
60
48
  import type { PublishKit } from '../src/types.js';
49
+ import type { Baggage } from '@agoric/swingset-liveslots';
50
+ /**
51
+ * @param {object} [options]
52
+ * @param {DurablePublishKitValueDurability & 'mandatory'} [options.valueDurability]
53
+ * @returns {DurablePublishKitState}
54
+ */
55
+ declare function initDurablePublishKitState(options?: {
56
+ valueDurability?: "mandatory" | undefined;
57
+ }): DurablePublishKitState;
61
58
  import type { Publisher } from '../src/types.js';
59
+ import type { DurablePublishKitState } from '../src/types.js';
60
+ export {};
62
61
  //# sourceMappingURL=publish-kit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"publish-kit.d.ts","sourceRoot":"","sources":["publish-kit.js"],"names":[],"mappings":"AAuBA;;;;GAIG;AAGH,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* @import {ERef} from '@endo/far';
11
11
  * @import {DurablePublishKitState, DurablePublishKitValueDurability, LatestTopic, Notifier, NotifierRecord, PublicationRecord, Publisher, PublishKit, Subscriber, UpdateRecord} from '../src/types.js';
12
+ * @import {Baggage} from '@agoric/swingset-liveslots';
12
13
  */
13
14
 
14
15
  const sink = () => {};
@@ -400,17 +401,15 @@ const advanceDurablePublishKit = (context, value, targetStatus = 'live') => {
400
401
  };
401
402
 
402
403
  /**
403
- * @param {import('@agoric/swingset-liveslots').Baggage} baggage
404
+ * @param {Baggage} baggage
404
405
  * @param {string} kindName
406
+ * @returns {<T>(options?: Parameters<typeof initDurablePublishKitState>[0]) => PublishKit<T>}
405
407
  */
406
408
  export const prepareDurablePublishKit = (baggage, kindName) => {
407
409
  // TODO: Once we unify with makePublishKit, we will use a Zone-compatible weak
408
410
  // map for memoization.
409
411
  const makeMemoizedUpdateRecord = makeUpdateRecordFromPublicationRecord;
410
412
 
411
- /**
412
- * @returns {() => PublishKit<*>}
413
- */
414
413
  return prepareExoClassKit(
415
414
  baggage,
416
415
  kindName,
@@ -1,10 +1,11 @@
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<EMarshaller>): 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 { Marshaller } from '@agoric/internal/src/lib-chainStorage.js';
7
+ import type { ERemote } from '@agoric/internal';
8
+ import type { EMarshaller } from '@agoric/internal/src/marshal/wrap-marshaller.js';
8
9
  import type { BaseNotifier } from './types.js';
9
10
  import type { StoredFacet } from '@agoric/internal/src/lib-chainStorage.js';
10
11
  //# sourceMappingURL=stored-notifier.d.ts.map
@@ -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":"AAoCO,mCANoB,CAAC,SAAf,WAAa,YACf,KAAK,SAAS,CAAC,CAAC,CAAC,eACjB,QAAQ,WAAW,CAAC,cACpB,QAAQ,WAAW,CAAC,GAClB,cAAc,CAAC,CAAC,CAAC,CAiC7B;2BAlDY,CAAC,IACD,aAAa,CAAC,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC;iCALjC,kBAAkB;8BAJP,YAAY;0BAD9B,WAAW;iCAIuB,0CAA0C;6BAFzE,kBAAkB;iCACd,iDAAiD;kCAFtC,YAAY;iCAGI,0CAA0C"}
@@ -8,8 +8,10 @@ import { observeNotifier } from './asyncIterableAdaptor.js';
8
8
  /**
9
9
  * @import {ERef} from '@endo/far';
10
10
  * @import {BaseNotifier, Notifier} from './types.js';
11
- * @import {Marshaller, StoredFacet, StorageNode, Unserializer} from '@agoric/internal/src/lib-chainStorage.js';
12
- * @import {PassableCap, RemotableObject} from '@endo/pass-style';
11
+ * @import {ERemote} from '@agoric/internal';
12
+ * @import {EMarshaller} from '@agoric/internal/src/marshal/wrap-marshaller.js';
13
+ * @import {StoredFacet, StorageNode, Unserializer} from '@agoric/internal/src/lib-chainStorage.js';
14
+ * @import {PassableCap} from '@endo/pass-style';
13
15
  */
14
16
 
15
17
  /**
@@ -28,8 +30,8 @@ import { observeNotifier } from './asyncIterableAdaptor.js';
28
30
  *
29
31
  * @template {PassableCap} T
30
32
  * @param {ERef<Notifier<T>>} notifier
31
- * @param {ERef<StorageNode>} storageNode
32
- * @param {ERef<Marshaller>} marshaller
33
+ * @param {ERemote<StorageNode>} storageNode
34
+ * @param {ERemote<EMarshaller>} marshaller
33
35
  * @returns {StoredNotifier<T>}
34
36
  */
35
37
  export const makeStoredNotifier = (notifier, storageNode, marshaller) => {
package/src/storesub.d.ts CHANGED
@@ -1,30 +1,20 @@
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> | undefined, marshaller?: ERef<{
4
- toCapData: import("@endo/marshal").ToCapData<unknown>;
5
- fromCapData: import("@endo/marshal").FromCapData<unknown>;
6
- serialize: import("@endo/marshal").ToCapData<unknown>;
7
- unserialize: import("@endo/marshal").FromCapData<unknown>;
8
- }> | undefined): StoredSubscription<T>;
9
- export function makeStoredPublisherKit<T = unknown>(storageNode?: ERef<StorageNode> | undefined, marshaller?: ERef<{
10
- toCapData: import("@endo/marshal").ToCapData<unknown>;
11
- fromCapData: import("@endo/marshal").FromCapData<unknown>;
12
- serialize: import("@endo/marshal").ToCapData<unknown>;
13
- unserialize: import("@endo/marshal").FromCapData<unknown>;
14
- }> | undefined, childPath?: string | undefined): StoredPublisherKit<T>;
15
- export function makeStoredPublishKit<T = unknown>(storageNode: ERef<StorageNode>, marshaller: ERef<Marshaller>): StoredPublishKit<T>;
2
+ export function makeStoredSubscriber<T extends PassableCap>(subscriber: Subscriber<T>, storageNode: ERemote<StorageNode>, marshaller: ERemote<EMarshaller>): StoredSubscriber<T>;
3
+ export function makeStoredSubscription<T>(subscription: Subscription<T>, storageNode?: ERemote<StorageNode> | null, marshaller?: ERemote<EMarshaller>): StoredSubscription<T>;
4
+ export function makeStoredPublisherKit<T = unknown>(storageNode?: ERemote<StorageNode> | null, marshaller?: ERemote<EMarshaller>, childPath?: string): StoredPublisherKit<T>;
5
+ export function makeStoredPublishKit<T = unknown>(storageNode: ERemote<StorageNode>, marshaller: ERemote<EMarshaller>): StoredPublishKit<T>;
16
6
  export type StoredPublisherKit<T> = {
17
7
  subscriber: StoredSubscription<T>;
18
8
  publisher: IterationObserver<T>;
19
9
  };
20
10
  import type { Subscriber } from '../src/types.js';
11
+ import type { PassableCap } from '@endo/marshal';
21
12
  import type { StorageNode } from '@agoric/internal/src/lib-chainStorage.js';
22
- import type { ERef } from '@endo/far';
23
- import { makeMarshal } from '@endo/marshal';
13
+ import type { ERemote } from '@agoric/internal';
14
+ import type { EMarshaller } from '@agoric/internal/src/marshal/wrap-marshaller.js';
24
15
  import type { StoredSubscriber } from '../src/types.js';
25
16
  import type { Subscription } from '../src/types.js';
26
17
  import type { StoredSubscription } from '../src/types.js';
27
- import type { Marshaller } from '@agoric/internal/src/lib-chainStorage.js';
28
18
  import type { StoredPublishKit } from '../src/types.js';
29
19
  import type { IterationObserver } from '../src/types.js';
30
20
  //# 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,KAA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AClB,iBAAiB,CAAC,CAAC,CAU/B;+BAzDY,CAAC;gBAEA,mBAAmB,CAAC,CAAC;eACrB,kBAAkB,CAAC,CAAC;;gCAnKmL,iBAAiB;iCAGxM,eAAe;iCAFD,0CAA0C;6BAH5D,kBAAkB;iCAId,iDAAiD;sCAFsI,iBAAiB;kCAAjB,iBAAiB;wCAAjB,iBAAiB;sCAAjB,iBAAiB;uCAAjB,iBAAiB"}
package/src/storesub.js CHANGED
@@ -8,9 +8,12 @@ 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';
15
+ * @import {EMarshaller} from '@agoric/internal/src/marshal/wrap-marshaller.js';
16
+ * @import {PassableCap} from '@endo/marshal';
14
17
  */
15
18
 
16
19
  /**
@@ -44,10 +47,10 @@ export const forEachPublicationRecord = async (subscriber, consumeValue) => {
44
47
  * the iteration themselves, or obtain information to subscribe to the stored
45
48
  * data out-of-band.
46
49
  *
47
- * @template {import('@endo/marshal').PassableCap} T
50
+ * @template {PassableCap} T
48
51
  * @param {Subscriber<T>} subscriber
49
- * @param {ERef<StorageNode>} storageNode
50
- * @param {ERef<ReturnType<typeof makeMarshal>>} marshaller
52
+ * @param {ERemote<StorageNode>} storageNode
53
+ * @param {ERemote<EMarshaller>} marshaller
51
54
  * @returns {StoredSubscriber<T>}
52
55
  */
53
56
  export const makeStoredSubscriber = (subscriber, storageNode, marshaller) => {
@@ -91,8 +94,8 @@ export const makeStoredSubscriber = (subscriber, storageNode, marshaller) => {
91
94
  *
92
95
  * @template T
93
96
  * @param {Subscription<T>} subscription
94
- * @param {ERef<StorageNode>} [storageNode]
95
- * @param {ERef<ReturnType<typeof makeMarshal>>} [marshaller]
97
+ * @param {ERemote<StorageNode> | null} [storageNode]
98
+ * @param {ERemote<EMarshaller>} [marshaller]
96
99
  * @returns {StoredSubscription<T>}
97
100
  */
98
101
  export const makeStoredSubscription = (
@@ -103,7 +106,7 @@ export const makeStoredSubscription = (
103
106
  serializeBodyFormat: 'smallcaps',
104
107
  }),
105
108
  ) => {
106
- /** @type {import('@agoric/internal/src/lib-chainStorage.js').Unserializer} */
109
+ /** @type {Unserializer} */
107
110
  const unserializer = Far('unserializer', {
108
111
  fromCapData: data => E(marshaller).fromCapData(data),
109
112
  unserialize: data => E(marshaller).fromCapData(data),
@@ -177,8 +180,8 @@ harden(makeStoredSubscription);
177
180
  * @deprecated incompatible with durability; instead handle vstorage ephemerally on a durable PublishKit
178
181
  *
179
182
  * @template [T=unknown]
180
- * @param {ERef<StorageNode>} [storageNode]
181
- * @param {ERef<Marshaller>} [marshaller]
183
+ * @param {ERemote<StorageNode> | null} [storageNode]
184
+ * @param {ERemote<EMarshaller>} [marshaller]
182
185
  * @param {string} [childPath]
183
186
  * @returns {StoredPublisherKit<T>}
184
187
  */
@@ -212,8 +215,8 @@ export const makeStoredPublisherKit = (storageNode, marshaller, childPath) => {
212
215
  * What's different is `subscriber` tees records, writing out to storageNode.
213
216
  *
214
217
  * @template [T=unknown]
215
- * @param {ERef<StorageNode>} storageNode
216
- * @param {ERef<Marshaller>} marshaller
218
+ * @param {ERemote<StorageNode>} storageNode
219
+ * @param {ERemote<EMarshaller>} marshaller
217
220
  * @returns {StoredPublishKit<T>}
218
221
  */
219
222
  export const makeStoredPublishKit = (storageNode, marshaller) => {
@@ -1,17 +1,17 @@
1
1
  export function subscribe<T>(itP: ERef<AsyncIterableIterator<T>>): {
2
2
  [Symbol.asyncIterator]: () => {
3
- [Symbol.asyncIterator]: () => any & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, any>;
3
+ [Symbol.asyncIterator]: () => /*elided*/ any & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, /*elided*/ any>;
4
4
  next: () => Promise<IteratorResult<T, any>>;
5
5
  } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
6
- [Symbol.asyncIterator]: () => any & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, any>;
6
+ [Symbol.asyncIterator]: () => /*elided*/ any & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, /*elided*/ any>;
7
7
  next: () => Promise<IteratorResult<T, any>>;
8
8
  }>;
9
9
  } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
10
10
  [Symbol.asyncIterator]: () => {
11
- [Symbol.asyncIterator]: () => any & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, any>;
11
+ [Symbol.asyncIterator]: () => /*elided*/ any & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, /*elided*/ any>;
12
12
  next: () => Promise<IteratorResult<T, any>>;
13
13
  } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
14
- [Symbol.asyncIterator]: () => any & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, any>;
14
+ [Symbol.asyncIterator]: () => /*elided*/ any & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, /*elided*/ any>;
15
15
  next: () => Promise<IteratorResult<T, any>>;
16
16
  }>;
17
17
  }>;
package/src/subscribe.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { X, Fail, annotateError } from '@endo/errors';
2
2
  import { E, Far } from '@endo/far';
3
- import { isObject } from '@endo/marshal';
3
+ import { isPrimitive } from '@endo/marshal';
4
4
  import { isUpgradeDisconnection } from '@agoric/internal/src/upgrade-api.js';
5
5
 
6
6
  /**
@@ -46,7 +46,7 @@ const reconnectAsNeeded = async (getter, seed = []) => {
46
46
  // if `err` is an (Error) object, we can try to associate it with
47
47
  // information about the disconnection that prompted the request
48
48
  // for which it is a result.
49
- if (isObject(err) && disconnection && disconnection !== err) {
49
+ if (!isPrimitive(err) && disconnection && disconnection !== err) {
50
50
  try {
51
51
  annotateError(
52
52
  err,
@@ -1,5 +1,5 @@
1
1
  export { eventLoopIteration } from "@agoric/internal/src/testing-utils.js";
2
- export function makeFakeStorage(path: string, publication?: IterationObserver<unknown> | undefined): StorageNode & {
2
+ export function makeFakeStorage(path: string, publication?: IterationObserver<unknown>): StorageNode & {
3
3
  countSetValueCalls: () => number;
4
4
  };
5
5
  export function makeFakeMarshaller(): {
@@ -1 +1 @@
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
+ {"version":3,"file":"testSupports.d.ts","sourceRoot":"","sources":["testSupports.js"],"names":[],"mappings":";AAaO,sCAHI,MAAM,gBACN,kBAAkB,OAAO,CAAC;wBAUY,MAAM,MAAM;EAe5D;AAGM;;;;;EAGH;uCAvCgC,iBAAiB;iCACvB,0CAA0C"}