@agoric/swing-store 0.9.2-dev-7dbb8b4.0 → 0.9.2-dev-33eb3c9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/swing-store",
3
- "version": "0.9.2-dev-7dbb8b4.0+7dbb8b4",
3
+ "version": "0.9.2-dev-33eb3c9.0+33eb3c9",
4
4
  "description": "Persistent storage for SwingSet",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -21,7 +21,7 @@
21
21
  "lint:eslint": "eslint ."
22
22
  },
23
23
  "dependencies": {
24
- "@agoric/internal": "0.3.3-dev-7dbb8b4.0+7dbb8b4",
24
+ "@agoric/internal": "0.3.3-dev-33eb3c9.0+33eb3c9",
25
25
  "@endo/base64": "^1.0.9",
26
26
  "@endo/bundle-source": "^4.0.0",
27
27
  "@endo/check-bundle": "^1.0.14",
@@ -51,5 +51,5 @@
51
51
  "typeCoverage": {
52
52
  "atLeast": 79.33
53
53
  },
54
- "gitHead": "7dbb8b4c4ef6623272adbd53a4bfdf6cd90085e8"
54
+ "gitHead": "33eb3c9c00816b734f69a252391c48d461bf622f"
55
55
  }
package/src/snapStore.js CHANGED
@@ -50,9 +50,17 @@ import { buffer } from './util.js';
50
50
  * repairSnapshotRecord: (key: string, value: string) => void,
51
51
  * }} SnapStoreInternal
52
52
  *
53
+ * @typedef {object} SnapshotRow
54
+ * @property {string} vatID
55
+ * @property {number} snapPos
56
+ * @property {string} [hash]
57
+ * @property {number | null} [inUse]
58
+ * @property {number} uncompressedSize
59
+ * @property {number} compressedSize
60
+ *
53
61
  * @typedef {{
54
62
  * hasHash: (vatID: string, hash: string) => boolean,
55
- * listAllSnapshots: () => Iterable<{}>,
63
+ * listAllSnapshots: () => Iterable<SnapshotRow>,
56
64
  * dumpSnapshots: (includeHistorical?: boolean) => Record<string, Array<{snapPos: number, hash: string, compressedSnapshot: Buffer, inUse: (null | 0 | 1)}>>,
57
65
  * deleteSnapshotByHash: (vatID: string, hash: string) => void,
58
66
  * }} SnapStoreDebug
@@ -681,6 +689,7 @@ export function makeSnapStore(
681
689
 
682
690
  /**
683
691
  * debug function to list all snapshots
692
+ * @returns {Iterable<SnapshotRow>}
684
693
  */
685
694
  function* listAllSnapshots() {
686
695
  yield* sqlListAllSnapshots.iterate();
@@ -5,7 +5,12 @@ export type {
5
5
  } from './swingStore.js';
6
6
  export type { KVStore } from './kvStore.js';
7
7
  export type { BundleStore } from './bundleStore.js';
8
- export type { SnapStore, SnapshotResult, SnapshotInfo } from './snapStore.js';
8
+ export type {
9
+ SnapStore,
10
+ SnapshotResult,
11
+ SnapshotInfo,
12
+ SnapStoreDebug,
13
+ } from './snapStore.js';
9
14
  export type { TranscriptStore } from './transcriptStore.js';
10
15
  export type { ArtifactMode } from './internal.js';
11
16
  export type { ImportSwingStoreOptions } from './importer.js';