pnpm
Version:
1,413 lines (1,402 loc) • 439 kB
JavaScript
import { createRequire as _cr } from 'module';const require = _cr(import.meta.url); const __filename = import.meta.filename; const __dirname = import.meta.dirname;var _ew=process.emitWarning;process.emitWarning=function(w,...a){if(String(w).includes('SQLite')&&(a[0]==='ExperimentalWarning'||(a[0]&&a[0].type==='ExperimentalWarning')))return;return _ew.call(process,w,...a)};
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
}) : x)(function(x) {
if (typeof require !== "undefined") return require.apply(this, arguments);
throw Error('Dynamic require of "' + x + '" is not supported');
});
var __commonJS = (cb, mod) => function __require2() {
try {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
} catch (e) {
throw mod = 0, e;
}
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target2) => (target2 = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target2, "default", { value: mod, enumerable: true }) : target2,
mod
));
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/graceful-fs/4.2.11/e60a23841f60609f733db41b2b1eced16c30ec8fe2e67c2a9b80e2dab0755700/node_modules/graceful-fs/polyfills.js
var require_polyfills = __commonJS({
"../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/graceful-fs/4.2.11/e60a23841f60609f733db41b2b1eced16c30ec8fe2e67c2a9b80e2dab0755700/node_modules/graceful-fs/polyfills.js"(exports, module) {
var constants2 = __require("constants");
var origCwd = process.cwd;
var cwd = null;
var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
process.cwd = function() {
if (!cwd)
cwd = origCwd.call(process);
return cwd;
};
try {
process.cwd();
} catch (er) {
}
if (typeof process.chdir === "function") {
chdir = process.chdir;
process.chdir = function(d) {
cwd = null;
chdir.call(process, d);
};
if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir);
}
var chdir;
module.exports = patch;
function patch(fs13) {
if (constants2.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
patchLchmod(fs13);
}
if (!fs13.lutimes) {
patchLutimes(fs13);
}
fs13.chown = chownFix(fs13.chown);
fs13.fchown = chownFix(fs13.fchown);
fs13.lchown = chownFix(fs13.lchown);
fs13.chmod = chmodFix(fs13.chmod);
fs13.fchmod = chmodFix(fs13.fchmod);
fs13.lchmod = chmodFix(fs13.lchmod);
fs13.chownSync = chownFixSync(fs13.chownSync);
fs13.fchownSync = chownFixSync(fs13.fchownSync);
fs13.lchownSync = chownFixSync(fs13.lchownSync);
fs13.chmodSync = chmodFixSync(fs13.chmodSync);
fs13.fchmodSync = chmodFixSync(fs13.fchmodSync);
fs13.lchmodSync = chmodFixSync(fs13.lchmodSync);
fs13.stat = statFix(fs13.stat);
fs13.fstat = statFix(fs13.fstat);
fs13.lstat = statFix(fs13.lstat);
fs13.statSync = statFixSync(fs13.statSync);
fs13.fstatSync = statFixSync(fs13.fstatSync);
fs13.lstatSync = statFixSync(fs13.lstatSync);
if (fs13.chmod && !fs13.lchmod) {
fs13.lchmod = function(path18, mode, cb) {
if (cb) process.nextTick(cb);
};
fs13.lchmodSync = function() {
};
}
if (fs13.chown && !fs13.lchown) {
fs13.lchown = function(path18, uid, gid, cb) {
if (cb) process.nextTick(cb);
};
fs13.lchownSync = function() {
};
}
if (platform === "win32") {
fs13.rename = typeof fs13.rename !== "function" ? fs13.rename : (function(fs$rename) {
function rename(from, to, cb) {
var start = Date.now();
var backoff = 0;
fs$rename(from, to, function CB(er) {
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
setTimeout(function() {
fs13.stat(to, function(stater, st) {
if (stater && stater.code === "ENOENT")
fs$rename(from, to, CB);
else
cb(er);
});
}, backoff);
if (backoff < 100)
backoff += 10;
return;
}
if (cb) cb(er);
});
}
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
return rename;
})(fs13.rename);
}
fs13.read = typeof fs13.read !== "function" ? fs13.read : (function(fs$read) {
function read2(fd, buffer, offset, length, position3, callback_) {
var callback;
if (callback_ && typeof callback_ === "function") {
var eagCounter = 0;
callback = function(er, _, __) {
if (er && er.code === "EAGAIN" && eagCounter < 10) {
eagCounter++;
return fs$read.call(fs13, fd, buffer, offset, length, position3, callback);
}
callback_.apply(this, arguments);
};
}
return fs$read.call(fs13, fd, buffer, offset, length, position3, callback);
}
if (Object.setPrototypeOf) Object.setPrototypeOf(read2, fs$read);
return read2;
})(fs13.read);
fs13.readSync = typeof fs13.readSync !== "function" ? fs13.readSync : /* @__PURE__ */ (function(fs$readSync) {
return function(fd, buffer, offset, length, position3) {
var eagCounter = 0;
while (true) {
try {
return fs$readSync.call(fs13, fd, buffer, offset, length, position3);
} catch (er) {
if (er.code === "EAGAIN" && eagCounter < 10) {
eagCounter++;
continue;
}
throw er;
}
}
};
})(fs13.readSync);
function patchLchmod(fs14) {
fs14.lchmod = function(path18, mode, callback) {
fs14.open(
path18,
constants2.O_WRONLY | constants2.O_SYMLINK,
mode,
function(err, fd) {
if (err) {
if (callback) callback(err);
return;
}
fs14.fchmod(fd, mode, function(err2) {
fs14.close(fd, function(err22) {
if (callback) callback(err2 || err22);
});
});
}
);
};
fs14.lchmodSync = function(path18, mode) {
var fd = fs14.openSync(path18, constants2.O_WRONLY | constants2.O_SYMLINK, mode);
var threw = true;
var ret;
try {
ret = fs14.fchmodSync(fd, mode);
threw = false;
} finally {
if (threw) {
try {
fs14.closeSync(fd);
} catch (er) {
}
} else {
fs14.closeSync(fd);
}
}
return ret;
};
}
function patchLutimes(fs14) {
if (constants2.hasOwnProperty("O_SYMLINK") && fs14.futimes) {
fs14.lutimes = function(path18, at, mt, cb) {
fs14.open(path18, constants2.O_SYMLINK, function(er, fd) {
if (er) {
if (cb) cb(er);
return;
}
fs14.futimes(fd, at, mt, function(er2) {
fs14.close(fd, function(er22) {
if (cb) cb(er2 || er22);
});
});
});
};
fs14.lutimesSync = function(path18, at, mt) {
var fd = fs14.openSync(path18, constants2.O_SYMLINK);
var ret;
var threw = true;
try {
ret = fs14.futimesSync(fd, at, mt);
threw = false;
} finally {
if (threw) {
try {
fs14.closeSync(fd);
} catch (er) {
}
} else {
fs14.closeSync(fd);
}
}
return ret;
};
} else if (fs14.futimes) {
fs14.lutimes = function(_a, _b, _c, cb) {
if (cb) process.nextTick(cb);
};
fs14.lutimesSync = function() {
};
}
}
function chmodFix(orig) {
if (!orig) return orig;
return function(target2, mode, cb) {
return orig.call(fs13, target2, mode, function(er) {
if (chownErOk(er)) er = null;
if (cb) cb.apply(this, arguments);
});
};
}
function chmodFixSync(orig) {
if (!orig) return orig;
return function(target2, mode) {
try {
return orig.call(fs13, target2, mode);
} catch (er) {
if (!chownErOk(er)) throw er;
}
};
}
function chownFix(orig) {
if (!orig) return orig;
return function(target2, uid, gid, cb) {
return orig.call(fs13, target2, uid, gid, function(er) {
if (chownErOk(er)) er = null;
if (cb) cb.apply(this, arguments);
});
};
}
function chownFixSync(orig) {
if (!orig) return orig;
return function(target2, uid, gid) {
try {
return orig.call(fs13, target2, uid, gid);
} catch (er) {
if (!chownErOk(er)) throw er;
}
};
}
function statFix(orig) {
if (!orig) return orig;
return function(target2, options, cb) {
if (typeof options === "function") {
cb = options;
options = null;
}
function callback(er, stats) {
if (stats) {
if (stats.uid < 0) stats.uid += 4294967296;
if (stats.gid < 0) stats.gid += 4294967296;
}
if (cb) cb.apply(this, arguments);
}
return options ? orig.call(fs13, target2, options, callback) : orig.call(fs13, target2, callback);
};
}
function statFixSync(orig) {
if (!orig) return orig;
return function(target2, options) {
var stats = options ? orig.call(fs13, target2, options) : orig.call(fs13, target2);
if (stats) {
if (stats.uid < 0) stats.uid += 4294967296;
if (stats.gid < 0) stats.gid += 4294967296;
}
return stats;
};
}
function chownErOk(er) {
if (!er)
return true;
if (er.code === "ENOSYS")
return true;
var nonroot = !process.getuid || process.getuid() !== 0;
if (nonroot) {
if (er.code === "EINVAL" || er.code === "EPERM")
return true;
}
return false;
}
}
}
});
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/graceful-fs/4.2.11/e60a23841f60609f733db41b2b1eced16c30ec8fe2e67c2a9b80e2dab0755700/node_modules/graceful-fs/legacy-streams.js
var require_legacy_streams = __commonJS({
"../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/graceful-fs/4.2.11/e60a23841f60609f733db41b2b1eced16c30ec8fe2e67c2a9b80e2dab0755700/node_modules/graceful-fs/legacy-streams.js"(exports, module) {
var Stream = __require("stream").Stream;
module.exports = legacy;
function legacy(fs13) {
return {
ReadStream,
WriteStream
};
function ReadStream(path18, options) {
if (!(this instanceof ReadStream)) return new ReadStream(path18, options);
Stream.call(this);
var self2 = this;
this.path = path18;
this.fd = null;
this.readable = true;
this.paused = false;
this.flags = "r";
this.mode = 438;
this.bufferSize = 64 * 1024;
options = options || {};
var keys = Object.keys(options);
for (var index = 0, length = keys.length; index < length; index++) {
var key = keys[index];
this[key] = options[key];
}
if (this.encoding) this.setEncoding(this.encoding);
if (this.start !== void 0) {
if ("number" !== typeof this.start) {
throw TypeError("start must be a Number");
}
if (this.end === void 0) {
this.end = Infinity;
} else if ("number" !== typeof this.end) {
throw TypeError("end must be a Number");
}
if (this.start > this.end) {
throw new Error("start must be <= end");
}
this.pos = this.start;
}
if (this.fd !== null) {
process.nextTick(function() {
self2._read();
});
return;
}
fs13.open(this.path, this.flags, this.mode, function(err, fd) {
if (err) {
self2.emit("error", err);
self2.readable = false;
return;
}
self2.fd = fd;
self2.emit("open", fd);
self2._read();
});
}
function WriteStream(path18, options) {
if (!(this instanceof WriteStream)) return new WriteStream(path18, options);
Stream.call(this);
this.path = path18;
this.fd = null;
this.writable = true;
this.flags = "w";
this.encoding = "binary";
this.mode = 438;
this.bytesWritten = 0;
options = options || {};
var keys = Object.keys(options);
for (var index = 0, length = keys.length; index < length; index++) {
var key = keys[index];
this[key] = options[key];
}
if (this.start !== void 0) {
if ("number" !== typeof this.start) {
throw TypeError("start must be a Number");
}
if (this.start < 0) {
throw new Error("start must be >= zero");
}
this.pos = this.start;
}
this.busy = false;
this._queue = [];
if (this.fd === null) {
this._open = fs13.open;
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
this.flush();
}
}
}
}
});
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/graceful-fs/4.2.11/e60a23841f60609f733db41b2b1eced16c30ec8fe2e67c2a9b80e2dab0755700/node_modules/graceful-fs/clone.js
var require_clone = __commonJS({
"../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/graceful-fs/4.2.11/e60a23841f60609f733db41b2b1eced16c30ec8fe2e67c2a9b80e2dab0755700/node_modules/graceful-fs/clone.js"(exports, module) {
"use strict";
module.exports = clone;
var getPrototypeOf = Object.getPrototypeOf || function(obj) {
return obj.__proto__;
};
function clone(obj) {
if (obj === null || typeof obj !== "object")
return obj;
if (obj instanceof Object)
var copy2 = { __proto__: getPrototypeOf(obj) };
else
var copy2 = /* @__PURE__ */ Object.create(null);
Object.getOwnPropertyNames(obj).forEach(function(key) {
Object.defineProperty(copy2, key, Object.getOwnPropertyDescriptor(obj, key));
});
return copy2;
}
}
});
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/graceful-fs/4.2.11/e60a23841f60609f733db41b2b1eced16c30ec8fe2e67c2a9b80e2dab0755700/node_modules/graceful-fs/graceful-fs.js
var require_graceful_fs = __commonJS({
"../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/graceful-fs/4.2.11/e60a23841f60609f733db41b2b1eced16c30ec8fe2e67c2a9b80e2dab0755700/node_modules/graceful-fs/graceful-fs.js"(exports, module) {
var fs13 = __require("fs");
var polyfills = require_polyfills();
var legacy = require_legacy_streams();
var clone = require_clone();
var util9 = __require("util");
var gracefulQueue;
var previousSymbol;
if (typeof Symbol === "function" && typeof Symbol.for === "function") {
gracefulQueue = /* @__PURE__ */ Symbol.for("graceful-fs.queue");
previousSymbol = /* @__PURE__ */ Symbol.for("graceful-fs.previous");
} else {
gracefulQueue = "___graceful-fs.queue";
previousSymbol = "___graceful-fs.previous";
}
function noop() {
}
function publishQueue(context, queue2) {
Object.defineProperty(context, gracefulQueue, {
get: function() {
return queue2;
}
});
}
var debug = noop;
if (util9.debuglog)
debug = util9.debuglog("gfs4");
else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
debug = function() {
var m = util9.format.apply(util9, arguments);
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
console.error(m);
};
if (!fs13[gracefulQueue]) {
queue = global[gracefulQueue] || [];
publishQueue(fs13, queue);
fs13.close = (function(fs$close) {
function close(fd, cb) {
return fs$close.call(fs13, fd, function(err) {
if (!err) {
resetQueue();
}
if (typeof cb === "function")
cb.apply(this, arguments);
});
}
Object.defineProperty(close, previousSymbol, {
value: fs$close
});
return close;
})(fs13.close);
fs13.closeSync = (function(fs$closeSync) {
function closeSync(fd) {
fs$closeSync.apply(fs13, arguments);
resetQueue();
}
Object.defineProperty(closeSync, previousSymbol, {
value: fs$closeSync
});
return closeSync;
})(fs13.closeSync);
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
process.on("exit", function() {
debug(fs13[gracefulQueue]);
__require("assert").equal(fs13[gracefulQueue].length, 0);
});
}
}
var queue;
if (!global[gracefulQueue]) {
publishQueue(global, fs13[gracefulQueue]);
}
module.exports = patch(clone(fs13));
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs13.__patched) {
module.exports = patch(fs13);
fs13.__patched = true;
}
function patch(fs14) {
polyfills(fs14);
fs14.gracefulify = patch;
fs14.createReadStream = createReadStream;
fs14.createWriteStream = createWriteStream;
var fs$readFile = fs14.readFile;
fs14.readFile = readFile;
function readFile(path18, options, cb) {
if (typeof options === "function")
cb = options, options = null;
return go$readFile(path18, options, cb);
function go$readFile(path19, options2, cb2, startTime) {
return fs$readFile(path19, options2, function(err) {
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
enqueue([go$readFile, [path19, options2, cb2], err, startTime || Date.now(), Date.now()]);
else {
if (typeof cb2 === "function")
cb2.apply(this, arguments);
}
});
}
}
var fs$writeFile = fs14.writeFile;
fs14.writeFile = writeFile2;
function writeFile2(path18, data, options, cb) {
if (typeof options === "function")
cb = options, options = null;
return go$writeFile(path18, data, options, cb);
function go$writeFile(path19, data2, options2, cb2, startTime) {
return fs$writeFile(path19, data2, options2, function(err) {
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
enqueue([go$writeFile, [path19, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
else {
if (typeof cb2 === "function")
cb2.apply(this, arguments);
}
});
}
}
var fs$appendFile = fs14.appendFile;
if (fs$appendFile)
fs14.appendFile = appendFile;
function appendFile(path18, data, options, cb) {
if (typeof options === "function")
cb = options, options = null;
return go$appendFile(path18, data, options, cb);
function go$appendFile(path19, data2, options2, cb2, startTime) {
return fs$appendFile(path19, data2, options2, function(err) {
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
enqueue([go$appendFile, [path19, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
else {
if (typeof cb2 === "function")
cb2.apply(this, arguments);
}
});
}
}
var fs$copyFile = fs14.copyFile;
if (fs$copyFile)
fs14.copyFile = copyFile;
function copyFile(src2, dest, flags, cb) {
if (typeof flags === "function") {
cb = flags;
flags = 0;
}
return go$copyFile(src2, dest, flags, cb);
function go$copyFile(src3, dest2, flags2, cb2, startTime) {
return fs$copyFile(src3, dest2, flags2, function(err) {
if (err && (err.code === "EMFILE" || err.code === "ENFILE" || err.code === "EBUSY"))
enqueue([go$copyFile, [src3, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]);
else {
if (typeof cb2 === "function")
cb2.apply(this, arguments);
}
});
}
}
var fs$readdir = fs14.readdir;
fs14.readdir = readdir;
var noReaddirOptionVersions = /^v[0-5]\./;
function readdir(path18, options, cb) {
if (typeof options === "function")
cb = options, options = null;
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path19, options2, cb2, startTime) {
return fs$readdir(path19, fs$readdirCallback(
path19,
options2,
cb2,
startTime
));
} : function go$readdir2(path19, options2, cb2, startTime) {
return fs$readdir(path19, options2, fs$readdirCallback(
path19,
options2,
cb2,
startTime
));
};
return go$readdir(path18, options, cb);
function fs$readdirCallback(path19, options2, cb2, startTime) {
return function(err, files) {
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
enqueue([
go$readdir,
[path19, options2, cb2],
err,
startTime || Date.now(),
Date.now()
]);
else {
if (files && files.sort)
files.sort();
if (typeof cb2 === "function")
cb2.call(this, err, files);
}
};
}
}
if (process.version.substr(0, 4) === "v0.8") {
var legStreams = legacy(fs14);
ReadStream = legStreams.ReadStream;
WriteStream = legStreams.WriteStream;
}
var fs$ReadStream = fs14.ReadStream;
if (fs$ReadStream) {
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
ReadStream.prototype.open = ReadStream$open;
}
var fs$WriteStream = fs14.WriteStream;
if (fs$WriteStream) {
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
WriteStream.prototype.open = WriteStream$open;
}
Object.defineProperty(fs14, "ReadStream", {
get: function() {
return ReadStream;
},
set: function(val) {
ReadStream = val;
},
enumerable: true,
configurable: true
});
Object.defineProperty(fs14, "WriteStream", {
get: function() {
return WriteStream;
},
set: function(val) {
WriteStream = val;
},
enumerable: true,
configurable: true
});
var FileReadStream = ReadStream;
Object.defineProperty(fs14, "FileReadStream", {
get: function() {
return FileReadStream;
},
set: function(val) {
FileReadStream = val;
},
enumerable: true,
configurable: true
});
var FileWriteStream = WriteStream;
Object.defineProperty(fs14, "FileWriteStream", {
get: function() {
return FileWriteStream;
},
set: function(val) {
FileWriteStream = val;
},
enumerable: true,
configurable: true
});
function ReadStream(path18, options) {
if (this instanceof ReadStream)
return fs$ReadStream.apply(this, arguments), this;
else
return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
}
function ReadStream$open() {
var that = this;
open(that.path, that.flags, that.mode, function(err, fd) {
if (err) {
if (that.autoClose)
that.destroy();
that.emit("error", err);
} else {
that.fd = fd;
that.emit("open", fd);
that.read();
}
});
}
function WriteStream(path18, options) {
if (this instanceof WriteStream)
return fs$WriteStream.apply(this, arguments), this;
else
return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
}
function WriteStream$open() {
var that = this;
open(that.path, that.flags, that.mode, function(err, fd) {
if (err) {
that.destroy();
that.emit("error", err);
} else {
that.fd = fd;
that.emit("open", fd);
}
});
}
function createReadStream(path18, options) {
return new fs14.ReadStream(path18, options);
}
function createWriteStream(path18, options) {
return new fs14.WriteStream(path18, options);
}
var fs$open = fs14.open;
fs14.open = open;
function open(path18, flags, mode, cb) {
if (typeof mode === "function")
cb = mode, mode = null;
return go$open(path18, flags, mode, cb);
function go$open(path19, flags2, mode2, cb2, startTime) {
return fs$open(path19, flags2, mode2, function(err, fd) {
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
enqueue([go$open, [path19, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
else {
if (typeof cb2 === "function")
cb2.apply(this, arguments);
}
});
}
}
return fs14;
}
function enqueue(elem) {
debug("ENQUEUE", elem[0].name, elem[1]);
fs13[gracefulQueue].push(elem);
retry();
}
var retryTimer;
function resetQueue() {
var now = Date.now();
for (var i = 0; i < fs13[gracefulQueue].length; ++i) {
if (fs13[gracefulQueue][i].length > 2) {
fs13[gracefulQueue][i][3] = now;
fs13[gracefulQueue][i][4] = now;
}
}
retry();
}
function retry() {
clearTimeout(retryTimer);
retryTimer = void 0;
if (fs13[gracefulQueue].length === 0)
return;
var elem = fs13[gracefulQueue].shift();
var fn = elem[0];
var args = elem[1];
var err = elem[2];
var startTime = elem[3];
var lastTime = elem[4];
if (startTime === void 0) {
debug("RETRY", fn.name, args);
fn.apply(null, args);
} else if (Date.now() - startTime >= 6e4) {
debug("TIMEOUT", fn.name, args);
var cb = args.pop();
if (typeof cb === "function")
cb.call(null, err);
} else {
var sinceAttempt = Date.now() - lastTime;
var sinceStart = Math.max(lastTime - startTime, 1);
var desiredDelay = Math.min(sinceStart * 1.2, 100);
if (sinceAttempt >= desiredDelay) {
debug("RETRY", fn.name, args);
fn.apply(null, args.concat([startTime]));
} else {
fs13[gracefulQueue].push(elem);
}
}
if (retryTimer === void 0) {
retryTimer = setTimeout(retry, 0);
}
}
}
});
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/fast-safe-stringify/2.1.1/71177aa317bf9c10d6ba54feb1e03d154d670845bac275960b4cc587a01d5783/node_modules/fast-safe-stringify/index.js
var require_fast_safe_stringify = __commonJS({
"../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/fast-safe-stringify/2.1.1/71177aa317bf9c10d6ba54feb1e03d154d670845bac275960b4cc587a01d5783/node_modules/fast-safe-stringify/index.js"(exports, module) {
module.exports = stringify;
stringify.default = stringify;
stringify.stable = deterministicStringify;
stringify.stableStringify = deterministicStringify;
var LIMIT_REPLACE_NODE = "[...]";
var CIRCULAR_REPLACE_NODE = "[Circular]";
var arr = [];
var replacerStack = [];
function defaultOptions2() {
return {
depthLimit: Number.MAX_SAFE_INTEGER,
edgesLimit: Number.MAX_SAFE_INTEGER
};
}
function stringify(obj, replacer, spacer, options) {
if (typeof options === "undefined") {
options = defaultOptions2();
}
decirc(obj, "", 0, [], void 0, 0, options);
var res;
try {
if (replacerStack.length === 0) {
res = JSON.stringify(obj, replacer, spacer);
} else {
res = JSON.stringify(obj, replaceGetterValues(replacer), spacer);
}
} catch (_) {
return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]");
} finally {
while (arr.length !== 0) {
var part = arr.pop();
if (part.length === 4) {
Object.defineProperty(part[0], part[1], part[3]);
} else {
part[0][part[1]] = part[2];
}
}
}
return res;
}
function setReplace(replace, val, k, parent) {
var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k);
if (propertyDescriptor.get !== void 0) {
if (propertyDescriptor.configurable) {
Object.defineProperty(parent, k, { value: replace });
arr.push([parent, k, val, propertyDescriptor]);
} else {
replacerStack.push([val, k, replace]);
}
} else {
parent[k] = replace;
arr.push([parent, k, val]);
}
}
function decirc(val, k, edgeIndex, stack, parent, depth, options) {
depth += 1;
var i;
if (typeof val === "object" && val !== null) {
for (i = 0; i < stack.length; i++) {
if (stack[i] === val) {
setReplace(CIRCULAR_REPLACE_NODE, val, k, parent);
return;
}
}
if (typeof options.depthLimit !== "undefined" && depth > options.depthLimit) {
setReplace(LIMIT_REPLACE_NODE, val, k, parent);
return;
}
if (typeof options.edgesLimit !== "undefined" && edgeIndex + 1 > options.edgesLimit) {
setReplace(LIMIT_REPLACE_NODE, val, k, parent);
return;
}
stack.push(val);
if (Array.isArray(val)) {
for (i = 0; i < val.length; i++) {
decirc(val[i], i, i, stack, val, depth, options);
}
} else {
var keys = Object.keys(val);
for (i = 0; i < keys.length; i++) {
var key = keys[i];
decirc(val[key], key, i, stack, val, depth, options);
}
}
stack.pop();
}
}
function compareFunction(a, b) {
if (a < b) {
return -1;
}
if (a > b) {
return 1;
}
return 0;
}
function deterministicStringify(obj, replacer, spacer, options) {
if (typeof options === "undefined") {
options = defaultOptions2();
}
var tmp = deterministicDecirc(obj, "", 0, [], void 0, 0, options) || obj;
var res;
try {
if (replacerStack.length === 0) {
res = JSON.stringify(tmp, replacer, spacer);
} else {
res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer);
}
} catch (_) {
return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]");
} finally {
while (arr.length !== 0) {
var part = arr.pop();
if (part.length === 4) {
Object.defineProperty(part[0], part[1], part[3]);
} else {
part[0][part[1]] = part[2];
}
}
}
return res;
}
function deterministicDecirc(val, k, edgeIndex, stack, parent, depth, options) {
depth += 1;
var i;
if (typeof val === "object" && val !== null) {
for (i = 0; i < stack.length; i++) {
if (stack[i] === val) {
setReplace(CIRCULAR_REPLACE_NODE, val, k, parent);
return;
}
}
try {
if (typeof val.toJSON === "function") {
return;
}
} catch (_) {
return;
}
if (typeof options.depthLimit !== "undefined" && depth > options.depthLimit) {
setReplace(LIMIT_REPLACE_NODE, val, k, parent);
return;
}
if (typeof options.edgesLimit !== "undefined" && edgeIndex + 1 > options.edgesLimit) {
setReplace(LIMIT_REPLACE_NODE, val, k, parent);
return;
}
stack.push(val);
if (Array.isArray(val)) {
for (i = 0; i < val.length; i++) {
deterministicDecirc(val[i], i, i, stack, val, depth, options);
}
} else {
var tmp = {};
var keys = Object.keys(val).sort(compareFunction);
for (i = 0; i < keys.length; i++) {
var key = keys[i];
deterministicDecirc(val[key], key, i, stack, val, depth, options);
tmp[key] = val[key];
}
if (typeof parent !== "undefined") {
arr.push([parent, k, val]);
parent[k] = tmp;
} else {
return tmp;
}
}
stack.pop();
}
}
function replaceGetterValues(replacer) {
replacer = typeof replacer !== "undefined" ? replacer : function(k, v) {
return v;
};
return function(key, val) {
if (replacerStack.length > 0) {
for (var i = 0; i < replacerStack.length; i++) {
var part = replacerStack[i];
if (part[1] === key && part[0] === val) {
val = part[2];
replacerStack.splice(i, 1);
break;
}
}
}
return replacer.call(this, key, val);
};
}
}
});
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/individual/3.0.0/82ec8ef054bfaf915092db8496dd7cdf5d8a529ff6202ce432d93772b51b5045/node_modules/individual/index.js
var require_individual = __commonJS({
"../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/individual/3.0.0/82ec8ef054bfaf915092db8496dd7cdf5d8a529ff6202ce432d93772b51b5045/node_modules/individual/index.js"(exports, module) {
"use strict";
var root = typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
module.exports = Individual;
function Individual(key, value) {
if (key in root) {
return root[key];
}
root[key] = value;
return value;
}
}
});
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/bole/5.0.29/6922e0a3a11b46fb67db71b821bacb20a87db33d8d1fb079a84a148dc6373834/node_modules/bole/format.js
var require_format = __commonJS({
"../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/bole/5.0.29/6922e0a3a11b46fb67db71b821bacb20a87db33d8d1fb079a84a148dc6373834/node_modules/bole/format.js"(exports, module) {
var utilformat = __require("util").format;
function format(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) {
if (a16 !== void 0) {
return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16);
}
if (a15 !== void 0) {
return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15);
}
if (a14 !== void 0) {
return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
}
if (a13 !== void 0) {
return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13);
}
if (a12 !== void 0) {
return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12);
}
if (a11 !== void 0) {
return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
}
if (a10 !== void 0) {
return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
}
if (a9 !== void 0) {
return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9);
}
if (a8 !== void 0) {
return utilformat(a1, a2, a3, a4, a5, a6, a7, a8);
}
if (a7 !== void 0) {
return utilformat(a1, a2, a3, a4, a5, a6, a7);
}
if (a6 !== void 0) {
return utilformat(a1, a2, a3, a4, a5, a6);
}
if (a5 !== void 0) {
return utilformat(a1, a2, a3, a4, a5);
}
if (a4 !== void 0) {
return utilformat(a1, a2, a3, a4);
}
if (a3 !== void 0) {
return utilformat(a1, a2, a3);
}
if (a2 !== void 0) {
return utilformat(a1, a2);
}
return a1;
}
module.exports = format;
}
});
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/bole/5.0.29/6922e0a3a11b46fb67db71b821bacb20a87db33d8d1fb079a84a148dc6373834/node_modules/bole/bole.js
var require_bole = __commonJS({
"../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/bole/5.0.29/6922e0a3a11b46fb67db71b821bacb20a87db33d8d1fb079a84a148dc6373834/node_modules/bole/bole.js"(exports, module) {
"use strict";
var _stringify = require_fast_safe_stringify();
var individual = require_individual()("$$bole", { fastTime: false });
var format = require_format();
var levels = "debug info warn error".split(" ");
var os = __require("os");
var pid = process.pid;
var hasObjMode = false;
var scache = [];
var hostname;
try {
hostname = os.hostname();
} catch (e) {
hostname = os.version().indexOf("Windows 7 ") === 0 ? "windows7" : "hostname-unknown";
}
var hostnameSt = _stringify(hostname);
for (const level of levels) {
scache[level] = ',"hostname":' + hostnameSt + ',"pid":' + pid + ',"level":"' + level;
Number(scache[level]);
if (!Array.isArray(individual[level])) {
individual[level] = [];
}
}
function stackToString(e) {
let s = e.stack;
let ce;
if (typeof e.cause === "function" && (ce = e.cause())) {
s += "\nCaused by: " + stackToString(ce);
}
return s;
}
function errorToOut(err, out) {
out.err = {
name: err.name,
message: err.message,
code: err.code,
// perhaps
stack: stackToString(err)
};
}
function requestToOut(req2, out) {
out.req = {
method: req2.method,
url: req2.url,
headers: req2.headers,
remoteAddress: req2.connection.remoteAddress,
remotePort: req2.connection.remotePort
};
}
function objectToOut(obj, out) {
for (const k in obj) {
if (Object.prototype.hasOwnProperty.call(obj, k) && obj[k] !== void 0) {
out[k] = obj[k];
}
}
}
function objectMode(stream) {
return stream._writableState && stream._writableState.objectMode === true;
}
function stringify(level, name, message, obj) {
let s = '{"time":' + (individual.fastTime ? Date.now() : '"' + (/* @__PURE__ */ new Date()).toISOString() + '"') + scache[level] + '","name":' + name + (message !== void 0 ? ',"message":' + _stringify(message) : "");
for (const k in obj) {
s += "," + _stringify(k) + ":" + _stringify(obj[k]);
}
s += "}";
Number(s);
return s;
}
function extend(level, name, message, obj) {
const newObj = {
time: individual.fastTime ? Date.now() : (/* @__PURE__ */ new Date()).toISOString(),
hostname,
pid,
level,
name
};
if (message !== void 0) {
obj.message = message;
}
for (const k in obj) {
newObj[k] = obj[k];
}
return newObj;
}
function levelLogger(level, name) {
const outputs = individual[level];
const nameSt = _stringify(name);
return function namedLevelLogger(inp, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) {
if (outputs.length === 0) {
return;
}
const out = {};
let objectOut;
let i = 0;
const l = outputs.length;
let stringified;
let message;
if (typeof inp === "string" || inp == null) {
if (!(message = format(inp, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16))) {
message = void 0;
}
} else {
if (inp instanceof Error) {
if (typeof a2 === "object") {
objectToOut(a2, out);
errorToOut(inp, out);
if (!(message = format(a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16))) {
message = void 0;
}
} else {
errorToOut(inp, out);
if (!(message = format(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16))) {
message = void 0;
}
}
} else {
if (!(message = format(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16))) {
message = void 0;
}
}
if (typeof inp === "boolean") {
message = String(inp);
} else if (typeof inp === "object" && !(inp instanceof Error)) {
if (inp.method && inp.url && inp.headers && inp.socket) {
requestToOut(inp, out);
} else {
objectToOut(inp, out);
}
}
}
if (l === 1 && !hasObjMode) {
outputs[0].write(Buffer.from(stringify(level, nameSt, message, out) + "\n"));
return;
}
for (; i < l; i++) {
if (objectMode(outputs[i])) {
if (objectOut === void 0) {
objectOut = extend(level, name, message, out);
}
outputs[i].write(objectOut);
} else {
if (stringified === void 0) {
stringified = Buffer.from(stringify(level, nameSt, message, out) + "\n");
}
outputs[i].write(stringified);
}
}
};
}
function bole4(name) {
function boleLogger(subname) {
return bole4(name + ":" + subname);
}
function makeLogger(p, level) {
p[level] = levelLogger(level, name);
return p;
}
return levels.reduce(makeLogger, boleLogger);
}
bole4.output = function output(opt) {
let b = false;
if (Array.isArray(opt)) {
opt.forEach(bole4.output);
return bole4;
}
if (typeof opt.level !== "string") {
throw new TypeError('Must provide a "level" option');
}
for (const level of levels) {
if (!b && level === opt.level) {
b = true;
}
if (b) {
if (opt.stream && objectMode(opt.stream)) {
hasObjMode = true;
}
individual[level].push(opt.stream);
}
}
return bole4;
};
bole4.reset = function reset() {
for (const level of levels) {
individual[level].splice(0, individual[level].length);
}
individual.fastTime = false;
return bole4;
};
bole4.setFastTime = function setFastTime(b) {
if (!arguments.length) {
individual.fastTime = true;
} else {
individual.fastTime = b;
}
return bole4;
};
module.exports = bole4;
}
});
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/split2/4.2.0/40e414c630ab7f443818aa50ee06a670a46fe60cf81f7f81a46733d76a4ce6ba/node_modules/split2/index.js
var require_split2 = __commonJS({
"../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/split2/4.2.0/40e414c630ab7f443818aa50ee06a670a46fe60cf81f7f81a46733d76a4ce6ba/node_modules/split2/index.js"(exports, module) {
"use strict";
var { Transform } = __require("stream");
var { StringDecoder } = __require("string_decoder");
var kLast = /* @__PURE__ */ Symbol("last");
var kDecoder = /* @__PURE__ */ Symbol("decoder");
function transform(chunk, enc, cb) {
let list;
if (this.overflow) {
const buf = this[kDecoder].write(chunk);
list = buf.split(this.matcher);
if (list.length === 1) return cb();
list.shift();
this.overflow = false;
} else {
this[kLast] += this[kDecoder].write(chunk);
list = this[kLast].split(this.matcher);
}
this[kLast] = list.pop();
for (let i = 0; i < list.length; i++) {
try {
push(this, this.mapper(list[i]));
} catch (error) {
return cb(error);
}
}
this.overflow = this[kLast].length > this.maxLength;
if (this.overflow && !this.skipOverflow) {
cb(new Error("maximum buffer reached"));
return;
}
cb();
}
function flush(cb) {
this[kLast] += this[kDecoder].end();
if (this[kLast]) {
try {
push(this, this.mapper(this[kLast]));
} catch (error) {
return cb(error);
}
}
cb();
}
function push(self2, val) {
if (val !== void 0) {
self2.push(val);
}
}
function noop(incoming) {
return incoming;
}
function split2(matcher, mapper, options) {
matcher = matcher || /\r?\n/;
mapper = mapper || noop;
options = options || {};
switch (arguments.length) {
case 1:
if (typeof matcher === "function") {
mapper = matcher;
matcher = /\r?\n/;
} else if (typeof matcher === "object" && !(matcher instanceof RegExp) && !matcher[Symbol.split]) {
options = matcher;
matcher = /\r?\n/;
}
break;
case 2:
if (typeof matcher === "function") {
options = mapper;
mapper = matcher;
matcher = /\r?\n/;
} else if (typeof mapper === "object") {
options = mapper;
mapper = noop;
}
}
options = Object.assign({}, options);
options.autoDestroy = true;
options.transform = transform;
options.flush = flush;
options.readableObjectMode = true;
const stream = new Transform(options);
stream[kLast] = "";
stream[kDecoder] = new StringDecoder("utf8");
stream.matcher = matcher;
stream.mapper = mapper;
stream.maxLength = options.maxLength;
stream.skipOverflow = options.skipOverflow || false;
stream.overflow = false;
stream._destroy = function(err, cb) {
this._writableState.errorEmitted = false;
cb(err);
};
return stream;
}
module.exports = split2;
}
});
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/universalify/2.0.1/3983135594189f71b00fc07b6b17387b476e8a92e19ec2a61c1f0e0d68895f4d/node_modules/universalify/index.js
var require_universalify = __commonJS({
"../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/universalify/2.0.1/3983135594189f71b00fc07b6b17387b476e8a92e19ec2a61c1f0e0d68895f4d/node_modules/universalify/index.js"(exports) {
"use strict";
exports.fromCallback = function(fn) {
return Object.defineProperty(function(...args) {
if (typeof args[args.length - 1] === "function") fn.apply(this, args);
else {
return new Promise((resolve, reject) => {
args.push((err, res) => err != null ? reject(err) : resolve(res));
fn.apply(this, args);
});
}
}, "name", { value: fn.name });
};
exports.fromPromise = function(fn) {
return Object.defineProperty(function(...args) {
const cb = args[args.length - 1];
if (typeof cb !== "function") return fn.apply(this, args);
else {
args.pop();
fn.apply(this, args).then((r) => cb(null, r), cb);
}
}, "name", { value: fn.name });
};
}
});
// ../../../../../setup-p