@agoric/swing-store 0.9.2-dev-75b00b2.0 → 0.9.2-dev-bef63e5.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 +9 -9
- package/src/bundleStore.js +1 -1
- package/src/importer.js +2 -2
- package/src/internal.js +3 -3
- package/src/repairMetadata.js +1 -1
- package/src/snapStore.js +2 -2
- package/src/swingStore.js +9 -9
- package/src/util.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/swing-store",
|
|
3
|
-
"version": "0.9.2-dev-
|
|
3
|
+
"version": "0.9.2-dev-bef63e5.0+bef63e5",
|
|
4
4
|
"description": "Persistent storage for SwingSet",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -21,16 +21,16 @@
|
|
|
21
21
|
"lint:eslint": "eslint ."
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@agoric/assert": "0.6.1-dev-
|
|
25
|
-
"@agoric/internal": "0.3.3-dev-
|
|
26
|
-
"@endo/base64": "^0.
|
|
27
|
-
"@endo/bundle-source": "^
|
|
28
|
-
"@endo/check-bundle": "^0.
|
|
29
|
-
"@endo/nat": "^
|
|
24
|
+
"@agoric/assert": "0.6.1-dev-bef63e5.0+bef63e5",
|
|
25
|
+
"@agoric/internal": "0.3.3-dev-bef63e5.0+bef63e5",
|
|
26
|
+
"@endo/base64": "^1.0.0",
|
|
27
|
+
"@endo/bundle-source": "^3.0.1",
|
|
28
|
+
"@endo/check-bundle": "^1.0.1",
|
|
29
|
+
"@endo/nat": "^5.0.1",
|
|
30
30
|
"better-sqlite3": "^9.1.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@endo/init": "^0.
|
|
33
|
+
"@endo/init": "^1.0.1",
|
|
34
34
|
"@types/better-sqlite3": "^7.5.0",
|
|
35
35
|
"ava": "^5.3.0",
|
|
36
36
|
"c8": "^7.13.0",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"typeCoverage": {
|
|
52
52
|
"atLeast": 75.52
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "bef63e5f0c6ad6a553b3eef69d722c060995a247"
|
|
55
55
|
}
|
package/src/bundleStore.js
CHANGED
|
@@ -15,7 +15,7 @@ import { createSHA256 } from './hasher.js';
|
|
|
15
15
|
* @typedef { EndoZipBase64Bundle | GetExportBundle | NestedEvaluateBundle } Bundle
|
|
16
16
|
*/
|
|
17
17
|
/**
|
|
18
|
-
* @typedef { import('./exporter').SwingStoreExporter } SwingStoreExporter
|
|
18
|
+
* @typedef { import('./exporter.js').SwingStoreExporter } SwingStoreExporter
|
|
19
19
|
* @typedef { import('./internal.js').ArtifactMode } ArtifactMode
|
|
20
20
|
*
|
|
21
21
|
* @typedef {{
|
package/src/importer.js
CHANGED
|
@@ -17,10 +17,10 @@ import { assertComplete } from './assertComplete.js';
|
|
|
17
17
|
* returned swingStore is not suitable for execution, and thus only contains
|
|
18
18
|
* the host facet for committing the populated swingStore.
|
|
19
19
|
*
|
|
20
|
-
* @param {import('./exporter').SwingStoreExporter} exporter
|
|
20
|
+
* @param {import('./exporter.js').SwingStoreExporter} exporter
|
|
21
21
|
* @param {string | null} [dirPath]
|
|
22
22
|
* @param {ImportSwingStoreOptions} [options]
|
|
23
|
-
* @returns {Promise<Pick<import('./swingStore').SwingStore, 'hostStorage' | 'debug'>>}
|
|
23
|
+
* @returns {Promise<Pick<import('./swingStore.js').SwingStore, 'hostStorage' | 'debug'>>}
|
|
24
24
|
*/
|
|
25
25
|
export async function importSwingStore(exporter, dirPath = null, options = {}) {
|
|
26
26
|
if (dirPath && typeof dirPath !== 'string') {
|
package/src/internal.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Fail, q } from '@agoric/assert';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @typedef { import('./snapStore').SnapStoreInternal } SnapStoreInternal
|
|
5
|
-
* @typedef { import('./transcriptStore').TranscriptStoreInternal } TranscriptStoreInternal
|
|
6
|
-
* @typedef { import('./bundleStore').BundleStoreInternal } BundleStoreInternal
|
|
4
|
+
* @typedef { import('./snapStore.js').SnapStoreInternal } SnapStoreInternal
|
|
5
|
+
* @typedef { import('./transcriptStore.js').TranscriptStoreInternal } TranscriptStoreInternal
|
|
6
|
+
* @typedef { import('./bundleStore.js').BundleStoreInternal } BundleStoreInternal
|
|
7
7
|
*
|
|
8
8
|
* @typedef {{
|
|
9
9
|
* transcriptStore: TranscriptStoreInternal,
|
package/src/repairMetadata.js
CHANGED
|
@@ -25,7 +25,7 @@ import { assertComplete } from './assertComplete.js';
|
|
|
25
25
|
* `hostStorage.commit()` when they are ready.
|
|
26
26
|
*
|
|
27
27
|
* @param {import('./internal.js').SwingStoreInternal} internal
|
|
28
|
-
* @param {import('./exporter').SwingStoreExporter} exporter
|
|
28
|
+
* @param {import('./exporter.js').SwingStoreExporter} exporter
|
|
29
29
|
* @returns {Promise<void>}
|
|
30
30
|
*/
|
|
31
31
|
export async function doRepairMetadata(internal, exporter) {
|
package/src/snapStore.js
CHANGED
|
@@ -26,11 +26,11 @@ import { buffer } from './util.js';
|
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* @template T
|
|
29
|
-
* @typedef { import('./exporter').AnyIterableIterator<T> } AnyIterableIterator<T>
|
|
29
|
+
* @typedef { import('./exporter.js').AnyIterableIterator<T> } AnyIterableIterator<T>
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
* @typedef { import('./exporter').SwingStoreExporter } SwingStoreExporter
|
|
33
|
+
* @typedef { import('./exporter.js').SwingStoreExporter } SwingStoreExporter
|
|
34
34
|
* @typedef { import('./internal.js').ArtifactMode } ArtifactMode
|
|
35
35
|
*
|
|
36
36
|
* @typedef {{
|
package/src/swingStore.js
CHANGED
|
@@ -17,18 +17,18 @@ import { makeSnapStoreIO } from './snapStoreIO.js';
|
|
|
17
17
|
import { doRepairMetadata } from './repairMetadata.js';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* @typedef { import('./kvStore').KVStore } KVStore
|
|
20
|
+
* @typedef { import('./kvStore.js').KVStore } KVStore
|
|
21
21
|
*
|
|
22
|
-
* @typedef { import('./snapStore').SnapStore } SnapStore
|
|
23
|
-
* @typedef { import('./snapStore').SnapshotResult } SnapshotResult
|
|
22
|
+
* @typedef { import('./snapStore.js').SnapStore } SnapStore
|
|
23
|
+
* @typedef { import('./snapStore.js').SnapshotResult } SnapshotResult
|
|
24
24
|
*
|
|
25
|
-
* @typedef { import('./transcriptStore').TranscriptStore } TranscriptStore
|
|
26
|
-
* @typedef { import('./transcriptStore').TranscriptStoreDebug } TranscriptStoreDebug
|
|
25
|
+
* @typedef { import('./transcriptStore.js').TranscriptStore } TranscriptStore
|
|
26
|
+
* @typedef { import('./transcriptStore.js').TranscriptStoreDebug } TranscriptStoreDebug
|
|
27
27
|
*
|
|
28
|
-
* @typedef { import('./bundleStore').BundleStore } BundleStore
|
|
29
|
-
* @typedef { import('./bundleStore').BundleStoreDebug } BundleStoreDebug
|
|
28
|
+
* @typedef { import('./bundleStore.js').BundleStore } BundleStore
|
|
29
|
+
* @typedef { import('./bundleStore.js').BundleStoreDebug } BundleStoreDebug
|
|
30
30
|
*
|
|
31
|
-
* @typedef { import('./exporter').KVPair } KVPair
|
|
31
|
+
* @typedef { import('./exporter.js').KVPair } KVPair
|
|
32
32
|
*
|
|
33
33
|
* @typedef {{
|
|
34
34
|
* kvStore: KVStore, // a key-value API object to load and store data on behalf of the kernel
|
|
@@ -49,7 +49,7 @@ import { doRepairMetadata } from './repairMetadata.js';
|
|
|
49
49
|
* close: () => Promise<void>, // shutdown the store, abandoning any uncommitted changes
|
|
50
50
|
* diskUsage?: () => number, // optional stats method
|
|
51
51
|
* setExportCallback: (cb: (updates: KVPair[]) => void) => void, // Set a callback invoked by swingStore when new serializable data is available for export
|
|
52
|
-
* repairMetadata: (exporter: import('./exporter').SwingStoreExporter) => Promise<void>,
|
|
52
|
+
* repairMetadata: (exporter: import('./exporter.js').SwingStoreExporter) => Promise<void>,
|
|
53
53
|
* }} SwingStoreHostStorage
|
|
54
54
|
*/
|
|
55
55
|
|
package/src/util.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Buffer } from 'buffer';
|
|
|
6
6
|
* 'stream/consumers' package, which unfortunately only exists in newer versions
|
|
7
7
|
* of Node.
|
|
8
8
|
*
|
|
9
|
-
* @param {import('./exporter').AnyIterable<Uint8Array>} inStream
|
|
9
|
+
* @param {import('./exporter.js').AnyIterable<Uint8Array>} inStream
|
|
10
10
|
*/
|
|
11
11
|
export const buffer = async inStream => {
|
|
12
12
|
const chunks = [];
|