@agoric/swingset-liveslots 0.10.3-other-dev-3eb1a1d.0 → 0.10.3-other-dev-fbe72e7.0.fbe72e7

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.
Files changed (86) hide show
  1. package/package.json +26 -26
  2. package/src/boyd-gc.d.ts +12 -0
  3. package/src/boyd-gc.d.ts.map +1 -0
  4. package/src/cache.d.ts +71 -0
  5. package/src/cache.d.ts.map +1 -0
  6. package/src/capdata.d.ts +16 -0
  7. package/src/capdata.d.ts.map +1 -0
  8. package/src/capdata.js +16 -8
  9. package/src/collectionManager.d.ts +47 -0
  10. package/src/collectionManager.d.ts.map +1 -0
  11. package/src/collectionManager.js +1 -0
  12. package/src/facetiousness.d.ts +25 -0
  13. package/src/facetiousness.d.ts.map +1 -0
  14. package/src/index.d.ts +4 -0
  15. package/src/index.d.ts.map +1 -0
  16. package/src/kdebug.d.ts +7 -0
  17. package/src/kdebug.d.ts.map +1 -0
  18. package/src/liveslots.d.ts +42 -0
  19. package/src/liveslots.d.ts.map +1 -0
  20. package/src/liveslots.js +6 -4
  21. package/src/message.d.ts +49 -0
  22. package/src/message.d.ts.map +1 -0
  23. package/src/message.js +7 -3
  24. package/src/parseVatSlots.d.ts +125 -0
  25. package/src/parseVatSlots.d.ts.map +1 -0
  26. package/src/types.d.ts +81 -0
  27. package/src/types.d.ts.map +1 -0
  28. package/src/types.js +6 -5
  29. package/src/vatDataTypes.d.ts +170 -0
  30. package/src/vatDataTypes.d.ts.map +1 -0
  31. package/src/vatDataTypes.ts +272 -0
  32. package/src/vatstore-iterators.d.ts +4 -0
  33. package/src/vatstore-iterators.d.ts.map +1 -0
  34. package/src/vatstore-usage.md +198 -0
  35. package/src/virtualObjectManager.d.ts +44 -0
  36. package/src/virtualObjectManager.d.ts.map +1 -0
  37. package/src/virtualObjectManager.js +70 -14
  38. package/src/virtualReferences.d.ts +61 -0
  39. package/src/virtualReferences.d.ts.map +1 -0
  40. package/src/vpid-tracking.md +92 -0
  41. package/src/watchedPromises.d.ts +31 -0
  42. package/src/watchedPromises.d.ts.map +1 -0
  43. package/src/watchedPromises.js +19 -12
  44. package/test/collections.test.js +25 -4
  45. package/test/dummyMeterControl.d.ts +2 -0
  46. package/test/dummyMeterControl.d.ts.map +1 -0
  47. package/test/engine-gc.d.ts +3 -0
  48. package/test/engine-gc.d.ts.map +1 -0
  49. package/test/gc-and-finalize.d.ts +5 -0
  50. package/test/gc-and-finalize.d.ts.map +1 -0
  51. package/test/gc-helpers.js +2 -2
  52. package/test/handled-promises.test.js +529 -163
  53. package/test/initial-vrefs.test.js +12 -18
  54. package/test/liveslots-helpers.d.ts +64 -0
  55. package/test/liveslots-helpers.d.ts.map +1 -0
  56. package/test/liveslots-helpers.js +1 -0
  57. package/test/liveslots-real-gc.test.js +11 -9
  58. package/test/liveslots.test.js +3 -3
  59. package/test/storeGC/lifecycle.test.js +13 -12
  60. package/test/util.d.ts +25 -0
  61. package/test/util.d.ts.map +1 -0
  62. package/test/util.js +2 -2
  63. package/test/vat-util.d.ts +9 -0
  64. package/test/vat-util.d.ts.map +1 -0
  65. package/test/virtual-objects/state-shape.test.js +312 -221
  66. package/test/virtual-objects/virtualObjectGC.test.js +37 -36
  67. package/test/virtual-objects/virtualObjectManager.test.js +41 -63
  68. package/test/vo-test-harness.test.js +13 -9
  69. package/test/waitUntilQuiescent.d.ts +3 -0
  70. package/test/waitUntilQuiescent.d.ts.map +1 -0
  71. package/tools/fakeCollectionManager.d.ts +14 -0
  72. package/tools/fakeCollectionManager.d.ts.map +1 -0
  73. package/tools/fakeVirtualObjectManager.d.ts +32 -0
  74. package/tools/fakeVirtualObjectManager.d.ts.map +1 -0
  75. package/tools/fakeVirtualSupport.d.ts +278 -0
  76. package/tools/fakeVirtualSupport.d.ts.map +1 -0
  77. package/tools/prepare-strict-test-env.d.ts +37 -0
  78. package/tools/prepare-strict-test-env.d.ts.map +1 -0
  79. package/tools/prepare-test-env.d.ts +2 -0
  80. package/tools/prepare-test-env.d.ts.map +1 -0
  81. package/tools/setup-vat-data.d.ts +9 -0
  82. package/tools/setup-vat-data.d.ts.map +1 -0
  83. package/tools/setup-vat-data.js +0 -1
  84. package/tools/vo-test-harness.d.ts +33 -0
  85. package/tools/vo-test-harness.d.ts.map +1 -0
  86. package/tools/vo-test-harness.js +21 -0
