Son CV dans un terminal web en Javascript! https://terminal-cv.gregandev.fr
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 lines
125 KiB

{"version":3,"file":"index.cjs","sources":["../native.js","../caching.js","../util/ArrayLikeIterable.js","../keys.js","../query.js","../util/when.js","../writer.js","../index.js"],"sourcesContent":["import { createRequire } from 'module';\r\nconst require = createRequire(import.meta.url)\r\nimport { fileURLToPath } from 'url'\r\nimport { dirname } from 'path'\r\nlet nativeMethods, dirName = dirname(fileURLToPath(import.meta.url)).replace(/dist$/, '')\r\ntry {\r\n\tconsole.log(dirName)\r\n\tnativeMethods = require('node-gyp-build')(dirName)\r\n\tif (process.versions.modules == 93)\r\n\t\trequire('v8').setFlagsFromString('--turbo-fast-api-calls')\r\n} catch(error) {\r\n\tif (process.versions.modules == 93) {\r\n\t\t// use this abi version as the backup version without turbo-fast-api-calls enabled\r\n\t\tObject.defineProperty(process.versions, 'modules', { value: '92' })\r\n\t\ttry {\r\n\t\t\tnativeMethods = require('node-gyp-build')(dirName)\r\n\t\t} catch(secondError) {\r\n\t\t\tthrow error\r\n\t\t} finally {\r\n\t\t\tObject.defineProperty(process.versions, 'modules', { value: '93' })\r\n\t\t}\r\n\t} else\r\n\t\tthrow error\r\n}\r\nexport const { Env, Cursor, Compression, getBufferForAddress, getAddress } = nativeMethods","import { WeakLRUCache } from 'weak-lru-cache/index.js'\r\nlet getLastVersion\r\nconst mapGet = Map.prototype.get\r\nexport const CachingStore = Store => class extends Store {\r\n\tconstructor(dbName, options) {\r\n\t\tsuper(dbName, options)\r\n\t\tif (!this.env.cacheCommitter) {\r\n\t\t\tthis.env.cacheCommitter = true\r\n\t\t\tthis.on('aftercommit', ({ next, last }) => {\r\n\t\t\t\tdo {\r\n\t\t\t\t\tlet store = next.store\r\n\t\t\t\t\tif (store) {\r\n\t\t\t\t\t\tif (next.flag & 1)\r\n\t\t\t\t\t\t\tnext.store.cache.delete(next.key) // just delete it from the map\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tlet expirationPriority = next.valueSize >> 10\r\n\t\t\t\t\t\t\tlet cache = next.store.cache\r\n\t\t\t\t\t\t\tlet entry = mapGet.call(cache, next.key)\r\n\t\t\t\t\t\t\tif (entry)\r\n\t\t\t\t\t\t\t\tcache.used(entry, expirationPriority) // this will enter it into the LRFU\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} while (next != last && (next = next.next))\r\n\t\t\t})\r\n\t\t}\r\n\t\tthis.db.cachingDb = this\r\n\t\tthis.cache = new WeakLRUCache(options.cache)\r\n\t}\r\n\tget(id, cacheMode) {\r\n\t\tlet value = this.cache.getValue(id)\r\n\t\tif (value !== undefined)\r\n\t\t\treturn value\r\n\t\tvalue = super.get(id)\r\n\t\tif (value && typeof value === 'object' && !cacheMode && typeof id !== 'object') {\r\n\t\t\tlet entry = this.cache.setValue(id, value, this.lastSize >> 10)\r\n\t\t\tif (this.useVersions) {\r\n\t\t\t\tentry.version = getLastVersion()\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn value\r\n\t}\r\n\tgetEntry(id, cacheMode) {\r\n\t\tlet entry = this.cache.get(id)\r\n\t\tif (entry)\r\n\t\t\treturn entry\r\n\t\tlet value = super.get(id)\r\n\t\tif (value === undefined)\r\n\t\t\treturn\r\n\t\tif (value && typeof value === 'object' && !cacheMode && typeof id !== 'object') {\r\n\t\t\tentry = this.cache.setValue(id, value, this.lastSize >> 10)\r\n\t\t} else {\r\n\t\t\tentry = { value }\r\n\t\t}\r\n\t\tif (this.useVersions) {\r\n\t\t\tentry.version = getLastVersion()\r\n\t\t}\r\n\t\treturn entry\r\n\t}\r\n\tputEntry(id, entry, ifVersion) {\r\n\t\tlet result = super.put(id, entry.value, entry.version, ifVersion)\r\n\t\tif (typeof id === 'object')\r\n\t\t\treturn result\r\n\t\tif (result && result.then)\r\n\t\t\tthis.cache.setManually(id, entry) // set manually so we can keep it pinned in memory until it is committed\r\n\t\telse // sync operation, immediately add to cache\r\n\t\t\tthis.cache.set(id, entry)\r\n\t}\r\n\tput(id, value, version, ifVersion) {\r\n\t\t// if (this.cache.get(id)) // if there is a cache entry, remove it from scheduledEntries and \r\n\t\tlet result = super.put(id, value, version, ifVersion)\r\n\t\tif (typeof id !== 'object') {\r\n\t\t\t// sync operation, immediately add to cache, otherwise keep it pinned in memory until it is committed\r\n\t\t\tlet entry = this.cache.setValue(id, value, result.isSync ? 0 : -1)\r\n\t\t\tif (version !== undefined)\r\n\t\t\t\tentry.version = typeof version === 'object' ? version.version : version\r\n\t\t}\r\n\t\treturn result\r\n\t}\r\n\tputSync(id, value, version, ifVersion) {\r\n\t\tif (id !== 'object') {\r\n\t\t\t// sync operation, immediately add to cache, otherwise keep it pinned in memory until it is committed\r\n\t\t\tif (value && typeof value === 'object') {\r\n\t\t\t\tlet entry = this.cache.setValue(id, value)\r\n\t\t\t\tif (version !== undefined) {\r\n\t\t\t\t\tentry.version = typeof version === 'object' ? version.version : version\r\n\t\t\t\t}\r\n\t\t\t} else // it is possible that a value used to exist here\r\n\t\t\t\tthis.cache.delete(id)\r\n\t\t}\r\n\t\treturn super.putSync(id, value, version, ifVersion)\r\n\t}\r\n\tremove(id, ifVersion) {\r\n\t\tthis.cache.delete(id)\r\n\t\treturn super.remove(id, ifVersion)\r\n\t}\r\n\tremoveSync(id, ifVersion) {\r\n\t\tthis.cache.delete(id)\r\n\t\treturn super.removeSync(id, ifVersion)\r\n\t}\r\n\tclear() {\r\n\t\tthis.cache.clear()\r\n\t\tsuper.clear()\r\n\t}\r\n\tchildTransaction(execute) {\r\n\t\tthrow new Error('Child transactions are not supported in caching stores')\r\n\t}\r\n}\r\nexport function setGetLastVersion(get) {\r\n\tgetLastVersion = get\r\n}\r\n","const SKIP = {}\r\nif (!Symbol.asyncIterator) {\r\n\tSymbol.asyncIterator = Symbol.for('Symbol.asyncIterator')\r\n}\r\n\r\nexport class ArrayLikeIterable {\r\n\tconstructor(sourceArray) {\r\n\t\tif (sourceArray) {\r\n\t\t\tthis[Symbol.iterator] = sourceArray[Symbol.iterator].bind(sourceArray)\r\n\t\t}\r\n\t}\r\n\tmap(func) {\r\n\t\tlet source = this\r\n\t\tlet result = new ArrayLikeIterable()\r\n\t\tresult[Symbol.iterator] = (async) => {\r\n\t\t\tlet iterator = source[Symbol.iterator](async)\r\n\t\t\treturn {\r\n\t\t\t\tnext(resolvedResult) {\r\n\t\t\t\t\tlet result\r\n\t\t\t\t\tdo {\r\n\t\t\t\t\t\tlet iteratorResult\r\n\t\t\t\t\t\tif (resolvedResult) {\r\n\t\t\t\t\t\t\titeratorResult = resolvedResult\r\n\t\t\t\t\t\t\tresolvedResult = null // don't go in this branch on next iteration\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\titeratorResult = iterator.next()\r\n\t\t\t\t\t\t\tif (iteratorResult.then) {\r\n\t\t\t\t\t\t\t\treturn iteratorResult.then(iteratorResult => this.next(iteratorResult))\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (iteratorResult.done === true) {\r\n\t\t\t\t\t\t\tthis.done = true\r\n\t\t\t\t\t\t\treturn iteratorResult\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tresult = func(iteratorResult.value)\r\n\t\t\t\t\t\tif (result && result.then) {\r\n\t\t\t\t\t\t\treturn result.then(result =>\r\n\t\t\t\t\t\t\t\tresult == SKIP ?\r\n\t\t\t\t\t\t\t\t\tthis.next() :\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tvalue: result\r\n\t\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} while(result == SKIP)\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tvalue: result\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\treturn() {\r\n\t\t\t\t\treturn iterator.return()\r\n\t\t\t\t},\r\n\t\t\t\tthrow() {\r\n\t\t\t\t\treturn iterator.throw()\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result\r\n\t}\r\n\t[Symbol.asyncIterator]() {\r\n\t\treturn this[Symbol.iterator](true)\r\n\t}\r\n\tfilter(func) {\r\n\t\treturn this.map(element => func(element) ? element : SKIP)\r\n\t}\r\n\r\n\tforEach(callback) {\r\n\t\tlet iterator = this[Symbol.iterator]()\r\n\t\tlet result\r\n\t\twhile ((result = iterator.next()).done !== true) {\r\n\t\t\tcallback(result.value)\r\n\t\t}\r\n\t}\r\n\tconcat(secondIterable) {\r\n\t\tlet concatIterable = new ArrayLikeIterable()\r\n\t\tconcatIterable[Symbol.iterator] = (async) => {\r\n\t\t\tlet iterator = this[Symbol.iterator]()\r\n\t\t\tlet isFirst = true\r\n\t\t\tlet concatIterator = {\r\n\t\t\t\tnext() {\r\n\t\t\t\t\tlet result = iterator.next()\r\n\t\t\t\t\tif (isFirst && result.done) {\r\n\t\t\t\t\t\tisFirst = false\r\n\t\t\t\t\t\titerator = secondIterable[Symbol.iterator](async)\r\n\t\t\t\t\t\treturn iterator.next()\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn result\r\n\t\t\t\t},\r\n\t\t\t\treturn() {\r\n\t\t\t\t\treturn iterator.return()\r\n\t\t\t\t},\r\n\t\t\t\tthrow() {\r\n\t\t\t\t\treturn iterator.throw()\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn concatIterator\r\n\t\t}\r\n\t\treturn concatIterable\r\n\t}\r\n\ttoJSON() {\r\n\t\tif (this.asArray && this.asArray.forEach) {\r\n\t\t\treturn this.asArray\r\n\t\t}\r\n\t\tthrow new Error('Can not serialize async iteratables without first calling resolveJSON')\r\n\t\t//return Array.from(this)\r\n\t}\r\n\tget asArray() {\r\n\t\tif (this._asArray)\r\n\t\t\treturn this._asArray\r\n\t\tlet promise = new Promise((resolve, reject) => {\r\n\t\t\tlet iterator = this[Symbol.iterator](true)\r\n\t\t\tlet array = []\r\n\t\t\tlet iterable = this\r\n\t\t\tfunction next(result) {\r\n\t\t\t\twhile (result.done !== true) {\r\n\t\t\t\t\tif (result.then) {\r\n\t\t\t\t\t\treturn result.then(next)\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tarray.push(result.value)\r\n\t\t\t\t\t}\r\n\t\t\t\t\tresult = iterator.next()\r\n\t\t\t\t}\r\n\t\t\t\tarray.iterable = iterable\r\n\t\t\t\tresolve(iterable._asArray = array)\r\n\t\t\t}\r\n\t\t\tnext(iterator.next())\r\n\t\t})\r\n\t\tpromise.iterable = this\r\n\t\treturn this._asArray || (this._asArray = promise)\r\n\t}\r\n\tresolveData() {\r\n\t\treturn this.asArray\r\n\t}\r\n}\r\n","import { getAddress } from './native.js'\r\nimport { writeKey, readKey, enableNullTermination } from 'ordered-binary/index.js'\r\nenableNullTermination()\r\n\r\nconst writeUint32Key = (key, target, start) => {\r\n\t(target.dataView || (target.dataView = new DataView(target.buffer, 0, target.length))).setUint32(start, key, true)\r\n\treturn start + 4\r\n}\r\nconst readUint32Key = (target, start) => {\r\n\treturn (target.dataView || (target.dataView = new DataView(target.buffer, 0, target.length))).getUint32(start, true)\r\n}\r\nconst writeBufferKey = (key, target, start) => {\r\n\tif (key.length > 1978)\r\n\t\tthrow new Error('Key buffer is too long')\r\n\ttarget.set(key, start)\r\n\treturn key.length + start\r\n}\r\nconst readBufferKey = (target, start, end) => {\r\n\treturn Uint8ArraySlice.call(target, start, end)\r\n}\r\n\r\nexport function applyKeyHandling(store) {\r\n \tif (store.encoding == 'ordered-binary') {\r\n\t\tstore.encoder = store.decoder = {\r\n\t\t\tencode(value) {\r\n\t\t\t\tif (savePosition > 6200)\r\n\t\t\t\t\tallocateSaveBuffer()\r\n\t\t\t\tlet start = savePosition\r\n\t\t\t\tsavePosition = writeKey(value, saveBuffer, start)\r\n\t\t\t\tlet buffer = saveBuffer.subarray(start, savePosition)\r\n\t\t\t\tsavePosition = (savePosition + 7) & 0xfffff8\r\n\t\t\t\treturn buffer\r\n\t\t\t},\r\n\t\t\tdecode(buffer, end) { return readKey(buffer, 0, end) },\r\n\t\t\twriteKey,\r\n\t\t\treadKey,\r\n\t\t}\r\n\t}\r\n\tif (store.keyIsUint32) {\r\n\t\tstore.writeKey = writeUint32Key\r\n\t\tstore.readKey = readUint32Key\r\n\t} else if (store.keyIsBuffer) {\r\n\t\tstore.writeKey = writeBufferKey\r\n\t\tstore.readKey = readBufferKey\r\n\t} else if (store.keyEncoder) {\r\n\t\tstore.writeKey = store.keyEncoder.writeKey\r\n\t\tstore.readKey = store.keyEncoder.readKey\r\n\t} else {\r\n\t\tstore.writeKey = writeKey\r\n\t\tstore.readKey = readKey\r\n\t}\r\n}\r\n\r\nlet saveBuffer, saveDataView, saveDataAddress\r\nlet savePosition = 8000\r\nfunction allocateSaveBuffer() {\r\n\tsaveBuffer = Buffer.alloc(8192)\r\n\tsaveBuffer.dataView = saveDataView = new DataView(saveBuffer.buffer, saveBuffer.byteOffset, saveBuffer.byteLength)\r\n\tsaveBuffer.buffer.address = getAddress(saveBuffer.buffer)\r\n\tsaveDataAddress = saveBuffer.buffer.address + saveBuffer.byteOffset\r\n\tsavePosition = 0\r\n\r\n}\r\nexport function saveKey(key, writeKey, saveTo) {\r\n\tif (savePosition > 6200) {\r\n\t\tallocateSaveBuffer()\r\n\t}\r\n\tlet start = savePosition\r\n\tsavePosition = writeKey(key, saveBuffer, start + 4)\r\n\tsaveDataView.setUint32(start, savePosition - start - 4, true)\r\n\tsaveTo.saveBuffer = saveBuffer\r\n\tsavePosition = (savePosition + 7) & 0xfffff8\r\n\treturn start + saveDataAddress\r\n}\r\n","import { ArrayLikeIterable } from './util/ArrayLikeIterable.js'\r\nimport { getAddress, Cursor } from './native.js'\r\nimport { saveKey } from './keys.js'\r\nimport { writeKey } from 'ordered-binary/index.js'\r\nconst ITERATOR_DONE = { done: true, value: undefined }\r\n\r\nexport function addQueryMethods(LMDBStore, {\r\n\tgetReadTxn, env, keyBytes, keyBytesView, getLastVersion\r\n}) {\r\n\tlet renewId = 1\r\n\tLMDBStore.onReadReset = () => renewId++\r\n\tObject.assign(LMDBStore.prototype, {\r\n\t\tgetValues(key, options) {\r\n\t\t\tlet defaultOptions = {\r\n\t\t\t\tkey,\r\n\t\t\t\tvaluesForKey: true\r\n\t\t\t}\r\n\t\t\tif (options && options.snapshot === false)\r\n\t\t\t\tthrow new Error('Can not disable snapshots for getValues')\r\n\t\t\treturn this.getRange(options ? Object.assign(defaultOptions, options) : defaultOptions)\r\n\t\t},\r\n\t\tgetKeys(options) {\r\n\t\t\tif (!options)\r\n\t\t\t\toptions = {}\r\n\t\t\toptions.values = false\r\n\t\t\treturn this.getRange(options)\r\n\t\t},\r\n\t\tgetCount(options) {\r\n\t\t\tif (!options)\r\n\t\t\t\toptions = {}\r\n\t\t\toptions.onlyCount = true\r\n\t\t\treturn this.getRange(options)[Symbol.iterator]()\r\n\t\t},\r\n\t\tgetKeysCount(options) {\r\n\t\t\tif (!options)\r\n\t\t\t\toptions = {}\r\n\t\t\toptions.onlyCount = true\r\n\t\t\toptions.values = false\r\n\t\t\treturn this.getRange(options)[Symbol.iterator]()\r\n\t\t},\r\n\t\tgetValuesCount(key, options) {\r\n\t\t\tif (!options)\r\n\t\t\t\toptions = {}\r\n\t\t\toptions.key = key\r\n\t\t\toptions.valuesForKey = true\r\n\t\t\toptions.onlyCount = true\r\n\t\t\treturn this.getRange(options)[Symbol.iterator]()\r\n\t\t},\r\n\t\tgetRange(options) {\r\n\t\t\tlet iterable = new ArrayLikeIterable()\r\n\t\t\tif (!options)\r\n\t\t\t\toptions = {}\r\n\t\t\tlet includeValues = options.values !== false\r\n\t\t\tlet includeVersions = options.versions\r\n\t\t\tlet valuesForKey = options.valuesForKey\r\n\t\t\tlet limit = options.limit\r\n\t\t\tlet db = this.db\r\n\t\t\tlet snapshot = options.snapshot\r\n\t\t\titerable[Symbol.iterator] = () => {\r\n\t\t\t\tlet currentKey = valuesForKey ? options.key : options.start\r\n\t\t\t\tconst reverse = options.reverse\r\n\t\t\t\tlet count = 0\r\n\t\t\t\tlet cursor, cursorRenewId\r\n\t\t\t\tlet txn\r\n\t\t\t\tlet flags = (includeValues ? 0x100 : 0) | (reverse ? 0x400 : 0) |\r\n\t\t\t\t\t(valuesForKey ? 0x800 : 0) | (options.exactMatch ? 0x4000 : 0)\r\n\t\t\t\tfunction resetCursor() {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tif (cursor)\r\n\t\t\t\t\t\t\tfinishCursor()\r\n\t\t\t\t\t\tlet writeTxn = env.writeTxn\r\n\t\t\t\t\t\ttxn = writeTxn || getReadTxn()\r\n\t\t\t\t\t\tcursor = !writeTxn && db.availableCursor\r\n\t\t\t\t\t\tif (cursor) {\r\n\t\t\t\t\t\t\tdb.availableCursor = null\r\n\t\t\t\t\t\t\tif (db.cursorTxn != txn)\r\n\t\t\t\t\t\t\t\tcursor.renew()\r\n\t\t\t\t\t\t\telse// if (db.currentRenewId != renewId)\r\n\t\t\t\t\t\t\t\tflags |= 0x2000\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcursor = new Cursor(db)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttxn.cursorCount = (txn.cursorCount || 0) + 1 // track transaction so we always use the same one\r\n\t\t\t\t\t\tif (snapshot === false) {\r\n\t\t\t\t\t\t\tcursorRenewId = renewId // use shared read transaction\r\n\t\t\t\t\t\t\ttxn.renewingCursorCount = (txn.renewingCursorCount || 0) + 1 // need to know how many are renewing cursors\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch(error) {\r\n\t\t\t\t\t\tif (cursor) {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tcursor.close()\r\n\t\t\t\t\t\t\t} catch(error) { }\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthrow error\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tresetCursor()\r\n\t\t\t\tlet store = this\r\n\t\t\t\tif (options.onlyCount) {\r\n\t\t\t\t\tflags |= 0x1000\r\n\t\t\t\t\tlet count = position(options.offset)\r\n\t\t\t\t\tfinishCursor()\r\n\t\t\t\t\treturn count\r\n\t\t\t\t}\r\n\t\t\t\tfunction position(offset) {\r\n\t\t\t\t\tlet keySize = store.writeKey(currentKey, keyBytes, 0)\r\n\t\t\t\t\tlet endAddress\r\n\t\t\t\t\tif (valuesForKey) {\r\n\t\t\t\t\t\tif (options.start === undefined && options.end === undefined)\r\n\t\t\t\t\t\t\tendAddress = 0\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tlet startAddress\r\n\t\t\t\t\t\t\tif (store.encoder.writeKey) {\r\n\t\t\t\t\t\t\t\tstartAddress = saveKey(options.start, store.encoder.writeKey, iterable)\r\n\t\t\t\t\t\t\t\tkeyBytesView.setFloat64(2000, startAddress, true)\r\n\t\t\t\t\t\t\t\tendAddress = saveKey(options.end, store.encoder.writeKey, iterable)\r\n\t\t\t\t\t\t\t} else if ((!options.start || options.start instanceof Uint8Array) && (!options.end || options.end instanceof Uint8Array)) {\r\n\t\t\t\t\t\t\t\tstartAddress = saveKey(options.start, writeKey, iterable)\r\n\t\t\t\t\t\t\t\tkeyBytesView.setFloat64(2000, startAddress, true)\r\n\t\t\t\t\t\t\t\tendAddress = saveKey(options.end, writeKey, iterable)\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tthrow new Error('Only key-based encoding is supported for start/end values')\r\n\t\t\t\t\t\t\t\tlet encoded = store.encoder.encode(options.start)\r\n\t\t\t\t\t\t\t\tlet bufferAddress = encoded.buffer.address || (encoded.buffer.address = getAddress(encoded) - encoded.byteOffset)\r\n\t\t\t\t\t\t\t\tstartAddress = bufferAddress + encoded.byteOffset\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else\r\n\t\t\t\t\t\tendAddress = saveKey(options.end, store.writeKey, iterable)\r\n\t\t\t\t\treturn cursor.position(flags, offset || 0, keySize, endAddress)\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfunction finishCursor() {\r\n\t\t\t\t\tif (txn.isAborted)\r\n\t\t\t\t\t\treturn\r\n\t\t\t\t\tif (cursorRenewId)\r\n\t\t\t\t\t\ttxn.renewingCursorCount--\r\n\t\t\t\t\tif (--txn.cursorCount <= 0 && txn.onlyCursor) {\r\n\t\t\t\t\t\tcursor.close()\r\n\t\t\t\t\t\ttxn.abort() // this is no longer main read txn, abort it now that we are done\r\n\t\t\t\t\t\ttxn.isAborted = true\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (db.availableCursor || txn != getReadTxn())\r\n\t\t\t\t\t\t\tcursor.close()\r\n\t\t\t\t\t\telse { // try to reuse it\r\n\t\t\t\t\t\t\tdb.availableCursor = cursor\r\n\t\t\t\t\t\t\tdb.cursorTxn = txn\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn {\r\n\t\t\t\t\tnext() {\r\n\t\t\t\t\t\tlet keySize, lastSize\r\n\t\t\t\t\t\tif (cursorRenewId && cursorRenewId != renewId) {\r\n\t\t\t\t\t\t\tresetCursor()\r\n\t\t\t\t\t\t\tkeySize = position(0)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (count === 0) { // && includeValues) // on first entry, get current value if we need to\r\n\t\t\t\t\t\t\tkeySize = position(options.offset)\r\n\t\t\t\t\t\t} else\r\n\t\t\t\t\t\t\tkeySize = cursor.iterate()\r\n\t\t\t\t\t\tif (keySize === 0 ||\r\n\t\t\t\t\t\t\t\t(count++ >= limit)) {\r\n\t\t\t\t\t\t\tfinishCursor()\r\n\t\t\t\t\t\t\treturn ITERATOR_DONE\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (!valuesForKey || snapshot === false)\r\n\t\t\t\t\t\t\tcurrentKey = store.readKey(keyBytes, 32, keySize + 32)\r\n\t\t\t\t\t\tif (includeValues) {\r\n\t\t\t\t\t\t\tlet value\r\n\t\t\t\t\t\t\tlastSize = keyBytesView.getUint32(0, true)\r\n\t\t\t\t\t\t\tif (store.decoder) {\r\n\t\t\t\t\t\t\t\tvalue = store.decoder.decode(db.unsafeBuffer, lastSize)\r\n\t\t\t\t\t\t\t} else if (store.encoding == 'binary')\r\n\t\t\t\t\t\t\t\tvalue = Uint8ArraySlice.call(db.unsafeBuffer, 0, lastSize)\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tvalue = store.db.unsafeBuffer.toString('utf8', 0, lastSize)\r\n\t\t\t\t\t\t\t\tif (store.encoding == 'json' && value)\r\n\t\t\t\t\t\t\t\t\tvalue = JSON.parse(value)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (includeVersions)\r\n\t\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\t\tvalue: {\r\n\t\t\t\t\t\t\t\t\t\tkey: currentKey,\r\n\t\t\t\t\t\t\t\t\t\tvalue,\r\n\t\t\t\t\t\t\t\t\t\tversion: getLastVersion()\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\telse if (valuesForKey)\r\n\t\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\t\tvalue\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\t\tvalue: {\r\n\t\t\t\t\t\t\t\t\t\tkey: currentKey,\r\n\t\t\t\t\t\t\t\t\t\tvalue,\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (includeVersions) {\r\n\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\tvalue: {\r\n\t\t\t\t\t\t\t\t\tkey: currentKey,\r\n\t\t\t\t\t\t\t\t\tversion: getLastVersion()\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\tvalue: currentKey\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\treturn() {\r\n\t\t\t\t\t\tfinishCursor()\r\n\t\t\t\t\t\treturn ITERATOR_DONE\r\n\t\t\t\t\t},\r\n\t\t\t\t\tthrow() {\r\n\t\t\t\t\t\tfinishCursor()\r\n\t\t\t\t\t\treturn ITERATOR_DONE\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn iterable\r\n\t\t}\r\n\r\n\t})\r\n}\r\n","export function when(promise, callback, errback) {\r\n if (promise && promise.then) {\r\n return errback ?\r\n promise.then(callback, errback) :\r\n promise.then(callback)\r\n }\r\n return callback(promise)\r\n}\r\n","import { getAddress } from './native.js'\r\nimport { when } from './util/when.js'\r\nvar backpressureArray\r\n\r\nconst MAX_KEY_SIZE = 1978\r\nconst PROCESSING = 0x20000000\r\nconst STATUS_LOCKED = 0x200000;\r\nconst WAITING_OPERATION = 0x400000;\r\nconst BACKPRESSURE_THRESHOLD = 5000000\r\nconst TXN_DELIMITER = 0x20000000\r\nconst TXN_COMMITTED = 0x40000000\r\nconst BATCH_DELIMITER = 0x8000000\r\nconst FAILED_CONDITION = 0x200000\r\n\r\nconst SYNC_PROMISE_SUCCESS = Promise.resolve(true)\r\nconst SYNC_PROMISE_FAIL = Promise.resolve(false)\r\nexport const ABORT = {}\r\nconst CALLBACK_THREW = {}\r\nSYNC_PROMISE_SUCCESS.isSync = true\r\nSYNC_PROMISE_FAIL.isSync = true\r\n\r\nvar log = []\r\nexport function addWriteMethods(LMDBStore, { env, fixedBuffer, resetReadTxn, useWritemap, eventTurnBatching, txnStartThreshold, batchStartThreshold, commitDelay }) {\r\n\t// stands for write instructions\r\n\tvar dynamicBytes\r\n\tfunction allocateInstructionBuffer() {\r\n\t\tdynamicBytes = Buffer.allocUnsafeSlow(0x10000)\r\n\t\tdynamicBytes.uint32 = new Uint32Array(dynamicBytes.buffer, 0, 0x10000 >> 2)\r\n\t\tdynamicBytes.uint32[0] = 0\r\n\t\tdynamicBytes.float64 = new Float64Array(dynamicBytes.buffer, 0, 0x10000 >> 3)\r\n\t\tdynamicBytes.buffer.address = getAddress(dynamicBytes.buffer)\r\n\t\tdynamicBytes.address = dynamicBytes.buffer.address + dynamicBytes.byteOffset\r\n\t\tdynamicBytes.position = 0\r\n\t\treturn dynamicBytes\r\n\t}\r\n\tvar lastCompressibleFloat64 = new Float64Array(1)\r\n\tvar lastCompressiblePosition = 0\r\n\tvar lastDynamicBytes\r\n\tvar compressionCount = 0\r\n\tvar outstandingWriteCount = 0\r\n\tvar startAddress = 0\r\n\tvar writeTxn = null\r\n\tvar abortedNonChildTransactionWarn\r\n\tvar nextTxnCallbacks = []\r\n\tvar lastQueuedTxnCallbacks\r\n\tvar commitPromise\r\n\tcommitDelay = commitDelay || 0\r\n\teventTurnBatching = eventTurnBatching === false ? false : true\r\n\tvar enqueuedCommit\r\n\tvar afterCommitCallbacks = []\r\n\tvar beforeCommitCallbacks = []\r\n\tvar enqueuedEventTurnBatch\r\n\tvar batchDepth = 0\r\n\tvar writeBatchStart, outstandingBatchCount\r\n\ttxnStartThreshold = txnStartThreshold || 5\r\n\tbatchStartThreshold = batchStartThreshold || 1000\r\n\r\n\tallocateInstructionBuffer()\r\n\tdynamicBytes.uint32[0] = TXN_DELIMITER | TXN_COMMITTED\r\n\tvar txnResolution, lastQueuedResolution, nextResolution = { uint32: dynamicBytes.uint32, flagPosition: 0, }\r\n\tvar uncommittedResolution = { next: nextResolution }\r\n\tvar unwrittenResolution = nextResolution\r\n\tfunction writeInstructions(flags, store, key, value, version, ifVersion) {\r\n\t\tlet writeStatus, compressionStatus = false\r\n\t\tlet targetBytes, position\r\n\t\tlet valueBuffer\r\n\t\tif (flags & 2) {\r\n\t\t\t// encode first in case we have to write a shared structure\r\n\t\t\tif (store.encoder) {\r\n\t\t\t\t//if (!(value instanceof Uint8Array)) TODO: in a future version, directly store buffers that are provided\r\n\t\t\t\tvalueBuffer = store.encoder.encode(value)\r\n\t\t\t\tif (typeof valueBuffer == 'string')\r\n\t\t\t\t\tvalueBuffer = Buffer.from(valueBuffer) // TODO: Would be nice to write strings inline in the instructions\r\n\t\t\t} else if (typeof value == 'string') {\r\n\t\t\t\tvalueBuffer = Buffer.from(value) // TODO: Would be nice to write strings inline in the instructions\r\n\t\t\t} else if (value instanceof Uint8Array)\r\n\t\t\t\tvalueBuffer = value\r\n\t\t\telse\r\n\t\t\t\tthrow new Error('Invalid value to put in database ' + value + ' (' + (typeof value) +'), consider using encoder')\r\n\t\t}\r\n\t\tif (writeTxn) {\r\n\t\t\ttargetBytes = fixedBuffer\r\n\t\t\tposition = 0\r\n\t\t} else {\r\n\t\t\tif (eventTurnBatching && !enqueuedEventTurnBatch && batchDepth == 0) {\r\n\t\t\t\tenqueuedEventTurnBatch = setImmediate(() => {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tfor (let i = 0, l = beforeCommitCallbacks.length; i < l; i++) {\r\n\t\t\t\t\t\t\tbeforeCommitCallbacks[i]()\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch(error) {\r\n\t\t\t\t\t\tconsole.error(error)\r\n\t\t\t\t\t}\r\n\t\t\t\t\tenqueuedEventTurnBatch = null\r\n\t\t\t\t\tfinishBatch()\r\n\t\t\t\t\tbatchDepth--\r\n\t\t\t\t\tif (writeBatchStart)\r\n\t\t\t\t\t\twriteBatchStart() // TODO: When we support delay start of batch, optionally don't delay this\r\n\t\t\t\t})\r\n\t\t\t\tcommitPromise = null // reset the commit promise, can't know if it is really a new transaction prior to finishWrite being called\r\n\t\t\t\twriteBatchStart = writeInstructions(1, store)\r\n\t\t\t\toutstandingBatchCount = 0\r\n\t\t\t\tbatchDepth++\r\n\t\t\t}\r\n\t\t\ttargetBytes = dynamicBytes\r\n\t\t\tposition = targetBytes.position\r\n\t\t}\r\n\t\tlet uint32 = targetBytes.uint32, float64 = targetBytes.float64\r\n\t\tlet flagPosition = position << 1 // flagPosition is the 32-bit word starting position\r\n\r\n\t\t// don't increment Position until we are sure we don't have any key writing errors\r\n\t\tuint32[flagPosition + 1] = store.db.dbi\r\n\t\tlet nextCompressible\r\n\t\tif (flags & 4) {\r\n\t\t\tlet keyStartPosition = (position << 3) + 12\r\n\t\t\tlet endPosition\r\n\t\t\ttry {\r\n\t\t\t\tendPosition = store.writeKey(key, targetBytes, keyStartPosition)\r\n\t\t\t} catch(error) {\r\n\t\t\t\ttargetBytes.fill(0, keyStartPosition)\r\n\t\t\t\tthrow error\r\n\t\t\t}\r\n\t\t\tlet keySize = endPosition - keyStartPosition\r\n\t\t\tif (keySize > MAX_KEY_SIZE) {\r\n\t\t\t\ttargetBytes.fill(0, keyStartPosition)\r\n\t\t\t\tthrow new Error('Key size is too large')\r\n\t\t\t}\r\n\t\t\tuint32[flagPosition + 2] = keySize\r\n\t\t\tposition = (endPosition + 16) >> 3\r\n\t\t\tif (flags & 2) {\r\n\t\t\t\tuint32[(position << 1) - 1] = valueBuffer.length\r\n\t\t\t\tlet valueArrayBuffer = valueBuffer.buffer\r\n\t\t\t\t// record pointer to value buffer\r\n\t\t\t\tfloat64[position++] = (valueArrayBuffer.address || (valueArrayBuffer.address = getAddress(valueArrayBuffer))) + valueBuffer.byteOffset\r\n\t\t\t\tif (store.compression && valueBuffer.length >= store.compression.threshold) {\r\n\t\t\t\t\tflags |= 0x100000;\r\n\t\t\t\t\tfloat64[position] = store.compression.address\r\n\t\t\t\t\tif (!writeTxn)\r\n\t\t\t\t\t\tenv.compress(targetBytes.buffer.address + (position << 3))\r\n\t\t\t\t\tposition++\r\n\t\t\t\t\tcompressionCount++\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (ifVersion !== undefined) {\r\n\t\t\t\tif (ifVersion === null)\r\n\t\t\t\t\tflags |= 0x10\r\n\t\t\t\telse {\r\n\t\t\t\t\tflags |= 0x100\r\n\t\t\t\t\tfloat64[position++] = ifVersion\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (version !== undefined) {\r\n\t\t\t\tflags |= 0x200\r\n\t\t\t\tfloat64[position++] = version || 0\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\tposition++\r\n\t\ttargetBytes.position = position\r\n\t\t//console.log('js write', (targetBytes.buffer.address + (flagPosition << 2)).toString(16), flags.toString(16))\r\n\t\tif (writeTxn) {\r\n\t\t\tuint32[0] = flags\r\n\t\t\tenv.write(targetBytes.buffer.address)\r\n\t\t\treturn () => (uint32[0] & FAILED_CONDITION) ? SYNC_PROMISE_FAIL : SYNC_PROMISE_SUCCESS\r\n\t\t}\r\n\t\tuint32[position << 1] = 0 // clear out the next slot\r\n\t\tlet nextUint32\r\n\t\tif (position > 0x1e00) { // 61440 bytes\r\n\t\t\t// make new buffer and make pointer to it\r\n\t\t\tlet lastBuffer = targetBytes\r\n\t\t\tlet lastPosition = position\r\n\t\t\tlet lastFloat64 = targetBytes.float64\r\n\t\t\tlet lastUint32 = targetBytes.uint32\r\n\t\t\ttargetBytes = allocateInstructionBuffer()\r\n\t\t\tposition = targetBytes.position\r\n\t\t\tlastFloat64[lastPosition + 1] = targetBytes.buffer.address + position\r\n\t\t\tlastUint32[lastPosition << 1] = 3 // pointer instruction\r\n\t\t\t//console.log('pointer from ', (lastFloat64.buffer.address + (lastPosition << 3)).toString(16), 'to', (targetBytes.buffer.address + position).toString(16), 'flag position', (uint32.buffer.address + (flagPosition << 2)).toString(16))\r\n\t\t\tnextUint32 = targetBytes.uint32\r\n\t\t} else\r\n\t\t\tnextUint32 = uint32\r\n\t\tlet newResolution = store.cache ?\r\n\t\t{\r\n\t\t\tuint32: nextUint32,\r\n\t\t\tflagPosition: position << 1,\r\n\t\t\tflag: 0, // TODO: eventually eliminate this, as we can probably signify success by zeroing the flagPosition\r\n\t\t\tvalueBuffer,\r\n\t\t\tnext: null,\r\n\t\t\tkey,\r\n\t\t\tstore,\r\n\t\t\tvalueSize: 0,\r\n\t\t} :\r\n\t\t{\r\n\t\t\tuint32: nextUint32,\r\n\t\t\tflagPosition: position << 1,\r\n\t\t\tflag: 0, // TODO: eventually eliminate this, as we can probably signify success by zeroing the flagPosition\r\n\t\t\tvalueBuffer,\r\n\t\t\tnext: null,\r\n\t\t}\r\n\t\tlet resolution = nextResolution\r\n\t\tresolution.next = newResolution\r\n\t\tnextResolution = newResolution\r\n\t\tlet writtenBatchDepth = batchDepth\r\n\r\n\t\treturn () => {\r\n\t\t\tif (writtenBatchDepth) {\r\n\t\t\t\t// if we are in a batch, the transaction can't close, so we do the faster,\r\n\t\t\t\t// but non-deterministic updates, knowing that the write thread can\r\n\t\t\t\t// just poll for the status change if we miss a status update\r\n\t\t\t\twriteStatus = uint32[flagPosition]\r\n\t\t\t\tuint32[flagPosition] = flags\r\n\t\t\t\tif (writeBatchStart && !writeStatus) {\r\n\t\t\t\t\toutstandingBatchCount++\r\n\t\t\t\t\tif (outstandingBatchCount > batchStartThreshold) {\r\n\t\t\t\t\t\toutstandingBatchCount = 0\r\n\t\t\t\t\t\twriteBatchStart()\r\n\t\t\t\t\t\twriteBatchStart = null\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else // otherwise the transaction could end at any time and we need to know the\r\n\t\t\t\t// deterministically if it is ending, so we can reset the commit promise\r\n\t\t\t\t// so we use the slower atomic operation\r\n\t\t\t\twriteStatus = Atomics.or(uint32, flagPosition, flags)\r\n\t\r\n\t\t\toutstandingWriteCount++\r\n\t\t\tif (writeStatus & TXN_DELIMITER) {\r\n\t\t\t\tcommitPromise = null\r\n\t\t\t\tqueueCommitResolution(resolution)\r\n\t\t\t\tif (!startAddress)\r\n\t\t\t\t\tstartAddress = uint32.buffer.address + (flagPosition << 2)\r\n\t\t\t}\r\n\t\t\tif (writeStatus & WAITING_OPERATION) { // write thread is waiting\r\n\t\t\t\t//console.log('resume batch thread', uint32.buffer.address + (flagPosition << 2))\r\n\t\t\t\tenv.startWriting(0)\r\n\t\t\t}\r\n\t\t\tif (outstandingWriteCount > BACKPRESSURE_THRESHOLD) {\r\n\t\t\t\tconsole.log('backpressure')\r\n\t\t\t\tif (!backpressureArray)\r\n\t\t\t\t\tbackpressureArray = new Int8Array(new SharedArrayBuffer(4), 0, 1)\r\n\t\t\t\tAtomics.wait(backpressureArray, 0, 0, 1)\r\n\t\t\t}\r\n\t\t\tif (startAddress) {\r\n\t\t\t\tif (!enqueuedCommit && txnStartThreshold) {\r\n\t\t\t\t\tenqueuedCommit = commitDelay == 0 ? setImmediate(startWriting) : setTimeout(startWriting, commitDelay)\r\n\t\t\t\t} else if (outstandingWriteCount > txnStartThreshold)\r\n\t\t\t\t\tstartWriting()\r\n\t\t\t}\r\n\r\n\t\t\tif ((outstandingWriteCount & 7) === 0)\r\n\t\t\t\tresolveWrites()\r\n\t\t\t\r\n\t\t\tif (store.cache) {\r\n\t\t\t\tresolution.key = key\r\n\t\t\t\tresolution.store = store\r\n\t\t\t\tresolution.valueSize = valueBuffer ? valueBuffer.length : 0\r\n\t\t\t}\r\n\t\t\tresolution.valueBuffer = valueBuffer\r\n\t\t\tlastQueuedResolution = resolution\r\n\t\t\t\t\r\n\t\t\tif (ifVersion === undefined) {\r\n\t\t\t\tif (writtenBatchDepth > 1)\r\n\t\t\t\t\treturn SYNC_PROMISE_SUCCESS // or return undefined?\r\n\t\t\t\tif (!commitPromise) {\r\n\t\t\t\t\tcommitPromise = new Promise((resolve, reject) => {\r\n\t\t\t\t\t\tresolution.resolve = resolve\r\n\t\t\t\t\t\tresolution.reject = reject\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t\treturn commitPromise\r\n\t\t\t}\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tresolution.resolve = resolve\r\n\t\t\t\tresolution.reject = reject\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\tfunction startWriting() {\r\n\t\t//console.log('start address ' + startAddress.toString(16), store.name)\r\n\t\tif (enqueuedCommit) {\r\n\t\t\tclearImmediate(enqueuedCommit)\r\n\t\t\tenqueuedCommit = null\r\n\t\t}\r\n\t\tenv.startWriting(startAddress, (status) => {\r\n\t\t\t//console.log('finished batch', store.name)\r\n\t\t\tif (dynamicBytes.uint32[dynamicBytes.position << 1] & TXN_DELIMITER)\r\n\t\t\t\tqueueCommitResolution(nextResolution)\r\n\r\n\t\t\tresolveWrites(true)\r\n\t\t\tswitch (status) {\r\n\t\t\t\tcase 0: case 1:\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\texecuteTxnCallbacks()\r\n\t\t\t\t\tconsole.log('user callback');\r\n\t\t\t\tbreak\r\n\t\t\t\tdefault:\r\n\t\t\t\tconsole.error(status)\r\n\t\t\t\tif (commitRejectPromise) {\r\n\t\t\t\t\tcommitRejectPromise.reject(status)\r\n\t\t\t\t\tcommitRejectPromise = null\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t\tstartAddress = 0\r\n\t}\r\n\r\n\tfunction queueCommitResolution(resolution) {\r\n\t\tif (!resolution.isTxn) {\r\n\t\t\tresolution.isTxn = true\r\n\t\t\tif (txnResolution) {\r\n\t\t\t\ttxnResolution.nextTxn = resolution\r\n\t\t\t\toutstandingWriteCount = 0\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\ttxnResolution = resolution\r\n\t\t}\r\n\t}\r\n\tfunction resolveWrites(async) {\r\n\t\t// clean up finished instructions\r\n\t\tlet instructionStatus\r\n\t\twhile ((instructionStatus = unwrittenResolution.uint32[unwrittenResolution.flagPosition])\r\n\t\t\t\t& 0x10000000) {\r\n\t\t\t//console.log('instructionStatus: ' + instructionStatus.toString(16))\r\n\t\t\tif (unwrittenResolution.callbacks) {\r\n\t\t\t\tnextTxnCallbacks.push(unwrittenResolution.callbacks)\r\n\t\t\t\tunwrittenResolution.callbacks = null\r\n\t\t\t}\r\n\t\t\tif (!unwrittenResolution.isTxn)\r\n\t\t\t\tunwrittenResolution.uint32 = null\r\n\t\t\tunwrittenResolution.valueBuffer = null\r\n\t\t\tunwrittenResolution.flag = instructionStatus\r\n\t\t\toutstandingWriteCount--\r\n\t\t\tunwrittenResolution = unwrittenResolution.next\r\n\t\t}\r\n\t\twhile (txnResolution &&\r\n\t\t\t(instructionStatus = txnResolution.uint32[txnResolution.flagPosition] & 0xc0000000)) {\r\n\t\t\tif (instructionStatus & 0x80000000)\r\n\t\t\t\trejectCommit()\r\n\t\t\telse if (instructionStatus & TXN_COMMITTED)\r\n\t\t\t\tresolveCommit(async)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction resolveCommit(async) {\r\n\t\tafterCommit()\r\n\t\tif (async)\r\n\t\t\tresetReadTxn()\r\n\t\telse\r\n\t\t\tqueueMicrotask(resetReadTxn) // TODO: only do this if there are actually committed writes?\r\n\t\tdo {\r\n\t\t\tif (uncommittedResolution.resolve) {\r\n\t\t\t\tlet flag = uncommittedResolution.flag\r\n\t\t\t\tif (flag < 0)\r\n\t\t\t\t\tuncommittedResolution.reject(new Error(\"Error occurred in write\"))\r\n\t\t\t\telse if (flag & FAILED_CONDITION) {\r\n\t\t\t\t\tuncommittedResolution.resolve(false)\r\n\t\t\t\t} else\r\n\t\t\t\t\tuncommittedResolution.resolve(true)\r\n\t\t\t}\r\n\t\t} while((uncommittedResolution = uncommittedResolution.next) && uncommittedResolution != txnResolution)\r\n\t\ttxnResolution = txnResolution.nextTxn\r\n\t}\r\n\tvar commitRejectPromise\r\n\tfunction rejectCommit() {\r\n\t\tafterCommit()\r\n\t\tif (!commitRejectPromise) {\r\n\t\t\tlet rejectFunction\r\n\t\t\tcommitRejectPromise = new Promise((resolve, reject) => rejectFunction = reject)\r\n\t\t\tcommitRejectPromise.reject = rejectFunction\r\n\t\t}\r\n\t\tdo {\r\n\t\t\tlet flag = uncommittedResolution.flag & 0xf\r\n\t\t\tlet error = new Error(\"Commit failed (see commitError for details)\")\r\n\t\t\terror.commitError = commitRejectPromise\r\n\t\t\tuncommittedResolution.reject(error)\r\n\t\t} while(uncommittedResolution = uncommittedResolution.next && uncommittedResolution != txnResolution)\r\n\t\ttxnResolution = txnResolution.nextTxn\r\n\t}\r\n\tfunction atomicStatus(uint32, flagPosition, newStatus) {\r\n\t\tif (batchDepth) {\r\n\t\t\t// if we are in a batch, the transaction can't close, so we do the faster,\r\n\t\t\t// but non-deterministic updates, knowing that the write thread can\r\n\t\t\t// just poll for the status change if we miss a status update\r\n\t\t\tlet writeStatus = uint32[flagPosition]\r\n\t\t\tuint32[flagPosition] = newStatus\r\n\t\t\treturn writeStatus\r\n\t\t} else // otherwise the transaction could end at any time and we need to know the\r\n\t\t\t// deterministically if it is ending, so we can reset the commit promise\r\n\t\t\t// so we use the slower atomic operation\r\n\t\t\treturn Atomics.or(uint32, flagPosition, newStatus)\r\n\t}\r\n\tfunction afterCommit() {\r\n\t\tfor (let i = 0, l = afterCommitCallbacks.length; i < l; i++) {\r\n\t\t\tafterCommitCallbacks[i]({ next: uncommittedResolution, last: unwrittenResolution})\r\n\t\t}\r\n\t}\r\n\tasync function executeTxnCallbacks() {\r\n\t\tenv.beginTxn(0)\r\n\t\tenv.writeTxn = writeTxn = {}\r\n\t\tlet promises\r\n\t\tlet txnCallbacks\r\n\t\tfor (let i = 0, l = nextTxnCallbacks.length; i < l; i++) {\r\n\t\t\ttxnCallbacks = nextTxnCallbacks[i]\r\n\t\t\tfor (let i = 0, l = txnCallbacks.length; i < l; i++) {\r\n\t\t\t\tlet userTxnCallback = txnCallbacks[i]\r\n\t\t\t\tlet asChild = userTxnCallback.asChild\r\n\t\t\t\tif (asChild) {\r\n\t\t\t\t\tif (promises) {\r\n\t\t\t\t\t\t// must complete any outstanding transactions before proceeding\r\n\t\t\t\t\t\tawait Promise.all(promises)\r\n\t\t\t\t\t\tpromises = null\r\n\t\t\t\t\t}\r\n\t\t\t\t\tenv.beginTxn(1) // abortable\r\n\t\t\t\t\t\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tlet result = userTxnCallback.callback()\r\n\t\t\t\t\t\tif (result && result.then) {\r\n\t\t\t\t\t\t\tawait result\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (result === ABORT)\r\n\t\t\t\t\t\t\tenv.abortTxn()\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tenv.commitTxn()\r\n\t\t\t\t\t\t\ttxnCallbacks[i] = result\r\n\t\t\t\t\t} catch(error) {\r\n\t\t\t\t\t\tenv.abortTxn()\r\n\t\t\t\t\t\ttxnError(error, i)\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tlet result = userTxnCallback()\r\n\t\t\t\t\t\ttxnCallbacks[i] = result\r\n\t\t\t\t\t\tif (result && result.then) {\r\n\t\t\t\t\t\t\tif (!promises)\r\n\t\t\t\t\t\t\t\tpromises = []\r\n\t\t\t\t\t\t\tpromises.push(result.catch(() => {}))\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch(error) {\r\n\t\t\t\t\t\ttxnError(error, i)\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tnextTxnCallbacks = []\r\n\t\tif (promises) { // finish any outstanding commit functions\r\n\t\t\tawait Promise.all(promises)\r\n\t\t}\r\n\t\tenv.writeTxn = writeTxn = false\r\n\t\t//console.log('async callback resume write trhead')\r\n\t\tlastQueuedTxnCallbacks = null\r\n\t\treturn env.commitTxn()\r\n\t\tfunction txnError(error, i) {\r\n\t\t\t(txnCallbacks.errors || (txnCallbacks.errors = []))[i] = error\r\n\t\t\ttxnCallbacks[i] = CALLBACK_THREW\r\n\t\t}\r\n\t}\r\n\tfunction finishBatch() {\r\n\t\tdynamicBytes.uint32[(dynamicBytes.position + 1) << 1] = 0 // clear out the next slot\r\n\t\tlet writeStatus = atomicStatus(dynamicBytes.uint32, (dynamicBytes.position++) << 1, 2) // atomically write the end block\r\n\t\tnextResolution.flagPosition += 2\r\n\t\tif (writeStatus & WAITING_OPERATION) {\r\n\t\t\tenv.startWriting(0)\r\n\t\t}\r\n\t}\r\n\tObject.assign(LMDBStore.prototype, {\r\n\t\tput(key, value, versionOrOptions, ifVersion) {\r\n\t\t\tlet sync, flags = 15\r\n\t\t\tif (typeof versionOrOptions == 'object') {\r\n\t\t\t\tif (versionOrOptions.noOverwrite)\r\n\t\t\t\t\tflags |= 0x10\r\n\t\t\t\tif (versionOrOptions.noDupData)\r\n\t\t\t\t\tflags |= 0x20\r\n\t\t\t\tif (versionOrOptions.append)\r\n\t\t\t\t\tflags |= 0x20000\r\n\t\t\t\tif (versionOrOptions.ifVersion != undefined)\r\n\t\t\t\t\tifVersion = versionsOrOptions.ifVersion\r\n\t\t\t\tversionOrOptions = versionOrOptions.version\r\n\t\t\t}\r\n\t\t\treturn writeInstructions(flags, this, key, value, this.useVersions ? versionOrOptions || 0 : undefined, ifVersion)()\r\n\t\t},\r\n\t\tremove(key, ifVersionOrValue) {\r\n\t\t\tlet flags = 13\r\n\t\t\tlet ifVersion, value\r\n\t\t\tif (ifVersionOrValue !== undefined) {\r\n\t\t\t\tif (this.useVersions)\r\n\t\t\t\t\tifVersion = ifVersionOrValue\r\n\t\t\t\telse {\r\n\t\t\t\t\tflags = 14\r\n\t\t\t\t\tvalue = ifVersionOrValue\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn writeInstructions(flags, this, key, value, undefined, ifVersion)()\r\n\t\t},\r\n\t\tifNoExists(key, callback) {\r\n\t\t\treturn this.ifVersion(key, null, callback)\r\n\t\t},\r\n\r\n\t\tifVersion(key, version, callback) {\r\n\t\t\tif (!callback) {\r\n\t\t\t\treturn new Batch((operations, callback) => {\r\n\t\t\t\t\tlet promise = this.ifVersion(key, version, operations)\r\n\t\t\t\t\tif (callback)\r\n\t\t\t\t\t\tpromise.then(callback)\r\n\t\t\t\t\treturn promise\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t\tif (writeTxn) {\r\n\t\t\t\tif (this.doesExist(key, version)) {\r\n\t\t\t\t\tcallback()\r\n\t\t\t\t\treturn SYNC_PROMISE_SUCCESS\r\n\t\t\t\t}\r\n\t\t\t\treturn SYNC_PROMISE_FAIL\r\n\t\t\t}\r\n\t\t\tlet finishStartWrite = writeInstructions(typeof key === 'undefined' ? 1 : 4, this, key, undefined, undefined, version)\r\n\t\t\tlet promise\r\n\t\t\tbatchDepth += 2\r\n\t\t\tif (batchDepth > 2)\r\n\t\t\t\tpromise = finishStartWrite()\r\n\t\t\telse {\r\n\t\t\t\twriteBatchStart = () => {\r\n\t\t\t\t\tpromise = finishStartWrite()\r\n\t\t\t\t}\r\n\t\t\t\toutstandingBatchCount = 0\r\n\t\t\t}\r\n\t\t\t//console.warn('wrote start of ifVersion', this.path)\r\n\t\t\ttry {\r\n\t\t\t\tif (typeof callback === 'function') {\r\n\t\t\t\t\tcallback()\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfor (let i = 0, l = callback.length; i < l; i++) {\r\n\t\t\t\t\t\tlet operation = callback[i]\r\n\t\t\t\t\t\tthis[operation.type](operation.key, operation.value)\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} finally {\r\n\t\t\t\t//console.warn('writing end of ifVersion', this.path, (dynamicBytes.buffer.address + ((dynamicBytes.position + 1) << 3)).toString(16))\r\n\t\t\t\tif (!promise) {\r\n\t\t\t\t\tfinishBatch()\r\n\t\t\t\t\tbatchDepth -= 2\r\n\t\t\t\t\tpromise = finishStartWrite() // finish write once all the operations have been written (and it hasn't been written prematurely)\r\n\t\t\t\t\twriteBatchStart = null\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbatchDepth -= 2\r\n\t\t\t\t\tfinishBatch()\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn promise\r\n\t\t},\r\n\t\tbatch(callbackOrOperations) {\r\n\t\t\treturn this.ifVersion(undefined, undefined, callbackOrOperations)\r\n\t\t},\r\n\r\n\t\tputSync(key, value, versionOrOptions, ifVersion) {\r\n\t\t\tif (writeTxn)\r\n\t\t\t\treturn this.put(key, value, versionOrOptions, ifVersion)\r\n\t\t\telse\r\n\t\t\t\treturn this.transactionSync(() =>\r\n\t\t\t\t\tthis.put(key, value, versionOrOptions, ifVersion) == SYNC_PROMISE_SUCCESS,\r\n\t\t\t\t\t{ abortable: false })\r\n\t\t},\r\n\t\tremoveSync(key, ifVersionOrValue) {\r\n\t\t\tif (writeTxn)\r\n\t\t\t\treturn this.remove(key, ifVersionOrValue)\r\n\t\t\telse\r\n\t\t\t\treturn this.transactionSync(() =>\r\n\t\t\t\t\tthis.remove(key, ifVersionOrValue) == SYNC_PROMISE_SUCCESS,\r\n\t\t\t\t\t{ abortable: false })\r\n\t\t},\r\n\t\ttransaction(callback, options) {\r\n\t\t\tif (options) {\r\n \t\t\t\tif (options.synchronousStart)\r\n \t\t\t\t\treturn this.transactionSync(callback, options)\r\n \t\t\t\tif (options.abortable)\r\n\t\t\t\t\treturn this.childTransaction(callback)\r\n\t\t\t}\r\n\t\t\tif (writeTxn) {\r\n\t\t\t\t// already nested in a transaction, just execute and return\r\n\t\t\t\treturn callback()\r\n\t\t\t}\r\n\t\t\treturn this.transactionAsync(callback)\r\n\t\t},\r\n\t\tchildTransaction(callback) {\r\n\t\t\tif (useWritemap)\r\n\t\t\t\tthrow new Error('Child transactions are not supported in writemap mode')\r\n\t\t\tif (writeTxn) {\r\n\t\t\t\tenv.beginTxn(1) // abortable\r\n\t\t\t\ttry {\r\n\t\t\t\t\treturn when(callback(), (result) => {\r\n\t\t\t\t\t\tif (result === ABORT)\r\n\t\t\t\t\t\t\tenv.abortTxn()\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tenv.commitTxn()\r\n\t\t\t\t\t\treturn result\r\n\t\t\t\t\t}, (error) => {\r\n\t\t\t\t\t\tenv.abortTxn()\r\n\t\t\t\t\t\tthrow error\r\n\t\t\t\t\t})\r\n\t\t\t\t} catch(error) {\r\n\t\t\t\t\tenv.abortTxn()\r\n\t\t\t\t\tthrow error\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn this.transactionAsync(callback, true)\r\n\t\t},\r\n\t\ttransactionAsync(callback, asChild) {\r\n\t\t\tlet txnIndex\r\n\t\t\tlet txnCallbacks\r\n\t\t\tif (!lastQueuedResolution || !lastQueuedResolution.callbacks) {\r\n\t\t\t\ttxnCallbacks = [asChild ? { callback, asChild } : callback]\r\n\t\t\t\ttxnCallbacks.results = writeInstructions(8 | (this.strictAsyncOrder ? 0x100000 : 0), this)()\r\n\t\t\t\tlastQueuedResolution.callbacks = txnCallbacks\r\n\t\t\t\ttxnIndex = 0\r\n\t\t\t} else {\r\n\t\t\t\ttxnCallbacks = lastQueuedResolution.callbacks\r\n\t\t\t\ttxnIndex = txnCallbacks.push(asChild ? { callback, asChild } : callback) - 1\r\n\t\t\t}\r\n\t\t\treturn txnCallbacks.results.then((results) => {\r\n\t\t\t\tlet result = txnCallbacks[txnIndex]\r\n\t\t\t\tif (result === CALLBACK_THREW)\r\n\t\t\t\t\tthrow txnCallbacks.errors[txnIndex]\r\n\t\t\t\treturn result\r\n\t\t\t})\r\n\t\t},\r\n\t\ttransactionSync(callback, options) {\r\n\t\t\tif (writeTxn) {\r\n\t\t\t\tif (!useWritemap && !this.cache && !(options && options.abortable === false))\r\n\t\t\t\t\t// already nested in a transaction, execute as child transaction (if possible) and return\r\n\t\t\t\t\treturn this.childTransaction(callback)\r\n\t\t\t\tlet result = callback() // else just run in current transaction\r\n\t\t\t\tif (result == ABORT && !abortedNonChildTransactionWarn) {\r\n\t\t\t\t\tconsole.warn('Can not abort a transaction inside another transaction with ' + (this.cache ? 'caching enabled' : 'useWritemap enabled'))\r\n\t\t\t\t\tabortedNonChildTransactionWarn = true\r\n\t\t\t\t}\r\n\t\t\t\treturn result\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tthis.transactions++\r\n\t\t\t\tlet flags = 0\r\n\t\t\t\tif (!(options && options.abortable === false))\r\n\t\t\t\t\tflags = 1\r\n\t\t\t\tif (!(options && options.synchronousCommit === false))\r\n\t\t\t\t\tflags |= 2\r\n\t\t\t\tenv.beginTxn(flags)\r\n\t\t\t\twriteTxn = env.writeTxn = {}\r\n\t\t\t\treturn when(callback(), (result) => {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tif (result === ABORT)\r\n\t\t\t\t\t\t\tenv.abortTxn()\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tenv.commitTxn()\r\n\t\t\t\t\t\t\tresetReadTxn()\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn result\r\n\t\t\t\t\t} finally {\r\n\t\t\t\t\t\tenv.writeTxn = writeTxn = null\r\n\t\t\t\t\t}\r\n\t\t\t\t}, (error) => {\r\n\t\t\t\t\ttry { env.abortTxn() } catch(e) {}\r\n\t\t\t\t\tenv.writeTxn = writeTxn = null\r\n\t\t\t\t\tthrow error\r\n\t\t\t\t})\r\n\t\t\t} catch(error) {\r\n\t\t\t\ttry { env.abortTxn() } catch(e) {}\r\n\t\t\t\tenv.writeTxn = writeTxn = null\r\n\t\t\t\tthrow error\r\n\t\t\t}\r\n\t\t},\r\n\t\ton(event, callback) {\r\n\t\t\tif (event == 'beforecommit') {\r\n\t\t\t\teventTurnBatching = true\r\n\t\t\t\tbeforeCommitCallbacks.push(callback)\r\n\t\t\t} else if (event == 'aftercommit')\r\n\t\t\t\tafterCommitCallbacks.push(callback)\r\n\t\t}\r\n\t})\r\n\tLMDBStore.prototype.del = LMDBStore.prototype.remove\r\n}\r\n\r\nclass Batch extends Array {\r\n\tconstructor(callback) {\r\n\t\tthis.callback = callback\r\n\t}\r\n\tput(key, value) {\r\n\t\tthis.push({ type: 'put', key, value })\r\n\t}\r\n\tdel(key) {\r\n\t\tthis.push({ type: 'del', key })\r\n\t}\r\n\tclear() {\r\n\t\tthis.splice(0, this.length)\r\n\t}\r\n\twrite(callback) {\r\n\t\tthis.callback(this, callback)\r\n\t}\r\n}\r\n","import fs from 'fs' // TODO: or Deno\r\nimport { extname, basename, dirname} from 'path'\r\nimport EventEmitter from 'events'\r\nimport { Env, Cursor, Compression, getBufferForAddress, getAddress } from './native.js'\r\nimport { CachingStore, setGetLastVersion } from './caching.js'\r\nimport { addQueryMethods } from './query.js'\r\nimport { addWriteMethods, ABORT } from './writer.js'\r\nexport { ABORT } from './writer.js'\r\nimport { applyKeyHandling } from './keys.js'\r\nexport { toBufferKey as keyValueToBuffer, compareKeys, compareKeys as compareKey, fromBufferKey as bufferToKeyValue } from 'ordered-binary/index.js'\r\nimport { createRequire } from 'module'\r\nconst require = createRequire(import.meta.url)\r\n\r\nimport os from 'os'\r\nsetGetLastVersion(getLastVersion)\r\nconst Uint8ArraySlice = Uint8Array.prototype.slice\r\nconst keyBytes = Buffer.allocUnsafeSlow(2048)\r\nconst keyBuffer = keyBytes.buffer\r\nconst keyBytesView = keyBytes.dataView = new DataView(keyBytes.buffer, 0, 2048) // max key size is actually 1978\r\nkeyBytes.uint32 = new Uint32Array(keyBuffer, 0, 512)\r\nkeyBytes.float64 = new Float64Array(keyBuffer, 0, 256)\r\nkeyBuffer.address = getAddress(keyBuffer)\r\nconst buffers = []\r\n\r\nconst DEFAULT_SYNC_BATCH_THRESHOLD = 200000000 // 200MB\r\nconst DEFAULT_IMMEDIATE_BATCH_THRESHOLD = 10000000 // 10MB\r\nconst DEFAULT_COMMIT_DELAY = 0\r\nconst READING_TNX = {\r\n\treadOnly: true\r\n}\r\n\r\nexport const allDbs = new Map()\r\nconst SYNC_PROMISE_RESULT = Promise.resolve(true)\r\nconst SYNC_PROMISE_FAIL = Promise.resolve(false)\r\nSYNC_PROMISE_RESULT.isSync = true\r\nSYNC_PROMISE_FAIL.isSync = true\r\n\r\nlet env\r\nlet defaultCompression\r\nlet lastSize, lastOffset, lastVersion\r\nconst MDB_SET_KEY = 0, MDB_SET_RANGE = 1, MDB_GET_BOTH_RANGE = 2, MDB_GET_CURRENT = 3, MDB_FIRST = 4, MDB_LAST = 5, MDB_NEXT = 6, MDB_NEXT_NODUP = 7, MDB_NEXT_DUP = 8, MDB_PREV = 9, MDB_PREV_NODUP = 10, MDB_PREV_DUP = 11\r\nlet abortedNonChildTransactionWarn\r\nexport function open(path, options) {\r\n\tlet env = new Env()\r\n\tlet committingWrites\r\n\tlet scheduledTransactions\r\n\tlet scheduledOperations\r\n\tlet asyncTransactionAfter = true, asyncTransactionStrictOrder\r\n\tlet transactionWarned\r\n\tlet readTxn, writeTxn, pendingBatch, currentCommit, runNextBatch, readTxnRenewed\r\n\tif (typeof path == 'object' && !options) {\r\n\t\toptions = path\r\n\t\tpath = options.path\r\n\t}\r\n\tlet extension = extname(path)\r\n\tlet name = basename(path, extension)\r\n\tlet is32Bit = os.arch().endsWith('32')\r\n\tlet remapChunks = (options && options.remapChunks) || ((options && options.mapSize) ?\r\n\t\t(is32Bit && options.mapSize > 0x100000000) : // larger than fits in address space, must use dynamic maps\r\n\t\tis32Bit) // without a known map size, we default to being able to handle large data correctly/well*/\r\n\toptions = Object.assign({\r\n\t\tpath,\r\n\t\tnoSubdir: Boolean(extension),\r\n\t\tisRoot: true,\r\n\t\tmaxDbs: 12,\r\n\t\tremapChunks,\r\n\t\tkeyBytes,\r\n\t\t// default map size limit of 4 exabytes when using remapChunks, since it is not preallocated and we can\r\n\t\t// make it super huge.\r\n\t\tmapSize: remapChunks ? 0x10000000000000 :\r\n\t\t\t0x20000, // Otherwise we start small with 128KB\r\n\t}, options)\r\n\tif (options.asyncTransactionOrder == 'before') {\r\n\t\tconsole.warn('asyncTransactionOrder: \"before\" is deprecated')\r\n\t\tasyncTransactionAfter = false\r\n\t} else if (options.asyncTransactionOrder == 'strict') {\r\n\t\tasyncTransactionStrictOrder = true\r\n\t\tasyncTransactionAfter = false\r\n\t}\r\n\tif (!fs.existsSync(options.noSubdir ? dirname(path) : path))\r\n\t\tfs.mkdirSync(options.noSubdir ? dirname(path) : path, { recursive: true })\r\n\tif (options.compression) {\r\n\t\tlet setDefault\r\n\t\tif (options.compression == true) {\r\n\t\t\tif (defaultCompression)\r\n\t\t\t\toptions.compression = defaultCompression\r\n\t\t\telse\r\n\t\t\t\tdefaultCompression = options.compression = new Compression({\r\n\t\t\t\t\tthreshold: 1000,\r\n\t\t\t\t\tdictionary: fs.readFileSync(new URL('./dict/dict.txt', import.meta.url.replace(/dist[\\\\\\/]index.cjs$/, ''))),\r\n\t\t\t\t})\r\n\t\t\t\tdefaultCompression.threshold = 1000\r\n\t\t} else {\r\n\t\t\tlet compressionOptions = Object.assign({\r\n\t\t\t\tthreshold: 1000,\r\n\t\t\t\tdictionary: fs.readFileSync(new URL('./dict/dict.txt', import.meta.url.replace(/dist[\\\\\\/]index.cjs$/, ''))),\r\n\t\t\t}, options.compression)\r\n\t\t\toptions.compression = new Compression(compressionOptions)\r\n\t\t\toptions.compression.threshold = compressionOptions.threshold\r\n\t\t}\r\n\t}\r\n\r\n\tif (options && options.clearOnStart) {\r\n\t\tconsole.info('Removing', path)\r\n\t\tfs.removeSync(path)\r\n\t\tconsole.info('Removed', path)\r\n\t}\r\n\tlet useWritemap = options.useWritemap\r\n\ttry {\r\n\t\tenv.open(options)\r\n\t} catch(error) {\r\n\t\tthrow error\r\n\t}\r\n\tenv.readerCheck() // clear out any stale entries\r\n\tfunction renewReadTxn() {\r\n\t\tif (readTxn)\r\n\t\t\treadTxn.renew()\r\n\t\telse\r\n\t\t\treadTxn = env.beginTxn(0x20000)\r\n\t\treadTxnRenewed = setImmediate(resetReadTxn)\r\n\t\treturn readTxn\r\n\t}\r\n\tfunction resetReadTxn() {\r\n\t\tif (readTxnRenewed) {\r\n\t\t\tLMDBStore.onReadReset()\r\n\t\t\treadTxnRenewed = null\r\n\t\t\tif (readTxn.cursorCount - (readTxn.renewingCursorCount || 0) > 0) {\r\n\t\t\t\treadTxn.onlyCursor = true\r\n\t\t\t\treadTxn = null\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\treadTxn.reset()\r\n\t\t}\r\n\t}\r\n\tlet stores = []\r\n\tclass LMDBStore extends EventEmitter {\r\n\t\tconstructor(dbName, dbOptions) {\r\n\t\t\tsuper()\r\n\t\t\tif (dbName === undefined)\r\n\t\t\t\tthrow new Error('Database name must be supplied in name property (may be null for root database)')\r\n\r\n\t\t\tconst openDB = () => {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.db = env.openDbi(Object.assign({\r\n\t\t\t\t\t\tname: dbName,\r\n\t\t\t\t\t\tcreate: true,\r\n\t\t\t\t\t\ttxn: env.writeTxn,\r\n\t\t\t\t\t}, dbOptions))\r\n\t\t\t\t\tthis.db.name = dbName || null\r\n\t\t\t\t} catch(error) {\r\n\t\t\t\t\thandleError(error, null, null, openDB)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (dbOptions.compression && !(dbOptions.compression instanceof Compression)) {\r\n\t\t\t\tif (dbOptions.compression == true && options.compression)\r\n\t\t\t\t\tdbOptions.compression = options.compression // use the parent compression if available\r\n\t\t\t\telse\r\n\t\t\t\t\tdbOptions.compression = new Compression(Object.assign({\r\n\t\t\t\t\t\tthreshold: 1000,\r\n\t\t\t\t\t\tdictionary: fs.readFileSync(require.resolve('./dict/dict.txt')),\r\n\t\t\t\t\t}), dbOptions.compression)\r\n\t\t\t}\r\n\r\n\t\t\tif (dbOptions.dupSort && (dbOptions.useVersions || dbOptions.cache)) {\r\n\t\t\t\tthrow new Error('The dupSort flag can not be combined with versions or caching')\r\n\t\t\t}\r\n\t\t\topenDB()\r\n\t\t\tresetReadTxn() // a read transaction becomes invalid after opening another db\r\n\t\t\tthis.name = dbName\r\n\t\t\tthis.env = env\r\n\t\t\tthis.reads = 0\r\n\t\t\tthis.writes = 0\r\n\t\t\tthis.transactions = 0\r\n\t\t\tthis.averageTransactionTime = 5\r\n\t\t\tif (dbOptions.syncBatchThreshold)\r\n\t\t\t\tconsole.warn('syncBatchThreshold is no longer supported')\r\n\t\t\tif (dbOptions.immediateBatchThreshold)\r\n\t\t\t\tconsole.warn('immediateBatchThreshold is no longer supported')\r\n\t\t\tthis.commitDelay = DEFAULT_COMMIT_DELAY\r\n\t\t\tObject.assign(this, { // these are the options that are inherited\r\n\t\t\t\tpath: options.path,\r\n\t\t\t\tencoding: options.encoding,\r\n\t\t\t\tstrictAsyncOrder: options.strictAsyncOrder,\r\n\t\t\t}, dbOptions)\r\n\t\t\tif (!this.encoding || this.encoding == 'msgpack' || this.encoding == 'cbor') {\r\n\t\t\t\tthis.encoder = this.decoder = new (this.encoding == 'cbor' ? require('cbor-x').Encoder : require('msgpackr').Encoder)\r\n\t\t\t\t\t(Object.assign(this.sharedStructuresKey ?\r\n\t\t\t\t\tthis.setupSharedStructures() : {\r\n\t\t\t\t\t\tcopyBuffers: true // need to copy any embedded buffers that are found since we use unsafe buffers\r\n\t\t\t\t\t}, options, dbOptions))\r\n\t\t\t} else if (this.encoding == 'json') {\r\n\t\t\t\tthis.encoder = {\r\n\t\t\t\t\tencode: JSON.stringify,\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tapplyKeyHandling(this)\r\n\t\t\tallDbs.set(dbName ? name + '-' + dbName : name, this)\r\n\t\t\tstores.push(this)\r\n\t\t}\r\n\t\topenDB(dbName, dbOptions) {\r\n\t\t\tif (typeof dbName == 'object' && !dbOptions) {\r\n\t\t\t\tdbOptions = dbName\r\n\t\t\t\tdbName = options.name\r\n\t\t\t} else\r\n\t\t\t\tdbOptions = dbOptions || {}\r\n\t\t\ttry {\r\n\t\t\t\treturn dbOptions.cache ?\r\n\t\t\t\t\tnew (CachingStore(LMDBStore))(dbName, dbOptions) :\r\n\t\t\t\t\tnew LMDBStore(dbName, dbOptions)\r\n\t\t\t} catch(error) {\r\n\t\t\t\tif (error.message.indexOf('MDB_DBS_FULL') > -1) {\r\n\t\t\t\t\terror.message += ' (increase your maxDbs option)'\r\n\t\t\t\t}\r\n\t\t\t\tthrow error\r\n\t\t\t}\r\n\t\t}\r\n\t\ttransactionAsync(callback, asChild) {\r\n\t\t\tlet lastOperation\r\n\t\t\tlet after, strictOrder\r\n\t\t\tif (scheduledOperations) {\r\n\t\t\t\tlastOperation = asyncTransactionAfter ? scheduledOperations.appendAsyncTxn :\r\n\t\t\t\t\tscheduledOperations[asyncTransactionStrictOrder ? scheduledOperations.length - 1 : 0]\r\n\t\t\t} else {\r\n\t\t\t\tscheduledOperations = []\r\n\t\t\t\tscheduledOperations.bytes = 0\r\n\t\t\t}\r\n\t\t\tlet transactionSet\r\n\t\t\tlet transactionSetIndex\r\n\t\t\tif (lastOperation === true) { // continue last set of transactions\r\n\t\t\t\ttransactionSetIndex = scheduledTransactions.length - 1\r\n\t\t\t\ttransactionSet = scheduledTransactions[transactionSetIndex]\r\n\t\t\t} else {\r\n\t\t\t\t// for now we signify transactions as a true\r\n\t\t\t\tif (asyncTransactionAfter) // by default we add a flag to put transactions after other operations\r\n\t\t\t\t\tscheduledOperations.appendAsyncTxn = true\r\n\t\t\t\telse if (asyncTransactionStrictOrder)\r\n\t\t\t\t\tscheduledOperations.push(true)\r\n\t\t\t\telse // in before mode, we put all the async transaction at the beginning\r\n\t\t\t\t\tscheduledOperations.unshift(true)\r\n\t\t\t\tif (!scheduledTransactions) {\r\n\t\t\t\t\tscheduledTransactions = []\r\n\t\t\t\t}\r\n\t\t\t\ttransactionSetIndex = scheduledTransactions.push(transactionSet = []) - 1\r\n\t\t\t}\r\n\t\t\tlet index = (transactionSet.push(asChild ?\r\n\t\t\t\t{asChild, callback } : callback) - 1) << 1\r\n\t\t\treturn this.scheduleCommit().results.then((results) => {\r\n\t\t\t\tlet transactionResults = results.transactionResults[transactionSetIndex]\r\n\t\t\t\tlet error = transactionResults[index]\r\n\t\t\t\tif (error)\r\n\t\t\t\t\tthrow error\r\n\t\t\t\treturn transactionResults[index + 1]\r\n\t\t\t})\r\n\t\t}\r\n\t\tgetSharedBufferForGet(id) {\r\n\t\t\tlet txn = (writeTxn || (readTxnRenewed ? readTxn : renewReadTxn()))\r\n\t\t\tlastSize = this.keyIsCompatibility ? txn.getBinaryShared(id) : this.db.get(this.writeKey(id, keyBytes, 0))\r\n\t\t\tif (lastSize === 0xffffffff) { // not found code\r\n\t\t\t\treturn //undefined\r\n\t\t\t}\r\n\t\t\treturn lastSize\r\n\t\t\tlastSize = keyBytesView.getUint32(0, true)\r\n\t\t\tlet bufferIndex = keyBytesView.getUint32(12, true)\r\n\t\t\tlastOffset = keyBytesView.getUint32(8, true)\r\n\t\t\tlet buffer = buffers[bufferIndex]\r\n\t\t\tlet startOffset\r\n\t\t\tif (!buffer || lastOffset < (startOffset = buffer.startOffset) || (lastOffset + lastSize > startOffset + 0x100000000)) {\r\n\t\t\t\tif (buffer)\r\n\t\t\t\t\tenv.detachBuffer(buffer.buffer)\r\n\t\t\t\tstartOffset = (lastOffset >>> 16) * 0x10000\r\n\t\t\t\tconsole.log('make buffer for address', bufferIndex * 0x100000000 + startOffset)\r\n\t\t\t\tbuffer = buffers[bufferIndex] = Buffer.from(getBufferForAddress(bufferIndex * 0x100000000 + startOffset))\r\n\t\t\t\tbuffer.startOffset = startOffset\r\n\t\t\t}\r\n\t\t\tlastOffset -= startOffset\r\n\t\t\treturn buffer\r\n\t\t\treturn buffer.slice(lastOffset, lastOffset + lastSize)/*Uint8ArraySlice.call(buffer, lastOffset, lastOffset + lastSize)*/\r\n\t\t}\r\n\r\n\t\tgetSizeBinaryFast(id) {\r\n\t\t\t(env.writeTxn || (readTxnRenewed ? readTxn : renewReadTxn()))\r\n\t\t\tlastSize = this.db.getByBinary(this.writeKey(id, keyBytes, 0))\r\n\t\t}\r\n\t\tgetString(id) {\r\n\t\t\t(env.writeTxn || (readTxnRenewed ? readTxn : renewReadTxn()))\r\n\t\t\tlet string = this.db.getStringByBinary(this.writeKey(id, keyBytes, 0))\r\n\t\t\tif (string)\r\n\t\t\t\tlastSize = string.length\r\n\t\t\treturn string\r\n\t\t}\r\n\t\tgetBinaryFast(id) {\r\n\t\t\tthis.getSizeBinaryFast(id)\r\n\t\t\treturn lastSize === 0xffffffff ? undefined : this.db.unsafeBuffer.subarray(0, lastSize)\r\n\t\t}\r\n\t\tgetBinary(id) {\r\n\t\t\tthis.getSizeBinaryFast(id)\r\n\t\t\treturn lastSize === 0xffffffff ? undefined : Uint8ArraySlice.call(this.db.unsafeBuffer, 0, lastSize)\r\n\t\t}\r\n\t\tget(id) {\r\n\t\t\tif (this.decoder) {\r\n\t\t\t\tthis.getSizeBinaryFast(id)\r\n\t\t\t\treturn lastSize === 0xffffffff ? undefined : this.decoder.decode(this.db.unsafeBuffer, lastSize)\r\n\t\t\t}\r\n\t\t\tif (this.encoding == 'binary')\r\n\t\t\t\treturn this.getBinary(id)\r\n\r\n\t\t\tlet result = this.getString(id)\r\n\t\t\tif (result) {\r\n\t\t\t\tif (this.encoding == 'json')\r\n\t\t\t\t\treturn JSON.parse(result)\r\n\t\t\t}\r\n\t\t\treturn result\r\n\t\t}\r\n\t\tgetEntry(id) {\r\n\t\t\tlet value = this.get(id)\r\n\t\t\tif (value !== undefined) {\r\n\t\t\t\tif (this.useVersions)\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tvalue,\r\n\t\t\t\t\t\tversion: getLastVersion(),\r\n\t\t\t\t\t\t//size: lastSize\r\n\t\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tvalue,\r\n\t\t\t\t\t\t//size: lastSize\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tresetReadTxn() {\r\n\t\t\tresetReadTxn()\r\n\t\t}\r\n\t\tdoesExist(key, versionOrValue) {\r\n\t\t\tlet txn\r\n\t\t\ttry {\r\n\t\t\t\tif (env.writeTxn) {\r\n\t\t\t\t\ttxn = env.writeTxn\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttxn = readTxnRenewed ? readTxn : renewReadTxn()\r\n\t\t\t\t}\r\n\t\t\t\tif (versionOrValue === undefined) {\r\n\t\t\t\t\tthis.getSizeBinaryFast(key)\r\n\t\t\t\t\treturn lastSize !== 0xffffffff\r\n\t\t\t\t}\r\n\t\t\t\telse if (this.useVersions) {\r\n\t\t\t\t\tthis.getSizeBinaryFast(key)\r\n\t\t\t\t\treturn lastSize !== 0xffffffff && matches(getLastVersion(), versionOrValue)\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif (this.encoder) {\r\n\t\t\t\t\t\tversionOrValue = this.encoder.encode(versionOrValue)\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (typeof versionOrValue == 'string')\r\n\t\t\t\t\t\tversionOrValue = Buffer.from(versionOrValue)\r\n\t\t\t\t\treturn this.getValuesCount(key, { start: versionOrValue, exactMatch: true}) > 0\r\n\t\t\t\t}\r\n\t\t\t} catch(error) {\r\n\t\t\t\treturn handleError(error, this, txn, () => this.doesExist(key, versionOrValue))\r\n\t\t\t}\r\n\t\t}\r\n\t\tbatch(operations) {\r\n\t\t\t/*if (writeTxn) {\r\n\t\t\t\tthis.commitBatchNow(operations.map(operation => [this.db, operation.key, operation.value]))\r\n\t\t\t\treturn Promise.resolve(true)\r\n\t\t\t}*/\r\n\t\t\tlet scheduledOperations = this.getScheduledOperations()\r\n\t\t\tfor (let operation of operations) {\r\n\t\t\t\tlet value = operation.value\r\n\t\t\t\tscheduledOperations.push([operation.key, value])\r\n\t\t\t\tscheduledOperations.bytes += operation.key.length + (value && value.length || 0) + 200\r\n\t\t\t}\r\n\t\t\treturn this.scheduleCommit().unconditionalResults\r\n\t\t}\r\n\t\tbackup(path) {\r\n\t\t\treturn new Promise((resolve, reject) => env.copy(path, false, (error) => {\r\n\t\t\t\tif (error) {\r\n\t\t\t\t\treject(error)\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresolve()\r\n\t\t\t\t}\r\n\t\t\t}))\r\n\t\t}\r\n\t\tclose() {\r\n\t\t\tthis.db.close()\r\n\t\t\tif (this.isRoot) {\r\n\t\t\t\tif (readTxn) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\treadTxn.abort()\r\n\t\t\t\t\t} catch(error) {}\r\n\t\t\t\t}\r\n\t\t\t\treadTxnRenewed = null\r\n\t\t\t\tenv.close()\r\n\t\t\t}\r\n\t\t}\r\n\t\tgetStats() {\r\n\t\t\ttry {\r\n\t\t\t\tlet stats = this.db.stat(readTxnRenewed ? readTxn : renewReadTxn())\r\n\t\t\t\treturn stats\r\n\t\t\t}\r\n\t\t\tcatch(error) {\r\n\t\t\t\treturn handleError(error, this, readTxn, () => this.getStats())\r\n\t\t\t}\r\n\t\t}\r\n\t\tsync(callback) {\r\n\t\t\treturn env.sync(callback || function(error) {\r\n\t\t\t\tif (error) {\r\n\t\t\t\t\tconsole.error(error)\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\t\tdeleteDB() {\r\n\t\t\tthis.transactionSync(() =>\r\n\t\t\t\tthis.db.drop({\r\n\t\t\t\t\tjustFreePages: false\r\n\t\t\t\t})\r\n\t\t\t, { abortable: false })\r\n\t\t}\r\n\t\tclear() {\r\n\t\t\tthis.transactionSync(() =>\r\n\t\t\t\tthis.db.drop({\r\n\t\t\t\t\tjustFreePages: true\r\n\t\t\t\t})\r\n\t\t\t, { abortable: false })\r\n\t\t\tif (this.encoder && this.encoder.structures)\r\n\t\t\t\tthis.encoder.structures = []\r\n\r\n\t\t}\r\n\t\treaderCheck() {\r\n\t\t\treturn env.readerCheck()\r\n\t\t}\r\n\t\treaderList() {\r\n\t\t\treturn env.readerList().join('')\r\n\t\t}\r\n\t\tsetupSharedStructures() {\r\n\t\t\tconst getStructures = () => {\r\n\t\t\t\tlet lastVersion // because we are doing a read here, we may need to save and restore the lastVersion from the last read\r\n\t\t\t\tif (this.useVersions)\r\n\t\t\t\t\tlastVersion = getLastVersion()\r\n\t\t\t\ttry {\r\n\t\t\t\t\tlet buffer = this.getBinary(this.sharedStructuresKey)\r\n\t\t\t\t\tif (this.useVersions)\r\n\t\t\t\t\t\tsetLastVersion(lastVersion)\r\n\t\t\t\t\treturn buffer ? this.encoder.decode(buffer) : []\r\n\t\t\t\t} catch(error) {\r\n\t\t\t\t\treturn handleError(error, this, null, getStructures)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn {\r\n\t\t\t\tsaveStructures: (structures, previousLength) => {\r\n\t\t\t\t\treturn this.transactionSync(() => {\r\n\t\t\t\t\t\tlet existingStructuresBuffer = this.getBinary(this.sharedStructuresKey)\r\n\t\t\t\t\t\tlet existingStructures = existingStructuresBuffer ? this.encoder.decode(existingStructuresBuffer) : []\r\n\t\t\t\t\t\tif (existingStructures.length != previousLength)\r\n\t\t\t\t\t\t\treturn false // it changed, we need to indicate that we couldn't update\r\n\t\t\t\t\t\tthis.put(this.sharedStructuresKey, structures)\r\n\t\t\t\t\t}, { abortable: false, synchronousCommit: false })\r\n\t\t\t\t},\r\n\t\t\t\tgetStructures,\r\n\t\t\t\tcopyBuffers: true // need to copy any embedded buffers that are found since we use unsafe buffers\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// if caching class overrides putSync, don't want to double call the caching code\r\n\tconst putSync = LMDBStore.prototype.putSync\r\n\tconst removeSync = LMDBStore.prototype.removeSync\r\n\taddQueryMethods(LMDBStore, { env, getReadTxn() {\r\n\t\treturn readTxnRenewed ? readTxn : renewReadTxn()\r\n\t}, saveKey, keyBytes, keyBytesView, getLastVersion })\r\n\taddWriteMethods(LMDBStore, { env, fixedBuffer: keyBytes, resetReadTxn, ...options })\r\n\treturn options.cache ?\r\n\t\tnew (CachingStore(LMDBStore))(options.name || null, options) :\r\n\t\tnew LMDBStore(options.name || null, options)\r\n\tfunction handleError(error, store, txn, retry) {\r\n\t\ttry {\r\n\t\t\tif (writeTxn)\r\n\t\t\t\twriteTxn.abort()\r\n\t\t} catch(error) {}\r\n\t\tif (writeTxn)\r\n\t\t\twriteTxn = null\r\n\r\n\t\tif (error.message.startsWith('MDB_') &&\r\n\t\t\t\t!(error.message.startsWith('MDB_KEYEXIST') || error.message.startsWith('MDB_NOTFOUND')) ||\r\n\t\t\t\terror.message == 'The transaction is already closed.') {\r\n\t\t\tresetReadTxn() // separate out cursor-based read txns\r\n\t\t\ttry {\r\n\t\t\t\tif (readTxn) {\r\n\t\t\t\t\treadTxn.abort()\r\n\t\t\t\t\treadTxn.isAborted = true\r\n\t\t\t\t}\r\n\t\t\t} catch(error) {}\r\n\t\t\treadTxn = null\r\n\t\t}\r\n\t\tif (error.message.startsWith('MDB_PROBLEM'))\r\n\t\t\tconsole.error(error)\r\n\t\terror.message = 'In database ' + name + ': ' + error.message\r\n\t\tthrow error\r\n\t}\r\n}\r\n\r\nfunction matches(previousVersion, ifVersion){\r\n\tlet matches\r\n\tif (previousVersion) {\r\n\t\tif (ifVersion) {\r\n\t\t\tmatches = previousVersion == ifVersion\r\n\t\t} else {\r\n\t\t\tmatches = false\r\n\t\t}\r\n\t} else {\r\n\t\tmatches = !ifVersion\r\n\t}\r\n\treturn matches\r\n}\r\n\r\nclass Entry {\r\n\tconstructor(value, version, db) {\r\n\t\tthis.value = value\r\n\t\tthis.version = version\r\n\t\tthis.db = db\r\n\t}\r\n\tifSamePut() {\r\n\r\n\t}\r\n\tifSameRemove() {\r\n\r\n\t}\r\n}\r\nexport function getLastEntrySize() {\r\n\treturn lastSize\r\n}\r\nexport function getLastVersion() {\r\n\treturn keyBytesView.getFloat64(16, true)\r\n}\r\n\r\nexport function setLastVersion(version) {\r\n\treturn keyBytesView.setFloat64(16, version, true)\r\n}\r\nlet saveBuffer, saveDataView, saveDataAddress\r\nlet savePosition = 8000\r\nfunction allocateSaveBuffer() {\r\n\tsaveBuffer = Buffer.alloc(8192)\r\n\tsaveBuffer.dataView = saveDataView = new DataView(saveBuffer.buffer, saveBuffer.byteOffset, saveBuffer.byteLength)\r\n\tsaveBuffer.buffer.address = getAddress(saveBuffer.buffer)\r\n\tsaveDataAddress = saveBuffer.buffer.address + saveBuffer.byteOffset\r\n\tsavePosition = 0\r\n\r\n}\r\nfunction saveKey(key, writeKey, saveTo) {\r\n\tif (savePosition > 6200) {\r\n\t\tallocateSaveBuffer()\r\n\t}\r\n\tlet start = savePosition\r\n\tsavePosition = writeKey(key, saveBuffer, start + 4)\r\n\tsaveDataView.setUint32(start, savePosition - start - 4, true)\r\n\tsaveTo.saveBuffer = saveBuffer\r\n\tsavePosition = (savePosition + 7) & 0xfffff8\r\n\treturn start + saveDataAddress\r\n}\r\n"],"names":["require","createRequire","dirname","fileURLToPath","WeakLRUCache","enableNullTermination","writeKey","readKey","getLastVersion","Uint8ArraySlice","SYNC_PROMISE_FAIL","path","extname","basename","saveKey","saveBuffer","saveDataView","saveDataAddress","savePosition","allocateSaveBuffer"],"mappings":";;;;;;;;;;;;;;;AACA,MAAMA,SAAO,GAAGC,sBAAa,CAAC,oMAAe,EAAC;AAG9C,IAAI,aAAa,EAAE,OAAO,GAAGC,YAAO,CAACC,iBAAa,CAAC,oMAAe,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,EAAC;AACzF,IAAI;AACJ,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAC;AACrB,CAAC,aAAa,GAAGH,SAAO,CAAC,gBAAgB,CAAC,CAAC,OAAO,EAAC;AACnD,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,OAAO,IAAI,EAAE;AACnC,EAAEA,SAAO,CAAC,IAAI,CAAC,CAAC,kBAAkB,CAAC,wBAAwB,EAAC;AAC5D,CAAC,CAAC,MAAM,KAAK,EAAE;AACf,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,OAAO,IAAI,EAAE,EAAE;AACrC;AACA,EAAE,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAC;AACrE,EAAE,IAAI;AACN,GAAG,aAAa,GAAGA,SAAO,CAAC,gBAAgB,CAAC,CAAC,OAAO,EAAC;AACrD,GAAG,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