corestore 6.18.2 → 6.18.3
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/index.js +4 -0
- package/package.json +4 -3
package/index.js
CHANGED
|
@@ -33,6 +33,7 @@ module.exports = class Corestore extends ReadyResource {
|
|
|
33
33
|
this.manifestVersion = typeof opts.manifestVersion === 'number' ? opts.manifestVersion : (root ? root.manifestVersion : DEFAULT_MANIFEST)
|
|
34
34
|
this.compat = typeof opts.compat === 'boolean' ? opts.compat : (root ? root.compat : DEFAULT_COMPAT)
|
|
35
35
|
this.inflightRange = opts.inflightRange || null
|
|
36
|
+
this.globalCache = opts.globalCache || null
|
|
36
37
|
|
|
37
38
|
this._keyStorage = null
|
|
38
39
|
this._bootstrap = opts._bootstrap || null
|
|
@@ -319,6 +320,7 @@ module.exports = class Corestore extends ReadyResource {
|
|
|
319
320
|
key,
|
|
320
321
|
compat: opts.compat,
|
|
321
322
|
cache: opts.cache,
|
|
323
|
+
globalCache: this.globalCache,
|
|
322
324
|
createIfMissing: opts.createIfMissing === false ? false : !opts._discoveryKey,
|
|
323
325
|
keyPair: hasKeyPair ? keyPair : null
|
|
324
326
|
})
|
|
@@ -392,6 +394,7 @@ module.exports = class Corestore extends ReadyResource {
|
|
|
392
394
|
|
|
393
395
|
const core = new Hypercore(null, {
|
|
394
396
|
...opts,
|
|
397
|
+
globalCache: this.globalCache,
|
|
395
398
|
name: null,
|
|
396
399
|
preload: async () => {
|
|
397
400
|
if (opts.preload) opts = { ...opts, ...(await opts.preload()) }
|
|
@@ -489,6 +492,7 @@ module.exports = class Corestore extends ReadyResource {
|
|
|
489
492
|
_attached: opts && opts.detach === false ? this : null,
|
|
490
493
|
_root: this._root,
|
|
491
494
|
inflightRange: this.inflightRange,
|
|
495
|
+
globalCache: this.globalCache,
|
|
492
496
|
...opts
|
|
493
497
|
})
|
|
494
498
|
if (this === this._root) this._rootStoreSessions.add(session)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "corestore",
|
|
3
|
-
"version": "6.18.
|
|
3
|
+
"version": "6.18.3",
|
|
4
4
|
"description": "A Hypercore factory that simplifies managing collections of cores.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -27,11 +27,12 @@
|
|
|
27
27
|
"brittle": "^3.2.2",
|
|
28
28
|
"random-access-memory": "^6.2.0",
|
|
29
29
|
"standard": "^17.1.0",
|
|
30
|
-
"test-tmp": "^1.0.2"
|
|
30
|
+
"test-tmp": "^1.0.2",
|
|
31
|
+
"rache": "^1.0.0"
|
|
31
32
|
},
|
|
32
33
|
"dependencies": {
|
|
33
34
|
"b4a": "^1.6.4",
|
|
34
|
-
"hypercore": "^10.
|
|
35
|
+
"hypercore": "^10.37.10",
|
|
35
36
|
"hypercore-crypto": "^3.4.0",
|
|
36
37
|
"hypercore-id-encoding": "^1.2.0",
|
|
37
38
|
"read-write-mutexify": "^2.1.0",
|