@atlaspack/cache 2.13.3-dev.39 → 2.13.3-dev.40
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 +2 -1
- package/lib/index.js +11 -0
- package/package.json +7 -7
- package/src/LMDBLiteCache.js +6 -2
- package/src/index.js +1 -1
package/lib/LMDBLiteCache.js
CHANGED
package/lib/index.js
CHANGED
@@ -25,6 +25,17 @@ Object.keys(_IDBCache).forEach(function (key) {
|
|
25
25
|
}
|
26
26
|
});
|
27
27
|
});
|
28
|
+
var _LMDBCache = require("./LMDBCache");
|
29
|
+
Object.keys(_LMDBCache).forEach(function (key) {
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
31
|
+
if (key in exports && exports[key] === _LMDBCache[key]) return;
|
32
|
+
Object.defineProperty(exports, key, {
|
33
|
+
enumerable: true,
|
34
|
+
get: function () {
|
35
|
+
return _LMDBCache[key];
|
36
|
+
}
|
37
|
+
});
|
38
|
+
});
|
28
39
|
var _LMDBLiteCache = require("./LMDBLiteCache");
|
29
40
|
Object.keys(_LMDBLiteCache).forEach(function (key) {
|
30
41
|
if (key === "default" || key === "__esModule") return;
|
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.13.3-dev.
|
4
|
+
"version": "2.13.3-dev.40+3a5870291",
|
5
5
|
"license": "(MIT OR Apache-2.0)",
|
6
6
|
"type": "commonjs",
|
7
7
|
"publishConfig": {
|
@@ -23,11 +23,11 @@
|
|
23
23
|
"check-ts": "tsc --noEmit index.d.ts"
|
24
24
|
},
|
25
25
|
"dependencies": {
|
26
|
-
"@atlaspack/build-cache": "2.13.3-dev.
|
27
|
-
"@atlaspack/fs": "2.14.1-dev.
|
28
|
-
"@atlaspack/logger": "2.14.1-dev.
|
29
|
-
"@atlaspack/rust": "3.0.1-dev.
|
30
|
-
"@atlaspack/utils": "2.14.1-dev.
|
26
|
+
"@atlaspack/build-cache": "2.13.3-dev.40+3a5870291",
|
27
|
+
"@atlaspack/fs": "2.14.1-dev.40+3a5870291",
|
28
|
+
"@atlaspack/logger": "2.14.1-dev.40+3a5870291",
|
29
|
+
"@atlaspack/rust": "3.0.1-dev.40+3a5870291",
|
30
|
+
"@atlaspack/utils": "2.14.1-dev.40+3a5870291",
|
31
31
|
"lmdb": "2.8.5"
|
32
32
|
},
|
33
33
|
"devDependencies": {
|
@@ -37,5 +37,5 @@
|
|
37
37
|
"./src/IDBCache.js": "./src/IDBCache.browser.js",
|
38
38
|
"./src/LMDBCache.js": false
|
39
39
|
},
|
40
|
-
"gitHead": "
|
40
|
+
"gitHead": "3a587029124601f8578afe85cbe36d50ee182837"
|
41
41
|
}
|
package/src/LMDBLiteCache.js
CHANGED
@@ -63,7 +63,10 @@ export function open(
|
|
63
63
|
new Lmdb({
|
64
64
|
path: directory,
|
65
65
|
asyncWrites: true,
|
66
|
-
mapSize:
|
66
|
+
mapSize:
|
67
|
+
process.env.ATLASPACK_BUILD_ENV === 'test'
|
68
|
+
? 1024 * 1024 * 1024
|
69
|
+
: 1024 * 1024 * 1024 * 15,
|
67
70
|
}),
|
68
71
|
);
|
69
72
|
}
|
@@ -101,7 +104,8 @@ export class LMDBLiteCache implements Cache {
|
|
101
104
|
return this.store.lmdb;
|
102
105
|
}
|
103
106
|
|
104
|
-
ensure(): Promise<void> {
|
107
|
+
async ensure(): Promise<void> {
|
108
|
+
await this.fsCache.ensure();
|
105
109
|
return Promise.resolve();
|
106
110
|
}
|
107
111
|
|