@@ -0,0 +1,32 @@
1
+ export function makeFakeVirtualObjectManager(vrm: any, fakeStuff: any): {
2
+ getValForSlot: any;
3
+ setValForSlot: any;
4
+ registerEntry: any;
5
+ deleteEntry: any;
6
+ flushStateCache: () => void;
7
+ dumpStore: any;
8
+ initializeKindHandleKind: () => void;
9
+ defineKind: <P extends Array<any>, S, F>(tag: string, init: (...args: P) => S, facet: F, options?: import("../src/vatDataTypes.js").DefineKindOptions<import("../src/vatDataTypes.js").KindContext<S, F>>) => (...args: P) => import("../src/vatDataTypes.js").KindFacet<F>;
10
+ defineKindMulti: <P extends Array<any>, S, B>(tag: string, init: (...args: P) => S, behavior: B, options?: import("../src/vatDataTypes.js").DefineKindOptions<import("../src/vatDataTypes.js").MultiKindContext<S, B>>) => (...args: P) => import("../src/vatDataTypes.js").KindFacets<B>;
11
+ defineDurableKind: <P extends Array<any>, S, F>(kindHandle: import("../src/vatDataTypes.js").DurableKindHandle, init: (...args: P) => S, facet: F, options?: import("../src/vatDataTypes.js").DefineKindOptions<import("../src/vatDataTypes.js").KindContext<S, F>>) => (...args: P) => import("../src/vatDataTypes.js").KindFacet<F>;
12
+ defineDurableKindMulti: <P extends Array<any>, S, B>(kindHandle: import("../src/vatDataTypes.js").DurableKindHandle, init: (...args: P) => S, behavior: B, options?: import("../src/vatDataTypes.js").DefineKindOptions<import("../src/vatDataTypes.js").MultiKindContext<S, B>>) => (...args: P) => import("../src/vatDataTypes.js").KindFacets<B>;
13
+ makeKindHandle: (tag: string) => import("../src/vatDataTypes.js").DurableKindHandle;
14
+ canBeDurable: (specimen: any) => boolean;
15
+ insistAllDurableKindsReconnected: () => void;
16
+ VirtualObjectAwareWeakMap: {
17
+ new (): {
18
+ has(key: any): any;
19
+ get(key: any): any;
20
+ set(key: any, value: any): /*elided*/ any;
21
+ delete(key: any): any;
22
+ };
23
+ };
24
+ VirtualObjectAwareWeakSet: {
25
+ new (): {
26
+ has(value: any): any;
27
+ add(value: any): /*elided*/ any;
28
+ delete(value: any): any;
29
+ };
30
+ };
31
+ };
32
+ //# sourceMappingURL=fakeVirtualObjectManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fakeVirtualObjectManager.d.ts","sourceRoot":"","sources":["fakeVirtualObjectManager.js"],"names":[],"mappings":"AAaA;;;;;;;;iEAiDywJ,GAAG,+IAAyF,GAAG;sEAAkK,GAAG,uJAAiG,GAAG;2HAAyQ,GAAG,+IAAyF,GAAG;gIAA2L,GAAG,uJAAiG,GAAG;;;;;;;;;;;;;;;;;;;EAD1vL"}
@@ -0,0 +1,278 @@
1
+ export function makeFakeLiveSlotsStuff(options?: {}): {
2
+ syscall: {
3
+ vatstoreGet(key: any): any;
4
+ vatstoreGetNextKey(priorKey: any): any;
5
+ vatstoreSet(key: any, value: any): void;
6
+ vatstoreDelete(key: any): void;
7
+ };
8
+ allocateExportID: () => any;
9
+ allocatePromiseID: () => any;
10
+ allocateCollectionID: () => any;
11
+ getSlotForVal: (val: any) => any;
12
+ requiredValForSlot: (slot: any) => any;
13
+ getValForSlot: (slot: any) => any;
14
+ setValForSlot: (slot: any, val: any) => void;
15
+ registerEntry: (baseRef: any, val: any, valIsCohort: any) => void;
16
+ valToSlot: any;
17
+ slotToVal: Map<any, any>;
18
+ convertValToSlot: (val: any) => any;
19
+ convertSlotToVal: (slot: any) => any;
20
+ marshal: {
21
+ toCapData: import("@endo/marshal").ToCapData<any>;
22
+ fromCapData: import("@endo/marshal").FromCapData<any>;
23
+ serialize: import("@endo/marshal").ToCapData<any>;
24
+ unserialize: import("@endo/marshal").FromCapData<any>;
25
+ };
26
+ deleteEntry: (slot: any, val: any) => void;
27
+ FinalizationRegistry: any;
28
+ WeakRef: any;
29
+ WeakMap: any;
30
+ WeakSet: any;
31
+ addToPossiblyDeadSet: any;
32
+ addToPossiblyRetiredSet: any;
33
+ dumpStore: () => any[][];
34
+ setVrm: (vrmToUse: any) => void;
35
+ assertAcceptableSyscallCapdataSize: (_capdatas: any) => void;
36
+ maybeExportPromise: (_vref: any) => boolean;
37
+ };
38
+ export function makeFakeVirtualReferenceManager(fakeStuff: any, relaxDurabilityRules?: boolean): {
39
+ registerDroppedCollection: (target: any, descriptor: any) => void;
40
+ isDurable: (vref: string) => boolean;
41
+ isDurableKind: (kindID: string) => boolean;
42
+ registerKind: (kindID: string, reanimator?: (string: any, boolean: any) => object, deleter?: (string: any) => boolean, durable?: boolean) => void;
43
+ rememberFacetNames: (kindID: string, facetNames: string[] | null) => void;
44
+ getFacet: (kindID: any, facets: any, facetIndex: any) => any;
45
+ getFacetNames: (kindID: any) => any;
46
+ reanimate: (baseRef: string) => any;
47
+ addReachableVref: (vref: any) => void;
48
+ removeReachableVref: (vref: any) => boolean;
49
+ updateReferenceCounts: (beforeSlots: any, afterSlots: any) => void;
50
+ getReachablePromiseRefCount: (p: any) => number;
51
+ addRecognizableValue: (value: any, recognizer: string | (Map<string, any> | Set<string>), recognizerIsVirtual?: boolean) => void;
52
+ removeRecognizableVref: (vref: string, recognizer: string | (Map<string, any> | Set<string>), recognizerIsVirtual?: boolean) => void;
53
+ removeRecognizableValue: (value: any, recognizer: string | (Map<string, any> | Set<string>), recognizerIsVirtual?: boolean) => void;
54
+ vrefKey: (value: any) => string | undefined;
55
+ isPresenceReachable: (vref: string) => boolean;
56
+ isVrefRecognizable: (vref: any) => boolean;
57
+ setExportStatus: (vref: any, exportStatus: any) => void;
58
+ isVirtualObjectReachable: (baseRef: string) => boolean;
59
+ deleteVirtualObject: (baseRef: string) => [boolean, string[]];
60
+ ceaseRecognition: (vref: string) => boolean;
61
+ setDeleteCollectionEntry: (fn: any) => void;
62
+ getRetentionStats: () => {
63
+ remotableRefCounts: number;
64
+ vrefRecognizers: number;
65
+ kindInfoTable: number;
66
+ };
67
+ initializeIDCounters: () => void;
68
+ allocateNextID: (name: any) => number;
69
+ flushIDCounters: () => void;
70
+ testHooks: {
71
+ getReachableRefCount: (vref: any) => number | undefined;
72
+ countCollectionsForWeakKey: (vref: any) => number;
73
+ getDroppedCollectionRegistry: () => any;
74
+ remotableRefCounts: Map<any, number>;
75
+ vrefRecognizers: Map<string, Set<Map<string, any> | Set<string>>>;
76
+ kindInfoTable: Map<any, any>;
77
+ };
78
+ };
79
+ export function makeFakeWatchedPromiseManager(vrm: any, vom: any, collectionManager: any, fakeStuff: any): {
80
+ preparePromiseWatcherTables: () => void;
81
+ loadWatchedPromiseTable: (revivePromise: (vref: any) => Promise<any>) => void;
82
+ providePromiseWatcher: <V, A extends any[]>(kindHandle: import("../src/vatDataTypes.js").DurableKindHandle, fulfillHandler?: (value: V, ...args: A) => void, rejectHandler?: (reason: any, ...args: A) => void) => import("../src/types.js").PromiseWatcher<V, A>;
83
+ watchPromise: <P extends Promise<any>, A extends any[]>(p: P, watcher: import("../src/types.js").PromiseWatcher<Awaited<P>, A>, ...args: A) => void;
84
+ };
85
+ /**
86
+ * Configure virtual stuff with relaxed durability rules and fake liveslots
87
+ *
88
+ * @param {object} [options]
89
+ * @param {number} [options.cacheSize]
90
+ * @param {boolean} [options.relaxDurabilityRules]
91
+ * @param {Map<string, string>} [options.fakeStore]
92
+ * @param {WeakMapConstructor} [options.WeakMap]
93
+ * @param {WeakSetConstructor} [options.WeakSet]
94
+ * @param {boolean} [options.weak]
95
+ */
96
+ export function makeFakeVirtualStuff(options?: {
97
+ cacheSize?: number | undefined;
98
+ relaxDurabilityRules?: boolean | undefined;
99
+ fakeStore?: Map<string, string> | undefined;
100
+ WeakMap?: WeakMapConstructor | undefined;
101
+ WeakSet?: WeakSetConstructor | undefined;
102
+ weak?: boolean | undefined;
103
+ }): {
104
+ fakeStuff: {
105
+ syscall: {
106
+ vatstoreGet(key: any): any;
107
+ vatstoreGetNextKey(priorKey: any): any;
108
+ vatstoreSet(key: any, value: any): void;
109
+ vatstoreDelete(key: any): void;
110
+ };
111
+ allocateExportID: () => any;
112
+ allocatePromiseID: () => any;
113
+ allocateCollectionID: () => any;
114
+ getSlotForVal: (val: any) => any;
115
+ requiredValForSlot: (slot: any) => any;
116
+ getValForSlot: (slot: any) => any;
117
+ setValForSlot: (slot: any, val: any) => void;
118
+ registerEntry: (baseRef: any, val: any, valIsCohort: any) => void;
119
+ valToSlot: any;
120
+ slotToVal: Map<any, any>;
121
+ convertValToSlot: (val: any) => any;
122
+ convertSlotToVal: (slot: any) => any;
123
+ marshal: {
124
+ toCapData: import("@endo/marshal").ToCapData<any>;
125
+ fromCapData: import("@endo/marshal").FromCapData<any>;
126
+ serialize: import("@endo/marshal").ToCapData<any>;
127
+ unserialize: import("@endo/marshal").FromCapData<any>;
128
+ };
129
+ deleteEntry: (slot: any, val: any) => void;
130
+ FinalizationRegistry: any;
131
+ WeakRef: any;
132
+ WeakMap: any;
133
+ WeakSet: any;
134
+ addToPossiblyDeadSet: any;
135
+ addToPossiblyRetiredSet: any;
136
+ dumpStore: () => any[][];
137
+ setVrm: (vrmToUse: any) => void;
138
+ assertAcceptableSyscallCapdataSize: (_capdatas: any) => void;
139
+ maybeExportPromise: (_vref: any) => boolean;
140
+ };
141
+ vrm: {
142
+ registerDroppedCollection: (target: any, descriptor: any) => void;
143
+ isDurable: (vref: string) => boolean;
144
+ isDurableKind: (kindID: string) => boolean;
145
+ registerKind: (kindID: string, reanimator?: (string: any, boolean: any) => object, deleter?: (string: any) => boolean, durable?: boolean) => void;
146
+ rememberFacetNames: (kindID: string, facetNames: string[] | null) => void;
147
+ getFacet: (kindID: any, facets: any, facetIndex: any) => any;
148
+ getFacetNames: (kindID: any) => any;
149
+ reanimate: (baseRef: string) => any;
150
+ addReachableVref: (vref: any) => void;
151
+ removeReachableVref: (vref: any) => boolean;
152
+ updateReferenceCounts: (beforeSlots: any, afterSlots: any) => void;
153
+ getReachablePromiseRefCount: (p: any) => number;
154
+ addRecognizableValue: (value: any, recognizer: string | (Map<string, any> | Set<string>), recognizerIsVirtual?: boolean) => void;
155
+ removeRecognizableVref: (vref: string, recognizer: string | (Map<string, any> | Set<string>), recognizerIsVirtual?: boolean) => void;
156
+ removeRecognizableValue: (value: any, recognizer: string | (Map<string, any> | Set<string>), recognizerIsVirtual?: boolean) => void;
157
+ vrefKey: (value: any) => string | undefined;
158
+ isPresenceReachable: (vref: string) => boolean;
159
+ isVrefRecognizable: (vref: any) => boolean;
160
+ setExportStatus: (vref: any, exportStatus: any) => void;
161
+ isVirtualObjectReachable: (baseRef: string) => boolean;
162
+ deleteVirtualObject: (baseRef: string) => [boolean, string[]];
163
+ ceaseRecognition: (vref: string) => boolean;
164
+ setDeleteCollectionEntry: (fn: any) => void;
165
+ getRetentionStats: () => {
166
+ remotableRefCounts: number;
167
+ vrefRecognizers: number;
168
+ kindInfoTable: number;
169
+ };
170
+ initializeIDCounters: () => void;
171
+ allocateNextID: (name: any) => number;
172
+ flushIDCounters: () => void;
173
+ testHooks: {
174
+ getReachableRefCount: (vref: any) => number | undefined;
175
+ countCollectionsForWeakKey: (vref: any) => number;
176
+ getDroppedCollectionRegistry: () => any;
177
+ remotableRefCounts: Map<any, number>;
178
+ vrefRecognizers: Map<string, Set<Map<string, any> | Set<string>>>;
179
+ kindInfoTable: Map<any, any>;
180
+ };
181
+ };
182
+ vom: {
183
+ getValForSlot: any;
184
+ setValForSlot: any;
185
+ registerEntry: any;
186
+ deleteEntry: any;
187
+ flushStateCache: () => void;
188
+ dumpStore: any;
189
+ initializeKindHandleKind: () => void;
190
+ defineKind: <P extends Array<any>, S, F>(tag: string, init: (...args: P) => S, facet: F, options?: import("../src/vatDataTypes.js").DefineKindOptions<import("../src/vatDataTypes.js").KindContext<S, F>>) => (...args: P) => import("../src/vatDataTypes.js").KindFacet<F>;
191
+ defineKindMulti: <P extends Array<any>, S, B>(tag: string, init: (...args: P) => S, behavior: B, options?: import("../src/vatDataTypes.js").DefineKindOptions<import("../src/vatDataTypes.js").MultiKindContext<S, B>>) => (...args: P) => import("../src/vatDataTypes.js").KindFacets<B>;
192
+ defineDurableKind: <P extends Array<any>, S, F>(kindHandle: import("../src/vatDataTypes.js").DurableKindHandle, init: (...args: P) => S, facet: F, options?: import("../src/vatDataTypes.js").DefineKindOptions<import("../src/vatDataTypes.js").KindContext<S, F>>) => (...args: P) => import("../src/vatDataTypes.js").KindFacet<F>;
193
+ defineDurableKindMulti: <P extends Array<any>, S, B>(kindHandle: import("../src/vatDataTypes.js").DurableKindHandle, init: (...args: P) => S, behavior: B, options?: import("../src/vatDataTypes.js").DefineKindOptions<import("../src/vatDataTypes.js").MultiKindContext<S, B>>) => (...args: P) => import("../src/vatDataTypes.js").KindFacets<B>;
194
+ makeKindHandle: (tag: string) => import("../src/vatDataTypes.js").DurableKindHandle;
195
+ canBeDurable: (specimen: any) => boolean;
196
+ insistAllDurableKindsReconnected: () => void;
197
+ VirtualObjectAwareWeakMap: {
198
+ new (): {
199
+ has(key: any): any;
200
+ get(key: any): any;
201
+ set(key: any, value: any): /*elided*/ any;
202
+ delete(key: any): any;
203
+ };
204
+ };
205
+ VirtualObjectAwareWeakSet: {
206
+ new (): {
207
+ has(value: any): any;
208
+ add(value: any): /*elided*/ any;
209
+ delete(value: any): any;
210
+ };
211
+ };
212
+ };
213
+ cm: {
214
+ getValForSlot: any;
215
+ setValForSlot: any;
216
+ registerEntry: any;
217
+ deleteEntry: any;
218
+ dumpStore: any;
219
+ makeScalarBigMapStore: <K, V>(label?: string, options?: StoreOptions) => MapStore<K, V>;
220
+ makeScalarBigWeakMapStore: <K, V>(label?: string, options?: StoreOptions) => WeakMapStore<K, V>;
221
+ makeScalarBigSetStore: <K>(label?: string, options?: StoreOptions) => SetStore<K>;
222
+ makeScalarBigWeakSetStore: <K>(label?: string, options?: StoreOptions) => WeakSetStore<K>;
223
+ provideBaggage: () => any;
224
+ flushSchemaCache: () => void;
225
+ };
226
+ wpm: {
227
+ preparePromiseWatcherTables: () => void;
228
+ loadWatchedPromiseTable: (revivePromise: (vref: any) => Promise<any>) => void;
229
+ providePromiseWatcher: <V, A extends any[]>(kindHandle: import("../src/vatDataTypes.js").DurableKindHandle, fulfillHandler?: (value: V, ...args: A) => void, rejectHandler?: (reason: any, ...args: A) => void) => import("../src/types.js").PromiseWatcher<V, A>;
230
+ watchPromise: <P extends Promise<any>, A extends any[]>(p: P, watcher: import("../src/types.js").PromiseWatcher<Awaited<P>, A>, ...args: A) => void;
231
+ };
232
+ };
233
+ export function makeStandaloneFakeVirtualObjectManager(options?: {}): {
234
+ getValForSlot: any;
235
+ setValForSlot: any;
236
+ registerEntry: any;
237
+ deleteEntry: any;
238
+ flushStateCache: () => void;
239
+ dumpStore: any;
240
+ initializeKindHandleKind: () => void;
241
+ defineKind: <P extends Array<any>, S, F>(tag: string, init: (...args: P) => S, facet: F, options?: import("../src/vatDataTypes.js").DefineKindOptions<import("../src/vatDataTypes.js").KindContext<S, F>>) => (...args: P) => import("../src/vatDataTypes.js").KindFacet<F>;
242
+ defineKindMulti: <P extends Array<any>, S, B>(tag: string, init: (...args: P) => S, behavior: B, options?: import("../src/vatDataTypes.js").DefineKindOptions<import("../src/vatDataTypes.js").MultiKindContext<S, B>>) => (...args: P) => import("../src/vatDataTypes.js").KindFacets<B>;
243
+ defineDurableKind: <P extends Array<any>, S, F>(kindHandle: import("../src/vatDataTypes.js").DurableKindHandle, init: (...args: P) => S, facet: F, options?: import("../src/vatDataTypes.js").DefineKindOptions<import("../src/vatDataTypes.js").KindContext<S, F>>) => (...args: P) => import("../src/vatDataTypes.js").KindFacet<F>;
244
+ defineDurableKindMulti: <P extends Array<any>, S, B>(kindHandle: import("../src/vatDataTypes.js").DurableKindHandle, init: (...args: P) => S, behavior: B, options?: import("../src/vatDataTypes.js").DefineKindOptions<import("../src/vatDataTypes.js").MultiKindContext<S, B>>) => (...args: P) => import("../src/vatDataTypes.js").KindFacets<B>;
245
+ makeKindHandle: (tag: string) => import("../src/vatDataTypes.js").DurableKindHandle;
246
+ canBeDurable: (specimen: any) => boolean;
247
+ insistAllDurableKindsReconnected: () => void;
248
+ VirtualObjectAwareWeakMap: {
249
+ new (): {
250
+ has(key: any): any;
251
+ get(key: any): any;
252
+ set(key: any, value: any): /*elided*/ any;
253
+ delete(key: any): any;
254
+ };
255
+ };
256
+ VirtualObjectAwareWeakSet: {
257
+ new (): {
258
+ has(value: any): any;
259
+ add(value: any): /*elided*/ any;
260
+ delete(value: any): any;
261
+ };
262
+ };
263
+ };
264
+ export function makeStandaloneFakeCollectionManager(options?: {}): {
265
+ getValForSlot: any;
266
+ setValForSlot: any;
267
+ registerEntry: any;
268
+ deleteEntry: any;
269
+ dumpStore: any;
270
+ makeScalarBigMapStore: <K, V>(label?: string, options?: StoreOptions) => MapStore<K, V>;
271
+ makeScalarBigWeakMapStore: <K, V>(label?: string, options?: StoreOptions) => WeakMapStore<K, V>;
272
+ makeScalarBigSetStore: <K>(label?: string, options?: StoreOptions) => SetStore<K>;
273
+ makeScalarBigWeakSetStore: <K>(label?: string, options?: StoreOptions) => WeakSetStore<K>;
274
+ provideBaggage: () => any;
275
+ flushSchemaCache: () => void;
276
+ };
277
+ export { makeStandaloneFakeVirtualObjectManager as makeFakeVirtualObjectManager, makeStandaloneFakeCollectionManager as makeFakeCollectionManager };
278
+ //# sourceMappingURL=fakeVirtualSupport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fakeVirtualSupport.d.ts","sourceRoot":"","sources":["fakeVirtualSupport.js"],"names":[],"mappings":"AAyCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuQC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcC;AAED;;;4IA5HwB,GAAI,gDAE1B,GAAC;;EAyIF;AAED;;;;;;;;;;GAUG;AACH,+CAPG;IAAyB,SAAS;IACR,oBAAoB;IACR,SAAS;IACV,OAAO;IACP,OAAO;IAClB,IAAI;CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qEAjFH,GAC9B,+IAKuB,GAAG;0EAQd,GAAG,uJAKV,GAAG;+HAeL,GAAG,+IAKiB,GAAG;oIAOA,GAC1B,uJAGG,GAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gJAvHkB,GAAI,gDAE1B,GAAC;;;EAqKF;AAED;;;;;;;;iEApG+B,GAC9B,+IAKuB,GAAG;sEAQd,GAAG,uJAKV,GAAG;2HAeL,GAAG,+IAKiB,GAAG;gIAOA,GAC1B,uJAGG,GAAE;;;;;;;;;;;;;;;;;;;EA0DL;AAED;;;;;;;;;;;;EAMC"}
@@ -0,0 +1,37 @@
1
+ export function annihilate(options?: Omit<ReincarnateOptions, "fakeVomKit" | "fakeStore">): {
2
+ relaxDurabilityRules?: boolean | undefined;
3
+ fakeStore: Map<string, string>;
4
+ weak?: boolean | undefined;
5
+ cacheSize?: number | undefined;
6
+ fakeVomKit: import("./setup-vat-data.js").FakeVomKit;
7
+ };
8
+ export function getBaggage(): Baggage;
9
+ export function nextLife(fromIncarnation?: ReincarnateOptions): {
10
+ relaxDurabilityRules?: boolean | undefined;
11
+ fakeStore: Map<string, string>;
12
+ weak?: boolean | undefined;
13
+ cacheSize?: number | undefined;
14
+ fakeVomKit: import("./setup-vat-data.js").FakeVomKit;
15
+ };
16
+ export function startLife<B extends (baggage: Baggage) => Promise<any> | any>(build: B, run?: (tools: Awaited<ReturnType<B>>) => Promise<void> | void, { fromIncarnation, cleanStart }?: {
17
+ fromIncarnation?: {
18
+ relaxDurabilityRules?: boolean | undefined;
19
+ fakeStore: Map<string, string>;
20
+ weak?: boolean | undefined;
21
+ cacheSize?: number | undefined;
22
+ fakeVomKit: import("./setup-vat-data.js").FakeVomKit;
23
+ } | undefined;
24
+ cleanStart?: boolean | undefined;
25
+ }): Promise<{
26
+ relaxDurabilityRules?: boolean | undefined;
27
+ fakeStore: Map<string, string>;
28
+ weak?: boolean | undefined;
29
+ cacheSize?: number | undefined;
30
+ fakeVomKit: import("./setup-vat-data.js").FakeVomKit;
31
+ }>;
32
+ import { flushIncarnation } from './setup-vat-data.js';
33
+ import { eventLoopIteration } from '@agoric/internal/src/testing-utils.js';
34
+ import type { ReincarnateOptions } from './setup-vat-data.js';
35
+ import type { Baggage } from '@agoric/swingset-liveslots';
36
+ export { flushIncarnation, eventLoopIteration as nextCrank };
37
+ //# sourceMappingURL=prepare-strict-test-env.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepare-strict-test-env.d.ts","sourceRoot":"","sources":["prepare-strict-test-env.js"],"names":[],"mappings":"AAiCO,qCADK,IAAI,CAAC,kBAAkB,EAAE,YAAY,GAAG,WAAW,CAAC;;;;;;EAO/D;AAGM,8BADO,OAAO,CAGpB;AAKM,2CAFI,kBAAkB;;;;;;EAM5B;AAUM,0BAPiD,CAAC,SAA5C,CAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,GAAG,CAAC,GAAG,GAAI,SAC5C,CAAC,QACD,CAAC,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,oCAE/D;IAAqC,eAAe;;;;;;;IAC1B,UAAU;CAAC;;;;;;GA2DvC;iCA5G6C,qBAAqB;mCAIhC,uCAAuC;wCASnC,qBAAqB;6BADhC,4BAA4B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=prepare-test-env.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepare-test-env.d.ts","sourceRoot":"","sources":["prepare-test-env.js"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ export function flushIncarnation(options?: Partial<ReincarnateOptions>): Omit<ReincarnateOptions, "fakeVomKit">;
2
+ export function reincarnate(options?: Partial<ReincarnateOptions>): ReincarnateOptions;
3
+ export type FakeVomKit = ReturnType<typeof makeFakeVirtualStuff>;
4
+ export type ReincarnateOptions = import("@agoric/internal").Simplify<Omit<NonNullable<Parameters<typeof makeFakeVirtualStuff>[0]>, "WeakMap" | "WeakSet"> & {
5
+ fakeVomKit: FakeVomKit;
6
+ fakeStore: Map<string, string>;
7
+ }>;
8
+ import { makeFakeVirtualStuff } from './fakeVirtualSupport.js';
9
+ //# sourceMappingURL=setup-vat-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup-vat-data.d.ts","sourceRoot":"","sources":["setup-vat-data.js"],"names":[],"mappings":"AA2DO,2CAHI,OAAO,CAAC,kBAAkB,CAAC,GACzB,IAAI,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAelD;AAOM,sCAHI,OAAO,CAAC,kBAAkB,CAAC,GACzB,kBAAkB,CAiB9B;yBAjFa,UAAU,CAAC,OAAO,oBAAoB,CAAC;iCAmCxC,OAAO,kBAAkB,EAAE,QAAQ,CAC3C,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC,GACxF;IAAM,UAAU,EAAE,UAAU,CAAC;IAAC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAC3D;qCA1CiC,yBAAyB"}
@@ -1,4 +1,3 @@
1
- // @ts-check
2
1
  /* global globalThis */
