@atlaspack/cache 2.12.1-canary.3489 → 2.12.1-canary.3491
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/lib/LMDBLiteCache.js +7 -2
- package/package.json +7 -7
- package/src/LMDBLiteCache.js +8 -2
package/lib/LMDBLiteCache.js
CHANGED
@@ -81,8 +81,6 @@ function open(directory
|
|
81
81
|
}
|
82
82
|
const pipeline = (0, _util().promisify)(_stream().default.pipeline);
|
83
83
|
class LMDBLiteCache {
|
84
|
-
// $FlowFixMe
|
85
|
-
|
86
84
|
constructor(cacheDir) {
|
87
85
|
this.fs = new (_fs().NodeFS)();
|
88
86
|
this.dir = cacheDir;
|
@@ -93,6 +91,13 @@ class LMDBLiteCache {
|
|
93
91
|
compression: true
|
94
92
|
});
|
95
93
|
}
|
94
|
+
|
95
|
+
/**
|
96
|
+
* Use this to pass the native LMDB instance back to Rust.
|
97
|
+
*/
|
98
|
+
getNativeRef() {
|
99
|
+
return this.store.lmdb;
|
100
|
+
}
|
96
101
|
ensure() {
|
97
102
|
return Promise.resolve();
|
98
103
|
}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaspack/cache",
|
3
3
|
"description": "Interface for defining caches and file-system, IDB and LMDB implementations.",
|
4
|
-
"version": "2.12.1-canary.
|
4
|
+
"version": "2.12.1-canary.3491+a99ff5d2c",
|
5
5
|
"license": "(MIT OR Apache-2.0)",
|
6
6
|
"publishConfig": {
|
7
7
|
"access": "public"
|
@@ -22,11 +22,11 @@
|
|
22
22
|
"check-ts": "tsc --noEmit index.d.ts"
|
23
23
|
},
|
24
24
|
"dependencies": {
|
25
|
-
"@atlaspack/build-cache": "2.12.1-canary.
|
26
|
-
"@atlaspack/fs": "2.12.1-canary.
|
27
|
-
"@atlaspack/logger": "2.12.1-canary.
|
28
|
-
"@atlaspack/rust": "2.12.1-canary.
|
29
|
-
"@atlaspack/utils": "2.12.1-canary.
|
25
|
+
"@atlaspack/build-cache": "2.12.1-canary.3491+a99ff5d2c",
|
26
|
+
"@atlaspack/fs": "2.12.1-canary.3491+a99ff5d2c",
|
27
|
+
"@atlaspack/logger": "2.12.1-canary.3491+a99ff5d2c",
|
28
|
+
"@atlaspack/rust": "2.12.1-canary.3491+a99ff5d2c",
|
29
|
+
"@atlaspack/utils": "2.12.1-canary.3491+a99ff5d2c",
|
30
30
|
"lmdb": "2.8.5"
|
31
31
|
},
|
32
32
|
"devDependencies": {
|
@@ -36,5 +36,5 @@
|
|
36
36
|
"./src/IDBCache.js": "./src/IDBCache.browser.js",
|
37
37
|
"./src/LMDBCache.js": false
|
38
38
|
},
|
39
|
-
"gitHead": "
|
39
|
+
"gitHead": "a99ff5d2c9aaeea8d96463c920ab0e86059dfbe7"
|
40
40
|
}
|
package/src/LMDBLiteCache.js
CHANGED
@@ -75,8 +75,7 @@ const pipeline: (Readable, Writable) => Promise<void> = promisify(
|
|
75
75
|
export class LMDBLiteCache implements Cache {
|
76
76
|
fs: NodeFS;
|
77
77
|
dir: FilePath;
|
78
|
-
|
79
|
-
store: any;
|
78
|
+
store: LmdbWrapper;
|
80
79
|
fsCache: FSCache;
|
81
80
|
|
82
81
|
constructor(cacheDir: FilePath) {
|
@@ -91,6 +90,13 @@ export class LMDBLiteCache implements Cache {
|
|
91
90
|
});
|
92
91
|
}
|
93
92
|
|
93
|
+
/**
|
94
|
+
* Use this to pass the native LMDB instance back to Rust.
|
95
|
+
*/
|
96
|
+
getNativeRef(): Lmdb {
|
97
|
+
return this.store.lmdb;
|
98
|
+
}
|
99
|
+
|
94
100
|
ensure(): Promise<void> {
|
95
101
|
return Promise.resolve();
|
96
102
|
}
|