3
2
 
4
3
  // This file produces the globalThis.VatData property outside of a
@@ -0,0 +1,33 @@
1
+ export function runVOTest(t: any, prepare: any, makeTestObject: any, testTestObject: any): Promise<void>;
2
+ export function makeSpy(t: import("ava").ExecutionContext): {
3
+ fail: (msg: any) => void;
4
+ falsy: (check: any, msg: any) => void;
5
+ failureMessage: string;
6
+ falsyMessage: string;
7
+ context: unknown;
8
+ title: string;
9
+ passed: boolean;
10
+ log: import("ava").LogFn;
11
+ plan: import("ava").PlanFn;
12
+ teardown: import("ava").TeardownFn;
13
+ timeout: import("ava").TimeoutFn;
14
+ try: import("ava").TryFn<unknown>;
15
+ assert: import("ava").AssertAssertion;
16
+ deepEqual: import("ava").DeepEqualAssertion;
17
+ like: import("ava").LikeAssertion;
18
+ false: import("ava").FalseAssertion;
19
+ is: import("ava").IsAssertion;
20
+ not: import("ava").NotAssertion;
21
+ notDeepEqual: import("ava").NotDeepEqualAssertion;
22
+ notRegex: import("ava").NotRegexAssertion;
23
+ notThrows: import("ava").NotThrowsAssertion;
24
+ notThrowsAsync: import("ava").NotThrowsAsyncAssertion;
25
+ pass: import("ava").PassAssertion;
26
+ regex: import("ava").RegexAssertion;
27
+ snapshot: import("ava").SnapshotAssertion;
28
+ throws: import("ava").ThrowsAssertion;
29
+ throwsAsync: import("ava").ThrowsAsyncAssertion;
30
+ true: import("ava").TrueAssertion;
31
+ truthy: import("ava").TruthyAssertion;
32
+ };
33
+ //# sourceMappingURL=vo-test-harness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vo-test-harness.d.ts","sourceRoot":"","sources":["vo-test-harness.js"],"names":[],"mappings":"AA8FA,yGAqEC;AAxJM,2BAFI,OAAO,KAAK,EAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBxC"}
@@ -5,6 +5,27 @@ import { setupTestLiveslots } from '../test/liveslots-helpers.js';
5
5
  // is to to help verify that a VO can be garbage collected and then
6
6
  // reloaded from persistent storage while maintaining functionality.
7
7
 
8
+ /**
9
+ * A spy wrapping Ava's t for tests that are testing the harness itself.
10
+ * @param {import('ava').ExecutionContext} t
11
+ */
12
+ export const makeSpy = t => {
13
+ const tSpy = {
14
+ ...t,
15
+ fail: msg => {
16
+ tSpy.failureMessage = msg;
17
+ },
18
+ // In Ava 6, assertions throw?
19
+ falsy: (check, msg) => {
20
+ if (!check) return;
21
+ tSpy.falsyMessage = msg;
22
+ },
23
+ failureMessage: '',
24
+ falsyMessage: '',
25
+ };
26
+ return tSpy;
27
+ };
28
+
8
29
  // Testing VO swapping with runVOTest:
9
30
  //
10
31
  // Step 1: import the necessary harness paraphernalia