diff --git a/backend/node_modules/@prisma/fetch-engine/dist/BinaryType.d.ts b/backend/node_modules/@prisma/fetch-engine/dist/BinaryType.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f8db848550883ce9f91763f529273a3d532ba186 --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/BinaryType.d.ts @@ -0,0 +1,5 @@ +export declare enum BinaryType { + QueryEngineBinary = "query-engine", + QueryEngineLibrary = "libquery-engine", + SchemaEngineBinary = "schema-engine" +} diff --git a/backend/node_modules/@prisma/fetch-engine/dist/BinaryType.js b/backend/node_modules/@prisma/fetch-engine/dist/BinaryType.js new file mode 100644 index 0000000000000000000000000000000000000000..dec1183002c667525245cad8511593bc436c3192 --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/BinaryType.js @@ -0,0 +1,25 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var BinaryType_exports = {}; +__export(BinaryType_exports, { + BinaryType: () => import_chunk_X37PZICB.BinaryType +}); +module.exports = __toCommonJS(BinaryType_exports); +var import_chunk_X37PZICB = require("./chunk-X37PZICB.js"); +var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js"); diff --git a/backend/node_modules/@prisma/fetch-engine/dist/chmodPlusX.d.ts b/backend/node_modules/@prisma/fetch-engine/dist/chmodPlusX.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a24b99d61eb9015fda1ec8d0d82fcfea55095416 --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/chmodPlusX.d.ts @@ -0,0 +1 @@ +export declare function chmodPlusX(file: string): void; diff --git a/backend/node_modules/@prisma/fetch-engine/dist/chunk-3VVCXIQ5.js b/backend/node_modules/@prisma/fetch-engine/dist/chunk-3VVCXIQ5.js new file mode 100644 index 0000000000000000000000000000000000000000..e8d69edf8efb261ff1c497b4b6fb5ae65cd1026f --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/chunk-3VVCXIQ5.js @@ -0,0 +1,67 @@ +"use strict"; +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 __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +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, target) => (target = 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(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var chunk_3VVCXIQ5_exports = {}; +__export(chunk_3VVCXIQ5_exports, { + cleanupCache: () => cleanupCache +}); +module.exports = __toCommonJS(chunk_3VVCXIQ5_exports); +var import_chunk_FSAAZH62 = require("./chunk-FSAAZH62.js"); +var import_chunk_LONQL55G = require("./chunk-LONQL55G.js"); +var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js"); +var import_node_fs = __toESM(require("node:fs")); +var import_node_path = __toESM(require("node:path")); +var import_debug = __toESM(require("@prisma/debug")); +var import_p_map = (0, import_chunk_QGM4M3NI.__toESM)((0, import_chunk_FSAAZH62.require_p_map)()); +var debug = (0, import_debug.default)("cleanupCache"); +async function cleanupCache(n = 5) { + try { + const rootCacheDir = await (0, import_chunk_LONQL55G.getRootCacheDir)(); + if (!rootCacheDir) { + debug("no rootCacheDir found"); + return; + } + const channel = "master"; + const cacheDir = import_node_path.default.join(rootCacheDir, channel); + const dirs = await import_node_fs.default.promises.readdir(cacheDir); + const dirsWithMeta = await Promise.all( + dirs.map(async (dirName) => { + const dir = import_node_path.default.join(cacheDir, dirName); + const statResult = await import_node_fs.default.promises.stat(dir); + return { + dir, + created: statResult.birthtime + }; + }) + ); + dirsWithMeta.sort((a, b) => a.created < b.created ? 1 : -1); + const dirsToRemove = dirsWithMeta.slice(n); + await (0, import_p_map.default)(dirsToRemove, (dir) => import_node_fs.default.promises.rm(dir.dir, { force: true, recursive: true }), { concurrency: 20 }); + } catch (e) { + } +} diff --git a/backend/node_modules/@prisma/fetch-engine/dist/chunk-4C3J5AMP.js b/backend/node_modules/@prisma/fetch-engine/dist/chunk-4C3J5AMP.js new file mode 100644 index 0000000000000000000000000000000000000000..a54c617d185f65bde200e5cc95e250d4596ef215 --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/chunk-4C3J5AMP.js @@ -0,0 +1,2588 @@ +"use strict"; +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 __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +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, target) => (target = 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(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var chunk_4C3J5AMP_exports = {}; +__export(chunk_4C3J5AMP_exports, { + download: () => download, + getBinaryName: () => getBinaryName, + getVersion: () => getVersion, + maybeCopyToTmp: () => maybeCopyToTmp, + plusX: () => plusX, + vercelPkgPathRegex: () => vercelPkgPathRegex +}); +module.exports = __toCommonJS(chunk_4C3J5AMP_exports); +var import_chunk_MWVY55RY = require("./chunk-MWVY55RY.js"); +var import_chunk_7JLQJWOR = require("./chunk-7JLQJWOR.js"); +var import_chunk_3VVCXIQ5 = require("./chunk-3VVCXIQ5.js"); +var import_chunk_CY52DY2B = require("./chunk-CY52DY2B.js"); +var import_chunk_LONQL55G = require("./chunk-LONQL55G.js"); +var import_chunk_QFA3XBMW = require("./chunk-QFA3XBMW.js"); +var import_chunk_FKGWOTGU = require("./chunk-FKGWOTGU.js"); +var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js"); +var import_node_fs = __toESM(require("node:fs")); +var import_node_path = __toESM(require("node:path")); +var import_node_util = require("node:util"); +var import_debug = __toESM(require("@prisma/debug")); +var import_get_platform = require("@prisma/get-platform"); +var import_node_buffer = require("node:buffer"); +var import_node_path2 = __toESM(require("node:path")); +var import_node_child_process = __toESM(require("node:child_process")); +var import_node_process = __toESM(require("node:process")); +var import_node_process2 = __toESM(require("node:process")); +var import_node_path3 = __toESM(require("node:path")); +var import_node_url = require("node:url"); +var import_node_process3 = __toESM(require("node:process")); +var import_node_os = require("node:os"); +var import_node_os2 = require("node:os"); +var import_node_os3 = __toESM(require("node:os")); +var import_node_fs2 = require("node:fs"); +var import_node_child_process2 = require("node:child_process"); +var import_node_fs3 = require("node:fs"); +var import_promises = require("node:timers/promises"); +var import_node_buffer2 = require("node:buffer"); +var import_node_child_process3 = require("node:child_process"); +var import_node_util2 = require("node:util"); +var import_node_process4 = __toESM(require("node:process")); +var require_windows = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports, module2) { + "use strict"; + module2.exports = isexe; + isexe.sync = sync; + var fs2 = (0, import_chunk_QGM4M3NI.__require)("fs"); + function checkPathExt(path4, options) { + var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT; + if (!pathext) { + return true; + } + pathext = pathext.split(";"); + if (pathext.indexOf("") !== -1) { + return true; + } + for (var i = 0; i < pathext.length; i++) { + var p = pathext[i].toLowerCase(); + if (p && path4.substr(-p.length).toLowerCase() === p) { + return true; + } + } + return false; + } + function checkStat(stat, path4, options) { + if (!stat.isSymbolicLink() && !stat.isFile()) { + return false; + } + return checkPathExt(path4, options); + } + function isexe(path4, options, cb) { + fs2.stat(path4, function(er, stat) { + cb(er, er ? false : checkStat(stat, path4, options)); + }); + } + function sync(path4, options) { + return checkStat(fs2.statSync(path4), path4, options); + } + } +}); +var require_mode = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports, module2) { + "use strict"; + module2.exports = isexe; + isexe.sync = sync; + var fs2 = (0, import_chunk_QGM4M3NI.__require)("fs"); + function isexe(path4, options, cb) { + fs2.stat(path4, function(er, stat) { + cb(er, er ? false : checkStat(stat, options)); + }); + } + function sync(path4, options) { + return checkStat(fs2.statSync(path4), options); + } + function checkStat(stat, options) { + return stat.isFile() && checkMode(stat, options); + } + function checkMode(stat, options) { + var mod = stat.mode; + var uid = stat.uid; + var gid = stat.gid; + var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid(); + var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid(); + var u = parseInt("100", 8); + var g = parseInt("010", 8); + var o = parseInt("001", 8); + var ug = u | g; + var ret = mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0; + return ret; + } + } +}); +var require_isexe = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module2) { + "use strict"; + var fs2 = (0, import_chunk_QGM4M3NI.__require)("fs"); + var core; + if (process.platform === "win32" || global.TESTING_WINDOWS) { + core = require_windows(); + } else { + core = require_mode(); + } + module2.exports = isexe; + isexe.sync = sync; + function isexe(path4, options, cb) { + if (typeof options === "function") { + cb = options; + options = {}; + } + if (!cb) { + if (typeof Promise !== "function") { + throw new TypeError("callback not provided"); + } + return new Promise(function(resolve, reject) { + isexe(path4, options || {}, function(er, is) { + if (er) { + reject(er); + } else { + resolve(is); + } + }); + }); + } + core(path4, options || {}, function(er, is) { + if (er) { + if (er.code === "EACCES" || options && options.ignoreErrors) { + er = null; + is = false; + } + } + cb(er, is); + }); + } + function sync(path4, options) { + try { + return core.sync(path4, options || {}); + } catch (er) { + if (options && options.ignoreErrors || er.code === "EACCES") { + return false; + } else { + throw er; + } + } + } + } +}); +var require_which = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports, module2) { + "use strict"; + var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys"; + var path4 = (0, import_chunk_QGM4M3NI.__require)("path"); + var COLON = isWindows ? ";" : ":"; + var isexe = require_isexe(); + var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }); + var getPathInfo = (cmd, opt) => { + const colon = opt.colon || COLON; + const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [ + // windows always checks the cwd first + ...isWindows ? [process.cwd()] : [], + ...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */ + "").split(colon) + ]; + const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : ""; + const pathExt = isWindows ? pathExtExe.split(colon) : [""]; + if (isWindows) { + if (cmd.indexOf(".") !== -1 && pathExt[0] !== "") + pathExt.unshift(""); + } + return { + pathEnv, + pathExt, + pathExtExe + }; + }; + var which = (cmd, opt, cb) => { + if (typeof opt === "function") { + cb = opt; + opt = {}; + } + if (!opt) + opt = {}; + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); + const found = []; + const step = (i) => new Promise((resolve, reject) => { + if (i === pathEnv.length) + return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd)); + const ppRaw = pathEnv[i]; + const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; + const pCmd = path4.join(pathPart, cmd); + const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; + resolve(subStep(p, i, 0)); + }); + const subStep = (p, i, ii) => new Promise((resolve, reject) => { + if (ii === pathExt.length) + return resolve(step(i + 1)); + const ext = pathExt[ii]; + isexe(p + ext, { pathExt: pathExtExe }, (er, is) => { + if (!er && is) { + if (opt.all) + found.push(p + ext); + else + return resolve(p + ext); + } + return resolve(subStep(p, i, ii + 1)); + }); + }); + return cb ? step(0).then((res) => cb(null, res), cb) : step(0); + }; + var whichSync = (cmd, opt) => { + opt = opt || {}; + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); + const found = []; + for (let i = 0; i < pathEnv.length; i++) { + const ppRaw = pathEnv[i]; + const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; + const pCmd = path4.join(pathPart, cmd); + const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; + for (let j = 0; j < pathExt.length; j++) { + const cur = p + pathExt[j]; + try { + const is = isexe.sync(cur, { pathExt: pathExtExe }); + if (is) { + if (opt.all) + found.push(cur); + else + return cur; + } + } catch (ex) { + } + } + } + if (opt.all && found.length) + return found; + if (opt.nothrow) + return null; + throw getNotFoundError(cmd); + }; + module2.exports = which; + which.sync = whichSync; + } +}); +var require_path_key = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports, module2) { + "use strict"; + var pathKey2 = (options = {}) => { + const environment = options.env || process.env; + const platform = options.platform || process.platform; + if (platform !== "win32") { + return "PATH"; + } + return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path"; + }; + module2.exports = pathKey2; + module2.exports.default = pathKey2; + } +}); +var require_resolveCommand = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module2) { + "use strict"; + var path4 = (0, import_chunk_QGM4M3NI.__require)("path"); + var which = require_which(); + var getPathKey = require_path_key(); + function resolveCommandAttempt(parsed, withoutPathExt) { + const env = parsed.options.env || process.env; + const cwd = process.cwd(); + const hasCustomCwd = parsed.options.cwd != null; + const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled; + if (shouldSwitchCwd) { + try { + process.chdir(parsed.options.cwd); + } catch (err) { + } + } + let resolved; + try { + resolved = which.sync(parsed.command, { + path: env[getPathKey({ env })], + pathExt: withoutPathExt ? path4.delimiter : void 0 + }); + } catch (e) { + } finally { + if (shouldSwitchCwd) { + process.chdir(cwd); + } + } + if (resolved) { + resolved = path4.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved); + } + return resolved; + } + function resolveCommand(parsed) { + return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); + } + module2.exports = resolveCommand; + } +}); +var require_escape = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"(exports, module2) { + "use strict"; + var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; + function escapeCommand(arg) { + arg = arg.replace(metaCharsRegExp, "^$1"); + return arg; + } + function escapeArgument(arg, doubleEscapeMetaChars) { + arg = `${arg}`; + arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"'); + arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1"); + arg = `"${arg}"`; + arg = arg.replace(metaCharsRegExp, "^$1"); + if (doubleEscapeMetaChars) { + arg = arg.replace(metaCharsRegExp, "^$1"); + } + return arg; + } + module2.exports.command = escapeCommand; + module2.exports.argument = escapeArgument; + } +}); +var require_shebang_regex = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports, module2) { + "use strict"; + module2.exports = /^#!(.*)/; + } +}); +var require_shebang_command = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports, module2) { + "use strict"; + var shebangRegex = require_shebang_regex(); + module2.exports = (string = "") => { + const match = string.match(shebangRegex); + if (!match) { + return null; + } + const [path4, argument] = match[0].replace(/#! ?/, "").split(" "); + const binary = path4.split("/").pop(); + if (binary === "env") { + return argument; + } + return argument ? `${binary} ${argument}` : binary; + }; + } +}); +var require_readShebang = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module2) { + "use strict"; + var fs2 = (0, import_chunk_QGM4M3NI.__require)("fs"); + var shebangCommand = require_shebang_command(); + function readShebang(command) { + const size = 150; + const buffer = Buffer.alloc(size); + let fd; + try { + fd = fs2.openSync(command, "r"); + fs2.readSync(fd, buffer, 0, size, 0); + fs2.closeSync(fd); + } catch (e) { + } + return shebangCommand(buffer.toString()); + } + module2.exports = readShebang; + } +}); +var require_parse = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports, module2) { + "use strict"; + var path4 = (0, import_chunk_QGM4M3NI.__require)("path"); + var resolveCommand = require_resolveCommand(); + var escape = require_escape(); + var readShebang = require_readShebang(); + var isWin = process.platform === "win32"; + var isExecutableRegExp = /\.(?:com|exe)$/i; + var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; + function detectShebang(parsed) { + parsed.file = resolveCommand(parsed); + const shebang = parsed.file && readShebang(parsed.file); + if (shebang) { + parsed.args.unshift(parsed.file); + parsed.command = shebang; + return resolveCommand(parsed); + } + return parsed.file; + } + function parseNonShell(parsed) { + if (!isWin) { + return parsed; + } + const commandFile = detectShebang(parsed); + const needsShell = !isExecutableRegExp.test(commandFile); + if (parsed.options.forceShell || needsShell) { + const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); + parsed.command = path4.normalize(parsed.command); + parsed.command = escape.command(parsed.command); + parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); + const shellCommand = [parsed.command].concat(parsed.args).join(" "); + parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`]; + parsed.command = process.env.comspec || "cmd.exe"; + parsed.options.windowsVerbatimArguments = true; + } + return parsed; + } + function parse(command, args, options) { + if (args && !Array.isArray(args)) { + options = args; + args = null; + } + args = args ? args.slice(0) : []; + options = Object.assign({}, options); + const parsed = { + command, + args, + options, + file: void 0, + original: { + command, + args + } + }; + return options.shell ? parsed : parseNonShell(parsed); + } + module2.exports = parse; + } +}); +var require_enoent = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"(exports, module2) { + "use strict"; + var isWin = process.platform === "win32"; + function notFoundError(original, syscall) { + return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { + code: "ENOENT", + errno: "ENOENT", + syscall: `${syscall} ${original.command}`, + path: original.command, + spawnargs: original.args + }); + } + function hookChildProcess(cp, parsed) { + if (!isWin) { + return; + } + const originalEmit = cp.emit; + cp.emit = function(name, arg1) { + if (name === "exit") { + const err = verifyENOENT(arg1, parsed); + if (err) { + return originalEmit.call(cp, "error", err); + } + } + return originalEmit.apply(cp, arguments); + }; + } + function verifyENOENT(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, "spawn"); + } + return null; + } + function verifyENOENTSync(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, "spawnSync"); + } + return null; + } + module2.exports = { + hookChildProcess, + verifyENOENT, + verifyENOENTSync, + notFoundError + }; + } +}); +var require_cross_spawn = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(exports, module2) { + "use strict"; + var cp = (0, import_chunk_QGM4M3NI.__require)("child_process"); + var parse = require_parse(); + var enoent = require_enoent(); + function spawn(command, args, options) { + const parsed = parse(command, args, options); + const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); + enoent.hookChildProcess(spawned, parsed); + return spawned; + } + function spawnSync(command, args, options) { + const parsed = parse(command, args, options); + const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); + result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); + return result; + } + module2.exports = spawn; + module2.exports.spawn = spawn; + module2.exports.sync = spawnSync; + module2.exports._parse = parse; + module2.exports._enoent = enoent; + } +}); +var require_merge_stream = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js"(exports, module2) { + "use strict"; + var { PassThrough } = (0, import_chunk_QGM4M3NI.__require)("stream"); + module2.exports = function() { + var sources = []; + var output = new PassThrough({ objectMode: true }); + output.setMaxListeners(0); + output.add = add; + output.isEmpty = isEmpty; + output.on("unpipe", remove); + Array.prototype.slice.call(arguments).forEach(add); + return output; + function add(source) { + if (Array.isArray(source)) { + source.forEach(add); + return this; + } + sources.push(source); + source.once("end", remove.bind(null, source)); + source.once("error", output.emit.bind(output, "error")); + source.pipe(output, { end: false }); + return this; + } + function isEmpty() { + return sources.length == 0; + } + function remove(source) { + sources = sources.filter(function(it) { + return it !== source; + }); + if (!sources.length && output.readable) { + output.end(); + } + } + }; + } +}); +var require_package = (0, import_chunk_QGM4M3NI.__commonJS)({ + "package.json"(exports, module2) { + module2.exports = { + name: "@prisma/fetch-engine", + version: "0.0.0", + description: "This package is intended for Prisma's internal use", + main: "dist/index.js", + types: "dist/index.d.ts", + license: "Apache-2.0", + author: "Tim Suchanek ", + homepage: "https://www.prisma.io", + repository: { + type: "git", + url: "https://github.com/prisma/prisma.git", + directory: "packages/fetch-engine" + }, + bugs: "https://github.com/prisma/prisma/issues", + enginesOverride: {}, + devDependencies: { + "@types/node": "18.19.76", + "@types/progress": "2.0.7", + del: "6.1.1", + execa: "8.0.1", + "find-cache-dir": "5.0.0", + "fs-extra": "11.3.0", + hasha: "5.2.2", + "http-proxy-agent": "7.0.2", + "https-proxy-agent": "7.0.6", + kleur: "4.1.5", + "node-fetch": "3.3.2", + "p-filter": "4.1.0", + "p-map": "4.0.0", + "p-retry": "4.6.2", + progress: "2.0.3", + "temp-dir": "2.0.0", + tempy: "1.0.1", + "timeout-signal": "2.0.0", + typescript: "5.4.5" + }, + dependencies: { + "@prisma/debug": "workspace:*", + "@prisma/engines-version": "7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7", + "@prisma/get-platform": "workspace:*" + }, + scripts: { + dev: "DEV=true tsx helpers/build.ts", + build: "tsx helpers/build.ts", + test: "vitest run", + prepublishOnly: "pnpm run build" + }, + files: [ + "README.md", + "dist" + ], + sideEffects: false + }; + } +}); +var import_cross_spawn = (0, import_chunk_QGM4M3NI.__toESM)(require_cross_spawn(), 1); +function stripFinalNewline(input) { + const LF = typeof input === "string" ? "\n" : "\n".charCodeAt(); + const CR = typeof input === "string" ? "\r" : "\r".charCodeAt(); + if (input[input.length - 1] === LF) { + input = input.slice(0, -1); + } + if (input[input.length - 1] === CR) { + input = input.slice(0, -1); + } + return input; +} +function pathKey(options = {}) { + const { + env = process.env, + platform = process.platform + } = options; + if (platform !== "win32") { + return "PATH"; + } + return Object.keys(env).reverse().find((key) => key.toUpperCase() === "PATH") || "Path"; +} +var npmRunPath = ({ + cwd = import_node_process2.default.cwd(), + path: pathOption = import_node_process2.default.env[pathKey()], + preferLocal = true, + execPath = import_node_process2.default.execPath, + addExecPath = true +} = {}) => { + const cwdString = cwd instanceof URL ? (0, import_node_url.fileURLToPath)(cwd) : cwd; + const cwdPath = import_node_path3.default.resolve(cwdString); + const result = []; + if (preferLocal) { + applyPreferLocal(result, cwdPath); + } + if (addExecPath) { + applyExecPath(result, execPath, cwdPath); + } + return [...result, pathOption].join(import_node_path3.default.delimiter); +}; +var applyPreferLocal = (result, cwdPath) => { + let previous; + while (previous !== cwdPath) { + result.push(import_node_path3.default.join(cwdPath, "node_modules/.bin")); + previous = cwdPath; + cwdPath = import_node_path3.default.resolve(cwdPath, ".."); + } +}; +var applyExecPath = (result, execPath, cwdPath) => { + const execPathString = execPath instanceof URL ? (0, import_node_url.fileURLToPath)(execPath) : execPath; + result.push(import_node_path3.default.resolve(cwdPath, execPathString, "..")); +}; +var npmRunPathEnv = ({ env = import_node_process2.default.env, ...options } = {}) => { + env = { ...env }; + const pathName = pathKey({ env }); + options.path = env[pathName]; + env[pathName] = npmRunPath(options); + return env; +}; +var copyProperty = (to, from, property, ignoreNonConfigurable) => { + if (property === "length" || property === "prototype") { + return; + } + if (property === "arguments" || property === "caller") { + return; + } + const toDescriptor = Object.getOwnPropertyDescriptor(to, property); + const fromDescriptor = Object.getOwnPropertyDescriptor(from, property); + if (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) { + return; + } + Object.defineProperty(to, property, fromDescriptor); +}; +var canCopyProperty = function(toDescriptor, fromDescriptor) { + return toDescriptor === void 0 || toDescriptor.configurable || toDescriptor.writable === fromDescriptor.writable && toDescriptor.enumerable === fromDescriptor.enumerable && toDescriptor.configurable === fromDescriptor.configurable && (toDescriptor.writable || toDescriptor.value === fromDescriptor.value); +}; +var changePrototype = (to, from) => { + const fromPrototype = Object.getPrototypeOf(from); + if (fromPrototype === Object.getPrototypeOf(to)) { + return; + } + Object.setPrototypeOf(to, fromPrototype); +}; +var wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/ +${fromBody}`; +var toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, "toString"); +var toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, "name"); +var changeToString = (to, from, name) => { + const withName = name === "" ? "" : `with ${name.trim()}() `; + const newToString = wrappedToString.bind(null, withName, from.toString()); + Object.defineProperty(newToString, "name", toStringName); + Object.defineProperty(to, "toString", { ...toStringDescriptor, value: newToString }); +}; +function mimicFunction(to, from, { ignoreNonConfigurable = false } = {}) { + const { name } = to; + for (const property of Reflect.ownKeys(from)) { + copyProperty(to, from, property, ignoreNonConfigurable); + } + changePrototype(to, from); + changeToString(to, from, name); + return to; +} +var calledFunctions = /* @__PURE__ */ new WeakMap(); +var onetime = (function_, options = {}) => { + if (typeof function_ !== "function") { + throw new TypeError("Expected a function"); + } + let returnValue; + let callCount = 0; + const functionName = function_.displayName || function_.name || ""; + const onetime2 = function(...arguments_) { + calledFunctions.set(onetime2, ++callCount); + if (callCount === 1) { + returnValue = function_.apply(this, arguments_); + function_ = null; + } else if (options.throw === true) { + throw new Error(`Function \`${functionName}\` can only be called once`); + } + return returnValue; + }; + mimicFunction(onetime2, function_); + calledFunctions.set(onetime2, callCount); + return onetime2; +}; +onetime.callCount = (function_) => { + if (!calledFunctions.has(function_)) { + throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`); + } + return calledFunctions.get(function_); +}; +var onetime_default = onetime; +var getRealtimeSignals = () => { + const length = SIGRTMAX - SIGRTMIN + 1; + return Array.from({ length }, getRealtimeSignal); +}; +var getRealtimeSignal = (value, index) => ({ + name: `SIGRT${index + 1}`, + number: SIGRTMIN + index, + action: "terminate", + description: "Application-specific signal (realtime)", + standard: "posix" +}); +var SIGRTMIN = 34; +var SIGRTMAX = 64; +var SIGNALS = [ + { + name: "SIGHUP", + number: 1, + action: "terminate", + description: "Terminal closed", + standard: "posix" + }, + { + name: "SIGINT", + number: 2, + action: "terminate", + description: "User interruption with CTRL-C", + standard: "ansi" + }, + { + name: "SIGQUIT", + number: 3, + action: "core", + description: "User interruption with CTRL-\\", + standard: "posix" + }, + { + name: "SIGILL", + number: 4, + action: "core", + description: "Invalid machine instruction", + standard: "ansi" + }, + { + name: "SIGTRAP", + number: 5, + action: "core", + description: "Debugger breakpoint", + standard: "posix" + }, + { + name: "SIGABRT", + number: 6, + action: "core", + description: "Aborted", + standard: "ansi" + }, + { + name: "SIGIOT", + number: 6, + action: "core", + description: "Aborted", + standard: "bsd" + }, + { + name: "SIGBUS", + number: 7, + action: "core", + description: "Bus error due to misaligned, non-existing address or paging error", + standard: "bsd" + }, + { + name: "SIGEMT", + number: 7, + action: "terminate", + description: "Command should be emulated but is not implemented", + standard: "other" + }, + { + name: "SIGFPE", + number: 8, + action: "core", + description: "Floating point arithmetic error", + standard: "ansi" + }, + { + name: "SIGKILL", + number: 9, + action: "terminate", + description: "Forced termination", + standard: "posix", + forced: true + }, + { + name: "SIGUSR1", + number: 10, + action: "terminate", + description: "Application-specific signal", + standard: "posix" + }, + { + name: "SIGSEGV", + number: 11, + action: "core", + description: "Segmentation fault", + standard: "ansi" + }, + { + name: "SIGUSR2", + number: 12, + action: "terminate", + description: "Application-specific signal", + standard: "posix" + }, + { + name: "SIGPIPE", + number: 13, + action: "terminate", + description: "Broken pipe or socket", + standard: "posix" + }, + { + name: "SIGALRM", + number: 14, + action: "terminate", + description: "Timeout or timer", + standard: "posix" + }, + { + name: "SIGTERM", + number: 15, + action: "terminate", + description: "Termination", + standard: "ansi" + }, + { + name: "SIGSTKFLT", + number: 16, + action: "terminate", + description: "Stack is empty or overflowed", + standard: "other" + }, + { + name: "SIGCHLD", + number: 17, + action: "ignore", + description: "Child process terminated, paused or unpaused", + standard: "posix" + }, + { + name: "SIGCLD", + number: 17, + action: "ignore", + description: "Child process terminated, paused or unpaused", + standard: "other" + }, + { + name: "SIGCONT", + number: 18, + action: "unpause", + description: "Unpaused", + standard: "posix", + forced: true + }, + { + name: "SIGSTOP", + number: 19, + action: "pause", + description: "Paused", + standard: "posix", + forced: true + }, + { + name: "SIGTSTP", + number: 20, + action: "pause", + description: 'Paused using CTRL-Z or "suspend"', + standard: "posix" + }, + { + name: "SIGTTIN", + number: 21, + action: "pause", + description: "Background process cannot read terminal input", + standard: "posix" + }, + { + name: "SIGBREAK", + number: 21, + action: "terminate", + description: "User interruption with CTRL-BREAK", + standard: "other" + }, + { + name: "SIGTTOU", + number: 22, + action: "pause", + description: "Background process cannot write to terminal output", + standard: "posix" + }, + { + name: "SIGURG", + number: 23, + action: "ignore", + description: "Socket received out-of-band data", + standard: "bsd" + }, + { + name: "SIGXCPU", + number: 24, + action: "core", + description: "Process timed out", + standard: "bsd" + }, + { + name: "SIGXFSZ", + number: 25, + action: "core", + description: "File too big", + standard: "bsd" + }, + { + name: "SIGVTALRM", + number: 26, + action: "terminate", + description: "Timeout or timer", + standard: "bsd" + }, + { + name: "SIGPROF", + number: 27, + action: "terminate", + description: "Timeout or timer", + standard: "bsd" + }, + { + name: "SIGWINCH", + number: 28, + action: "ignore", + description: "Terminal window size changed", + standard: "bsd" + }, + { + name: "SIGIO", + number: 29, + action: "terminate", + description: "I/O is available", + standard: "other" + }, + { + name: "SIGPOLL", + number: 29, + action: "terminate", + description: "Watched event", + standard: "other" + }, + { + name: "SIGINFO", + number: 29, + action: "ignore", + description: "Request for process information", + standard: "other" + }, + { + name: "SIGPWR", + number: 30, + action: "terminate", + description: "Device running out of power", + standard: "systemv" + }, + { + name: "SIGSYS", + number: 31, + action: "core", + description: "Invalid system call", + standard: "other" + }, + { + name: "SIGUNUSED", + number: 31, + action: "terminate", + description: "Invalid system call", + standard: "other" + } +]; +var getSignals = () => { + const realtimeSignals = getRealtimeSignals(); + const signals2 = [...SIGNALS, ...realtimeSignals].map(normalizeSignal); + return signals2; +}; +var normalizeSignal = ({ + name, + number: defaultNumber, + description, + action, + forced = false, + standard +}) => { + const { + signals: { [name]: constantSignal } + } = import_node_os2.constants; + const supported = constantSignal !== void 0; + const number = supported ? constantSignal : defaultNumber; + return { name, number, description, supported, action, forced, standard }; +}; +var getSignalsByName = () => { + const signals2 = getSignals(); + return Object.fromEntries(signals2.map(getSignalByName)); +}; +var getSignalByName = ({ + name, + number, + description, + supported, + action, + forced, + standard +}) => [name, { name, number, description, supported, action, forced, standard }]; +var signalsByName = getSignalsByName(); +var getSignalsByNumber = () => { + const signals2 = getSignals(); + const length = SIGRTMAX + 1; + const signalsA = Array.from( + { length }, + (value, number) => getSignalByNumber(number, signals2) + ); + return Object.assign({}, ...signalsA); +}; +var getSignalByNumber = (number, signals2) => { + const signal = findSignalByNumber(number, signals2); + if (signal === void 0) { + return {}; + } + const { name, description, supported, action, forced, standard } = signal; + return { + [number]: { + name, + number, + description, + supported, + action, + forced, + standard + } + }; +}; +var findSignalByNumber = (number, signals2) => { + const signal = signals2.find(({ name }) => import_node_os.constants.signals[name] === number); + if (signal !== void 0) { + return signal; + } + return signals2.find((signalA) => signalA.number === number); +}; +var signalsByNumber = getSignalsByNumber(); +var getErrorPrefix = ({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }) => { + if (timedOut) { + return `timed out after ${timeout} milliseconds`; + } + if (isCanceled) { + return "was canceled"; + } + if (errorCode !== void 0) { + return `failed with ${errorCode}`; + } + if (signal !== void 0) { + return `was killed with ${signal} (${signalDescription})`; + } + if (exitCode !== void 0) { + return `failed with exit code ${exitCode}`; + } + return "failed"; +}; +var makeError = ({ + stdout, + stderr, + all, + error, + signal, + exitCode, + command, + escapedCommand, + timedOut, + isCanceled, + killed, + parsed: { options: { timeout, cwd = import_node_process3.default.cwd() } } +}) => { + exitCode = exitCode === null ? void 0 : exitCode; + signal = signal === null ? void 0 : signal; + const signalDescription = signal === void 0 ? void 0 : signalsByName[signal].description; + const errorCode = error && error.code; + const prefix = getErrorPrefix({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }); + const execaMessage = `Command ${prefix}: ${command}`; + const isError = Object.prototype.toString.call(error) === "[object Error]"; + const shortMessage = isError ? `${execaMessage} +${error.message}` : execaMessage; + const message = [shortMessage, stderr, stdout].filter(Boolean).join("\n"); + if (isError) { + error.originalMessage = error.message; + error.message = message; + } else { + error = new Error(message); + } + error.shortMessage = shortMessage; + error.command = command; + error.escapedCommand = escapedCommand; + error.exitCode = exitCode; + error.signal = signal; + error.signalDescription = signalDescription; + error.stdout = stdout; + error.stderr = stderr; + error.cwd = cwd; + if (all !== void 0) { + error.all = all; + } + if ("bufferedData" in error) { + delete error.bufferedData; + } + error.failed = true; + error.timedOut = Boolean(timedOut); + error.isCanceled = isCanceled; + error.killed = killed && !timedOut; + return error; +}; +var aliases = ["stdin", "stdout", "stderr"]; +var hasAlias = (options) => aliases.some((alias) => options[alias] !== void 0); +var normalizeStdio = (options) => { + if (!options) { + return; + } + const { stdio } = options; + if (stdio === void 0) { + return aliases.map((alias) => options[alias]); + } + if (hasAlias(options)) { + throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map((alias) => `\`${alias}\``).join(", ")}`); + } + if (typeof stdio === "string") { + return stdio; + } + if (!Array.isArray(stdio)) { + throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); + } + const length = Math.max(stdio.length, aliases.length); + return Array.from({ length }, (value, index) => stdio[index]); +}; +var signals = []; +signals.push("SIGHUP", "SIGINT", "SIGTERM"); +if (process.platform !== "win32") { + signals.push( + "SIGALRM", + "SIGABRT", + "SIGVTALRM", + "SIGXCPU", + "SIGXFSZ", + "SIGUSR2", + "SIGTRAP", + "SIGSYS", + "SIGQUIT", + "SIGIOT" + // should detect profiler and enable/disable accordingly. + // see #21 + // 'SIGPROF' + ); +} +if (process.platform === "linux") { + signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT"); +} +var processOk = (process7) => !!process7 && typeof process7 === "object" && typeof process7.removeListener === "function" && typeof process7.emit === "function" && typeof process7.reallyExit === "function" && typeof process7.listeners === "function" && typeof process7.kill === "function" && typeof process7.pid === "number" && typeof process7.on === "function"; +var kExitEmitter = Symbol.for("signal-exit emitter"); +var global2 = globalThis; +var ObjectDefineProperty = Object.defineProperty.bind(Object); +var Emitter = class { + emitted = { + afterExit: false, + exit: false + }; + listeners = { + afterExit: [], + exit: [] + }; + count = 0; + id = Math.random(); + constructor() { + if (global2[kExitEmitter]) { + return global2[kExitEmitter]; + } + ObjectDefineProperty(global2, kExitEmitter, { + value: this, + writable: false, + enumerable: false, + configurable: false + }); + } + on(ev, fn) { + this.listeners[ev].push(fn); + } + removeListener(ev, fn) { + const list = this.listeners[ev]; + const i = list.indexOf(fn); + if (i === -1) { + return; + } + if (i === 0 && list.length === 1) { + list.length = 0; + } else { + list.splice(i, 1); + } + } + emit(ev, code, signal) { + if (this.emitted[ev]) { + return false; + } + this.emitted[ev] = true; + let ret = false; + for (const fn of this.listeners[ev]) { + ret = fn(code, signal) === true || ret; + } + if (ev === "exit") { + ret = this.emit("afterExit", code, signal) || ret; + } + return ret; + } +}; +var SignalExitBase = class { +}; +var signalExitWrap = (handler) => { + return { + onExit(cb, opts) { + return handler.onExit(cb, opts); + }, + load() { + return handler.load(); + }, + unload() { + return handler.unload(); + } + }; +}; +var SignalExitFallback = class extends SignalExitBase { + onExit() { + return () => { + }; + } + load() { + } + unload() { + } +}; +var SignalExit = class extends SignalExitBase { + // "SIGHUP" throws an `ENOSYS` error on Windows, + // so use a supported signal instead + /* c8 ignore start */ + #hupSig = process4.platform === "win32" ? "SIGINT" : "SIGHUP"; + /* c8 ignore stop */ + #emitter = new Emitter(); + #process; + #originalProcessEmit; + #originalProcessReallyExit; + #sigListeners = {}; + #loaded = false; + constructor(process7) { + super(); + this.#process = process7; + this.#sigListeners = {}; + for (const sig of signals) { + this.#sigListeners[sig] = () => { + const listeners = this.#process.listeners(sig); + let { count } = this.#emitter; + const p = process7; + if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") { + count += p.__signal_exit_emitter__.count; + } + if (listeners.length === count) { + this.unload(); + const ret = this.#emitter.emit("exit", null, sig); + const s = sig === "SIGHUP" ? this.#hupSig : sig; + if (!ret) + process7.kill(process7.pid, s); + } + }; + } + this.#originalProcessReallyExit = process7.reallyExit; + this.#originalProcessEmit = process7.emit; + } + onExit(cb, opts) { + if (!processOk(this.#process)) { + return () => { + }; + } + if (this.#loaded === false) { + this.load(); + } + const ev = opts?.alwaysLast ? "afterExit" : "exit"; + this.#emitter.on(ev, cb); + return () => { + this.#emitter.removeListener(ev, cb); + if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) { + this.unload(); + } + }; + } + load() { + if (this.#loaded) { + return; + } + this.#loaded = true; + this.#emitter.count += 1; + for (const sig of signals) { + try { + const fn = this.#sigListeners[sig]; + if (fn) + this.#process.on(sig, fn); + } catch (_) { + } + } + this.#process.emit = (ev, ...a) => { + return this.#processEmit(ev, ...a); + }; + this.#process.reallyExit = (code) => { + return this.#processReallyExit(code); + }; + } + unload() { + if (!this.#loaded) { + return; + } + this.#loaded = false; + signals.forEach((sig) => { + const listener = this.#sigListeners[sig]; + if (!listener) { + throw new Error("Listener not defined for signal: " + sig); + } + try { + this.#process.removeListener(sig, listener); + } catch (_) { + } + }); + this.#process.emit = this.#originalProcessEmit; + this.#process.reallyExit = this.#originalProcessReallyExit; + this.#emitter.count -= 1; + } + #processReallyExit(code) { + if (!processOk(this.#process)) { + return 0; + } + this.#process.exitCode = code || 0; + this.#emitter.emit("exit", this.#process.exitCode, null); + return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode); + } + #processEmit(ev, ...args) { + const og = this.#originalProcessEmit; + if (ev === "exit" && processOk(this.#process)) { + if (typeof args[0] === "number") { + this.#process.exitCode = args[0]; + } + const ret = og.call(this.#process, ev, ...args); + this.#emitter.emit("exit", this.#process.exitCode, null); + return ret; + } else { + return og.call(this.#process, ev, ...args); + } + } +}; +var process4 = globalThis.process; +var { + /** + * Called when the process is exiting, whether via signal, explicit + * exit, or running out of stuff to do. + * + * If the global process object is not suitable for instrumentation, + * then this will be a no-op. + * + * Returns a function that may be used to unload signal-exit. + */ + onExit, + /** + * Load the listeners. Likely you never need to call this, unless + * doing a rather deep integration with signal-exit functionality. + * Mostly exposed for the benefit of testing. + * + * @internal + */ + load, + /** + * Unload the listeners. Likely you never need to call this, unless + * doing a rather deep integration with signal-exit functionality. + * Mostly exposed for the benefit of testing. + * + * @internal + */ + unload +} = signalExitWrap(processOk(process4) ? new SignalExit(process4) : new SignalExitFallback()); +var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5; +var spawnedKill = (kill, signal = "SIGTERM", options = {}) => { + const killResult = kill(signal); + setKillTimeout(kill, signal, options, killResult); + return killResult; +}; +var setKillTimeout = (kill, signal, options, killResult) => { + if (!shouldForceKill(signal, options, killResult)) { + return; + } + const timeout = getForceKillAfterTimeout(options); + const t = setTimeout(() => { + kill("SIGKILL"); + }, timeout); + if (t.unref) { + t.unref(); + } +}; +var shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => isSigterm(signal) && forceKillAfterTimeout !== false && killResult; +var isSigterm = (signal) => signal === import_node_os3.default.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM"; +var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => { + if (forceKillAfterTimeout === true) { + return DEFAULT_FORCE_KILL_TIMEOUT; + } + if (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) { + throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`); + } + return forceKillAfterTimeout; +}; +var spawnedCancel = (spawned, context) => { + const killResult = spawned.kill(); + if (killResult) { + context.isCanceled = true; + } +}; +var timeoutKill = (spawned, signal, reject) => { + spawned.kill(signal); + reject(Object.assign(new Error("Timed out"), { timedOut: true, signal })); +}; +var setupTimeout = (spawned, { timeout, killSignal = "SIGTERM" }, spawnedPromise) => { + if (timeout === 0 || timeout === void 0) { + return spawnedPromise; + } + let timeoutId; + const timeoutPromise = new Promise((resolve, reject) => { + timeoutId = setTimeout(() => { + timeoutKill(spawned, killSignal, reject); + }, timeout); + }); + const safeSpawnedPromise = spawnedPromise.finally(() => { + clearTimeout(timeoutId); + }); + return Promise.race([timeoutPromise, safeSpawnedPromise]); +}; +var validateTimeout = ({ timeout }) => { + if (timeout !== void 0 && (!Number.isFinite(timeout) || timeout < 0)) { + throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`); + } +}; +var setExitHandler = async (spawned, { cleanup, detached }, timedPromise) => { + if (!cleanup || detached) { + return timedPromise; + } + const removeExitHandler = onExit(() => { + spawned.kill(); + }); + return timedPromise.finally(() => { + removeExitHandler(); + }); +}; +function isStream(stream) { + return stream !== null && typeof stream === "object" && typeof stream.pipe === "function"; +} +function isWritableStream(stream) { + return isStream(stream) && stream.writable !== false && typeof stream._write === "function" && typeof stream._writableState === "object"; +} +var isExecaChildProcess = (target) => target instanceof import_node_child_process2.ChildProcess && typeof target.then === "function"; +var pipeToTarget = (spawned, streamName, target) => { + if (typeof target === "string") { + spawned[streamName].pipe((0, import_node_fs2.createWriteStream)(target)); + return spawned; + } + if (isWritableStream(target)) { + spawned[streamName].pipe(target); + return spawned; + } + if (!isExecaChildProcess(target)) { + throw new TypeError("The second argument must be a string, a stream or an Execa child process."); + } + if (!isWritableStream(target.stdin)) { + throw new TypeError("The target child process's stdin must be available."); + } + spawned[streamName].pipe(target.stdin); + return target; +}; +var addPipeMethods = (spawned) => { + if (spawned.stdout !== null) { + spawned.pipeStdout = pipeToTarget.bind(void 0, spawned, "stdout"); + } + if (spawned.stderr !== null) { + spawned.pipeStderr = pipeToTarget.bind(void 0, spawned, "stderr"); + } + if (spawned.all !== void 0) { + spawned.pipeAll = pipeToTarget.bind(void 0, spawned, "all"); + } +}; +var getStreamContents = async (stream, { init, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize }, { maxBuffer = Number.POSITIVE_INFINITY } = {}) => { + if (!isAsyncIterable(stream)) { + throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable."); + } + const state = init(); + state.length = 0; + try { + for await (const chunk of stream) { + const chunkType = getChunkType(chunk); + const convertedChunk = convertChunk[chunkType](chunk, state); + appendChunk({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer }); + } + appendFinalChunk({ state, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, maxBuffer }); + return finalize(state); + } catch (error) { + error.bufferedData = finalize(state); + throw error; + } +}; +var appendFinalChunk = ({ state, getSize, truncateChunk, addChunk, getFinalChunk, maxBuffer }) => { + const convertedChunk = getFinalChunk(state); + if (convertedChunk !== void 0) { + appendChunk({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer }); + } +}; +var appendChunk = ({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer }) => { + const chunkSize = getSize(convertedChunk); + const newLength = state.length + chunkSize; + if (newLength <= maxBuffer) { + addNewChunk(convertedChunk, state, addChunk, newLength); + return; + } + const truncatedChunk = truncateChunk(convertedChunk, maxBuffer - state.length); + if (truncatedChunk !== void 0) { + addNewChunk(truncatedChunk, state, addChunk, maxBuffer); + } + throw new MaxBufferError(); +}; +var addNewChunk = (convertedChunk, state, addChunk, newLength) => { + state.contents = addChunk(convertedChunk, state, newLength); + state.length = newLength; +}; +var isAsyncIterable = (stream) => typeof stream === "object" && stream !== null && typeof stream[Symbol.asyncIterator] === "function"; +var getChunkType = (chunk) => { + const typeOfChunk = typeof chunk; + if (typeOfChunk === "string") { + return "string"; + } + if (typeOfChunk !== "object" || chunk === null) { + return "others"; + } + if (globalThis.Buffer?.isBuffer(chunk)) { + return "buffer"; + } + const prototypeName = objectToString.call(chunk); + if (prototypeName === "[object ArrayBuffer]") { + return "arrayBuffer"; + } + if (prototypeName === "[object DataView]") { + return "dataView"; + } + if (Number.isInteger(chunk.byteLength) && Number.isInteger(chunk.byteOffset) && objectToString.call(chunk.buffer) === "[object ArrayBuffer]") { + return "typedArray"; + } + return "others"; +}; +var { toString: objectToString } = Object.prototype; +var MaxBufferError = class extends Error { + name = "MaxBufferError"; + constructor() { + super("maxBuffer exceeded"); + } +}; +var identity = (value) => value; +var noop = () => void 0; +var getContentsProp = ({ contents }) => contents; +var throwObjectStream = (chunk) => { + throw new Error(`Streams in object mode are not supported: ${String(chunk)}`); +}; +var getLengthProp = (convertedChunk) => convertedChunk.length; +async function getStreamAsArrayBuffer(stream, options) { + return getStreamContents(stream, arrayBufferMethods, options); +} +var initArrayBuffer = () => ({ contents: new ArrayBuffer(0) }); +var useTextEncoder = (chunk) => textEncoder.encode(chunk); +var textEncoder = new TextEncoder(); +var useUint8Array = (chunk) => new Uint8Array(chunk); +var useUint8ArrayWithOffset = (chunk) => new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength); +var truncateArrayBufferChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize); +var addArrayBufferChunk = (convertedChunk, { contents, length: previousLength }, length) => { + const newContents = hasArrayBufferResize() ? resizeArrayBuffer(contents, length) : resizeArrayBufferSlow(contents, length); + new Uint8Array(newContents).set(convertedChunk, previousLength); + return newContents; +}; +var resizeArrayBufferSlow = (contents, length) => { + if (length <= contents.byteLength) { + return contents; + } + const arrayBuffer = new ArrayBuffer(getNewContentsLength(length)); + new Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0); + return arrayBuffer; +}; +var resizeArrayBuffer = (contents, length) => { + if (length <= contents.maxByteLength) { + contents.resize(length); + return contents; + } + const arrayBuffer = new ArrayBuffer(length, { maxByteLength: getNewContentsLength(length) }); + new Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0); + return arrayBuffer; +}; +var getNewContentsLength = (length) => SCALE_FACTOR ** Math.ceil(Math.log(length) / Math.log(SCALE_FACTOR)); +var SCALE_FACTOR = 2; +var finalizeArrayBuffer = ({ contents, length }) => hasArrayBufferResize() ? contents : contents.slice(0, length); +var hasArrayBufferResize = () => "resize" in ArrayBuffer.prototype; +var arrayBufferMethods = { + init: initArrayBuffer, + convertChunk: { + string: useTextEncoder, + buffer: useUint8Array, + arrayBuffer: useUint8Array, + dataView: useUint8ArrayWithOffset, + typedArray: useUint8ArrayWithOffset, + others: throwObjectStream + }, + getSize: getLengthProp, + truncateChunk: truncateArrayBufferChunk, + addChunk: addArrayBufferChunk, + getFinalChunk: noop, + finalize: finalizeArrayBuffer +}; +async function getStreamAsBuffer(stream, options) { + if (!("Buffer" in globalThis)) { + throw new Error("getStreamAsBuffer() is only supported in Node.js"); + } + try { + return arrayBufferToNodeBuffer(await getStreamAsArrayBuffer(stream, options)); + } catch (error) { + if (error.bufferedData !== void 0) { + error.bufferedData = arrayBufferToNodeBuffer(error.bufferedData); + } + throw error; + } +} +var arrayBufferToNodeBuffer = (arrayBuffer) => globalThis.Buffer.from(arrayBuffer); +async function getStreamAsString(stream, options) { + return getStreamContents(stream, stringMethods, options); +} +var initString = () => ({ contents: "", textDecoder: new TextDecoder() }); +var useTextDecoder = (chunk, { textDecoder }) => textDecoder.decode(chunk, { stream: true }); +var addStringChunk = (convertedChunk, { contents }) => contents + convertedChunk; +var truncateStringChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize); +var getFinalStringChunk = ({ textDecoder }) => { + const finalChunk = textDecoder.decode(); + return finalChunk === "" ? void 0 : finalChunk; +}; +var stringMethods = { + init: initString, + convertChunk: { + string: identity, + buffer: useTextDecoder, + arrayBuffer: useTextDecoder, + dataView: useTextDecoder, + typedArray: useTextDecoder, + others: throwObjectStream + }, + getSize: getLengthProp, + truncateChunk: truncateStringChunk, + addChunk: addStringChunk, + getFinalChunk: getFinalStringChunk, + finalize: getContentsProp +}; +var import_merge_stream = (0, import_chunk_QGM4M3NI.__toESM)(require_merge_stream(), 1); +var validateInputOptions = (input) => { + if (input !== void 0) { + throw new TypeError("The `input` and `inputFile` options cannot be both set."); + } +}; +var getInputSync = ({ input, inputFile }) => { + if (typeof inputFile !== "string") { + return input; + } + validateInputOptions(input); + return (0, import_node_fs3.readFileSync)(inputFile); +}; +var handleInputSync = (options) => { + const input = getInputSync(options); + if (isStream(input)) { + throw new TypeError("The `input` option cannot be a stream in sync mode"); + } + return input; +}; +var getInput = ({ input, inputFile }) => { + if (typeof inputFile !== "string") { + return input; + } + validateInputOptions(input); + return (0, import_node_fs3.createReadStream)(inputFile); +}; +var handleInput = (spawned, options) => { + const input = getInput(options); + if (input === void 0) { + return; + } + if (isStream(input)) { + input.pipe(spawned.stdin); + } else { + spawned.stdin.end(input); + } +}; +var makeAllStream = (spawned, { all }) => { + if (!all || !spawned.stdout && !spawned.stderr) { + return; + } + const mixed = (0, import_merge_stream.default)(); + if (spawned.stdout) { + mixed.add(spawned.stdout); + } + if (spawned.stderr) { + mixed.add(spawned.stderr); + } + return mixed; +}; +var getBufferedData = async (stream, streamPromise) => { + if (!stream || streamPromise === void 0) { + return; + } + await (0, import_promises.setTimeout)(0); + stream.destroy(); + try { + return await streamPromise; + } catch (error) { + return error.bufferedData; + } +}; +var getStreamPromise = (stream, { encoding, buffer, maxBuffer }) => { + if (!stream || !buffer) { + return; + } + if (encoding === "utf8" || encoding === "utf-8") { + return getStreamAsString(stream, { maxBuffer }); + } + if (encoding === null || encoding === "buffer") { + return getStreamAsBuffer(stream, { maxBuffer }); + } + return applyEncoding(stream, maxBuffer, encoding); +}; +var applyEncoding = async (stream, maxBuffer, encoding) => { + const buffer = await getStreamAsBuffer(stream, { maxBuffer }); + return buffer.toString(encoding); +}; +var getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer, maxBuffer }, processDone) => { + const stdoutPromise = getStreamPromise(stdout, { encoding, buffer, maxBuffer }); + const stderrPromise = getStreamPromise(stderr, { encoding, buffer, maxBuffer }); + const allPromise = getStreamPromise(all, { encoding, buffer, maxBuffer: maxBuffer * 2 }); + try { + return await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]); + } catch (error) { + return Promise.all([ + { error, signal: error.signal, timedOut: error.timedOut }, + getBufferedData(stdout, stdoutPromise), + getBufferedData(stderr, stderrPromise), + getBufferedData(all, allPromise) + ]); + } +}; +var nativePromisePrototype = (async () => { +})().constructor.prototype; +var descriptors = ["then", "catch", "finally"].map((property) => [ + property, + Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property) +]); +var mergePromise = (spawned, promise) => { + for (const [property, descriptor] of descriptors) { + const value = typeof promise === "function" ? (...args) => Reflect.apply(descriptor.value, promise(), args) : descriptor.value.bind(promise); + Reflect.defineProperty(spawned, property, { ...descriptor, value }); + } +}; +var getSpawnedPromise = (spawned) => new Promise((resolve, reject) => { + spawned.on("exit", (exitCode, signal) => { + resolve({ exitCode, signal }); + }); + spawned.on("error", (error) => { + reject(error); + }); + if (spawned.stdin) { + spawned.stdin.on("error", (error) => { + reject(error); + }); + } +}); +var normalizeArgs = (file, args = []) => { + if (!Array.isArray(args)) { + return [file]; + } + return [file, ...args]; +}; +var NO_ESCAPE_REGEXP = /^[\w.-]+$/; +var escapeArg = (arg) => { + if (typeof arg !== "string" || NO_ESCAPE_REGEXP.test(arg)) { + return arg; + } + return `"${arg.replaceAll('"', '\\"')}"`; +}; +var joinCommand = (file, args) => normalizeArgs(file, args).join(" "); +var getEscapedCommand = (file, args) => normalizeArgs(file, args).map((arg) => escapeArg(arg)).join(" "); +var SPACES_REGEXP = / +/g; +var parseExpression = (expression) => { + const typeOfExpression = typeof expression; + if (typeOfExpression === "string") { + return expression; + } + if (typeOfExpression === "number") { + return String(expression); + } + if (typeOfExpression === "object" && expression !== null && !(expression instanceof import_node_child_process3.ChildProcess) && "stdout" in expression) { + const typeOfStdout = typeof expression.stdout; + if (typeOfStdout === "string") { + return expression.stdout; + } + if (import_node_buffer2.Buffer.isBuffer(expression.stdout)) { + return expression.stdout.toString(); + } + throw new TypeError(`Unexpected "${typeOfStdout}" stdout in template expression`); + } + throw new TypeError(`Unexpected "${typeOfExpression}" in template expression`); +}; +var concatTokens = (tokens, nextTokens, isNew) => isNew || tokens.length === 0 || nextTokens.length === 0 ? [...tokens, ...nextTokens] : [ + ...tokens.slice(0, -1), + `${tokens.at(-1)}${nextTokens[0]}`, + ...nextTokens.slice(1) +]; +var parseTemplate = ({ templates, expressions, tokens, index, template }) => { + const templateString = template ?? templates.raw[index]; + const templateTokens = templateString.split(SPACES_REGEXP).filter(Boolean); + const newTokens = concatTokens( + tokens, + templateTokens, + templateString.startsWith(" ") + ); + if (index === expressions.length) { + return newTokens; + } + const expression = expressions[index]; + const expressionTokens = Array.isArray(expression) ? expression.map((expression2) => parseExpression(expression2)) : [parseExpression(expression)]; + return concatTokens( + newTokens, + expressionTokens, + templateString.endsWith(" ") + ); +}; +var parseTemplates = (templates, expressions) => { + let tokens = []; + for (const [index, template] of templates.entries()) { + tokens = parseTemplate({ templates, expressions, tokens, index, template }); + } + return tokens; +}; +var verboseDefault = (0, import_node_util2.debuglog)("execa").enabled; +var padField = (field, padding) => String(field).padStart(padding, "0"); +var getTimestamp = () => { + const date = /* @__PURE__ */ new Date(); + return `${padField(date.getHours(), 2)}:${padField(date.getMinutes(), 2)}:${padField(date.getSeconds(), 2)}.${padField(date.getMilliseconds(), 3)}`; +}; +var logCommand = (escapedCommand, { verbose }) => { + if (!verbose) { + return; + } + import_node_process4.default.stderr.write(`[${getTimestamp()}] ${escapedCommand} +`); +}; +var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100; +var getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => { + const env = extendEnv ? { ...import_node_process.default.env, ...envOption } : envOption; + if (preferLocal) { + return npmRunPathEnv({ env, cwd: localDir, execPath }); + } + return env; +}; +var handleArguments = (file, args, options = {}) => { + const parsed = import_cross_spawn.default._parse(file, args, options); + file = parsed.command; + args = parsed.args; + options = parsed.options; + options = { + maxBuffer: DEFAULT_MAX_BUFFER, + buffer: true, + stripFinalNewline: true, + extendEnv: true, + preferLocal: false, + localDir: options.cwd || import_node_process.default.cwd(), + execPath: import_node_process.default.execPath, + encoding: "utf8", + reject: true, + cleanup: true, + all: false, + windowsHide: true, + verbose: verboseDefault, + ...options + }; + options.env = getEnv(options); + options.stdio = normalizeStdio(options); + if (import_node_process.default.platform === "win32" && import_node_path2.default.basename(file, ".exe") === "cmd") { + args.unshift("/q"); + } + return { file, args, options, parsed }; +}; +var handleOutput = (options, value, error) => { + if (typeof value !== "string" && !import_node_buffer.Buffer.isBuffer(value)) { + return error === void 0 ? void 0 : ""; + } + if (options.stripFinalNewline) { + return stripFinalNewline(value); + } + return value; +}; +function execa(file, args, options) { + const parsed = handleArguments(file, args, options); + const command = joinCommand(file, args); + const escapedCommand = getEscapedCommand(file, args); + logCommand(escapedCommand, parsed.options); + validateTimeout(parsed.options); + let spawned; + try { + spawned = import_node_child_process.default.spawn(parsed.file, parsed.args, parsed.options); + } catch (error) { + const dummySpawned = new import_node_child_process.default.ChildProcess(); + const errorPromise = Promise.reject(makeError({ + error, + stdout: "", + stderr: "", + all: "", + command, + escapedCommand, + parsed, + timedOut: false, + isCanceled: false, + killed: false + })); + mergePromise(dummySpawned, errorPromise); + return dummySpawned; + } + const spawnedPromise = getSpawnedPromise(spawned); + const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise); + const processDone = setExitHandler(spawned, parsed.options, timedPromise); + const context = { isCanceled: false }; + spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned)); + spawned.cancel = spawnedCancel.bind(null, spawned, context); + const handlePromise = async () => { + const [{ error, exitCode, signal, timedOut }, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone); + const stdout = handleOutput(parsed.options, stdoutResult); + const stderr = handleOutput(parsed.options, stderrResult); + const all = handleOutput(parsed.options, allResult); + if (error || exitCode !== 0 || signal !== null) { + const returnedError = makeError({ + error, + exitCode, + signal, + stdout, + stderr, + all, + command, + escapedCommand, + parsed, + timedOut, + isCanceled: context.isCanceled || (parsed.options.signal ? parsed.options.signal.aborted : false), + killed: spawned.killed + }); + if (!parsed.options.reject) { + return returnedError; + } + throw returnedError; + } + return { + command, + escapedCommand, + exitCode: 0, + stdout, + stderr, + all, + failed: false, + timedOut: false, + isCanceled: false, + killed: false + }; + }; + const handlePromiseOnce = onetime_default(handlePromise); + handleInput(spawned, parsed.options); + spawned.all = makeAllStream(spawned, parsed.options); + addPipeMethods(spawned); + mergePromise(spawned, handlePromiseOnce); + return spawned; +} +function execaSync(file, args, options) { + const parsed = handleArguments(file, args, options); + const command = joinCommand(file, args); + const escapedCommand = getEscapedCommand(file, args); + logCommand(escapedCommand, parsed.options); + const input = handleInputSync(parsed.options); + let result; + try { + result = import_node_child_process.default.spawnSync(parsed.file, parsed.args, { ...parsed.options, input }); + } catch (error) { + throw makeError({ + error, + stdout: "", + stderr: "", + all: "", + command, + escapedCommand, + parsed, + timedOut: false, + isCanceled: false, + killed: false + }); + } + const stdout = handleOutput(parsed.options, result.stdout, result.error); + const stderr = handleOutput(parsed.options, result.stderr, result.error); + if (result.error || result.status !== 0 || result.signal !== null) { + const error = makeError({ + stdout, + stderr, + error: result.error, + signal: result.signal, + exitCode: result.status, + command, + escapedCommand, + parsed, + timedOut: result.error && result.error.code === "ETIMEDOUT", + isCanceled: false, + killed: result.signal !== null + }); + if (!parsed.options.reject) { + return error; + } + throw error; + } + return { + command, + escapedCommand, + exitCode: 0, + stdout, + stderr, + failed: false, + timedOut: false, + isCanceled: false, + killed: false + }; +} +var normalizeScriptStdin = ({ input, inputFile, stdio }) => input === void 0 && inputFile === void 0 && stdio === void 0 ? { stdin: "inherit" } : {}; +var normalizeScriptOptions = (options = {}) => ({ + preferLocal: true, + ...normalizeScriptStdin(options), + ...options +}); +function create$(options) { + function $2(templatesOrOptions, ...expressions) { + if (!Array.isArray(templatesOrOptions)) { + return create$({ ...options, ...templatesOrOptions }); + } + const [file, ...args] = parseTemplates(templatesOrOptions, expressions); + return execa(file, args, normalizeScriptOptions(options)); + } + $2.sync = (templates, ...expressions) => { + if (!Array.isArray(templates)) { + throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`."); + } + const [file, ...args] = parseTemplates(templates, expressions); + return execaSync(file, args, normalizeScriptOptions(options)); + }; + return $2; +} +var $ = create$(); +var import_fs_extra = (0, import_chunk_QGM4M3NI.__toESM)((0, import_chunk_LONQL55G.require_lib)()); +async function pMap(iterable, mapper, { + concurrency = Number.POSITIVE_INFINITY, + stopOnError = true, + signal +} = {}) { + return new Promise((resolve_, reject_) => { + if (iterable[Symbol.iterator] === void 0 && iterable[Symbol.asyncIterator] === void 0) { + throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`); + } + if (typeof mapper !== "function") { + throw new TypeError("Mapper function is required"); + } + if (!(Number.isSafeInteger(concurrency) && concurrency >= 1 || concurrency === Number.POSITIVE_INFINITY)) { + throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`); + } + const result = []; + const errors = []; + const skippedIndexesMap = /* @__PURE__ */ new Map(); + let isRejected = false; + let isResolved = false; + let isIterableDone = false; + let resolvingCount = 0; + let currentIndex = 0; + const iterator = iterable[Symbol.iterator] === void 0 ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator](); + const signalListener = () => { + reject(signal.reason); + }; + const cleanup = () => { + signal?.removeEventListener("abort", signalListener); + }; + const resolve = (value) => { + resolve_(value); + cleanup(); + }; + const reject = (reason) => { + isRejected = true; + isResolved = true; + reject_(reason); + cleanup(); + }; + if (signal) { + if (signal.aborted) { + reject(signal.reason); + } + signal.addEventListener("abort", signalListener, { once: true }); + } + const next = async () => { + if (isResolved) { + return; + } + const nextItem = await iterator.next(); + const index = currentIndex; + currentIndex++; + if (nextItem.done) { + isIterableDone = true; + if (resolvingCount === 0 && !isResolved) { + if (!stopOnError && errors.length > 0) { + reject(new AggregateError(errors)); + return; + } + isResolved = true; + if (skippedIndexesMap.size === 0) { + resolve(result); + return; + } + const pureResult = []; + for (const [index2, value] of result.entries()) { + if (skippedIndexesMap.get(index2) === pMapSkip) { + continue; + } + pureResult.push(value); + } + resolve(pureResult); + } + return; + } + resolvingCount++; + (async () => { + try { + const element = await nextItem.value; + if (isResolved) { + return; + } + const value = await mapper(element, index); + if (value === pMapSkip) { + skippedIndexesMap.set(index, value); + } + result[index] = value; + resolvingCount--; + await next(); + } catch (error) { + if (stopOnError) { + reject(error); + } else { + errors.push(error); + resolvingCount--; + try { + await next(); + } catch (error2) { + reject(error2); + } + } + } + })(); + }; + (async () => { + for (let index = 0; index < concurrency; index++) { + try { + await next(); + } catch (error) { + reject(error); + break; + } + if (isIterableDone || isRejected) { + break; + } + } + })(); + }); +} +var pMapSkip = Symbol("skip"); +async function pFilter(iterable, filterer, options) { + const values = await pMap( + iterable, + (element, index) => Promise.all([filterer(element, index), element]), + options + ); + return values.filter((value) => Boolean(value[0])).map((value) => value[1]); +} +var import_temp_dir = (0, import_chunk_QGM4M3NI.__toESM)((0, import_chunk_CY52DY2B.require_temp_dir)()); +var { enginesOverride } = require_package(); +var debug = (0, import_debug.default)("prisma:fetch-engine:download"); +var exists = (0, import_node_util.promisify)(import_node_fs.default.exists); +var channel = "master"; +var vercelPkgPathRegex = /^((\w:[\\\/])|\/)snapshot[\/\\]/; +async function download(options) { + if (!options.binaries || Object.values(options.binaries).length === 0) { + return {}; + } + if (enginesOverride?.["branch"] || enginesOverride?.["folder"]) { + options.version = "_local_"; + options.skipCacheIntegrityCheck = true; + } + const { binaryTarget, ...os2 } = await (0, import_get_platform.getPlatformInfo)(); + if (os2.targetDistro && ["nixos"].includes(os2.targetDistro) && !(0, import_chunk_QFA3XBMW.allEngineEnvVarsSet)(Object.keys(options.binaries))) { + console.error( + `${(0, import_chunk_QFA3XBMW.yellow)("Warning")} Precompiled engine files are not available for ${os2.targetDistro}, please provide the paths via environment variables, see https://pris.ly/d/custom-engines` + ); + } else if (["freebsd11", "freebsd12", "freebsd13", "freebsd14", "freebsd15", "openbsd", "netbsd"].includes(binaryTarget)) { + console.error( + `${(0, import_chunk_QFA3XBMW.yellow)( + "Warning" + )} Precompiled engine files are not available for ${binaryTarget}. Read more about building your own engines at https://pris.ly/d/build-engines` + ); + } else if ("libquery-engine" in options.binaries) { + (0, import_get_platform.assertNodeAPISupported)(); + } + const opts = { + ...options, + binaryTargets: options.binaryTargets ?? [binaryTarget], + version: options.version ?? "latest", + binaries: options.binaries + }; + const binaryJobs = Object.entries(opts.binaries).flatMap( + ([binaryName, targetFolder]) => opts.binaryTargets.map((binaryTarget2) => { + const fileName = getBinaryName(binaryName, binaryTarget2); + const targetFilePath = import_node_path.default.join(targetFolder, fileName); + return { + binaryName, + targetFolder, + binaryTarget: binaryTarget2, + fileName, + targetFilePath, + envVarPath: (0, import_chunk_QFA3XBMW.getBinaryEnvVarPath)(binaryName)?.path, + skipCacheIntegrityCheck: !!opts.skipCacheIntegrityCheck + }; + }) + ); + if (process.env.BINARY_DOWNLOAD_VERSION) { + debug(`process.env.BINARY_DOWNLOAD_VERSION is set to "${process.env.BINARY_DOWNLOAD_VERSION}"`); + opts.version = process.env.BINARY_DOWNLOAD_VERSION; + } + if (opts.printVersion) { + console.log(`version: ${opts.version}`); + } + const binariesToDownload = await pFilter(binaryJobs, async (job) => { + const needsToBeDownloaded = await binaryNeedsToBeDownloaded(job, binaryTarget, opts.version); + const isSupported = import_get_platform.binaryTargets.includes(job.binaryTarget); + const shouldDownload = isSupported && !job.envVarPath && // this is for custom binaries + needsToBeDownloaded; + if (needsToBeDownloaded && !isSupported) { + throw new Error(`Unknown binaryTarget ${job.binaryTarget} and no custom engine files were provided`); + } + return shouldDownload; + }); + if (binariesToDownload.length > 0) { + const cleanupPromise = (0, import_chunk_3VVCXIQ5.cleanupCache)(); + let finishBar; + let setProgress; + if (opts.showProgress) { + const collectiveBar = getCollectiveBar(opts); + finishBar = collectiveBar.finishBar; + setProgress = collectiveBar.setProgress; + } + const promises = binariesToDownload.map((job) => { + const downloadUrl = (0, import_chunk_LONQL55G.getDownloadUrl)({ + channel: "all_commits", + version: opts.version, + binaryTarget: job.binaryTarget, + binaryName: job.binaryName + }); + debug(`${downloadUrl} will be downloaded to ${job.targetFilePath}`); + return downloadBinary({ + ...job, + downloadUrl, + version: opts.version, + failSilent: opts.failSilent, + progressCb: setProgress ? setProgress(job.targetFilePath) : void 0 + }); + }); + await Promise.all(promises); + await cleanupPromise; + if (finishBar) { + finishBar(); + } + } + const binaryPaths = binaryJobsToBinaryPaths(binaryJobs); + if (__dirname.match(vercelPkgPathRegex)) { + for (const engineType in binaryPaths) { + const binaryTargets2 = binaryPaths[engineType]; + for (const binaryTarget2 in binaryTargets2) { + const binaryPath = binaryTargets2[binaryTarget2]; + binaryTargets2[binaryTarget2] = await maybeCopyToTmp(binaryPath); + } + } + } + return binaryPaths; +} +function getCollectiveBar(options) { + const hasNodeAPI = "libquery-engine" in options.binaries; + const bar = (0, import_chunk_MWVY55RY.getBar)( + `Downloading Prisma engines${hasNodeAPI ? " for Node-API" : ""} for ${options.binaryTargets?.map((p) => (0, import_chunk_QFA3XBMW.bold)(p)).join(" and ")}` + ); + const progressMap = {}; + const numDownloads = Object.values(options.binaries).length * Object.values(options?.binaryTargets ?? []).length; + const setProgress = (sourcePath) => (progress) => { + progressMap[sourcePath] = progress; + const progressValues = Object.values(progressMap); + const totalProgress = progressValues.reduce((acc, curr) => { + return acc + curr; + }, 0) / numDownloads; + if (options.progressCb) { + options.progressCb(totalProgress); + } + if (bar) { + bar.update(totalProgress); + } + }; + return { + setProgress, + finishBar: () => { + bar.update(1); + bar.terminate(); + } + }; +} +function binaryJobsToBinaryPaths(jobs) { + return jobs.reduce((acc, job) => { + if (!acc[job.binaryName]) { + acc[job.binaryName] = {}; + } + acc[job.binaryName][job.binaryTarget] = job.envVarPath || job.targetFilePath; + return acc; + }, {}); +} +async function binaryNeedsToBeDownloaded(job, nativePlatform, version) { + if (job.envVarPath && import_node_fs.default.existsSync(job.envVarPath)) { + return false; + } + const targetExists = await exists(job.targetFilePath); + const cachedFile = await getCachedBinaryPath({ + ...job, + version + }); + if (cachedFile) { + if (job.skipCacheIntegrityCheck === true) { + await (0, import_chunk_LONQL55G.overwriteFile)(cachedFile, job.targetFilePath); + return false; + } + const sha256FilePath = cachedFile + ".sha256"; + if (await exists(sha256FilePath)) { + const sha256File = await import_node_fs.default.promises.readFile(sha256FilePath, "utf-8"); + const sha256Cache = await (0, import_chunk_FKGWOTGU.getHash)(cachedFile); + if (sha256File === sha256Cache) { + if (!targetExists) { + debug(`copying ${cachedFile} to ${job.targetFilePath}`); + await import_node_fs.default.promises.utimes(cachedFile, /* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()); + await (0, import_chunk_LONQL55G.overwriteFile)(cachedFile, job.targetFilePath); + } + const targetSha256 = await (0, import_chunk_FKGWOTGU.getHash)(job.targetFilePath); + if (sha256File !== targetSha256) { + debug(`overwriting ${job.targetFilePath} with ${cachedFile} as hashes do not match`); + await (0, import_chunk_LONQL55G.overwriteFile)(cachedFile, job.targetFilePath); + } + return false; + } else { + return true; + } + } else if (process.env.PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING) { + debug( + `the checksum file ${sha256FilePath} is missing but this was ignored because the PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING environment variable is set` + ); + if (targetExists) { + return false; + } + if (cachedFile) { + debug(`copying ${cachedFile} to ${job.targetFilePath}`); + await (0, import_chunk_LONQL55G.overwriteFile)(cachedFile, job.targetFilePath); + return false; + } + return true; + } else { + return true; + } + } + if (!targetExists) { + debug(`file ${job.targetFilePath} does not exist and must be downloaded`); + return true; + } + if (job.binaryTarget === nativePlatform) { + const currentVersion = await getVersion(job.targetFilePath, job.binaryName); + if (currentVersion?.includes(version) !== true) { + debug(`file ${job.targetFilePath} exists but its version is ${currentVersion} and we expect ${version}`); + return true; + } + } + return false; +} +async function getVersion(enginePath, binaryName) { + try { + if (binaryName === "libquery-engine") { + (0, import_get_platform.assertNodeAPISupported)(); + const commitHash = (0, import_chunk_QGM4M3NI.__require)(enginePath).version().commit; + return `${"libquery-engine"} ${commitHash}`; + } else { + const result = await execa(enginePath, ["--version"]); + return result.stdout; + } + } catch { + } + return void 0; +} +function getBinaryName(binaryName, binaryTarget) { + if (binaryName === "libquery-engine") { + return `${(0, import_get_platform.getNodeAPIName)(binaryTarget, "fs")}`; + } + const extension = binaryTarget === "windows" ? ".exe" : ""; + return `${binaryName}-${binaryTarget}${extension}`; +} +async function getCachedBinaryPath({ + version, + binaryTarget, + binaryName +}) { + const cacheDir = await (0, import_chunk_LONQL55G.getCacheDir)(channel, version, binaryTarget); + if (!cacheDir) { + return null; + } + const cachedTargetPath = import_node_path.default.join(cacheDir, binaryName); + if (!import_node_fs.default.existsSync(cachedTargetPath)) { + return null; + } + if (version !== "latest") { + return cachedTargetPath; + } + if (await exists(cachedTargetPath)) { + return cachedTargetPath; + } + return null; +} +async function downloadBinary(options) { + const { version, progressCb, targetFilePath, downloadUrl } = options; + const targetDir = import_node_path.default.dirname(targetFilePath); + try { + import_node_fs.default.accessSync(targetDir, import_node_fs.default.constants.W_OK); + await (0, import_fs_extra.ensureDir)(targetDir); + } catch (e) { + if (options.failSilent || e.code !== "EACCES") { + return; + } else { + throw new Error(`Can't write to ${targetDir} please make sure you install "prisma" with the right permissions.`); + } + } + debug(`Downloading ${downloadUrl} to ${targetFilePath} ...`); + if (progressCb) { + progressCb(0); + } + const { sha256, zippedSha256 } = await (0, import_chunk_CY52DY2B.downloadZip)(downloadUrl, targetFilePath, progressCb); + if (progressCb) { + progressCb(1); + } + (0, import_chunk_7JLQJWOR.chmodPlusX)(targetFilePath); + await saveFileToCache(options, version, sha256, zippedSha256); +} +async function saveFileToCache(job, version, sha256, zippedSha256) { + const cacheDir = await (0, import_chunk_LONQL55G.getCacheDir)(channel, version, job.binaryTarget); + if (!cacheDir) { + return; + } + const cachedTargetPath = import_node_path.default.join(cacheDir, job.binaryName); + const cachedSha256Path = import_node_path.default.join(cacheDir, job.binaryName + ".sha256"); + const cachedSha256ZippedPath = import_node_path.default.join(cacheDir, job.binaryName + ".gz.sha256"); + try { + await (0, import_chunk_LONQL55G.overwriteFile)(job.targetFilePath, cachedTargetPath); + if (sha256 != null) { + await import_node_fs.default.promises.writeFile(cachedSha256Path, sha256); + } + if (zippedSha256 != null) { + await import_node_fs.default.promises.writeFile(cachedSha256ZippedPath, zippedSha256); + } + } catch (e) { + debug(e); + } +} +async function maybeCopyToTmp(file) { + if (__dirname.match(vercelPkgPathRegex)) { + const targetDir = import_node_path.default.join(import_temp_dir.default, "prisma-binaries"); + await (0, import_fs_extra.ensureDir)(targetDir); + const target = import_node_path.default.join(targetDir, import_node_path.default.basename(file)); + const data = await import_node_fs.default.promises.readFile(file); + await import_node_fs.default.promises.writeFile(target, data); + plusX(target); + return target; + } + return file; +} +function plusX(file) { + const s = import_node_fs.default.statSync(file); + const newMode = s.mode | 64 | 8 | 1; + if (s.mode === newMode) { + return; + } + const base8 = newMode.toString(8).slice(-3); + import_node_fs.default.chmodSync(file, base8); +} diff --git a/backend/node_modules/@prisma/fetch-engine/dist/chunk-CCMBPDR2.js b/backend/node_modules/@prisma/fetch-engine/dist/chunk-CCMBPDR2.js new file mode 100644 index 0000000000000000000000000000000000000000..b03ce44360f418ab9c8f24cbc255d6cfdc888744 --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/chunk-CCMBPDR2.js @@ -0,0 +1,2588 @@ +"use strict"; +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 __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +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, target) => (target = 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(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var chunk_CCMBPDR2_exports = {}; +__export(chunk_CCMBPDR2_exports, { + download: () => download, + getBinaryName: () => getBinaryName, + getVersion: () => getVersion, + maybeCopyToTmp: () => maybeCopyToTmp, + plusX: () => plusX, + vercelPkgPathRegex: () => vercelPkgPathRegex +}); +module.exports = __toCommonJS(chunk_CCMBPDR2_exports); +var import_chunk_MWVY55RY = require("./chunk-MWVY55RY.js"); +var import_chunk_7JLQJWOR = require("./chunk-7JLQJWOR.js"); +var import_chunk_3VVCXIQ5 = require("./chunk-3VVCXIQ5.js"); +var import_chunk_CY52DY2B = require("./chunk-CY52DY2B.js"); +var import_chunk_LONQL55G = require("./chunk-LONQL55G.js"); +var import_chunk_QFA3XBMW = require("./chunk-QFA3XBMW.js"); +var import_chunk_FKGWOTGU = require("./chunk-FKGWOTGU.js"); +var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js"); +var import_node_fs = __toESM(require("node:fs")); +var import_node_path = __toESM(require("node:path")); +var import_node_util = require("node:util"); +var import_debug = __toESM(require("@prisma/debug")); +var import_get_platform = require("@prisma/get-platform"); +var import_node_buffer = require("node:buffer"); +var import_node_path2 = __toESM(require("node:path")); +var import_node_child_process = __toESM(require("node:child_process")); +var import_node_process = __toESM(require("node:process")); +var import_node_process2 = __toESM(require("node:process")); +var import_node_path3 = __toESM(require("node:path")); +var import_node_url = require("node:url"); +var import_node_process3 = __toESM(require("node:process")); +var import_node_os = require("node:os"); +var import_node_os2 = require("node:os"); +var import_node_os3 = __toESM(require("node:os")); +var import_node_fs2 = require("node:fs"); +var import_node_child_process2 = require("node:child_process"); +var import_node_fs3 = require("node:fs"); +var import_promises = require("node:timers/promises"); +var import_node_buffer2 = require("node:buffer"); +var import_node_child_process3 = require("node:child_process"); +var import_node_util2 = require("node:util"); +var import_node_process4 = __toESM(require("node:process")); +var require_windows = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports, module2) { + "use strict"; + module2.exports = isexe; + isexe.sync = sync; + var fs2 = (0, import_chunk_QGM4M3NI.__require)("fs"); + function checkPathExt(path4, options) { + var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT; + if (!pathext) { + return true; + } + pathext = pathext.split(";"); + if (pathext.indexOf("") !== -1) { + return true; + } + for (var i = 0; i < pathext.length; i++) { + var p = pathext[i].toLowerCase(); + if (p && path4.substr(-p.length).toLowerCase() === p) { + return true; + } + } + return false; + } + function checkStat(stat, path4, options) { + if (!stat.isSymbolicLink() && !stat.isFile()) { + return false; + } + return checkPathExt(path4, options); + } + function isexe(path4, options, cb) { + fs2.stat(path4, function(er, stat) { + cb(er, er ? false : checkStat(stat, path4, options)); + }); + } + function sync(path4, options) { + return checkStat(fs2.statSync(path4), path4, options); + } + } +}); +var require_mode = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports, module2) { + "use strict"; + module2.exports = isexe; + isexe.sync = sync; + var fs2 = (0, import_chunk_QGM4M3NI.__require)("fs"); + function isexe(path4, options, cb) { + fs2.stat(path4, function(er, stat) { + cb(er, er ? false : checkStat(stat, options)); + }); + } + function sync(path4, options) { + return checkStat(fs2.statSync(path4), options); + } + function checkStat(stat, options) { + return stat.isFile() && checkMode(stat, options); + } + function checkMode(stat, options) { + var mod = stat.mode; + var uid = stat.uid; + var gid = stat.gid; + var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid(); + var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid(); + var u = parseInt("100", 8); + var g = parseInt("010", 8); + var o = parseInt("001", 8); + var ug = u | g; + var ret = mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0; + return ret; + } + } +}); +var require_isexe = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module2) { + "use strict"; + var fs2 = (0, import_chunk_QGM4M3NI.__require)("fs"); + var core; + if (process.platform === "win32" || global.TESTING_WINDOWS) { + core = require_windows(); + } else { + core = require_mode(); + } + module2.exports = isexe; + isexe.sync = sync; + function isexe(path4, options, cb) { + if (typeof options === "function") { + cb = options; + options = {}; + } + if (!cb) { + if (typeof Promise !== "function") { + throw new TypeError("callback not provided"); + } + return new Promise(function(resolve, reject) { + isexe(path4, options || {}, function(er, is) { + if (er) { + reject(er); + } else { + resolve(is); + } + }); + }); + } + core(path4, options || {}, function(er, is) { + if (er) { + if (er.code === "EACCES" || options && options.ignoreErrors) { + er = null; + is = false; + } + } + cb(er, is); + }); + } + function sync(path4, options) { + try { + return core.sync(path4, options || {}); + } catch (er) { + if (options && options.ignoreErrors || er.code === "EACCES") { + return false; + } else { + throw er; + } + } + } + } +}); +var require_which = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports, module2) { + "use strict"; + var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys"; + var path4 = (0, import_chunk_QGM4M3NI.__require)("path"); + var COLON = isWindows ? ";" : ":"; + var isexe = require_isexe(); + var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }); + var getPathInfo = (cmd, opt) => { + const colon = opt.colon || COLON; + const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [ + // windows always checks the cwd first + ...isWindows ? [process.cwd()] : [], + ...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */ + "").split(colon) + ]; + const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : ""; + const pathExt = isWindows ? pathExtExe.split(colon) : [""]; + if (isWindows) { + if (cmd.indexOf(".") !== -1 && pathExt[0] !== "") + pathExt.unshift(""); + } + return { + pathEnv, + pathExt, + pathExtExe + }; + }; + var which = (cmd, opt, cb) => { + if (typeof opt === "function") { + cb = opt; + opt = {}; + } + if (!opt) + opt = {}; + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); + const found = []; + const step = (i) => new Promise((resolve, reject) => { + if (i === pathEnv.length) + return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd)); + const ppRaw = pathEnv[i]; + const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; + const pCmd = path4.join(pathPart, cmd); + const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; + resolve(subStep(p, i, 0)); + }); + const subStep = (p, i, ii) => new Promise((resolve, reject) => { + if (ii === pathExt.length) + return resolve(step(i + 1)); + const ext = pathExt[ii]; + isexe(p + ext, { pathExt: pathExtExe }, (er, is) => { + if (!er && is) { + if (opt.all) + found.push(p + ext); + else + return resolve(p + ext); + } + return resolve(subStep(p, i, ii + 1)); + }); + }); + return cb ? step(0).then((res) => cb(null, res), cb) : step(0); + }; + var whichSync = (cmd, opt) => { + opt = opt || {}; + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); + const found = []; + for (let i = 0; i < pathEnv.length; i++) { + const ppRaw = pathEnv[i]; + const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; + const pCmd = path4.join(pathPart, cmd); + const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; + for (let j = 0; j < pathExt.length; j++) { + const cur = p + pathExt[j]; + try { + const is = isexe.sync(cur, { pathExt: pathExtExe }); + if (is) { + if (opt.all) + found.push(cur); + else + return cur; + } + } catch (ex) { + } + } + } + if (opt.all && found.length) + return found; + if (opt.nothrow) + return null; + throw getNotFoundError(cmd); + }; + module2.exports = which; + which.sync = whichSync; + } +}); +var require_path_key = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports, module2) { + "use strict"; + var pathKey2 = (options = {}) => { + const environment = options.env || process.env; + const platform = options.platform || process.platform; + if (platform !== "win32") { + return "PATH"; + } + return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path"; + }; + module2.exports = pathKey2; + module2.exports.default = pathKey2; + } +}); +var require_resolveCommand = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module2) { + "use strict"; + var path4 = (0, import_chunk_QGM4M3NI.__require)("path"); + var which = require_which(); + var getPathKey = require_path_key(); + function resolveCommandAttempt(parsed, withoutPathExt) { + const env = parsed.options.env || process.env; + const cwd = process.cwd(); + const hasCustomCwd = parsed.options.cwd != null; + const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled; + if (shouldSwitchCwd) { + try { + process.chdir(parsed.options.cwd); + } catch (err) { + } + } + let resolved; + try { + resolved = which.sync(parsed.command, { + path: env[getPathKey({ env })], + pathExt: withoutPathExt ? path4.delimiter : void 0 + }); + } catch (e) { + } finally { + if (shouldSwitchCwd) { + process.chdir(cwd); + } + } + if (resolved) { + resolved = path4.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved); + } + return resolved; + } + function resolveCommand(parsed) { + return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); + } + module2.exports = resolveCommand; + } +}); +var require_escape = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"(exports, module2) { + "use strict"; + var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; + function escapeCommand(arg) { + arg = arg.replace(metaCharsRegExp, "^$1"); + return arg; + } + function escapeArgument(arg, doubleEscapeMetaChars) { + arg = `${arg}`; + arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"'); + arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1"); + arg = `"${arg}"`; + arg = arg.replace(metaCharsRegExp, "^$1"); + if (doubleEscapeMetaChars) { + arg = arg.replace(metaCharsRegExp, "^$1"); + } + return arg; + } + module2.exports.command = escapeCommand; + module2.exports.argument = escapeArgument; + } +}); +var require_shebang_regex = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports, module2) { + "use strict"; + module2.exports = /^#!(.*)/; + } +}); +var require_shebang_command = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports, module2) { + "use strict"; + var shebangRegex = require_shebang_regex(); + module2.exports = (string = "") => { + const match = string.match(shebangRegex); + if (!match) { + return null; + } + const [path4, argument] = match[0].replace(/#! ?/, "").split(" "); + const binary = path4.split("/").pop(); + if (binary === "env") { + return argument; + } + return argument ? `${binary} ${argument}` : binary; + }; + } +}); +var require_readShebang = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module2) { + "use strict"; + var fs2 = (0, import_chunk_QGM4M3NI.__require)("fs"); + var shebangCommand = require_shebang_command(); + function readShebang(command) { + const size = 150; + const buffer = Buffer.alloc(size); + let fd; + try { + fd = fs2.openSync(command, "r"); + fs2.readSync(fd, buffer, 0, size, 0); + fs2.closeSync(fd); + } catch (e) { + } + return shebangCommand(buffer.toString()); + } + module2.exports = readShebang; + } +}); +var require_parse = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports, module2) { + "use strict"; + var path4 = (0, import_chunk_QGM4M3NI.__require)("path"); + var resolveCommand = require_resolveCommand(); + var escape = require_escape(); + var readShebang = require_readShebang(); + var isWin = process.platform === "win32"; + var isExecutableRegExp = /\.(?:com|exe)$/i; + var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; + function detectShebang(parsed) { + parsed.file = resolveCommand(parsed); + const shebang = parsed.file && readShebang(parsed.file); + if (shebang) { + parsed.args.unshift(parsed.file); + parsed.command = shebang; + return resolveCommand(parsed); + } + return parsed.file; + } + function parseNonShell(parsed) { + if (!isWin) { + return parsed; + } + const commandFile = detectShebang(parsed); + const needsShell = !isExecutableRegExp.test(commandFile); + if (parsed.options.forceShell || needsShell) { + const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); + parsed.command = path4.normalize(parsed.command); + parsed.command = escape.command(parsed.command); + parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); + const shellCommand = [parsed.command].concat(parsed.args).join(" "); + parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`]; + parsed.command = process.env.comspec || "cmd.exe"; + parsed.options.windowsVerbatimArguments = true; + } + return parsed; + } + function parse(command, args, options) { + if (args && !Array.isArray(args)) { + options = args; + args = null; + } + args = args ? args.slice(0) : []; + options = Object.assign({}, options); + const parsed = { + command, + args, + options, + file: void 0, + original: { + command, + args + } + }; + return options.shell ? parsed : parseNonShell(parsed); + } + module2.exports = parse; + } +}); +var require_enoent = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"(exports, module2) { + "use strict"; + var isWin = process.platform === "win32"; + function notFoundError(original, syscall) { + return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { + code: "ENOENT", + errno: "ENOENT", + syscall: `${syscall} ${original.command}`, + path: original.command, + spawnargs: original.args + }); + } + function hookChildProcess(cp, parsed) { + if (!isWin) { + return; + } + const originalEmit = cp.emit; + cp.emit = function(name, arg1) { + if (name === "exit") { + const err = verifyENOENT(arg1, parsed); + if (err) { + return originalEmit.call(cp, "error", err); + } + } + return originalEmit.apply(cp, arguments); + }; + } + function verifyENOENT(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, "spawn"); + } + return null; + } + function verifyENOENTSync(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, "spawnSync"); + } + return null; + } + module2.exports = { + hookChildProcess, + verifyENOENT, + verifyENOENTSync, + notFoundError + }; + } +}); +var require_cross_spawn = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(exports, module2) { + "use strict"; + var cp = (0, import_chunk_QGM4M3NI.__require)("child_process"); + var parse = require_parse(); + var enoent = require_enoent(); + function spawn(command, args, options) { + const parsed = parse(command, args, options); + const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); + enoent.hookChildProcess(spawned, parsed); + return spawned; + } + function spawnSync(command, args, options) { + const parsed = parse(command, args, options); + const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); + result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); + return result; + } + module2.exports = spawn; + module2.exports.spawn = spawn; + module2.exports.sync = spawnSync; + module2.exports._parse = parse; + module2.exports._enoent = enoent; + } +}); +var require_merge_stream = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js"(exports, module2) { + "use strict"; + var { PassThrough } = (0, import_chunk_QGM4M3NI.__require)("stream"); + module2.exports = function() { + var sources = []; + var output = new PassThrough({ objectMode: true }); + output.setMaxListeners(0); + output.add = add; + output.isEmpty = isEmpty; + output.on("unpipe", remove); + Array.prototype.slice.call(arguments).forEach(add); + return output; + function add(source) { + if (Array.isArray(source)) { + source.forEach(add); + return this; + } + sources.push(source); + source.once("end", remove.bind(null, source)); + source.once("error", output.emit.bind(output, "error")); + source.pipe(output, { end: false }); + return this; + } + function isEmpty() { + return sources.length == 0; + } + function remove(source) { + sources = sources.filter(function(it) { + return it !== source; + }); + if (!sources.length && output.readable) { + output.end(); + } + } + }; + } +}); +var require_package = (0, import_chunk_QGM4M3NI.__commonJS)({ + "package.json"(exports, module2) { + module2.exports = { + name: "@prisma/fetch-engine", + version: "6.19.3", + description: "This package is intended for Prisma's internal use", + main: "dist/index.js", + types: "dist/index.d.ts", + license: "Apache-2.0", + author: "Tim Suchanek ", + homepage: "https://www.prisma.io", + repository: { + type: "git", + url: "https://github.com/prisma/prisma.git", + directory: "packages/fetch-engine" + }, + bugs: "https://github.com/prisma/prisma/issues", + enginesOverride: {}, + devDependencies: { + "@types/node": "18.19.76", + "@types/progress": "2.0.7", + del: "6.1.1", + execa: "8.0.1", + "find-cache-dir": "5.0.0", + "fs-extra": "11.3.0", + hasha: "5.2.2", + "http-proxy-agent": "7.0.2", + "https-proxy-agent": "7.0.6", + kleur: "4.1.5", + "node-fetch": "3.3.2", + "p-filter": "4.1.0", + "p-map": "4.0.0", + "p-retry": "4.6.2", + progress: "2.0.3", + "temp-dir": "2.0.0", + tempy: "1.0.1", + "timeout-signal": "2.0.0", + typescript: "5.4.5" + }, + dependencies: { + "@prisma/debug": "workspace:*", + "@prisma/engines-version": "7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7", + "@prisma/get-platform": "workspace:*" + }, + scripts: { + dev: "DEV=true tsx helpers/build.ts", + build: "tsx helpers/build.ts", + test: "vitest run", + prepublishOnly: "pnpm run build" + }, + files: [ + "README.md", + "dist" + ], + sideEffects: false + }; + } +}); +var import_cross_spawn = (0, import_chunk_QGM4M3NI.__toESM)(require_cross_spawn(), 1); +function stripFinalNewline(input) { + const LF = typeof input === "string" ? "\n" : "\n".charCodeAt(); + const CR = typeof input === "string" ? "\r" : "\r".charCodeAt(); + if (input[input.length - 1] === LF) { + input = input.slice(0, -1); + } + if (input[input.length - 1] === CR) { + input = input.slice(0, -1); + } + return input; +} +function pathKey(options = {}) { + const { + env = process.env, + platform = process.platform + } = options; + if (platform !== "win32") { + return "PATH"; + } + return Object.keys(env).reverse().find((key) => key.toUpperCase() === "PATH") || "Path"; +} +var npmRunPath = ({ + cwd = import_node_process2.default.cwd(), + path: pathOption = import_node_process2.default.env[pathKey()], + preferLocal = true, + execPath = import_node_process2.default.execPath, + addExecPath = true +} = {}) => { + const cwdString = cwd instanceof URL ? (0, import_node_url.fileURLToPath)(cwd) : cwd; + const cwdPath = import_node_path3.default.resolve(cwdString); + const result = []; + if (preferLocal) { + applyPreferLocal(result, cwdPath); + } + if (addExecPath) { + applyExecPath(result, execPath, cwdPath); + } + return [...result, pathOption].join(import_node_path3.default.delimiter); +}; +var applyPreferLocal = (result, cwdPath) => { + let previous; + while (previous !== cwdPath) { + result.push(import_node_path3.default.join(cwdPath, "node_modules/.bin")); + previous = cwdPath; + cwdPath = import_node_path3.default.resolve(cwdPath, ".."); + } +}; +var applyExecPath = (result, execPath, cwdPath) => { + const execPathString = execPath instanceof URL ? (0, import_node_url.fileURLToPath)(execPath) : execPath; + result.push(import_node_path3.default.resolve(cwdPath, execPathString, "..")); +}; +var npmRunPathEnv = ({ env = import_node_process2.default.env, ...options } = {}) => { + env = { ...env }; + const pathName = pathKey({ env }); + options.path = env[pathName]; + env[pathName] = npmRunPath(options); + return env; +}; +var copyProperty = (to, from, property, ignoreNonConfigurable) => { + if (property === "length" || property === "prototype") { + return; + } + if (property === "arguments" || property === "caller") { + return; + } + const toDescriptor = Object.getOwnPropertyDescriptor(to, property); + const fromDescriptor = Object.getOwnPropertyDescriptor(from, property); + if (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) { + return; + } + Object.defineProperty(to, property, fromDescriptor); +}; +var canCopyProperty = function(toDescriptor, fromDescriptor) { + return toDescriptor === void 0 || toDescriptor.configurable || toDescriptor.writable === fromDescriptor.writable && toDescriptor.enumerable === fromDescriptor.enumerable && toDescriptor.configurable === fromDescriptor.configurable && (toDescriptor.writable || toDescriptor.value === fromDescriptor.value); +}; +var changePrototype = (to, from) => { + const fromPrototype = Object.getPrototypeOf(from); + if (fromPrototype === Object.getPrototypeOf(to)) { + return; + } + Object.setPrototypeOf(to, fromPrototype); +}; +var wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/ +${fromBody}`; +var toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, "toString"); +var toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, "name"); +var changeToString = (to, from, name) => { + const withName = name === "" ? "" : `with ${name.trim()}() `; + const newToString = wrappedToString.bind(null, withName, from.toString()); + Object.defineProperty(newToString, "name", toStringName); + Object.defineProperty(to, "toString", { ...toStringDescriptor, value: newToString }); +}; +function mimicFunction(to, from, { ignoreNonConfigurable = false } = {}) { + const { name } = to; + for (const property of Reflect.ownKeys(from)) { + copyProperty(to, from, property, ignoreNonConfigurable); + } + changePrototype(to, from); + changeToString(to, from, name); + return to; +} +var calledFunctions = /* @__PURE__ */ new WeakMap(); +var onetime = (function_, options = {}) => { + if (typeof function_ !== "function") { + throw new TypeError("Expected a function"); + } + let returnValue; + let callCount = 0; + const functionName = function_.displayName || function_.name || ""; + const onetime2 = function(...arguments_) { + calledFunctions.set(onetime2, ++callCount); + if (callCount === 1) { + returnValue = function_.apply(this, arguments_); + function_ = null; + } else if (options.throw === true) { + throw new Error(`Function \`${functionName}\` can only be called once`); + } + return returnValue; + }; + mimicFunction(onetime2, function_); + calledFunctions.set(onetime2, callCount); + return onetime2; +}; +onetime.callCount = (function_) => { + if (!calledFunctions.has(function_)) { + throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`); + } + return calledFunctions.get(function_); +}; +var onetime_default = onetime; +var getRealtimeSignals = () => { + const length = SIGRTMAX - SIGRTMIN + 1; + return Array.from({ length }, getRealtimeSignal); +}; +var getRealtimeSignal = (value, index) => ({ + name: `SIGRT${index + 1}`, + number: SIGRTMIN + index, + action: "terminate", + description: "Application-specific signal (realtime)", + standard: "posix" +}); +var SIGRTMIN = 34; +var SIGRTMAX = 64; +var SIGNALS = [ + { + name: "SIGHUP", + number: 1, + action: "terminate", + description: "Terminal closed", + standard: "posix" + }, + { + name: "SIGINT", + number: 2, + action: "terminate", + description: "User interruption with CTRL-C", + standard: "ansi" + }, + { + name: "SIGQUIT", + number: 3, + action: "core", + description: "User interruption with CTRL-\\", + standard: "posix" + }, + { + name: "SIGILL", + number: 4, + action: "core", + description: "Invalid machine instruction", + standard: "ansi" + }, + { + name: "SIGTRAP", + number: 5, + action: "core", + description: "Debugger breakpoint", + standard: "posix" + }, + { + name: "SIGABRT", + number: 6, + action: "core", + description: "Aborted", + standard: "ansi" + }, + { + name: "SIGIOT", + number: 6, + action: "core", + description: "Aborted", + standard: "bsd" + }, + { + name: "SIGBUS", + number: 7, + action: "core", + description: "Bus error due to misaligned, non-existing address or paging error", + standard: "bsd" + }, + { + name: "SIGEMT", + number: 7, + action: "terminate", + description: "Command should be emulated but is not implemented", + standard: "other" + }, + { + name: "SIGFPE", + number: 8, + action: "core", + description: "Floating point arithmetic error", + standard: "ansi" + }, + { + name: "SIGKILL", + number: 9, + action: "terminate", + description: "Forced termination", + standard: "posix", + forced: true + }, + { + name: "SIGUSR1", + number: 10, + action: "terminate", + description: "Application-specific signal", + standard: "posix" + }, + { + name: "SIGSEGV", + number: 11, + action: "core", + description: "Segmentation fault", + standard: "ansi" + }, + { + name: "SIGUSR2", + number: 12, + action: "terminate", + description: "Application-specific signal", + standard: "posix" + }, + { + name: "SIGPIPE", + number: 13, + action: "terminate", + description: "Broken pipe or socket", + standard: "posix" + }, + { + name: "SIGALRM", + number: 14, + action: "terminate", + description: "Timeout or timer", + standard: "posix" + }, + { + name: "SIGTERM", + number: 15, + action: "terminate", + description: "Termination", + standard: "ansi" + }, + { + name: "SIGSTKFLT", + number: 16, + action: "terminate", + description: "Stack is empty or overflowed", + standard: "other" + }, + { + name: "SIGCHLD", + number: 17, + action: "ignore", + description: "Child process terminated, paused or unpaused", + standard: "posix" + }, + { + name: "SIGCLD", + number: 17, + action: "ignore", + description: "Child process terminated, paused or unpaused", + standard: "other" + }, + { + name: "SIGCONT", + number: 18, + action: "unpause", + description: "Unpaused", + standard: "posix", + forced: true + }, + { + name: "SIGSTOP", + number: 19, + action: "pause", + description: "Paused", + standard: "posix", + forced: true + }, + { + name: "SIGTSTP", + number: 20, + action: "pause", + description: 'Paused using CTRL-Z or "suspend"', + standard: "posix" + }, + { + name: "SIGTTIN", + number: 21, + action: "pause", + description: "Background process cannot read terminal input", + standard: "posix" + }, + { + name: "SIGBREAK", + number: 21, + action: "terminate", + description: "User interruption with CTRL-BREAK", + standard: "other" + }, + { + name: "SIGTTOU", + number: 22, + action: "pause", + description: "Background process cannot write to terminal output", + standard: "posix" + }, + { + name: "SIGURG", + number: 23, + action: "ignore", + description: "Socket received out-of-band data", + standard: "bsd" + }, + { + name: "SIGXCPU", + number: 24, + action: "core", + description: "Process timed out", + standard: "bsd" + }, + { + name: "SIGXFSZ", + number: 25, + action: "core", + description: "File too big", + standard: "bsd" + }, + { + name: "SIGVTALRM", + number: 26, + action: "terminate", + description: "Timeout or timer", + standard: "bsd" + }, + { + name: "SIGPROF", + number: 27, + action: "terminate", + description: "Timeout or timer", + standard: "bsd" + }, + { + name: "SIGWINCH", + number: 28, + action: "ignore", + description: "Terminal window size changed", + standard: "bsd" + }, + { + name: "SIGIO", + number: 29, + action: "terminate", + description: "I/O is available", + standard: "other" + }, + { + name: "SIGPOLL", + number: 29, + action: "terminate", + description: "Watched event", + standard: "other" + }, + { + name: "SIGINFO", + number: 29, + action: "ignore", + description: "Request for process information", + standard: "other" + }, + { + name: "SIGPWR", + number: 30, + action: "terminate", + description: "Device running out of power", + standard: "systemv" + }, + { + name: "SIGSYS", + number: 31, + action: "core", + description: "Invalid system call", + standard: "other" + }, + { + name: "SIGUNUSED", + number: 31, + action: "terminate", + description: "Invalid system call", + standard: "other" + } +]; +var getSignals = () => { + const realtimeSignals = getRealtimeSignals(); + const signals2 = [...SIGNALS, ...realtimeSignals].map(normalizeSignal); + return signals2; +}; +var normalizeSignal = ({ + name, + number: defaultNumber, + description, + action, + forced = false, + standard +}) => { + const { + signals: { [name]: constantSignal } + } = import_node_os2.constants; + const supported = constantSignal !== void 0; + const number = supported ? constantSignal : defaultNumber; + return { name, number, description, supported, action, forced, standard }; +}; +var getSignalsByName = () => { + const signals2 = getSignals(); + return Object.fromEntries(signals2.map(getSignalByName)); +}; +var getSignalByName = ({ + name, + number, + description, + supported, + action, + forced, + standard +}) => [name, { name, number, description, supported, action, forced, standard }]; +var signalsByName = getSignalsByName(); +var getSignalsByNumber = () => { + const signals2 = getSignals(); + const length = SIGRTMAX + 1; + const signalsA = Array.from( + { length }, + (value, number) => getSignalByNumber(number, signals2) + ); + return Object.assign({}, ...signalsA); +}; +var getSignalByNumber = (number, signals2) => { + const signal = findSignalByNumber(number, signals2); + if (signal === void 0) { + return {}; + } + const { name, description, supported, action, forced, standard } = signal; + return { + [number]: { + name, + number, + description, + supported, + action, + forced, + standard + } + }; +}; +var findSignalByNumber = (number, signals2) => { + const signal = signals2.find(({ name }) => import_node_os.constants.signals[name] === number); + if (signal !== void 0) { + return signal; + } + return signals2.find((signalA) => signalA.number === number); +}; +var signalsByNumber = getSignalsByNumber(); +var getErrorPrefix = ({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }) => { + if (timedOut) { + return `timed out after ${timeout} milliseconds`; + } + if (isCanceled) { + return "was canceled"; + } + if (errorCode !== void 0) { + return `failed with ${errorCode}`; + } + if (signal !== void 0) { + return `was killed with ${signal} (${signalDescription})`; + } + if (exitCode !== void 0) { + return `failed with exit code ${exitCode}`; + } + return "failed"; +}; +var makeError = ({ + stdout, + stderr, + all, + error, + signal, + exitCode, + command, + escapedCommand, + timedOut, + isCanceled, + killed, + parsed: { options: { timeout, cwd = import_node_process3.default.cwd() } } +}) => { + exitCode = exitCode === null ? void 0 : exitCode; + signal = signal === null ? void 0 : signal; + const signalDescription = signal === void 0 ? void 0 : signalsByName[signal].description; + const errorCode = error && error.code; + const prefix = getErrorPrefix({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }); + const execaMessage = `Command ${prefix}: ${command}`; + const isError = Object.prototype.toString.call(error) === "[object Error]"; + const shortMessage = isError ? `${execaMessage} +${error.message}` : execaMessage; + const message = [shortMessage, stderr, stdout].filter(Boolean).join("\n"); + if (isError) { + error.originalMessage = error.message; + error.message = message; + } else { + error = new Error(message); + } + error.shortMessage = shortMessage; + error.command = command; + error.escapedCommand = escapedCommand; + error.exitCode = exitCode; + error.signal = signal; + error.signalDescription = signalDescription; + error.stdout = stdout; + error.stderr = stderr; + error.cwd = cwd; + if (all !== void 0) { + error.all = all; + } + if ("bufferedData" in error) { + delete error.bufferedData; + } + error.failed = true; + error.timedOut = Boolean(timedOut); + error.isCanceled = isCanceled; + error.killed = killed && !timedOut; + return error; +}; +var aliases = ["stdin", "stdout", "stderr"]; +var hasAlias = (options) => aliases.some((alias) => options[alias] !== void 0); +var normalizeStdio = (options) => { + if (!options) { + return; + } + const { stdio } = options; + if (stdio === void 0) { + return aliases.map((alias) => options[alias]); + } + if (hasAlias(options)) { + throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map((alias) => `\`${alias}\``).join(", ")}`); + } + if (typeof stdio === "string") { + return stdio; + } + if (!Array.isArray(stdio)) { + throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); + } + const length = Math.max(stdio.length, aliases.length); + return Array.from({ length }, (value, index) => stdio[index]); +}; +var signals = []; +signals.push("SIGHUP", "SIGINT", "SIGTERM"); +if (process.platform !== "win32") { + signals.push( + "SIGALRM", + "SIGABRT", + "SIGVTALRM", + "SIGXCPU", + "SIGXFSZ", + "SIGUSR2", + "SIGTRAP", + "SIGSYS", + "SIGQUIT", + "SIGIOT" + // should detect profiler and enable/disable accordingly. + // see #21 + // 'SIGPROF' + ); +} +if (process.platform === "linux") { + signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT"); +} +var processOk = (process7) => !!process7 && typeof process7 === "object" && typeof process7.removeListener === "function" && typeof process7.emit === "function" && typeof process7.reallyExit === "function" && typeof process7.listeners === "function" && typeof process7.kill === "function" && typeof process7.pid === "number" && typeof process7.on === "function"; +var kExitEmitter = Symbol.for("signal-exit emitter"); +var global2 = globalThis; +var ObjectDefineProperty = Object.defineProperty.bind(Object); +var Emitter = class { + emitted = { + afterExit: false, + exit: false + }; + listeners = { + afterExit: [], + exit: [] + }; + count = 0; + id = Math.random(); + constructor() { + if (global2[kExitEmitter]) { + return global2[kExitEmitter]; + } + ObjectDefineProperty(global2, kExitEmitter, { + value: this, + writable: false, + enumerable: false, + configurable: false + }); + } + on(ev, fn) { + this.listeners[ev].push(fn); + } + removeListener(ev, fn) { + const list = this.listeners[ev]; + const i = list.indexOf(fn); + if (i === -1) { + return; + } + if (i === 0 && list.length === 1) { + list.length = 0; + } else { + list.splice(i, 1); + } + } + emit(ev, code, signal) { + if (this.emitted[ev]) { + return false; + } + this.emitted[ev] = true; + let ret = false; + for (const fn of this.listeners[ev]) { + ret = fn(code, signal) === true || ret; + } + if (ev === "exit") { + ret = this.emit("afterExit", code, signal) || ret; + } + return ret; + } +}; +var SignalExitBase = class { +}; +var signalExitWrap = (handler) => { + return { + onExit(cb, opts) { + return handler.onExit(cb, opts); + }, + load() { + return handler.load(); + }, + unload() { + return handler.unload(); + } + }; +}; +var SignalExitFallback = class extends SignalExitBase { + onExit() { + return () => { + }; + } + load() { + } + unload() { + } +}; +var SignalExit = class extends SignalExitBase { + // "SIGHUP" throws an `ENOSYS` error on Windows, + // so use a supported signal instead + /* c8 ignore start */ + #hupSig = process4.platform === "win32" ? "SIGINT" : "SIGHUP"; + /* c8 ignore stop */ + #emitter = new Emitter(); + #process; + #originalProcessEmit; + #originalProcessReallyExit; + #sigListeners = {}; + #loaded = false; + constructor(process7) { + super(); + this.#process = process7; + this.#sigListeners = {}; + for (const sig of signals) { + this.#sigListeners[sig] = () => { + const listeners = this.#process.listeners(sig); + let { count } = this.#emitter; + const p = process7; + if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") { + count += p.__signal_exit_emitter__.count; + } + if (listeners.length === count) { + this.unload(); + const ret = this.#emitter.emit("exit", null, sig); + const s = sig === "SIGHUP" ? this.#hupSig : sig; + if (!ret) + process7.kill(process7.pid, s); + } + }; + } + this.#originalProcessReallyExit = process7.reallyExit; + this.#originalProcessEmit = process7.emit; + } + onExit(cb, opts) { + if (!processOk(this.#process)) { + return () => { + }; + } + if (this.#loaded === false) { + this.load(); + } + const ev = opts?.alwaysLast ? "afterExit" : "exit"; + this.#emitter.on(ev, cb); + return () => { + this.#emitter.removeListener(ev, cb); + if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) { + this.unload(); + } + }; + } + load() { + if (this.#loaded) { + return; + } + this.#loaded = true; + this.#emitter.count += 1; + for (const sig of signals) { + try { + const fn = this.#sigListeners[sig]; + if (fn) + this.#process.on(sig, fn); + } catch (_) { + } + } + this.#process.emit = (ev, ...a) => { + return this.#processEmit(ev, ...a); + }; + this.#process.reallyExit = (code) => { + return this.#processReallyExit(code); + }; + } + unload() { + if (!this.#loaded) { + return; + } + this.#loaded = false; + signals.forEach((sig) => { + const listener = this.#sigListeners[sig]; + if (!listener) { + throw new Error("Listener not defined for signal: " + sig); + } + try { + this.#process.removeListener(sig, listener); + } catch (_) { + } + }); + this.#process.emit = this.#originalProcessEmit; + this.#process.reallyExit = this.#originalProcessReallyExit; + this.#emitter.count -= 1; + } + #processReallyExit(code) { + if (!processOk(this.#process)) { + return 0; + } + this.#process.exitCode = code || 0; + this.#emitter.emit("exit", this.#process.exitCode, null); + return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode); + } + #processEmit(ev, ...args) { + const og = this.#originalProcessEmit; + if (ev === "exit" && processOk(this.#process)) { + if (typeof args[0] === "number") { + this.#process.exitCode = args[0]; + } + const ret = og.call(this.#process, ev, ...args); + this.#emitter.emit("exit", this.#process.exitCode, null); + return ret; + } else { + return og.call(this.#process, ev, ...args); + } + } +}; +var process4 = globalThis.process; +var { + /** + * Called when the process is exiting, whether via signal, explicit + * exit, or running out of stuff to do. + * + * If the global process object is not suitable for instrumentation, + * then this will be a no-op. + * + * Returns a function that may be used to unload signal-exit. + */ + onExit, + /** + * Load the listeners. Likely you never need to call this, unless + * doing a rather deep integration with signal-exit functionality. + * Mostly exposed for the benefit of testing. + * + * @internal + */ + load, + /** + * Unload the listeners. Likely you never need to call this, unless + * doing a rather deep integration with signal-exit functionality. + * Mostly exposed for the benefit of testing. + * + * @internal + */ + unload +} = signalExitWrap(processOk(process4) ? new SignalExit(process4) : new SignalExitFallback()); +var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5; +var spawnedKill = (kill, signal = "SIGTERM", options = {}) => { + const killResult = kill(signal); + setKillTimeout(kill, signal, options, killResult); + return killResult; +}; +var setKillTimeout = (kill, signal, options, killResult) => { + if (!shouldForceKill(signal, options, killResult)) { + return; + } + const timeout = getForceKillAfterTimeout(options); + const t = setTimeout(() => { + kill("SIGKILL"); + }, timeout); + if (t.unref) { + t.unref(); + } +}; +var shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => isSigterm(signal) && forceKillAfterTimeout !== false && killResult; +var isSigterm = (signal) => signal === import_node_os3.default.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM"; +var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => { + if (forceKillAfterTimeout === true) { + return DEFAULT_FORCE_KILL_TIMEOUT; + } + if (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) { + throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`); + } + return forceKillAfterTimeout; +}; +var spawnedCancel = (spawned, context) => { + const killResult = spawned.kill(); + if (killResult) { + context.isCanceled = true; + } +}; +var timeoutKill = (spawned, signal, reject) => { + spawned.kill(signal); + reject(Object.assign(new Error("Timed out"), { timedOut: true, signal })); +}; +var setupTimeout = (spawned, { timeout, killSignal = "SIGTERM" }, spawnedPromise) => { + if (timeout === 0 || timeout === void 0) { + return spawnedPromise; + } + let timeoutId; + const timeoutPromise = new Promise((resolve, reject) => { + timeoutId = setTimeout(() => { + timeoutKill(spawned, killSignal, reject); + }, timeout); + }); + const safeSpawnedPromise = spawnedPromise.finally(() => { + clearTimeout(timeoutId); + }); + return Promise.race([timeoutPromise, safeSpawnedPromise]); +}; +var validateTimeout = ({ timeout }) => { + if (timeout !== void 0 && (!Number.isFinite(timeout) || timeout < 0)) { + throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`); + } +}; +var setExitHandler = async (spawned, { cleanup, detached }, timedPromise) => { + if (!cleanup || detached) { + return timedPromise; + } + const removeExitHandler = onExit(() => { + spawned.kill(); + }); + return timedPromise.finally(() => { + removeExitHandler(); + }); +}; +function isStream(stream) { + return stream !== null && typeof stream === "object" && typeof stream.pipe === "function"; +} +function isWritableStream(stream) { + return isStream(stream) && stream.writable !== false && typeof stream._write === "function" && typeof stream._writableState === "object"; +} +var isExecaChildProcess = (target) => target instanceof import_node_child_process2.ChildProcess && typeof target.then === "function"; +var pipeToTarget = (spawned, streamName, target) => { + if (typeof target === "string") { + spawned[streamName].pipe((0, import_node_fs2.createWriteStream)(target)); + return spawned; + } + if (isWritableStream(target)) { + spawned[streamName].pipe(target); + return spawned; + } + if (!isExecaChildProcess(target)) { + throw new TypeError("The second argument must be a string, a stream or an Execa child process."); + } + if (!isWritableStream(target.stdin)) { + throw new TypeError("The target child process's stdin must be available."); + } + spawned[streamName].pipe(target.stdin); + return target; +}; +var addPipeMethods = (spawned) => { + if (spawned.stdout !== null) { + spawned.pipeStdout = pipeToTarget.bind(void 0, spawned, "stdout"); + } + if (spawned.stderr !== null) { + spawned.pipeStderr = pipeToTarget.bind(void 0, spawned, "stderr"); + } + if (spawned.all !== void 0) { + spawned.pipeAll = pipeToTarget.bind(void 0, spawned, "all"); + } +}; +var getStreamContents = async (stream, { init, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize }, { maxBuffer = Number.POSITIVE_INFINITY } = {}) => { + if (!isAsyncIterable(stream)) { + throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable."); + } + const state = init(); + state.length = 0; + try { + for await (const chunk of stream) { + const chunkType = getChunkType(chunk); + const convertedChunk = convertChunk[chunkType](chunk, state); + appendChunk({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer }); + } + appendFinalChunk({ state, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, maxBuffer }); + return finalize(state); + } catch (error) { + error.bufferedData = finalize(state); + throw error; + } +}; +var appendFinalChunk = ({ state, getSize, truncateChunk, addChunk, getFinalChunk, maxBuffer }) => { + const convertedChunk = getFinalChunk(state); + if (convertedChunk !== void 0) { + appendChunk({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer }); + } +}; +var appendChunk = ({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer }) => { + const chunkSize = getSize(convertedChunk); + const newLength = state.length + chunkSize; + if (newLength <= maxBuffer) { + addNewChunk(convertedChunk, state, addChunk, newLength); + return; + } + const truncatedChunk = truncateChunk(convertedChunk, maxBuffer - state.length); + if (truncatedChunk !== void 0) { + addNewChunk(truncatedChunk, state, addChunk, maxBuffer); + } + throw new MaxBufferError(); +}; +var addNewChunk = (convertedChunk, state, addChunk, newLength) => { + state.contents = addChunk(convertedChunk, state, newLength); + state.length = newLength; +}; +var isAsyncIterable = (stream) => typeof stream === "object" && stream !== null && typeof stream[Symbol.asyncIterator] === "function"; +var getChunkType = (chunk) => { + const typeOfChunk = typeof chunk; + if (typeOfChunk === "string") { + return "string"; + } + if (typeOfChunk !== "object" || chunk === null) { + return "others"; + } + if (globalThis.Buffer?.isBuffer(chunk)) { + return "buffer"; + } + const prototypeName = objectToString.call(chunk); + if (prototypeName === "[object ArrayBuffer]") { + return "arrayBuffer"; + } + if (prototypeName === "[object DataView]") { + return "dataView"; + } + if (Number.isInteger(chunk.byteLength) && Number.isInteger(chunk.byteOffset) && objectToString.call(chunk.buffer) === "[object ArrayBuffer]") { + return "typedArray"; + } + return "others"; +}; +var { toString: objectToString } = Object.prototype; +var MaxBufferError = class extends Error { + name = "MaxBufferError"; + constructor() { + super("maxBuffer exceeded"); + } +}; +var identity = (value) => value; +var noop = () => void 0; +var getContentsProp = ({ contents }) => contents; +var throwObjectStream = (chunk) => { + throw new Error(`Streams in object mode are not supported: ${String(chunk)}`); +}; +var getLengthProp = (convertedChunk) => convertedChunk.length; +async function getStreamAsArrayBuffer(stream, options) { + return getStreamContents(stream, arrayBufferMethods, options); +} +var initArrayBuffer = () => ({ contents: new ArrayBuffer(0) }); +var useTextEncoder = (chunk) => textEncoder.encode(chunk); +var textEncoder = new TextEncoder(); +var useUint8Array = (chunk) => new Uint8Array(chunk); +var useUint8ArrayWithOffset = (chunk) => new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength); +var truncateArrayBufferChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize); +var addArrayBufferChunk = (convertedChunk, { contents, length: previousLength }, length) => { + const newContents = hasArrayBufferResize() ? resizeArrayBuffer(contents, length) : resizeArrayBufferSlow(contents, length); + new Uint8Array(newContents).set(convertedChunk, previousLength); + return newContents; +}; +var resizeArrayBufferSlow = (contents, length) => { + if (length <= contents.byteLength) { + return contents; + } + const arrayBuffer = new ArrayBuffer(getNewContentsLength(length)); + new Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0); + return arrayBuffer; +}; +var resizeArrayBuffer = (contents, length) => { + if (length <= contents.maxByteLength) { + contents.resize(length); + return contents; + } + const arrayBuffer = new ArrayBuffer(length, { maxByteLength: getNewContentsLength(length) }); + new Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0); + return arrayBuffer; +}; +var getNewContentsLength = (length) => SCALE_FACTOR ** Math.ceil(Math.log(length) / Math.log(SCALE_FACTOR)); +var SCALE_FACTOR = 2; +var finalizeArrayBuffer = ({ contents, length }) => hasArrayBufferResize() ? contents : contents.slice(0, length); +var hasArrayBufferResize = () => "resize" in ArrayBuffer.prototype; +var arrayBufferMethods = { + init: initArrayBuffer, + convertChunk: { + string: useTextEncoder, + buffer: useUint8Array, + arrayBuffer: useUint8Array, + dataView: useUint8ArrayWithOffset, + typedArray: useUint8ArrayWithOffset, + others: throwObjectStream + }, + getSize: getLengthProp, + truncateChunk: truncateArrayBufferChunk, + addChunk: addArrayBufferChunk, + getFinalChunk: noop, + finalize: finalizeArrayBuffer +}; +async function getStreamAsBuffer(stream, options) { + if (!("Buffer" in globalThis)) { + throw new Error("getStreamAsBuffer() is only supported in Node.js"); + } + try { + return arrayBufferToNodeBuffer(await getStreamAsArrayBuffer(stream, options)); + } catch (error) { + if (error.bufferedData !== void 0) { + error.bufferedData = arrayBufferToNodeBuffer(error.bufferedData); + } + throw error; + } +} +var arrayBufferToNodeBuffer = (arrayBuffer) => globalThis.Buffer.from(arrayBuffer); +async function getStreamAsString(stream, options) { + return getStreamContents(stream, stringMethods, options); +} +var initString = () => ({ contents: "", textDecoder: new TextDecoder() }); +var useTextDecoder = (chunk, { textDecoder }) => textDecoder.decode(chunk, { stream: true }); +var addStringChunk = (convertedChunk, { contents }) => contents + convertedChunk; +var truncateStringChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize); +var getFinalStringChunk = ({ textDecoder }) => { + const finalChunk = textDecoder.decode(); + return finalChunk === "" ? void 0 : finalChunk; +}; +var stringMethods = { + init: initString, + convertChunk: { + string: identity, + buffer: useTextDecoder, + arrayBuffer: useTextDecoder, + dataView: useTextDecoder, + typedArray: useTextDecoder, + others: throwObjectStream + }, + getSize: getLengthProp, + truncateChunk: truncateStringChunk, + addChunk: addStringChunk, + getFinalChunk: getFinalStringChunk, + finalize: getContentsProp +}; +var import_merge_stream = (0, import_chunk_QGM4M3NI.__toESM)(require_merge_stream(), 1); +var validateInputOptions = (input) => { + if (input !== void 0) { + throw new TypeError("The `input` and `inputFile` options cannot be both set."); + } +}; +var getInputSync = ({ input, inputFile }) => { + if (typeof inputFile !== "string") { + return input; + } + validateInputOptions(input); + return (0, import_node_fs3.readFileSync)(inputFile); +}; +var handleInputSync = (options) => { + const input = getInputSync(options); + if (isStream(input)) { + throw new TypeError("The `input` option cannot be a stream in sync mode"); + } + return input; +}; +var getInput = ({ input, inputFile }) => { + if (typeof inputFile !== "string") { + return input; + } + validateInputOptions(input); + return (0, import_node_fs3.createReadStream)(inputFile); +}; +var handleInput = (spawned, options) => { + const input = getInput(options); + if (input === void 0) { + return; + } + if (isStream(input)) { + input.pipe(spawned.stdin); + } else { + spawned.stdin.end(input); + } +}; +var makeAllStream = (spawned, { all }) => { + if (!all || !spawned.stdout && !spawned.stderr) { + return; + } + const mixed = (0, import_merge_stream.default)(); + if (spawned.stdout) { + mixed.add(spawned.stdout); + } + if (spawned.stderr) { + mixed.add(spawned.stderr); + } + return mixed; +}; +var getBufferedData = async (stream, streamPromise) => { + if (!stream || streamPromise === void 0) { + return; + } + await (0, import_promises.setTimeout)(0); + stream.destroy(); + try { + return await streamPromise; + } catch (error) { + return error.bufferedData; + } +}; +var getStreamPromise = (stream, { encoding, buffer, maxBuffer }) => { + if (!stream || !buffer) { + return; + } + if (encoding === "utf8" || encoding === "utf-8") { + return getStreamAsString(stream, { maxBuffer }); + } + if (encoding === null || encoding === "buffer") { + return getStreamAsBuffer(stream, { maxBuffer }); + } + return applyEncoding(stream, maxBuffer, encoding); +}; +var applyEncoding = async (stream, maxBuffer, encoding) => { + const buffer = await getStreamAsBuffer(stream, { maxBuffer }); + return buffer.toString(encoding); +}; +var getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer, maxBuffer }, processDone) => { + const stdoutPromise = getStreamPromise(stdout, { encoding, buffer, maxBuffer }); + const stderrPromise = getStreamPromise(stderr, { encoding, buffer, maxBuffer }); + const allPromise = getStreamPromise(all, { encoding, buffer, maxBuffer: maxBuffer * 2 }); + try { + return await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]); + } catch (error) { + return Promise.all([ + { error, signal: error.signal, timedOut: error.timedOut }, + getBufferedData(stdout, stdoutPromise), + getBufferedData(stderr, stderrPromise), + getBufferedData(all, allPromise) + ]); + } +}; +var nativePromisePrototype = (async () => { +})().constructor.prototype; +var descriptors = ["then", "catch", "finally"].map((property) => [ + property, + Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property) +]); +var mergePromise = (spawned, promise) => { + for (const [property, descriptor] of descriptors) { + const value = typeof promise === "function" ? (...args) => Reflect.apply(descriptor.value, promise(), args) : descriptor.value.bind(promise); + Reflect.defineProperty(spawned, property, { ...descriptor, value }); + } +}; +var getSpawnedPromise = (spawned) => new Promise((resolve, reject) => { + spawned.on("exit", (exitCode, signal) => { + resolve({ exitCode, signal }); + }); + spawned.on("error", (error) => { + reject(error); + }); + if (spawned.stdin) { + spawned.stdin.on("error", (error) => { + reject(error); + }); + } +}); +var normalizeArgs = (file, args = []) => { + if (!Array.isArray(args)) { + return [file]; + } + return [file, ...args]; +}; +var NO_ESCAPE_REGEXP = /^[\w.-]+$/; +var escapeArg = (arg) => { + if (typeof arg !== "string" || NO_ESCAPE_REGEXP.test(arg)) { + return arg; + } + return `"${arg.replaceAll('"', '\\"')}"`; +}; +var joinCommand = (file, args) => normalizeArgs(file, args).join(" "); +var getEscapedCommand = (file, args) => normalizeArgs(file, args).map((arg) => escapeArg(arg)).join(" "); +var SPACES_REGEXP = / +/g; +var parseExpression = (expression) => { + const typeOfExpression = typeof expression; + if (typeOfExpression === "string") { + return expression; + } + if (typeOfExpression === "number") { + return String(expression); + } + if (typeOfExpression === "object" && expression !== null && !(expression instanceof import_node_child_process3.ChildProcess) && "stdout" in expression) { + const typeOfStdout = typeof expression.stdout; + if (typeOfStdout === "string") { + return expression.stdout; + } + if (import_node_buffer2.Buffer.isBuffer(expression.stdout)) { + return expression.stdout.toString(); + } + throw new TypeError(`Unexpected "${typeOfStdout}" stdout in template expression`); + } + throw new TypeError(`Unexpected "${typeOfExpression}" in template expression`); +}; +var concatTokens = (tokens, nextTokens, isNew) => isNew || tokens.length === 0 || nextTokens.length === 0 ? [...tokens, ...nextTokens] : [ + ...tokens.slice(0, -1), + `${tokens.at(-1)}${nextTokens[0]}`, + ...nextTokens.slice(1) +]; +var parseTemplate = ({ templates, expressions, tokens, index, template }) => { + const templateString = template ?? templates.raw[index]; + const templateTokens = templateString.split(SPACES_REGEXP).filter(Boolean); + const newTokens = concatTokens( + tokens, + templateTokens, + templateString.startsWith(" ") + ); + if (index === expressions.length) { + return newTokens; + } + const expression = expressions[index]; + const expressionTokens = Array.isArray(expression) ? expression.map((expression2) => parseExpression(expression2)) : [parseExpression(expression)]; + return concatTokens( + newTokens, + expressionTokens, + templateString.endsWith(" ") + ); +}; +var parseTemplates = (templates, expressions) => { + let tokens = []; + for (const [index, template] of templates.entries()) { + tokens = parseTemplate({ templates, expressions, tokens, index, template }); + } + return tokens; +}; +var verboseDefault = (0, import_node_util2.debuglog)("execa").enabled; +var padField = (field, padding) => String(field).padStart(padding, "0"); +var getTimestamp = () => { + const date = /* @__PURE__ */ new Date(); + return `${padField(date.getHours(), 2)}:${padField(date.getMinutes(), 2)}:${padField(date.getSeconds(), 2)}.${padField(date.getMilliseconds(), 3)}`; +}; +var logCommand = (escapedCommand, { verbose }) => { + if (!verbose) { + return; + } + import_node_process4.default.stderr.write(`[${getTimestamp()}] ${escapedCommand} +`); +}; +var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100; +var getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => { + const env = extendEnv ? { ...import_node_process.default.env, ...envOption } : envOption; + if (preferLocal) { + return npmRunPathEnv({ env, cwd: localDir, execPath }); + } + return env; +}; +var handleArguments = (file, args, options = {}) => { + const parsed = import_cross_spawn.default._parse(file, args, options); + file = parsed.command; + args = parsed.args; + options = parsed.options; + options = { + maxBuffer: DEFAULT_MAX_BUFFER, + buffer: true, + stripFinalNewline: true, + extendEnv: true, + preferLocal: false, + localDir: options.cwd || import_node_process.default.cwd(), + execPath: import_node_process.default.execPath, + encoding: "utf8", + reject: true, + cleanup: true, + all: false, + windowsHide: true, + verbose: verboseDefault, + ...options + }; + options.env = getEnv(options); + options.stdio = normalizeStdio(options); + if (import_node_process.default.platform === "win32" && import_node_path2.default.basename(file, ".exe") === "cmd") { + args.unshift("/q"); + } + return { file, args, options, parsed }; +}; +var handleOutput = (options, value, error) => { + if (typeof value !== "string" && !import_node_buffer.Buffer.isBuffer(value)) { + return error === void 0 ? void 0 : ""; + } + if (options.stripFinalNewline) { + return stripFinalNewline(value); + } + return value; +}; +function execa(file, args, options) { + const parsed = handleArguments(file, args, options); + const command = joinCommand(file, args); + const escapedCommand = getEscapedCommand(file, args); + logCommand(escapedCommand, parsed.options); + validateTimeout(parsed.options); + let spawned; + try { + spawned = import_node_child_process.default.spawn(parsed.file, parsed.args, parsed.options); + } catch (error) { + const dummySpawned = new import_node_child_process.default.ChildProcess(); + const errorPromise = Promise.reject(makeError({ + error, + stdout: "", + stderr: "", + all: "", + command, + escapedCommand, + parsed, + timedOut: false, + isCanceled: false, + killed: false + })); + mergePromise(dummySpawned, errorPromise); + return dummySpawned; + } + const spawnedPromise = getSpawnedPromise(spawned); + const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise); + const processDone = setExitHandler(spawned, parsed.options, timedPromise); + const context = { isCanceled: false }; + spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned)); + spawned.cancel = spawnedCancel.bind(null, spawned, context); + const handlePromise = async () => { + const [{ error, exitCode, signal, timedOut }, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone); + const stdout = handleOutput(parsed.options, stdoutResult); + const stderr = handleOutput(parsed.options, stderrResult); + const all = handleOutput(parsed.options, allResult); + if (error || exitCode !== 0 || signal !== null) { + const returnedError = makeError({ + error, + exitCode, + signal, + stdout, + stderr, + all, + command, + escapedCommand, + parsed, + timedOut, + isCanceled: context.isCanceled || (parsed.options.signal ? parsed.options.signal.aborted : false), + killed: spawned.killed + }); + if (!parsed.options.reject) { + return returnedError; + } + throw returnedError; + } + return { + command, + escapedCommand, + exitCode: 0, + stdout, + stderr, + all, + failed: false, + timedOut: false, + isCanceled: false, + killed: false + }; + }; + const handlePromiseOnce = onetime_default(handlePromise); + handleInput(spawned, parsed.options); + spawned.all = makeAllStream(spawned, parsed.options); + addPipeMethods(spawned); + mergePromise(spawned, handlePromiseOnce); + return spawned; +} +function execaSync(file, args, options) { + const parsed = handleArguments(file, args, options); + const command = joinCommand(file, args); + const escapedCommand = getEscapedCommand(file, args); + logCommand(escapedCommand, parsed.options); + const input = handleInputSync(parsed.options); + let result; + try { + result = import_node_child_process.default.spawnSync(parsed.file, parsed.args, { ...parsed.options, input }); + } catch (error) { + throw makeError({ + error, + stdout: "", + stderr: "", + all: "", + command, + escapedCommand, + parsed, + timedOut: false, + isCanceled: false, + killed: false + }); + } + const stdout = handleOutput(parsed.options, result.stdout, result.error); + const stderr = handleOutput(parsed.options, result.stderr, result.error); + if (result.error || result.status !== 0 || result.signal !== null) { + const error = makeError({ + stdout, + stderr, + error: result.error, + signal: result.signal, + exitCode: result.status, + command, + escapedCommand, + parsed, + timedOut: result.error && result.error.code === "ETIMEDOUT", + isCanceled: false, + killed: result.signal !== null + }); + if (!parsed.options.reject) { + return error; + } + throw error; + } + return { + command, + escapedCommand, + exitCode: 0, + stdout, + stderr, + failed: false, + timedOut: false, + isCanceled: false, + killed: false + }; +} +var normalizeScriptStdin = ({ input, inputFile, stdio }) => input === void 0 && inputFile === void 0 && stdio === void 0 ? { stdin: "inherit" } : {}; +var normalizeScriptOptions = (options = {}) => ({ + preferLocal: true, + ...normalizeScriptStdin(options), + ...options +}); +function create$(options) { + function $2(templatesOrOptions, ...expressions) { + if (!Array.isArray(templatesOrOptions)) { + return create$({ ...options, ...templatesOrOptions }); + } + const [file, ...args] = parseTemplates(templatesOrOptions, expressions); + return execa(file, args, normalizeScriptOptions(options)); + } + $2.sync = (templates, ...expressions) => { + if (!Array.isArray(templates)) { + throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`."); + } + const [file, ...args] = parseTemplates(templates, expressions); + return execaSync(file, args, normalizeScriptOptions(options)); + }; + return $2; +} +var $ = create$(); +var import_fs_extra = (0, import_chunk_QGM4M3NI.__toESM)((0, import_chunk_LONQL55G.require_lib)()); +async function pMap(iterable, mapper, { + concurrency = Number.POSITIVE_INFINITY, + stopOnError = true, + signal +} = {}) { + return new Promise((resolve_, reject_) => { + if (iterable[Symbol.iterator] === void 0 && iterable[Symbol.asyncIterator] === void 0) { + throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`); + } + if (typeof mapper !== "function") { + throw new TypeError("Mapper function is required"); + } + if (!(Number.isSafeInteger(concurrency) && concurrency >= 1 || concurrency === Number.POSITIVE_INFINITY)) { + throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`); + } + const result = []; + const errors = []; + const skippedIndexesMap = /* @__PURE__ */ new Map(); + let isRejected = false; + let isResolved = false; + let isIterableDone = false; + let resolvingCount = 0; + let currentIndex = 0; + const iterator = iterable[Symbol.iterator] === void 0 ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator](); + const signalListener = () => { + reject(signal.reason); + }; + const cleanup = () => { + signal?.removeEventListener("abort", signalListener); + }; + const resolve = (value) => { + resolve_(value); + cleanup(); + }; + const reject = (reason) => { + isRejected = true; + isResolved = true; + reject_(reason); + cleanup(); + }; + if (signal) { + if (signal.aborted) { + reject(signal.reason); + } + signal.addEventListener("abort", signalListener, { once: true }); + } + const next = async () => { + if (isResolved) { + return; + } + const nextItem = await iterator.next(); + const index = currentIndex; + currentIndex++; + if (nextItem.done) { + isIterableDone = true; + if (resolvingCount === 0 && !isResolved) { + if (!stopOnError && errors.length > 0) { + reject(new AggregateError(errors)); + return; + } + isResolved = true; + if (skippedIndexesMap.size === 0) { + resolve(result); + return; + } + const pureResult = []; + for (const [index2, value] of result.entries()) { + if (skippedIndexesMap.get(index2) === pMapSkip) { + continue; + } + pureResult.push(value); + } + resolve(pureResult); + } + return; + } + resolvingCount++; + (async () => { + try { + const element = await nextItem.value; + if (isResolved) { + return; + } + const value = await mapper(element, index); + if (value === pMapSkip) { + skippedIndexesMap.set(index, value); + } + result[index] = value; + resolvingCount--; + await next(); + } catch (error) { + if (stopOnError) { + reject(error); + } else { + errors.push(error); + resolvingCount--; + try { + await next(); + } catch (error2) { + reject(error2); + } + } + } + })(); + }; + (async () => { + for (let index = 0; index < concurrency; index++) { + try { + await next(); + } catch (error) { + reject(error); + break; + } + if (isIterableDone || isRejected) { + break; + } + } + })(); + }); +} +var pMapSkip = Symbol("skip"); +async function pFilter(iterable, filterer, options) { + const values = await pMap( + iterable, + (element, index) => Promise.all([filterer(element, index), element]), + options + ); + return values.filter((value) => Boolean(value[0])).map((value) => value[1]); +} +var import_temp_dir = (0, import_chunk_QGM4M3NI.__toESM)((0, import_chunk_CY52DY2B.require_temp_dir)()); +var { enginesOverride } = require_package(); +var debug = (0, import_debug.default)("prisma:fetch-engine:download"); +var exists = (0, import_node_util.promisify)(import_node_fs.default.exists); +var channel = "master"; +var vercelPkgPathRegex = /^((\w:[\\\/])|\/)snapshot[\/\\]/; +async function download(options) { + if (!options.binaries || Object.values(options.binaries).length === 0) { + return {}; + } + if (enginesOverride?.["branch"] || enginesOverride?.["folder"]) { + options.version = "_local_"; + options.skipCacheIntegrityCheck = true; + } + const { binaryTarget, ...os2 } = await (0, import_get_platform.getPlatformInfo)(); + if (os2.targetDistro && ["nixos"].includes(os2.targetDistro) && !(0, import_chunk_QFA3XBMW.allEngineEnvVarsSet)(Object.keys(options.binaries))) { + console.error( + `${(0, import_chunk_QFA3XBMW.yellow)("Warning")} Precompiled engine files are not available for ${os2.targetDistro}, please provide the paths via environment variables, see https://pris.ly/d/custom-engines` + ); + } else if (["freebsd11", "freebsd12", "freebsd13", "freebsd14", "freebsd15", "openbsd", "netbsd"].includes(binaryTarget)) { + console.error( + `${(0, import_chunk_QFA3XBMW.yellow)( + "Warning" + )} Precompiled engine files are not available for ${binaryTarget}. Read more about building your own engines at https://pris.ly/d/build-engines` + ); + } else if ("libquery-engine" in options.binaries) { + (0, import_get_platform.assertNodeAPISupported)(); + } + const opts = { + ...options, + binaryTargets: options.binaryTargets ?? [binaryTarget], + version: options.version ?? "latest", + binaries: options.binaries + }; + const binaryJobs = Object.entries(opts.binaries).flatMap( + ([binaryName, targetFolder]) => opts.binaryTargets.map((binaryTarget2) => { + const fileName = getBinaryName(binaryName, binaryTarget2); + const targetFilePath = import_node_path.default.join(targetFolder, fileName); + return { + binaryName, + targetFolder, + binaryTarget: binaryTarget2, + fileName, + targetFilePath, + envVarPath: (0, import_chunk_QFA3XBMW.getBinaryEnvVarPath)(binaryName)?.path, + skipCacheIntegrityCheck: !!opts.skipCacheIntegrityCheck + }; + }) + ); + if (process.env.BINARY_DOWNLOAD_VERSION) { + debug(`process.env.BINARY_DOWNLOAD_VERSION is set to "${process.env.BINARY_DOWNLOAD_VERSION}"`); + opts.version = process.env.BINARY_DOWNLOAD_VERSION; + } + if (opts.printVersion) { + console.log(`version: ${opts.version}`); + } + const binariesToDownload = await pFilter(binaryJobs, async (job) => { + const needsToBeDownloaded = await binaryNeedsToBeDownloaded(job, binaryTarget, opts.version); + const isSupported = import_get_platform.binaryTargets.includes(job.binaryTarget); + const shouldDownload = isSupported && !job.envVarPath && // this is for custom binaries + needsToBeDownloaded; + if (needsToBeDownloaded && !isSupported) { + throw new Error(`Unknown binaryTarget ${job.binaryTarget} and no custom engine files were provided`); + } + return shouldDownload; + }); + if (binariesToDownload.length > 0) { + const cleanupPromise = (0, import_chunk_3VVCXIQ5.cleanupCache)(); + let finishBar; + let setProgress; + if (opts.showProgress) { + const collectiveBar = getCollectiveBar(opts); + finishBar = collectiveBar.finishBar; + setProgress = collectiveBar.setProgress; + } + const promises = binariesToDownload.map((job) => { + const downloadUrl = (0, import_chunk_LONQL55G.getDownloadUrl)({ + channel: "all_commits", + version: opts.version, + binaryTarget: job.binaryTarget, + binaryName: job.binaryName + }); + debug(`${downloadUrl} will be downloaded to ${job.targetFilePath}`); + return downloadBinary({ + ...job, + downloadUrl, + version: opts.version, + failSilent: opts.failSilent, + progressCb: setProgress ? setProgress(job.targetFilePath) : void 0 + }); + }); + await Promise.all(promises); + await cleanupPromise; + if (finishBar) { + finishBar(); + } + } + const binaryPaths = binaryJobsToBinaryPaths(binaryJobs); + if (__dirname.match(vercelPkgPathRegex)) { + for (const engineType in binaryPaths) { + const binaryTargets2 = binaryPaths[engineType]; + for (const binaryTarget2 in binaryTargets2) { + const binaryPath = binaryTargets2[binaryTarget2]; + binaryTargets2[binaryTarget2] = await maybeCopyToTmp(binaryPath); + } + } + } + return binaryPaths; +} +function getCollectiveBar(options) { + const hasNodeAPI = "libquery-engine" in options.binaries; + const bar = (0, import_chunk_MWVY55RY.getBar)( + `Downloading Prisma engines${hasNodeAPI ? " for Node-API" : ""} for ${options.binaryTargets?.map((p) => (0, import_chunk_QFA3XBMW.bold)(p)).join(" and ")}` + ); + const progressMap = {}; + const numDownloads = Object.values(options.binaries).length * Object.values(options?.binaryTargets ?? []).length; + const setProgress = (sourcePath) => (progress) => { + progressMap[sourcePath] = progress; + const progressValues = Object.values(progressMap); + const totalProgress = progressValues.reduce((acc, curr) => { + return acc + curr; + }, 0) / numDownloads; + if (options.progressCb) { + options.progressCb(totalProgress); + } + if (bar) { + bar.update(totalProgress); + } + }; + return { + setProgress, + finishBar: () => { + bar.update(1); + bar.terminate(); + } + }; +} +function binaryJobsToBinaryPaths(jobs) { + return jobs.reduce((acc, job) => { + if (!acc[job.binaryName]) { + acc[job.binaryName] = {}; + } + acc[job.binaryName][job.binaryTarget] = job.envVarPath || job.targetFilePath; + return acc; + }, {}); +} +async function binaryNeedsToBeDownloaded(job, nativePlatform, version) { + if (job.envVarPath && import_node_fs.default.existsSync(job.envVarPath)) { + return false; + } + const targetExists = await exists(job.targetFilePath); + const cachedFile = await getCachedBinaryPath({ + ...job, + version + }); + if (cachedFile) { + if (job.skipCacheIntegrityCheck === true) { + await (0, import_chunk_LONQL55G.overwriteFile)(cachedFile, job.targetFilePath); + return false; + } + const sha256FilePath = cachedFile + ".sha256"; + if (await exists(sha256FilePath)) { + const sha256File = await import_node_fs.default.promises.readFile(sha256FilePath, "utf-8"); + const sha256Cache = await (0, import_chunk_FKGWOTGU.getHash)(cachedFile); + if (sha256File === sha256Cache) { + if (!targetExists) { + debug(`copying ${cachedFile} to ${job.targetFilePath}`); + await import_node_fs.default.promises.utimes(cachedFile, /* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()); + await (0, import_chunk_LONQL55G.overwriteFile)(cachedFile, job.targetFilePath); + } + const targetSha256 = await (0, import_chunk_FKGWOTGU.getHash)(job.targetFilePath); + if (sha256File !== targetSha256) { + debug(`overwriting ${job.targetFilePath} with ${cachedFile} as hashes do not match`); + await (0, import_chunk_LONQL55G.overwriteFile)(cachedFile, job.targetFilePath); + } + return false; + } else { + return true; + } + } else if (process.env.PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING) { + debug( + `the checksum file ${sha256FilePath} is missing but this was ignored because the PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING environment variable is set` + ); + if (targetExists) { + return false; + } + if (cachedFile) { + debug(`copying ${cachedFile} to ${job.targetFilePath}`); + await (0, import_chunk_LONQL55G.overwriteFile)(cachedFile, job.targetFilePath); + return false; + } + return true; + } else { + return true; + } + } + if (!targetExists) { + debug(`file ${job.targetFilePath} does not exist and must be downloaded`); + return true; + } + if (job.binaryTarget === nativePlatform) { + const currentVersion = await getVersion(job.targetFilePath, job.binaryName); + if (currentVersion?.includes(version) !== true) { + debug(`file ${job.targetFilePath} exists but its version is ${currentVersion} and we expect ${version}`); + return true; + } + } + return false; +} +async function getVersion(enginePath, binaryName) { + try { + if (binaryName === "libquery-engine") { + (0, import_get_platform.assertNodeAPISupported)(); + const commitHash = (0, import_chunk_QGM4M3NI.__require)(enginePath).version().commit; + return `${"libquery-engine"} ${commitHash}`; + } else { + const result = await execa(enginePath, ["--version"]); + return result.stdout; + } + } catch { + } + return void 0; +} +function getBinaryName(binaryName, binaryTarget) { + if (binaryName === "libquery-engine") { + return `${(0, import_get_platform.getNodeAPIName)(binaryTarget, "fs")}`; + } + const extension = binaryTarget === "windows" ? ".exe" : ""; + return `${binaryName}-${binaryTarget}${extension}`; +} +async function getCachedBinaryPath({ + version, + binaryTarget, + binaryName +}) { + const cacheDir = await (0, import_chunk_LONQL55G.getCacheDir)(channel, version, binaryTarget); + if (!cacheDir) { + return null; + } + const cachedTargetPath = import_node_path.default.join(cacheDir, binaryName); + if (!import_node_fs.default.existsSync(cachedTargetPath)) { + return null; + } + if (version !== "latest") { + return cachedTargetPath; + } + if (await exists(cachedTargetPath)) { + return cachedTargetPath; + } + return null; +} +async function downloadBinary(options) { + const { version, progressCb, targetFilePath, downloadUrl } = options; + const targetDir = import_node_path.default.dirname(targetFilePath); + try { + import_node_fs.default.accessSync(targetDir, import_node_fs.default.constants.W_OK); + await (0, import_fs_extra.ensureDir)(targetDir); + } catch (e) { + if (options.failSilent || e.code !== "EACCES") { + return; + } else { + throw new Error(`Can't write to ${targetDir} please make sure you install "prisma" with the right permissions.`); + } + } + debug(`Downloading ${downloadUrl} to ${targetFilePath} ...`); + if (progressCb) { + progressCb(0); + } + const { sha256, zippedSha256 } = await (0, import_chunk_CY52DY2B.downloadZip)(downloadUrl, targetFilePath, progressCb); + if (progressCb) { + progressCb(1); + } + (0, import_chunk_7JLQJWOR.chmodPlusX)(targetFilePath); + await saveFileToCache(options, version, sha256, zippedSha256); +} +async function saveFileToCache(job, version, sha256, zippedSha256) { + const cacheDir = await (0, import_chunk_LONQL55G.getCacheDir)(channel, version, job.binaryTarget); + if (!cacheDir) { + return; + } + const cachedTargetPath = import_node_path.default.join(cacheDir, job.binaryName); + const cachedSha256Path = import_node_path.default.join(cacheDir, job.binaryName + ".sha256"); + const cachedSha256ZippedPath = import_node_path.default.join(cacheDir, job.binaryName + ".gz.sha256"); + try { + await (0, import_chunk_LONQL55G.overwriteFile)(job.targetFilePath, cachedTargetPath); + if (sha256 != null) { + await import_node_fs.default.promises.writeFile(cachedSha256Path, sha256); + } + if (zippedSha256 != null) { + await import_node_fs.default.promises.writeFile(cachedSha256ZippedPath, zippedSha256); + } + } catch (e) { + debug(e); + } +} +async function maybeCopyToTmp(file) { + if (__dirname.match(vercelPkgPathRegex)) { + const targetDir = import_node_path.default.join(import_temp_dir.default, "prisma-binaries"); + await (0, import_fs_extra.ensureDir)(targetDir); + const target = import_node_path.default.join(targetDir, import_node_path.default.basename(file)); + const data = await import_node_fs.default.promises.readFile(file); + await import_node_fs.default.promises.writeFile(target, data); + plusX(target); + return target; + } + return file; +} +function plusX(file) { + const s = import_node_fs.default.statSync(file); + const newMode = s.mode | 64 | 8 | 1; + if (s.mode === newMode) { + return; + } + const base8 = newMode.toString(8).slice(-3); + import_node_fs.default.chmodSync(file, base8); +} diff --git a/backend/node_modules/@prisma/fetch-engine/dist/chunk-FKGWOTGU.js b/backend/node_modules/@prisma/fetch-engine/dist/chunk-FKGWOTGU.js new file mode 100644 index 0000000000000000000000000000000000000000..7789dc63626839decc0526b2329cb788c24a5489 --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/chunk-FKGWOTGU.js @@ -0,0 +1,49 @@ +"use strict"; +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 __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +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, target) => (target = 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(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var chunk_FKGWOTGU_exports = {}; +__export(chunk_FKGWOTGU_exports, { + getHash: () => getHash +}); +module.exports = __toCommonJS(chunk_FKGWOTGU_exports); +var import_node_crypto = __toESM(require("node:crypto")); +var import_node_fs = __toESM(require("node:fs")); +function getHash(filePath) { + const hash = import_node_crypto.default.createHash("sha256"); + const input = import_node_fs.default.createReadStream(filePath); + return new Promise((resolve) => { + input.on("readable", () => { + const data = input.read(); + if (data) { + hash.update(data); + } else { + resolve(hash.digest("hex")); + } + }); + }); +} diff --git a/backend/node_modules/@prisma/fetch-engine/dist/chunk-FSAAZH62.js b/backend/node_modules/@prisma/fetch-engine/dist/chunk-FSAAZH62.js new file mode 100644 index 0000000000000000000000000000000000000000..60056a2fa997d15fd581ea82a5638d02c9fd6313 --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/chunk-FSAAZH62.js @@ -0,0 +1,190 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var chunk_FSAAZH62_exports = {}; +__export(chunk_FSAAZH62_exports, { + require_p_map: () => require_p_map +}); +module.exports = __toCommonJS(chunk_FSAAZH62_exports); +var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js"); +var require_indent_string = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.js"(exports, module2) { + "use strict"; + module2.exports = (string, count = 1, options) => { + options = { + indent: " ", + includeEmptyLines: false, + ...options + }; + if (typeof string !== "string") { + throw new TypeError( + `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` + ); + } + if (typeof count !== "number") { + throw new TypeError( + `Expected \`count\` to be a \`number\`, got \`${typeof count}\`` + ); + } + if (typeof options.indent !== "string") { + throw new TypeError( + `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\`` + ); + } + if (count === 0) { + return string; + } + const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; + return string.replace(regex, options.indent.repeat(count)); + }; + } +}); +var require_clean_stack = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/index.js"(exports, module2) { + "use strict"; + var os = (0, import_chunk_QGM4M3NI.__require)("os"); + var extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; + var pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; + var homeDir = typeof os.homedir === "undefined" ? "" : os.homedir(); + module2.exports = (stack, options) => { + options = Object.assign({ pretty: false }, options); + return stack.replace(/\\/g, "/").split("\n").filter((line) => { + const pathMatches = line.match(extractPathRegex); + if (pathMatches === null || !pathMatches[1]) { + return true; + } + const match = pathMatches[1]; + if (match.includes(".app/Contents/Resources/electron.asar") || match.includes(".app/Contents/Resources/default_app.asar")) { + return false; + } + return !pathRegex.test(match); + }).filter((line) => line.trim() !== "").map((line) => { + if (options.pretty) { + return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, "~"))); + } + return line; + }).join("\n"); + }; + } +}); +var require_aggregate_error = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/index.js"(exports, module2) { + "use strict"; + var indentString = require_indent_string(); + var cleanStack = require_clean_stack(); + var cleanInternalStack = (stack) => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ""); + var AggregateError = class extends Error { + constructor(errors) { + if (!Array.isArray(errors)) { + throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); + } + errors = [...errors].map((error) => { + if (error instanceof Error) { + return error; + } + if (error !== null && typeof error === "object") { + return Object.assign(new Error(error.message), error); + } + return new Error(error); + }); + let message = errors.map((error) => { + return typeof error.stack === "string" ? cleanInternalStack(cleanStack(error.stack)) : String(error); + }).join("\n"); + message = "\n" + indentString(message, 4); + super(message); + this.name = "AggregateError"; + Object.defineProperty(this, "_errors", { value: errors }); + } + *[Symbol.iterator]() { + for (const error of this._errors) { + yield error; + } + } + }; + module2.exports = AggregateError; + } +}); +var require_p_map = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/index.js"(exports, module2) { + "use strict"; + var AggregateError = require_aggregate_error(); + module2.exports = async (iterable, mapper, { + concurrency = Infinity, + stopOnError = true + } = {}) => { + return new Promise((resolve, reject) => { + if (typeof mapper !== "function") { + throw new TypeError("Mapper function is required"); + } + if (!((Number.isSafeInteger(concurrency) || concurrency === Infinity) && concurrency >= 1)) { + throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`); + } + const result = []; + const errors = []; + const iterator = iterable[Symbol.iterator](); + let isRejected = false; + let isIterableDone = false; + let resolvingCount = 0; + let currentIndex = 0; + const next = () => { + if (isRejected) { + return; + } + const nextItem = iterator.next(); + const index = currentIndex; + currentIndex++; + if (nextItem.done) { + isIterableDone = true; + if (resolvingCount === 0) { + if (!stopOnError && errors.length !== 0) { + reject(new AggregateError(errors)); + } else { + resolve(result); + } + } + return; + } + resolvingCount++; + (async () => { + try { + const element = await nextItem.value; + result[index] = await mapper(element, index); + resolvingCount--; + next(); + } catch (error) { + if (stopOnError) { + isRejected = true; + reject(error); + } else { + errors.push(error); + resolvingCount--; + next(); + } + } + })(); + }; + for (let i = 0; i < concurrency; i++) { + next(); + if (isIterableDone) { + break; + } + } + }); + }; + } +}); diff --git a/backend/node_modules/@prisma/fetch-engine/dist/chunk-LONQL55G.js b/backend/node_modules/@prisma/fetch-engine/dist/chunk-LONQL55G.js new file mode 100644 index 0000000000000000000000000000000000000000..062b761168ff4ab9c9b7b4c3557b861e7ebfb1f2 --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/chunk-LONQL55G.js @@ -0,0 +1,2348 @@ +"use strict"; +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 __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +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, target) => (target = 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(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var chunk_LONQL55G_exports = {}; +__export(chunk_LONQL55G_exports, { + getCacheDir: () => getCacheDir, + getDownloadUrl: () => getDownloadUrl, + getRootCacheDir: () => getRootCacheDir, + overwriteFile: () => overwriteFile, + require_lib: () => require_lib +}); +module.exports = __toCommonJS(chunk_LONQL55G_exports); +var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js"); +var import_node_fs = __toESM(require("node:fs")); +var import_node_os = __toESM(require("node:os")); +var import_node_path = __toESM(require("node:path")); +var import_debug = __toESM(require("@prisma/debug")); +var import_get_platform = require("@prisma/get-platform"); +var import_node_process = __toESM(require("node:process")); +var import_node_path2 = __toESM(require("node:path")); +var import_node_fs2 = __toESM(require("node:fs")); +var import_node_path3 = __toESM(require("node:path")); +var import_node_path4 = __toESM(require("node:path")); +var import_node_url = require("node:url"); +var import_node_process2 = __toESM(require("node:process")); +var import_node_path5 = __toESM(require("node:path")); +var import_node_fs3 = __toESM(require("node:fs")); +var import_node_url2 = require("node:url"); +var require_common_path_prefix = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/common-path-prefix@3.0.0/node_modules/common-path-prefix/index.js"(exports, module2) { + "use strict"; + var { sep: DEFAULT_SEPARATOR } = (0, import_chunk_QGM4M3NI.__require)("path"); + var determineSeparator = (paths) => { + for (const path6 of paths) { + const match = /(\/|\\)/.exec(path6); + if (match !== null) return match[0]; + } + return DEFAULT_SEPARATOR; + }; + module2.exports = function commonPathPrefix2(paths, sep = determineSeparator(paths)) { + const [first = "", ...remaining] = paths; + if (first === "" || remaining.length === 0) return ""; + const parts = first.split(sep); + let endOfPrefix = parts.length; + for (const path6 of remaining) { + const compare = path6.split(sep); + for (let i = 0; i < endOfPrefix; i++) { + if (compare[i] !== parts[i]) { + endOfPrefix = i; + } + } + if (endOfPrefix === 0) return ""; + } + const prefix = parts.slice(0, endOfPrefix).join(sep); + return prefix.endsWith(sep) ? prefix : prefix + sep; + }; + } +}); +var require_universalify = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/universalify@2.0.1/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 }); + }; + } +}); +var require_polyfills = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports, module2) { + "use strict"; + var constants = (0, import_chunk_QGM4M3NI.__require)("constants"); + var origCwd = process.cwd; + var cwd2 = null; + var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform; + process.cwd = function() { + if (!cwd2) + cwd2 = origCwd.call(process); + return cwd2; + }; + try { + process.cwd(); + } catch (er) { + } + if (typeof process.chdir === "function") { + chdir = process.chdir; + process.chdir = function(d) { + cwd2 = null; + chdir.call(process, d); + }; + if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); + } + var chdir; + module2.exports = patch; + function patch(fs4) { + if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs4); + } + if (!fs4.lutimes) { + patchLutimes(fs4); + } + fs4.chown = chownFix(fs4.chown); + fs4.fchown = chownFix(fs4.fchown); + fs4.lchown = chownFix(fs4.lchown); + fs4.chmod = chmodFix(fs4.chmod); + fs4.fchmod = chmodFix(fs4.fchmod); + fs4.lchmod = chmodFix(fs4.lchmod); + fs4.chownSync = chownFixSync(fs4.chownSync); + fs4.fchownSync = chownFixSync(fs4.fchownSync); + fs4.lchownSync = chownFixSync(fs4.lchownSync); + fs4.chmodSync = chmodFixSync(fs4.chmodSync); + fs4.fchmodSync = chmodFixSync(fs4.fchmodSync); + fs4.lchmodSync = chmodFixSync(fs4.lchmodSync); + fs4.stat = statFix(fs4.stat); + fs4.fstat = statFix(fs4.fstat); + fs4.lstat = statFix(fs4.lstat); + fs4.statSync = statFixSync(fs4.statSync); + fs4.fstatSync = statFixSync(fs4.fstatSync); + fs4.lstatSync = statFixSync(fs4.lstatSync); + if (fs4.chmod && !fs4.lchmod) { + fs4.lchmod = function(path6, mode, cb) { + if (cb) process.nextTick(cb); + }; + fs4.lchmodSync = function() { + }; + } + if (fs4.chown && !fs4.lchown) { + fs4.lchown = function(path6, uid, gid, cb) { + if (cb) process.nextTick(cb); + }; + fs4.lchownSync = function() { + }; + } + if (platform === "win32") { + fs4.rename = typeof fs4.rename !== "function" ? fs4.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() { + fs4.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; + }(fs4.rename); + } + fs4.read = typeof fs4.read !== "function" ? fs4.read : function(fs$read) { + function read(fd, buffer, offset, length, position, 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(fs4, fd, buffer, offset, length, position, callback); + } + callback_.apply(this, arguments); + }; + } + return fs$read.call(fs4, fd, buffer, offset, length, position, callback); + } + if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); + return read; + }(fs4.read); + fs4.readSync = typeof fs4.readSync !== "function" ? fs4.readSync : /* @__PURE__ */ function(fs$readSync) { + return function(fd, buffer, offset, length, position) { + var eagCounter = 0; + while (true) { + try { + return fs$readSync.call(fs4, fd, buffer, offset, length, position); + } catch (er) { + if (er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + continue; + } + throw er; + } + } + }; + }(fs4.readSync); + function patchLchmod(fs5) { + fs5.lchmod = function(path6, mode, callback) { + fs5.open( + path6, + constants.O_WRONLY | constants.O_SYMLINK, + mode, + function(err, fd) { + if (err) { + if (callback) callback(err); + return; + } + fs5.fchmod(fd, mode, function(err2) { + fs5.close(fd, function(err22) { + if (callback) callback(err2 || err22); + }); + }); + } + ); + }; + fs5.lchmodSync = function(path6, mode) { + var fd = fs5.openSync(path6, constants.O_WRONLY | constants.O_SYMLINK, mode); + var threw = true; + var ret; + try { + ret = fs5.fchmodSync(fd, mode); + threw = false; + } finally { + if (threw) { + try { + fs5.closeSync(fd); + } catch (er) { + } + } else { + fs5.closeSync(fd); + } + } + return ret; + }; + } + function patchLutimes(fs5) { + if (constants.hasOwnProperty("O_SYMLINK") && fs5.futimes) { + fs5.lutimes = function(path6, at, mt, cb) { + fs5.open(path6, constants.O_SYMLINK, function(er, fd) { + if (er) { + if (cb) cb(er); + return; + } + fs5.futimes(fd, at, mt, function(er2) { + fs5.close(fd, function(er22) { + if (cb) cb(er2 || er22); + }); + }); + }); + }; + fs5.lutimesSync = function(path6, at, mt) { + var fd = fs5.openSync(path6, constants.O_SYMLINK); + var ret; + var threw = true; + try { + ret = fs5.futimesSync(fd, at, mt); + threw = false; + } finally { + if (threw) { + try { + fs5.closeSync(fd); + } catch (er) { + } + } else { + fs5.closeSync(fd); + } + } + return ret; + }; + } else if (fs5.futimes) { + fs5.lutimes = function(_a, _b, _c, cb) { + if (cb) process.nextTick(cb); + }; + fs5.lutimesSync = function() { + }; + } + } + function chmodFix(orig) { + if (!orig) return orig; + return function(target, mode, cb) { + return orig.call(fs4, target, mode, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chmodFixSync(orig) { + if (!orig) return orig; + return function(target, mode) { + try { + return orig.call(fs4, target, mode); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function chownFix(orig) { + if (!orig) return orig; + return function(target, uid, gid, cb) { + return orig.call(fs4, target, uid, gid, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chownFixSync(orig) { + if (!orig) return orig; + return function(target, uid, gid) { + try { + return orig.call(fs4, target, uid, gid); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function statFix(orig) { + if (!orig) return orig; + return function(target, 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(fs4, target, options, callback) : orig.call(fs4, target, callback); + }; + } + function statFixSync(orig) { + if (!orig) return orig; + return function(target, options) { + var stats = options ? orig.call(fs4, target, options) : orig.call(fs4, target); + 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; + } + } + } +}); +var require_legacy_streams = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports, module2) { + "use strict"; + var Stream = (0, import_chunk_QGM4M3NI.__require)("stream").Stream; + module2.exports = legacy; + function legacy(fs4) { + return { + ReadStream, + WriteStream + }; + function ReadStream(path6, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path6, options); + Stream.call(this); + var self = this; + this.path = path6; + 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() { + self._read(); + }); + return; + } + fs4.open(this.path, this.flags, this.mode, function(err, fd) { + if (err) { + self.emit("error", err); + self.readable = false; + return; + } + self.fd = fd; + self.emit("open", fd); + self._read(); + }); + } + function WriteStream(path6, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path6, options); + Stream.call(this); + this.path = path6; + 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 = fs4.open; + this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); + this.flush(); + } + } + } + } +}); +var require_clone = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(exports, module2) { + "use strict"; + module2.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 copy = { __proto__: getPrototypeOf(obj) }; + else + var copy = /* @__PURE__ */ Object.create(null); + Object.getOwnPropertyNames(obj).forEach(function(key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); + }); + return copy; + } + } +}); +var require_graceful_fs = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports, module2) { + "use strict"; + var fs4 = (0, import_chunk_QGM4M3NI.__require)("fs"); + var polyfills = require_polyfills(); + var legacy = require_legacy_streams(); + var clone = require_clone(); + var util = (0, import_chunk_QGM4M3NI.__require)("util"); + var gracefulQueue; + var previousSymbol; + if (typeof Symbol === "function" && typeof Symbol.for === "function") { + gracefulQueue = Symbol.for("graceful-fs.queue"); + previousSymbol = 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 debug2 = noop; + if (util.debuglog) + debug2 = util.debuglog("gfs4"); + else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) + debug2 = function() { + var m = util.format.apply(util, arguments); + m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); + console.error(m); + }; + if (!fs4[gracefulQueue]) { + queue = global[gracefulQueue] || []; + publishQueue(fs4, queue); + fs4.close = function(fs$close) { + function close(fd, cb) { + return fs$close.call(fs4, fd, function(err) { + if (!err) { + resetQueue(); + } + if (typeof cb === "function") + cb.apply(this, arguments); + }); + } + Object.defineProperty(close, previousSymbol, { + value: fs$close + }); + return close; + }(fs4.close); + fs4.closeSync = function(fs$closeSync) { + function closeSync(fd) { + fs$closeSync.apply(fs4, arguments); + resetQueue(); + } + Object.defineProperty(closeSync, previousSymbol, { + value: fs$closeSync + }); + return closeSync; + }(fs4.closeSync); + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { + process.on("exit", function() { + debug2(fs4[gracefulQueue]); + (0, import_chunk_QGM4M3NI.__require)("assert").equal(fs4[gracefulQueue].length, 0); + }); + } + } + var queue; + if (!global[gracefulQueue]) { + publishQueue(global, fs4[gracefulQueue]); + } + module2.exports = patch(clone(fs4)); + if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs4.__patched) { + module2.exports = patch(fs4); + fs4.__patched = true; + } + function patch(fs5) { + polyfills(fs5); + fs5.gracefulify = patch; + fs5.createReadStream = createReadStream; + fs5.createWriteStream = createWriteStream; + var fs$readFile = fs5.readFile; + fs5.readFile = readFile; + function readFile(path6, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$readFile(path6, options, cb); + function go$readFile(path7, options2, cb2, startTime) { + return fs$readFile(path7, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$readFile, [path7, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$writeFile = fs5.writeFile; + fs5.writeFile = writeFile; + function writeFile(path6, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$writeFile(path6, data, options, cb); + function go$writeFile(path7, data2, options2, cb2, startTime) { + return fs$writeFile(path7, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$writeFile, [path7, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$appendFile = fs5.appendFile; + if (fs$appendFile) + fs5.appendFile = appendFile; + function appendFile(path6, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$appendFile(path6, data, options, cb); + function go$appendFile(path7, data2, options2, cb2, startTime) { + return fs$appendFile(path7, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$appendFile, [path7, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$copyFile = fs5.copyFile; + if (fs$copyFile) + fs5.copyFile = copyFile; + function copyFile(src, dest, flags, cb) { + if (typeof flags === "function") { + cb = flags; + flags = 0; + } + return go$copyFile(src, dest, flags, cb); + function go$copyFile(src2, dest2, flags2, cb2, startTime) { + return fs$copyFile(src2, dest2, flags2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$readdir = fs5.readdir; + fs5.readdir = readdir; + var noReaddirOptionVersions = /^v[0-5]\./; + function readdir(path6, options, cb) { + if (typeof options === "function") + cb = options, options = null; + var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path7, options2, cb2, startTime) { + return fs$readdir(path7, fs$readdirCallback( + path7, + options2, + cb2, + startTime + )); + } : function go$readdir2(path7, options2, cb2, startTime) { + return fs$readdir(path7, options2, fs$readdirCallback( + path7, + options2, + cb2, + startTime + )); + }; + return go$readdir(path6, options, cb); + function fs$readdirCallback(path7, options2, cb2, startTime) { + return function(err, files) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([ + go$readdir, + [path7, 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(fs5); + ReadStream = legStreams.ReadStream; + WriteStream = legStreams.WriteStream; + } + var fs$ReadStream = fs5.ReadStream; + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype); + ReadStream.prototype.open = ReadStream$open; + } + var fs$WriteStream = fs5.WriteStream; + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype); + WriteStream.prototype.open = WriteStream$open; + } + Object.defineProperty(fs5, "ReadStream", { + get: function() { + return ReadStream; + }, + set: function(val) { + ReadStream = val; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(fs5, "WriteStream", { + get: function() { + return WriteStream; + }, + set: function(val) { + WriteStream = val; + }, + enumerable: true, + configurable: true + }); + var FileReadStream = ReadStream; + Object.defineProperty(fs5, "FileReadStream", { + get: function() { + return FileReadStream; + }, + set: function(val) { + FileReadStream = val; + }, + enumerable: true, + configurable: true + }); + var FileWriteStream = WriteStream; + Object.defineProperty(fs5, "FileWriteStream", { + get: function() { + return FileWriteStream; + }, + set: function(val) { + FileWriteStream = val; + }, + enumerable: true, + configurable: true + }); + function ReadStream(path6, 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(path6, 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(path6, options) { + return new fs5.ReadStream(path6, options); + } + function createWriteStream(path6, options) { + return new fs5.WriteStream(path6, options); + } + var fs$open = fs5.open; + fs5.open = open; + function open(path6, flags, mode, cb) { + if (typeof mode === "function") + cb = mode, mode = null; + return go$open(path6, flags, mode, cb); + function go$open(path7, flags2, mode2, cb2, startTime) { + return fs$open(path7, flags2, mode2, function(err, fd) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$open, [path7, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + return fs5; + } + function enqueue(elem) { + debug2("ENQUEUE", elem[0].name, elem[1]); + fs4[gracefulQueue].push(elem); + retry(); + } + var retryTimer; + function resetQueue() { + var now = Date.now(); + for (var i = 0; i < fs4[gracefulQueue].length; ++i) { + if (fs4[gracefulQueue][i].length > 2) { + fs4[gracefulQueue][i][3] = now; + fs4[gracefulQueue][i][4] = now; + } + } + retry(); + } + function retry() { + clearTimeout(retryTimer); + retryTimer = void 0; + if (fs4[gracefulQueue].length === 0) + return; + var elem = fs4[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) { + debug2("RETRY", fn.name, args); + fn.apply(null, args); + } else if (Date.now() - startTime >= 6e4) { + debug2("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) { + debug2("RETRY", fn.name, args); + fn.apply(null, args.concat([startTime])); + } else { + fs4[gracefulQueue].push(elem); + } + } + if (retryTimer === void 0) { + retryTimer = setTimeout(retry, 0); + } + } + } +}); +var require_fs = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"(exports) { + "use strict"; + var u = require_universalify().fromCallback; + var fs4 = require_graceful_fs(); + var api = [ + "access", + "appendFile", + "chmod", + "chown", + "close", + "copyFile", + "cp", + "fchmod", + "fchown", + "fdatasync", + "fstat", + "fsync", + "ftruncate", + "futimes", + "glob", + "lchmod", + "lchown", + "lutimes", + "link", + "lstat", + "mkdir", + "mkdtemp", + "open", + "opendir", + "readdir", + "readFile", + "readlink", + "realpath", + "rename", + "rm", + "rmdir", + "stat", + "statfs", + "symlink", + "truncate", + "unlink", + "utimes", + "writeFile" + ].filter((key) => { + return typeof fs4[key] === "function"; + }); + Object.assign(exports, fs4); + api.forEach((method) => { + exports[method] = u(fs4[method]); + }); + exports.exists = function(filename, callback) { + if (typeof callback === "function") { + return fs4.exists(filename, callback); + } + return new Promise((resolve) => { + return fs4.exists(filename, resolve); + }); + }; + exports.read = function(fd, buffer, offset, length, position, callback) { + if (typeof callback === "function") { + return fs4.read(fd, buffer, offset, length, position, callback); + } + return new Promise((resolve, reject) => { + fs4.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => { + if (err) return reject(err); + resolve({ bytesRead, buffer: buffer2 }); + }); + }); + }; + exports.write = function(fd, buffer, ...args) { + if (typeof args[args.length - 1] === "function") { + return fs4.write(fd, buffer, ...args); + } + return new Promise((resolve, reject) => { + fs4.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => { + if (err) return reject(err); + resolve({ bytesWritten, buffer: buffer2 }); + }); + }); + }; + exports.readv = function(fd, buffers, ...args) { + if (typeof args[args.length - 1] === "function") { + return fs4.readv(fd, buffers, ...args); + } + return new Promise((resolve, reject) => { + fs4.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => { + if (err) return reject(err); + resolve({ bytesRead, buffers: buffers2 }); + }); + }); + }; + exports.writev = function(fd, buffers, ...args) { + if (typeof args[args.length - 1] === "function") { + return fs4.writev(fd, buffers, ...args); + } + return new Promise((resolve, reject) => { + fs4.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => { + if (err) return reject(err); + resolve({ bytesWritten, buffers: buffers2 }); + }); + }); + }; + if (typeof fs4.realpath.native === "function") { + exports.realpath.native = u(fs4.realpath.native); + } else { + process.emitWarning( + "fs.realpath.native is not a function. Is fs being monkey-patched?", + "Warning", + "fs-extra-WARN0003" + ); + } + } +}); +var require_utils = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module2) { + "use strict"; + var path6 = (0, import_chunk_QGM4M3NI.__require)("path"); + module2.exports.checkPath = function checkPath(pth) { + if (process.platform === "win32") { + const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path6.parse(pth).root, "")); + if (pathHasInvalidWinCharacters) { + const error = new Error(`Path contains invalid characters: ${pth}`); + error.code = "EINVAL"; + throw error; + } + } + }; + } +}); +var require_make_dir = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module2) { + "use strict"; + var fs4 = require_fs(); + var { checkPath } = require_utils(); + var getMode = (options) => { + const defaults = { mode: 511 }; + if (typeof options === "number") return options; + return { ...defaults, ...options }.mode; + }; + module2.exports.makeDir = async (dir, options) => { + checkPath(dir); + return fs4.mkdir(dir, { + mode: getMode(options), + recursive: true + }); + }; + module2.exports.makeDirSync = (dir, options) => { + checkPath(dir); + return fs4.mkdirSync(dir, { + mode: getMode(options), + recursive: true + }); + }; + } +}); +var require_mkdirs = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/index.js"(exports, module2) { + "use strict"; + var u = require_universalify().fromPromise; + var { makeDir: _makeDir, makeDirSync } = require_make_dir(); + var makeDir = u(_makeDir); + module2.exports = { + mkdirs: makeDir, + mkdirsSync: makeDirSync, + // alias + mkdirp: makeDir, + mkdirpSync: makeDirSync, + ensureDir: makeDir, + ensureDirSync: makeDirSync + }; + } +}); +var require_path_exists = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/path-exists/index.js"(exports, module2) { + "use strict"; + var u = require_universalify().fromPromise; + var fs4 = require_fs(); + function pathExists2(path6) { + return fs4.access(path6).then(() => true).catch(() => false); + } + module2.exports = { + pathExists: u(pathExists2), + pathExistsSync: fs4.existsSync + }; + } +}); +var require_utimes = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/util/utimes.js"(exports, module2) { + "use strict"; + var fs4 = require_fs(); + var u = require_universalify().fromPromise; + async function utimesMillis(path6, atime, mtime) { + const fd = await fs4.open(path6, "r+"); + let closeErr = null; + try { + await fs4.futimes(fd, atime, mtime); + } finally { + try { + await fs4.close(fd); + } catch (e) { + closeErr = e; + } + } + if (closeErr) { + throw closeErr; + } + } + function utimesMillisSync(path6, atime, mtime) { + const fd = fs4.openSync(path6, "r+"); + fs4.futimesSync(fd, atime, mtime); + return fs4.closeSync(fd); + } + module2.exports = { + utimesMillis: u(utimesMillis), + utimesMillisSync + }; + } +}); +var require_stat = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/util/stat.js"(exports, module2) { + "use strict"; + var fs4 = require_fs(); + var path6 = (0, import_chunk_QGM4M3NI.__require)("path"); + var u = require_universalify().fromPromise; + function getStats(src, dest, opts) { + const statFunc = opts.dereference ? (file) => fs4.stat(file, { bigint: true }) : (file) => fs4.lstat(file, { bigint: true }); + return Promise.all([ + statFunc(src), + statFunc(dest).catch((err) => { + if (err.code === "ENOENT") return null; + throw err; + }) + ]).then(([srcStat, destStat]) => ({ srcStat, destStat })); + } + function getStatsSync(src, dest, opts) { + let destStat; + const statFunc = opts.dereference ? (file) => fs4.statSync(file, { bigint: true }) : (file) => fs4.lstatSync(file, { bigint: true }); + const srcStat = statFunc(src); + try { + destStat = statFunc(dest); + } catch (err) { + if (err.code === "ENOENT") return { srcStat, destStat: null }; + throw err; + } + return { srcStat, destStat }; + } + async function checkPaths(src, dest, funcName, opts) { + const { srcStat, destStat } = await getStats(src, dest, opts); + if (destStat) { + if (areIdentical(srcStat, destStat)) { + const srcBaseName = path6.basename(src); + const destBaseName = path6.basename(dest); + if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) { + return { srcStat, destStat, isChangingCase: true }; + } + throw new Error("Source and destination must not be the same."); + } + if (srcStat.isDirectory() && !destStat.isDirectory()) { + throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`); + } + if (!srcStat.isDirectory() && destStat.isDirectory()) { + throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`); + } + } + if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { + throw new Error(errMsg(src, dest, funcName)); + } + return { srcStat, destStat }; + } + function checkPathsSync(src, dest, funcName, opts) { + const { srcStat, destStat } = getStatsSync(src, dest, opts); + if (destStat) { + if (areIdentical(srcStat, destStat)) { + const srcBaseName = path6.basename(src); + const destBaseName = path6.basename(dest); + if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) { + return { srcStat, destStat, isChangingCase: true }; + } + throw new Error("Source and destination must not be the same."); + } + if (srcStat.isDirectory() && !destStat.isDirectory()) { + throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`); + } + if (!srcStat.isDirectory() && destStat.isDirectory()) { + throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`); + } + } + if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { + throw new Error(errMsg(src, dest, funcName)); + } + return { srcStat, destStat }; + } + async function checkParentPaths(src, srcStat, dest, funcName) { + const srcParent = path6.resolve(path6.dirname(src)); + const destParent = path6.resolve(path6.dirname(dest)); + if (destParent === srcParent || destParent === path6.parse(destParent).root) return; + let destStat; + try { + destStat = await fs4.stat(destParent, { bigint: true }); + } catch (err) { + if (err.code === "ENOENT") return; + throw err; + } + if (areIdentical(srcStat, destStat)) { + throw new Error(errMsg(src, dest, funcName)); + } + return checkParentPaths(src, srcStat, destParent, funcName); + } + function checkParentPathsSync(src, srcStat, dest, funcName) { + const srcParent = path6.resolve(path6.dirname(src)); + const destParent = path6.resolve(path6.dirname(dest)); + if (destParent === srcParent || destParent === path6.parse(destParent).root) return; + let destStat; + try { + destStat = fs4.statSync(destParent, { bigint: true }); + } catch (err) { + if (err.code === "ENOENT") return; + throw err; + } + if (areIdentical(srcStat, destStat)) { + throw new Error(errMsg(src, dest, funcName)); + } + return checkParentPathsSync(src, srcStat, destParent, funcName); + } + function areIdentical(srcStat, destStat) { + return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev; + } + function isSrcSubdir(src, dest) { + const srcArr = path6.resolve(src).split(path6.sep).filter((i) => i); + const destArr = path6.resolve(dest).split(path6.sep).filter((i) => i); + return srcArr.every((cur, i) => destArr[i] === cur); + } + function errMsg(src, dest, funcName) { + return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`; + } + module2.exports = { + // checkPaths + checkPaths: u(checkPaths), + checkPathsSync, + // checkParent + checkParentPaths: u(checkParentPaths), + checkParentPathsSync, + // Misc + isSrcSubdir, + areIdentical + }; + } +}); +var require_copy = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/copy.js"(exports, module2) { + "use strict"; + var fs4 = require_fs(); + var path6 = (0, import_chunk_QGM4M3NI.__require)("path"); + var { mkdirs } = require_mkdirs(); + var { pathExists: pathExists2 } = require_path_exists(); + var { utimesMillis } = require_utimes(); + var stat = require_stat(); + async function copy(src, dest, opts = {}) { + if (typeof opts === "function") { + opts = { filter: opts }; + } + opts.clobber = "clobber" in opts ? !!opts.clobber : true; + opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber; + if (opts.preserveTimestamps && process.arch === "ia32") { + process.emitWarning( + "Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269", + "Warning", + "fs-extra-WARN0001" + ); + } + const { srcStat, destStat } = await stat.checkPaths(src, dest, "copy", opts); + await stat.checkParentPaths(src, srcStat, dest, "copy"); + const include = await runFilter(src, dest, opts); + if (!include) return; + const destParent = path6.dirname(dest); + const dirExists = await pathExists2(destParent); + if (!dirExists) { + await mkdirs(destParent); + } + await getStatsAndPerformCopy(destStat, src, dest, opts); + } + async function runFilter(src, dest, opts) { + if (!opts.filter) return true; + return opts.filter(src, dest); + } + async function getStatsAndPerformCopy(destStat, src, dest, opts) { + const statFn = opts.dereference ? fs4.stat : fs4.lstat; + const srcStat = await statFn(src); + if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts); + if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts); + if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts); + if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`); + if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`); + throw new Error(`Unknown file: ${src}`); + } + async function onFile(srcStat, destStat, src, dest, opts) { + if (!destStat) return copyFile(srcStat, src, dest, opts); + if (opts.overwrite) { + await fs4.unlink(dest); + return copyFile(srcStat, src, dest, opts); + } + if (opts.errorOnExist) { + throw new Error(`'${dest}' already exists`); + } + } + async function copyFile(srcStat, src, dest, opts) { + await fs4.copyFile(src, dest); + if (opts.preserveTimestamps) { + if (fileIsNotWritable(srcStat.mode)) { + await makeFileWritable(dest, srcStat.mode); + } + const updatedSrcStat = await fs4.stat(src); + await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime); + } + return fs4.chmod(dest, srcStat.mode); + } + function fileIsNotWritable(srcMode) { + return (srcMode & 128) === 0; + } + function makeFileWritable(dest, srcMode) { + return fs4.chmod(dest, srcMode | 128); + } + async function onDir(srcStat, destStat, src, dest, opts) { + if (!destStat) { + await fs4.mkdir(dest); + } + const promises = []; + for await (const item of await fs4.opendir(src)) { + const srcItem = path6.join(src, item.name); + const destItem = path6.join(dest, item.name); + promises.push( + runFilter(srcItem, destItem, opts).then((include) => { + if (include) { + return stat.checkPaths(srcItem, destItem, "copy", opts).then(({ destStat: destStat2 }) => { + return getStatsAndPerformCopy(destStat2, srcItem, destItem, opts); + }); + } + }) + ); + } + await Promise.all(promises); + if (!destStat) { + await fs4.chmod(dest, srcStat.mode); + } + } + async function onLink(destStat, src, dest, opts) { + let resolvedSrc = await fs4.readlink(src); + if (opts.dereference) { + resolvedSrc = path6.resolve(process.cwd(), resolvedSrc); + } + if (!destStat) { + return fs4.symlink(resolvedSrc, dest); + } + let resolvedDest = null; + try { + resolvedDest = await fs4.readlink(dest); + } catch (e) { + if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs4.symlink(resolvedSrc, dest); + throw e; + } + if (opts.dereference) { + resolvedDest = path6.resolve(process.cwd(), resolvedDest); + } + if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) { + throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`); + } + if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) { + throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`); + } + await fs4.unlink(dest); + return fs4.symlink(resolvedSrc, dest); + } + module2.exports = copy; + } +}); +var require_copy_sync = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module2) { + "use strict"; + var fs4 = require_graceful_fs(); + var path6 = (0, import_chunk_QGM4M3NI.__require)("path"); + var mkdirsSync = require_mkdirs().mkdirsSync; + var utimesMillisSync = require_utimes().utimesMillisSync; + var stat = require_stat(); + function copySync(src, dest, opts) { + if (typeof opts === "function") { + opts = { filter: opts }; + } + opts = opts || {}; + opts.clobber = "clobber" in opts ? !!opts.clobber : true; + opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber; + if (opts.preserveTimestamps && process.arch === "ia32") { + process.emitWarning( + "Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269", + "Warning", + "fs-extra-WARN0002" + ); + } + const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts); + stat.checkParentPathsSync(src, srcStat, dest, "copy"); + if (opts.filter && !opts.filter(src, dest)) return; + const destParent = path6.dirname(dest); + if (!fs4.existsSync(destParent)) mkdirsSync(destParent); + return getStats(destStat, src, dest, opts); + } + function getStats(destStat, src, dest, opts) { + const statSync = opts.dereference ? fs4.statSync : fs4.lstatSync; + const srcStat = statSync(src); + if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts); + else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts); + else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts); + else if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`); + else if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`); + throw new Error(`Unknown file: ${src}`); + } + function onFile(srcStat, destStat, src, dest, opts) { + if (!destStat) return copyFile(srcStat, src, dest, opts); + return mayCopyFile(srcStat, src, dest, opts); + } + function mayCopyFile(srcStat, src, dest, opts) { + if (opts.overwrite) { + fs4.unlinkSync(dest); + return copyFile(srcStat, src, dest, opts); + } else if (opts.errorOnExist) { + throw new Error(`'${dest}' already exists`); + } + } + function copyFile(srcStat, src, dest, opts) { + fs4.copyFileSync(src, dest); + if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest); + return setDestMode(dest, srcStat.mode); + } + function handleTimestamps(srcMode, src, dest) { + if (fileIsNotWritable(srcMode)) makeFileWritable(dest, srcMode); + return setDestTimestamps(src, dest); + } + function fileIsNotWritable(srcMode) { + return (srcMode & 128) === 0; + } + function makeFileWritable(dest, srcMode) { + return setDestMode(dest, srcMode | 128); + } + function setDestMode(dest, srcMode) { + return fs4.chmodSync(dest, srcMode); + } + function setDestTimestamps(src, dest) { + const updatedSrcStat = fs4.statSync(src); + return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime); + } + function onDir(srcStat, destStat, src, dest, opts) { + if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts); + return copyDir(src, dest, opts); + } + function mkDirAndCopy(srcMode, src, dest, opts) { + fs4.mkdirSync(dest); + copyDir(src, dest, opts); + return setDestMode(dest, srcMode); + } + function copyDir(src, dest, opts) { + const dir = fs4.opendirSync(src); + try { + let dirent; + while ((dirent = dir.readSync()) !== null) { + copyDirItem(dirent.name, src, dest, opts); + } + } finally { + dir.closeSync(); + } + } + function copyDirItem(item, src, dest, opts) { + const srcItem = path6.join(src, item); + const destItem = path6.join(dest, item); + if (opts.filter && !opts.filter(srcItem, destItem)) return; + const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts); + return getStats(destStat, srcItem, destItem, opts); + } + function onLink(destStat, src, dest, opts) { + let resolvedSrc = fs4.readlinkSync(src); + if (opts.dereference) { + resolvedSrc = path6.resolve(process.cwd(), resolvedSrc); + } + if (!destStat) { + return fs4.symlinkSync(resolvedSrc, dest); + } else { + let resolvedDest; + try { + resolvedDest = fs4.readlinkSync(dest); + } catch (err) { + if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs4.symlinkSync(resolvedSrc, dest); + throw err; + } + if (opts.dereference) { + resolvedDest = path6.resolve(process.cwd(), resolvedDest); + } + if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) { + throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`); + } + if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) { + throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`); + } + return copyLink(resolvedSrc, dest); + } + } + function copyLink(resolvedSrc, dest) { + fs4.unlinkSync(dest); + return fs4.symlinkSync(resolvedSrc, dest); + } + module2.exports = copySync; + } +}); +var require_copy2 = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/index.js"(exports, module2) { + "use strict"; + var u = require_universalify().fromPromise; + module2.exports = { + copy: u(require_copy()), + copySync: require_copy_sync() + }; + } +}); +var require_remove = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/remove/index.js"(exports, module2) { + "use strict"; + var fs4 = require_graceful_fs(); + var u = require_universalify().fromCallback; + function remove(path6, callback) { + fs4.rm(path6, { recursive: true, force: true }, callback); + } + function removeSync(path6) { + fs4.rmSync(path6, { recursive: true, force: true }); + } + module2.exports = { + remove: u(remove), + removeSync + }; + } +}); +var require_empty = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/empty/index.js"(exports, module2) { + "use strict"; + var u = require_universalify().fromPromise; + var fs4 = require_fs(); + var path6 = (0, import_chunk_QGM4M3NI.__require)("path"); + var mkdir = require_mkdirs(); + var remove = require_remove(); + var emptyDir = u(async function emptyDir2(dir) { + let items; + try { + items = await fs4.readdir(dir); + } catch { + return mkdir.mkdirs(dir); + } + return Promise.all(items.map((item) => remove.remove(path6.join(dir, item)))); + }); + function emptyDirSync(dir) { + let items; + try { + items = fs4.readdirSync(dir); + } catch { + return mkdir.mkdirsSync(dir); + } + items.forEach((item) => { + item = path6.join(dir, item); + remove.removeSync(item); + }); + } + module2.exports = { + emptyDirSync, + emptydirSync: emptyDirSync, + emptyDir, + emptydir: emptyDir + }; + } +}); +var require_file = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/file.js"(exports, module2) { + "use strict"; + var u = require_universalify().fromPromise; + var path6 = (0, import_chunk_QGM4M3NI.__require)("path"); + var fs4 = require_fs(); + var mkdir = require_mkdirs(); + async function createFile(file) { + let stats; + try { + stats = await fs4.stat(file); + } catch { + } + if (stats && stats.isFile()) return; + const dir = path6.dirname(file); + let dirStats = null; + try { + dirStats = await fs4.stat(dir); + } catch (err) { + if (err.code === "ENOENT") { + await mkdir.mkdirs(dir); + await fs4.writeFile(file, ""); + return; + } else { + throw err; + } + } + if (dirStats.isDirectory()) { + await fs4.writeFile(file, ""); + } else { + await fs4.readdir(dir); + } + } + function createFileSync(file) { + let stats; + try { + stats = fs4.statSync(file); + } catch { + } + if (stats && stats.isFile()) return; + const dir = path6.dirname(file); + try { + if (!fs4.statSync(dir).isDirectory()) { + fs4.readdirSync(dir); + } + } catch (err) { + if (err && err.code === "ENOENT") mkdir.mkdirsSync(dir); + else throw err; + } + fs4.writeFileSync(file, ""); + } + module2.exports = { + createFile: u(createFile), + createFileSync + }; + } +}); +var require_link = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/link.js"(exports, module2) { + "use strict"; + var u = require_universalify().fromPromise; + var path6 = (0, import_chunk_QGM4M3NI.__require)("path"); + var fs4 = require_fs(); + var mkdir = require_mkdirs(); + var { pathExists: pathExists2 } = require_path_exists(); + var { areIdentical } = require_stat(); + async function createLink(srcpath, dstpath) { + let dstStat; + try { + dstStat = await fs4.lstat(dstpath); + } catch { + } + let srcStat; + try { + srcStat = await fs4.lstat(srcpath); + } catch (err) { + err.message = err.message.replace("lstat", "ensureLink"); + throw err; + } + if (dstStat && areIdentical(srcStat, dstStat)) return; + const dir = path6.dirname(dstpath); + const dirExists = await pathExists2(dir); + if (!dirExists) { + await mkdir.mkdirs(dir); + } + await fs4.link(srcpath, dstpath); + } + function createLinkSync(srcpath, dstpath) { + let dstStat; + try { + dstStat = fs4.lstatSync(dstpath); + } catch { + } + try { + const srcStat = fs4.lstatSync(srcpath); + if (dstStat && areIdentical(srcStat, dstStat)) return; + } catch (err) { + err.message = err.message.replace("lstat", "ensureLink"); + throw err; + } + const dir = path6.dirname(dstpath); + const dirExists = fs4.existsSync(dir); + if (dirExists) return fs4.linkSync(srcpath, dstpath); + mkdir.mkdirsSync(dir); + return fs4.linkSync(srcpath, dstpath); + } + module2.exports = { + createLink: u(createLink), + createLinkSync + }; + } +}); +var require_symlink_paths = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module2) { + "use strict"; + var path6 = (0, import_chunk_QGM4M3NI.__require)("path"); + var fs4 = require_fs(); + var { pathExists: pathExists2 } = require_path_exists(); + var u = require_universalify().fromPromise; + async function symlinkPaths(srcpath, dstpath) { + if (path6.isAbsolute(srcpath)) { + try { + await fs4.lstat(srcpath); + } catch (err) { + err.message = err.message.replace("lstat", "ensureSymlink"); + throw err; + } + return { + toCwd: srcpath, + toDst: srcpath + }; + } + const dstdir = path6.dirname(dstpath); + const relativeToDst = path6.join(dstdir, srcpath); + const exists = await pathExists2(relativeToDst); + if (exists) { + return { + toCwd: relativeToDst, + toDst: srcpath + }; + } + try { + await fs4.lstat(srcpath); + } catch (err) { + err.message = err.message.replace("lstat", "ensureSymlink"); + throw err; + } + return { + toCwd: srcpath, + toDst: path6.relative(dstdir, srcpath) + }; + } + function symlinkPathsSync(srcpath, dstpath) { + if (path6.isAbsolute(srcpath)) { + const exists2 = fs4.existsSync(srcpath); + if (!exists2) throw new Error("absolute srcpath does not exist"); + return { + toCwd: srcpath, + toDst: srcpath + }; + } + const dstdir = path6.dirname(dstpath); + const relativeToDst = path6.join(dstdir, srcpath); + const exists = fs4.existsSync(relativeToDst); + if (exists) { + return { + toCwd: relativeToDst, + toDst: srcpath + }; + } + const srcExists = fs4.existsSync(srcpath); + if (!srcExists) throw new Error("relative srcpath does not exist"); + return { + toCwd: srcpath, + toDst: path6.relative(dstdir, srcpath) + }; + } + module2.exports = { + symlinkPaths: u(symlinkPaths), + symlinkPathsSync + }; + } +}); +var require_symlink_type = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module2) { + "use strict"; + var fs4 = require_fs(); + var u = require_universalify().fromPromise; + async function symlinkType(srcpath, type) { + if (type) return type; + let stats; + try { + stats = await fs4.lstat(srcpath); + } catch { + return "file"; + } + return stats && stats.isDirectory() ? "dir" : "file"; + } + function symlinkTypeSync(srcpath, type) { + if (type) return type; + let stats; + try { + stats = fs4.lstatSync(srcpath); + } catch { + return "file"; + } + return stats && stats.isDirectory() ? "dir" : "file"; + } + module2.exports = { + symlinkType: u(symlinkType), + symlinkTypeSync + }; + } +}); +var require_symlink = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module2) { + "use strict"; + var u = require_universalify().fromPromise; + var path6 = (0, import_chunk_QGM4M3NI.__require)("path"); + var fs4 = require_fs(); + var { mkdirs, mkdirsSync } = require_mkdirs(); + var { symlinkPaths, symlinkPathsSync } = require_symlink_paths(); + var { symlinkType, symlinkTypeSync } = require_symlink_type(); + var { pathExists: pathExists2 } = require_path_exists(); + var { areIdentical } = require_stat(); + async function createSymlink(srcpath, dstpath, type) { + let stats; + try { + stats = await fs4.lstat(dstpath); + } catch { + } + if (stats && stats.isSymbolicLink()) { + const [srcStat, dstStat] = await Promise.all([ + fs4.stat(srcpath), + fs4.stat(dstpath) + ]); + if (areIdentical(srcStat, dstStat)) return; + } + const relative = await symlinkPaths(srcpath, dstpath); + srcpath = relative.toDst; + const toType = await symlinkType(relative.toCwd, type); + const dir = path6.dirname(dstpath); + if (!await pathExists2(dir)) { + await mkdirs(dir); + } + return fs4.symlink(srcpath, dstpath, toType); + } + function createSymlinkSync(srcpath, dstpath, type) { + let stats; + try { + stats = fs4.lstatSync(dstpath); + } catch { + } + if (stats && stats.isSymbolicLink()) { + const srcStat = fs4.statSync(srcpath); + const dstStat = fs4.statSync(dstpath); + if (areIdentical(srcStat, dstStat)) return; + } + const relative = symlinkPathsSync(srcpath, dstpath); + srcpath = relative.toDst; + type = symlinkTypeSync(relative.toCwd, type); + const dir = path6.dirname(dstpath); + const exists = fs4.existsSync(dir); + if (exists) return fs4.symlinkSync(srcpath, dstpath, type); + mkdirsSync(dir); + return fs4.symlinkSync(srcpath, dstpath, type); + } + module2.exports = { + createSymlink: u(createSymlink), + createSymlinkSync + }; + } +}); +var require_ensure = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/index.js"(exports, module2) { + "use strict"; + var { createFile, createFileSync } = require_file(); + var { createLink, createLinkSync } = require_link(); + var { createSymlink, createSymlinkSync } = require_symlink(); + module2.exports = { + // file + createFile, + createFileSync, + ensureFile: createFile, + ensureFileSync: createFileSync, + // link + createLink, + createLinkSync, + ensureLink: createLink, + ensureLinkSync: createLinkSync, + // symlink + createSymlink, + createSymlinkSync, + ensureSymlink: createSymlink, + ensureSymlinkSync: createSymlinkSync + }; + } +}); +var require_utils2 = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js"(exports, module2) { + "use strict"; + function stringify(obj, { EOL = "\n", finalEOL = true, replacer = null, spaces } = {}) { + const EOF = finalEOL ? EOL : ""; + const str = JSON.stringify(obj, replacer, spaces); + return str.replace(/\n/g, EOL) + EOF; + } + function stripBom(content) { + if (Buffer.isBuffer(content)) content = content.toString("utf8"); + return content.replace(/^\uFEFF/, ""); + } + module2.exports = { stringify, stripBom }; + } +}); +var require_jsonfile = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/index.js"(exports, module2) { + "use strict"; + var _fs; + try { + _fs = require_graceful_fs(); + } catch (_) { + _fs = (0, import_chunk_QGM4M3NI.__require)("fs"); + } + var universalify = require_universalify(); + var { stringify, stripBom } = require_utils2(); + async function _readFile(file, options = {}) { + if (typeof options === "string") { + options = { encoding: options }; + } + const fs4 = options.fs || _fs; + const shouldThrow = "throws" in options ? options.throws : true; + let data = await universalify.fromCallback(fs4.readFile)(file, options); + data = stripBom(data); + let obj; + try { + obj = JSON.parse(data, options ? options.reviver : null); + } catch (err) { + if (shouldThrow) { + err.message = `${file}: ${err.message}`; + throw err; + } else { + return null; + } + } + return obj; + } + var readFile = universalify.fromPromise(_readFile); + function readFileSync(file, options = {}) { + if (typeof options === "string") { + options = { encoding: options }; + } + const fs4 = options.fs || _fs; + const shouldThrow = "throws" in options ? options.throws : true; + try { + let content = fs4.readFileSync(file, options); + content = stripBom(content); + return JSON.parse(content, options.reviver); + } catch (err) { + if (shouldThrow) { + err.message = `${file}: ${err.message}`; + throw err; + } else { + return null; + } + } + } + async function _writeFile(file, obj, options = {}) { + const fs4 = options.fs || _fs; + const str = stringify(obj, options); + await universalify.fromCallback(fs4.writeFile)(file, str, options); + } + var writeFile = universalify.fromPromise(_writeFile); + function writeFileSync(file, obj, options = {}) { + const fs4 = options.fs || _fs; + const str = stringify(obj, options); + return fs4.writeFileSync(file, str, options); + } + var jsonfile = { + readFile, + readFileSync, + writeFile, + writeFileSync + }; + module2.exports = jsonfile; + } +}); +var require_jsonfile2 = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/json/jsonfile.js"(exports, module2) { + "use strict"; + var jsonFile = require_jsonfile(); + module2.exports = { + // jsonfile exports + readJson: jsonFile.readFile, + readJsonSync: jsonFile.readFileSync, + writeJson: jsonFile.writeFile, + writeJsonSync: jsonFile.writeFileSync + }; + } +}); +var require_output_file = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/output-file/index.js"(exports, module2) { + "use strict"; + var u = require_universalify().fromPromise; + var fs4 = require_fs(); + var path6 = (0, import_chunk_QGM4M3NI.__require)("path"); + var mkdir = require_mkdirs(); + var pathExists2 = require_path_exists().pathExists; + async function outputFile(file, data, encoding = "utf-8") { + const dir = path6.dirname(file); + if (!await pathExists2(dir)) { + await mkdir.mkdirs(dir); + } + return fs4.writeFile(file, data, encoding); + } + function outputFileSync(file, ...args) { + const dir = path6.dirname(file); + if (!fs4.existsSync(dir)) { + mkdir.mkdirsSync(dir); + } + fs4.writeFileSync(file, ...args); + } + module2.exports = { + outputFile: u(outputFile), + outputFileSync + }; + } +}); +var require_output_json = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/json/output-json.js"(exports, module2) { + "use strict"; + var { stringify } = require_utils2(); + var { outputFile } = require_output_file(); + async function outputJson(file, data, options = {}) { + const str = stringify(data, options); + await outputFile(file, str, options); + } + module2.exports = outputJson; + } +}); +var require_output_json_sync = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module2) { + "use strict"; + var { stringify } = require_utils2(); + var { outputFileSync } = require_output_file(); + function outputJsonSync(file, data, options) { + const str = stringify(data, options); + outputFileSync(file, str, options); + } + module2.exports = outputJsonSync; + } +}); +var require_json = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/json/index.js"(exports, module2) { + "use strict"; + var u = require_universalify().fromPromise; + var jsonFile = require_jsonfile2(); + jsonFile.outputJson = u(require_output_json()); + jsonFile.outputJsonSync = require_output_json_sync(); + jsonFile.outputJSON = jsonFile.outputJson; + jsonFile.outputJSONSync = jsonFile.outputJsonSync; + jsonFile.writeJSON = jsonFile.writeJson; + jsonFile.writeJSONSync = jsonFile.writeJsonSync; + jsonFile.readJSON = jsonFile.readJson; + jsonFile.readJSONSync = jsonFile.readJsonSync; + module2.exports = jsonFile; + } +}); +var require_move = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/move/move.js"(exports, module2) { + "use strict"; + var fs4 = require_fs(); + var path6 = (0, import_chunk_QGM4M3NI.__require)("path"); + var { copy } = require_copy2(); + var { remove } = require_remove(); + var { mkdirp } = require_mkdirs(); + var { pathExists: pathExists2 } = require_path_exists(); + var stat = require_stat(); + async function move(src, dest, opts = {}) { + const overwrite = opts.overwrite || opts.clobber || false; + const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts); + await stat.checkParentPaths(src, srcStat, dest, "move"); + const destParent = path6.dirname(dest); + const parsedParentPath = path6.parse(destParent); + if (parsedParentPath.root !== destParent) { + await mkdirp(destParent); + } + return doRename(src, dest, overwrite, isChangingCase); + } + async function doRename(src, dest, overwrite, isChangingCase) { + if (!isChangingCase) { + if (overwrite) { + await remove(dest); + } else if (await pathExists2(dest)) { + throw new Error("dest already exists."); + } + } + try { + await fs4.rename(src, dest); + } catch (err) { + if (err.code !== "EXDEV") { + throw err; + } + await moveAcrossDevice(src, dest, overwrite); + } + } + async function moveAcrossDevice(src, dest, overwrite) { + const opts = { + overwrite, + errorOnExist: true, + preserveTimestamps: true + }; + await copy(src, dest, opts); + return remove(src); + } + module2.exports = move; + } +}); +var require_move_sync = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/move/move-sync.js"(exports, module2) { + "use strict"; + var fs4 = require_graceful_fs(); + var path6 = (0, import_chunk_QGM4M3NI.__require)("path"); + var copySync = require_copy2().copySync; + var removeSync = require_remove().removeSync; + var mkdirpSync = require_mkdirs().mkdirpSync; + var stat = require_stat(); + function moveSync(src, dest, opts) { + opts = opts || {}; + const overwrite = opts.overwrite || opts.clobber || false; + const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts); + stat.checkParentPathsSync(src, srcStat, dest, "move"); + if (!isParentRoot(dest)) mkdirpSync(path6.dirname(dest)); + return doRename(src, dest, overwrite, isChangingCase); + } + function isParentRoot(dest) { + const parent = path6.dirname(dest); + const parsedPath = path6.parse(parent); + return parsedPath.root === parent; + } + function doRename(src, dest, overwrite, isChangingCase) { + if (isChangingCase) return rename(src, dest, overwrite); + if (overwrite) { + removeSync(dest); + return rename(src, dest, overwrite); + } + if (fs4.existsSync(dest)) throw new Error("dest already exists."); + return rename(src, dest, overwrite); + } + function rename(src, dest, overwrite) { + try { + fs4.renameSync(src, dest); + } catch (err) { + if (err.code !== "EXDEV") throw err; + return moveAcrossDevice(src, dest, overwrite); + } + } + function moveAcrossDevice(src, dest, overwrite) { + const opts = { + overwrite, + errorOnExist: true, + preserveTimestamps: true + }; + copySync(src, dest, opts); + return removeSync(src); + } + module2.exports = moveSync; + } +}); +var require_move2 = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/move/index.js"(exports, module2) { + "use strict"; + var u = require_universalify().fromPromise; + module2.exports = { + move: u(require_move()), + moveSync: require_move_sync() + }; + } +}); +var require_lib = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/index.js"(exports, module2) { + "use strict"; + module2.exports = { + // Export promiseified graceful-fs: + ...require_fs(), + // Export extra methods: + ...require_copy2(), + ...require_empty(), + ...require_ensure(), + ...require_json(), + ...require_mkdirs(), + ...require_move2(), + ...require_output_file(), + ...require_path_exists(), + ...require_remove() + }; + } +}); +var import_common_path_prefix = (0, import_chunk_QGM4M3NI.__toESM)(require_common_path_prefix(), 1); +var typeMappings = { + directory: "isDirectory", + file: "isFile" +}; +function checkType(type) { + if (Object.hasOwnProperty.call(typeMappings, type)) { + return; + } + throw new Error(`Invalid type specified: ${type}`); +} +var matchType = (type, stat) => stat[typeMappings[type]](); +var toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url2.fileURLToPath)(urlOrPath) : urlOrPath; +function locatePathSync(paths, { + cwd: cwd2 = import_node_process2.default.cwd(), + type = "file", + allowSymlinks = true +} = {}) { + checkType(type); + cwd2 = toPath(cwd2); + const statFunction = allowSymlinks ? import_node_fs3.default.statSync : import_node_fs3.default.lstatSync; + for (const path_ of paths) { + try { + const stat = statFunction(import_node_path5.default.resolve(cwd2, path_), { + throwIfNoEntry: false + }); + if (!stat) { + continue; + } + if (matchType(type, stat)) { + return path_; + } + } catch { + } + } +} +var toPath2 = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath; +var findUpStop = Symbol("findUpStop"); +function findUpMultipleSync(name, options = {}) { + let directory = import_node_path4.default.resolve(toPath2(options.cwd) || ""); + const { root } = import_node_path4.default.parse(directory); + const stopAt = options.stopAt || root; + const limit = options.limit || Number.POSITIVE_INFINITY; + const paths = [name].flat(); + const runMatcher = (locateOptions) => { + if (typeof name !== "function") { + return locatePathSync(paths, locateOptions); + } + const foundPath = name(locateOptions.cwd); + if (typeof foundPath === "string") { + return locatePathSync([foundPath], locateOptions); + } + return foundPath; + }; + const matches = []; + while (true) { + const foundPath = runMatcher({ ...options, cwd: directory }); + if (foundPath === findUpStop) { + break; + } + if (foundPath) { + matches.push(import_node_path4.default.resolve(directory, foundPath)); + } + if (directory === stopAt || matches.length >= limit) { + break; + } + directory = import_node_path4.default.dirname(directory); + } + return matches; +} +function findUpSync(name, options = {}) { + const matches = findUpMultipleSync(name, { ...options, limit: 1 }); + return matches[0]; +} +function packageDirectorySync({ cwd: cwd2 } = {}) { + const filePath = findUpSync("package.json", { cwd: cwd2 }); + return filePath && import_node_path3.default.dirname(filePath); +} +var { env, cwd } = import_node_process.default; +var isWritable = (path6) => { + try { + import_node_fs2.default.accessSync(path6, import_node_fs2.default.constants.W_OK); + return true; + } catch { + return false; + } +}; +function useDirectory(directory, options) { + if (options.create) { + import_node_fs2.default.mkdirSync(directory, { recursive: true }); + } + return directory; +} +function getNodeModuleDirectory(directory) { + const nodeModules = import_node_path2.default.join(directory, "node_modules"); + if (!isWritable(nodeModules) && (import_node_fs2.default.existsSync(nodeModules) || !isWritable(import_node_path2.default.join(directory)))) { + return; + } + return nodeModules; +} +function findCacheDirectory(options = {}) { + if (env.CACHE_DIR && !["true", "false", "1", "0"].includes(env.CACHE_DIR)) { + return useDirectory(import_node_path2.default.join(env.CACHE_DIR, options.name), options); + } + let { cwd: directory = cwd(), files } = options; + if (files) { + if (!Array.isArray(files)) { + throw new TypeError(`Expected \`files\` option to be an array, got \`${typeof files}\`.`); + } + directory = (0, import_common_path_prefix.default)(files.map((file) => import_node_path2.default.resolve(directory, file))); + } + directory = packageDirectorySync({ cwd: directory }); + if (!directory) { + return; + } + const nodeModules = getNodeModuleDirectory(directory); + if (!nodeModules) { + return; + } + return useDirectory(import_node_path2.default.join(directory, "node_modules", ".cache", options.name), options); +} +var import_fs_extra = (0, import_chunk_QGM4M3NI.__toESM)(require_lib()); +var debug = (0, import_debug.default)("prisma:fetch-engine:cache-dir"); +async function getRootCacheDir() { + if (import_node_os.default.platform() === "win32") { + const cacheDir = findCacheDirectory({ name: "prisma", create: true }); + if (cacheDir) { + return cacheDir; + } + if (process.env.APPDATA) { + return import_node_path.default.join(process.env.APPDATA, "Prisma"); + } + } + if (process.env.AWS_LAMBDA_FUNCTION_VERSION) { + try { + await (0, import_fs_extra.ensureDir)(`/tmp/prisma-download`); + return `/tmp/prisma-download`; + } catch (e) { + return null; + } + } + return process.env.XDG_CACHE_HOME ? import_node_path.default.join(process.env.XDG_CACHE_HOME, "prisma") : import_node_path.default.join(import_node_os.default.homedir(), ".cache/prisma"); +} +async function getCacheDir(channel, version, binaryTarget) { + const rootCacheDir = await getRootCacheDir(); + if (!rootCacheDir) { + return null; + } + const cacheDir = import_node_path.default.join(rootCacheDir, channel, version, binaryTarget); + try { + if (!import_node_fs.default.existsSync(cacheDir)) { + await (0, import_fs_extra.ensureDir)(cacheDir); + } + } catch (e) { + debug("The following error is being caught and just there for debugging:"); + debug(e); + return null; + } + return cacheDir; +} +function getDownloadUrl({ + channel, + version, + binaryTarget, + binaryName, + extension = ".gz" +}) { + const baseUrl = process.env.PRISMA_BINARIES_MIRROR || // TODO: remove this + process.env.PRISMA_ENGINES_MIRROR || "https://binaries.prisma.sh"; + const finalExtension = ( + // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison + binaryTarget === "windows" && "libquery-engine" !== binaryName ? `.exe${extension}` : extension + ); + if (binaryName === "libquery-engine") { + binaryName = (0, import_get_platform.getNodeAPIName)(binaryTarget, "url"); + } + return `${baseUrl}/${channel}/${version}/${binaryTarget}/${binaryName}${finalExtension}`; +} +async function overwriteFile(sourcePath, targetPath) { + if (import_node_os.default.platform() === "darwin") { + await removeFileIfExists(targetPath); + await import_node_fs.default.promises.copyFile(sourcePath, targetPath); + } else { + const tempPath = `${targetPath}.tmp${process.pid}`; + await import_node_fs.default.promises.copyFile(sourcePath, tempPath); + await import_node_fs.default.promises.rename(tempPath, targetPath); + } +} +async function removeFileIfExists(filePath) { + try { + await import_node_fs.default.promises.unlink(filePath); + } catch (e) { + if (e.code !== "ENOENT") { + throw e; + } + } +} diff --git a/backend/node_modules/@prisma/fetch-engine/dist/chunk-QFA3XBMW.js b/backend/node_modules/@prisma/fetch-engine/dist/chunk-QFA3XBMW.js new file mode 100644 index 0000000000000000000000000000000000000000..714a8cc1d4588c783907e72785991797a4de6c52 --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/chunk-QFA3XBMW.js @@ -0,0 +1,159 @@ +"use strict"; +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 __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +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, target) => (target = 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(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var chunk_QFA3XBMW_exports = {}; +__export(chunk_QFA3XBMW_exports, { + allEngineEnvVarsSet: () => allEngineEnvVarsSet, + bold: () => bold, + deprecatedEnvVarMap: () => deprecatedEnvVarMap, + engineEnvVarMap: () => engineEnvVarMap, + getBinaryEnvVarPath: () => getBinaryEnvVarPath, + yellow: () => yellow +}); +module.exports = __toCommonJS(chunk_QFA3XBMW_exports); +var import_node_fs = __toESM(require("node:fs")); +var import_node_path = __toESM(require("node:path")); +var import_debug = __toESM(require("@prisma/debug")); +var FORCE_COLOR; +var NODE_DISABLE_COLORS; +var NO_COLOR; +var TERM; +var isTTY = true; +if (typeof process !== "undefined") { + ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {}); + isTTY = process.stdout && process.stdout.isTTY; +} +var $ = { + enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY) +}; +function init(x, y) { + let rgx = new RegExp(`\\x1b\\[${y}m`, "g"); + let open = `\x1B[${x}m`, close = `\x1B[${y}m`; + return function(txt) { + if (!$.enabled || txt == null) return txt; + return open + (!!~("" + txt).indexOf(close) ? txt.replace(rgx, close + open) : txt) + close; + }; +} +var reset = init(0, 0); +var bold = init(1, 22); +var dim = init(2, 22); +var italic = init(3, 23); +var underline = init(4, 24); +var inverse = init(7, 27); +var hidden = init(8, 28); +var strikethrough = init(9, 29); +var black = init(30, 39); +var red = init(31, 39); +var green = init(32, 39); +var yellow = init(33, 39); +var blue = init(34, 39); +var magenta = init(35, 39); +var cyan = init(36, 39); +var white = init(37, 39); +var gray = init(90, 39); +var grey = init(90, 39); +var bgBlack = init(40, 49); +var bgRed = init(41, 49); +var bgGreen = init(42, 49); +var bgYellow = init(43, 49); +var bgBlue = init(44, 49); +var bgMagenta = init(45, 49); +var bgCyan = init(46, 49); +var bgWhite = init(47, 49); +var debug = (0, import_debug.default)("prisma:fetch-engine:env"); +var engineEnvVarMap = { + [ + "query-engine" + /* QueryEngineBinary */ + ]: "PRISMA_QUERY_ENGINE_BINARY", + [ + "libquery-engine" + /* QueryEngineLibrary */ + ]: "PRISMA_QUERY_ENGINE_LIBRARY", + [ + "schema-engine" + /* SchemaEngineBinary */ + ]: "PRISMA_SCHEMA_ENGINE_BINARY" +}; +var deprecatedEnvVarMap = { + [ + "schema-engine" + /* SchemaEngineBinary */ + ]: "PRISMA_MIGRATION_ENGINE_BINARY" +}; +function getBinaryEnvVarPath(binaryName) { + const envVar = getEnvVarToUse(binaryName); + if (process.env[envVar]) { + const envVarPath = import_node_path.default.resolve(process.cwd(), process.env[envVar]); + if (!import_node_fs.default.existsSync(envVarPath)) { + throw new Error( + `Env var ${bold(envVar)} is provided but provided path ${underline(process.env[envVar])} can't be resolved.` + ); + } + debug( + `Using env var ${bold(envVar)} for binary ${bold(binaryName)}, which points to ${underline( + process.env[envVar] + )}` + ); + return { + path: envVarPath, + fromEnvVar: envVar + }; + } + return null; +} +function getEnvVarToUse(binaryType) { + const envVar = engineEnvVarMap[binaryType]; + const deprecatedEnvVar = deprecatedEnvVarMap[binaryType]; + if (deprecatedEnvVar && process.env[deprecatedEnvVar]) { + if (process.env[envVar]) { + console.warn( + `${yellow("prisma:warn")} Both ${bold(envVar)} and ${bold(deprecatedEnvVar)} are specified, ${bold( + envVar + )} takes precedence. ${bold(deprecatedEnvVar)} is deprecated.` + ); + return envVar; + } else { + console.warn( + `${yellow("prisma:warn")} ${bold(deprecatedEnvVar)} environment variable is deprecated, please use ${bold( + envVar + )} instead` + ); + return deprecatedEnvVar; + } + } + return envVar; +} +function allEngineEnvVarsSet(binaries) { + for (const binaryType of binaries) { + if (!getBinaryEnvVarPath(binaryType)) { + return false; + } + } + return true; +} diff --git a/backend/node_modules/@prisma/fetch-engine/dist/chunk-QGM4M3NI.js b/backend/node_modules/@prisma/fetch-engine/dist/chunk-QGM4M3NI.js new file mode 100644 index 0000000000000000000000000000000000000000..434d559077ad127797bb33c2b1baa7c0f6cded47 --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/chunk-QGM4M3NI.js @@ -0,0 +1,56 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var chunk_QGM4M3NI_exports = {}; +__export(chunk_QGM4M3NI_exports, { + __commonJS: () => __commonJS, + __require: () => __require, + __toESM: () => __toESM +}); +module.exports = __toCommonJS(chunk_QGM4M3NI_exports); +var __create = Object.create; +var __defProp2 = Object.defineProperty; +var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; +var __getOwnPropNames2 = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp2 = 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() { + return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps2( + // 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 ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod +)); diff --git a/backend/node_modules/@prisma/fetch-engine/dist/chunk-VAPNG6TS.js b/backend/node_modules/@prisma/fetch-engine/dist/chunk-VAPNG6TS.js new file mode 100644 index 0000000000000000000000000000000000000000..2be3f28b071f9027b3008083ae3768b7a082b19f --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/chunk-VAPNG6TS.js @@ -0,0 +1,1642 @@ +"use strict"; +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 __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +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, target) => (target = 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(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var chunk_VAPNG6TS_exports = {}; +__export(chunk_VAPNG6TS_exports, { + getProxyAgent: () => getProxyAgent +}); +module.exports = __toCommonJS(chunk_VAPNG6TS_exports); +var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js"); +var import_debug = __toESM(require("@prisma/debug")); +var require_ms = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports, module2) { + "use strict"; + var s = 1e3; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var w = d * 7; + var y = d * 365.25; + module2.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === "string" && val.length > 0) { + return parse(val); + } else if (type === "number" && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) + ); + }; + function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || "ms").toLowerCase(); + switch (type) { + case "years": + case "year": + case "yrs": + case "yr": + case "y": + return n * y; + case "weeks": + case "week": + case "w": + return n * w; + case "days": + case "day": + case "d": + return n * d; + case "hours": + case "hour": + case "hrs": + case "hr": + case "h": + return n * h; + case "minutes": + case "minute": + case "mins": + case "min": + case "m": + return n * m; + case "seconds": + case "second": + case "secs": + case "sec": + case "s": + return n * s; + case "milliseconds": + case "millisecond": + case "msecs": + case "msec": + case "ms": + return n; + default: + return void 0; + } + } + function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + "d"; + } + if (msAbs >= h) { + return Math.round(ms / h) + "h"; + } + if (msAbs >= m) { + return Math.round(ms / m) + "m"; + } + if (msAbs >= s) { + return Math.round(ms / s) + "s"; + } + return ms + "ms"; + } + function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, "day"); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, "hour"); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, "minute"); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, "second"); + } + return ms + " ms"; + } + function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + " " + name + (isPlural ? "s" : ""); + } + } +}); +var require_common = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/common.js"(exports, module2) { + "use strict"; + function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = require_ms(); + createDebug.destroy = destroy; + Object.keys(env).forEach((key) => { + createDebug[key] = env[key]; + }); + createDebug.names = []; + createDebug.skips = []; + createDebug.formatters = {}; + function selectColor(namespace) { + let hash = 0; + for (let i = 0; i < namespace.length; i++) { + hash = (hash << 5) - hash + namespace.charCodeAt(i); + hash |= 0; + } + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; + function debug2(...args) { + if (!debug2.enabled) { + return; + } + const self = debug2; + const curr = Number(/* @__PURE__ */ new Date()); + const ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + args[0] = createDebug.coerce(args[0]); + if (typeof args[0] !== "string") { + args.unshift("%O"); + } + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + if (match === "%%") { + return "%"; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === "function") { + const val = args[index]; + match = formatter.call(self, val); + args.splice(index, 1); + index--; + } + return match; + }); + createDebug.formatArgs.call(self, args); + const logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + debug2.namespace = namespace; + debug2.useColors = createDebug.useColors(); + debug2.color = createDebug.selectColor(namespace); + debug2.extend = extend; + debug2.destroy = createDebug.destroy; + Object.defineProperty(debug2, "enabled", { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + return enabledCache; + }, + set: (v) => { + enableOverride = v; + } + }); + if (typeof createDebug.init === "function") { + createDebug.init(debug2); + } + return debug2; + } + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.namespaces = namespaces; + createDebug.names = []; + createDebug.skips = []; + const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(" ", ",").split(",").filter(Boolean); + for (const ns of split) { + if (ns[0] === "-") { + createDebug.skips.push(ns.slice(1)); + } else { + createDebug.names.push(ns); + } + } + } + function matchesTemplate(search, template) { + let searchIndex = 0; + let templateIndex = 0; + let starIndex = -1; + let matchIndex = 0; + while (searchIndex < search.length) { + if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) { + if (template[templateIndex] === "*") { + starIndex = templateIndex; + matchIndex = searchIndex; + templateIndex++; + } else { + searchIndex++; + templateIndex++; + } + } else if (starIndex !== -1) { + templateIndex = starIndex + 1; + matchIndex++; + searchIndex = matchIndex; + } else { + return false; + } + } + while (templateIndex < template.length && template[templateIndex] === "*") { + templateIndex++; + } + return templateIndex === template.length; + } + function disable() { + const namespaces = [ + ...createDebug.names, + ...createDebug.skips.map((namespace) => "-" + namespace) + ].join(","); + createDebug.enable(""); + return namespaces; + } + function enabled(name) { + for (const skip of createDebug.skips) { + if (matchesTemplate(name, skip)) { + return false; + } + } + for (const ns of createDebug.names) { + if (matchesTemplate(name, ns)) { + return true; + } + } + return false; + } + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + function destroy() { + console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + } + createDebug.enable(createDebug.load()); + return createDebug; + } + module2.exports = setup; + } +}); +var require_browser = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/browser.js"(exports, module2) { + "use strict"; + exports.formatArgs = formatArgs; + exports.save = save; + exports.load = load; + exports.useColors = useColors; + exports.storage = localstorage(); + exports.destroy = /* @__PURE__ */ (() => { + let warned = false; + return () => { + if (!warned) { + warned = true; + console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + } + }; + })(); + exports.colors = [ + "#0000CC", + "#0000FF", + "#0033CC", + "#0033FF", + "#0066CC", + "#0066FF", + "#0099CC", + "#0099FF", + "#00CC00", + "#00CC33", + "#00CC66", + "#00CC99", + "#00CCCC", + "#00CCFF", + "#3300CC", + "#3300FF", + "#3333CC", + "#3333FF", + "#3366CC", + "#3366FF", + "#3399CC", + "#3399FF", + "#33CC00", + "#33CC33", + "#33CC66", + "#33CC99", + "#33CCCC", + "#33CCFF", + "#6600CC", + "#6600FF", + "#6633CC", + "#6633FF", + "#66CC00", + "#66CC33", + "#9900CC", + "#9900FF", + "#9933CC", + "#9933FF", + "#99CC00", + "#99CC33", + "#CC0000", + "#CC0033", + "#CC0066", + "#CC0099", + "#CC00CC", + "#CC00FF", + "#CC3300", + "#CC3333", + "#CC3366", + "#CC3399", + "#CC33CC", + "#CC33FF", + "#CC6600", + "#CC6633", + "#CC9900", + "#CC9933", + "#CCCC00", + "#CCCC33", + "#FF0000", + "#FF0033", + "#FF0066", + "#FF0099", + "#FF00CC", + "#FF00FF", + "#FF3300", + "#FF3333", + "#FF3366", + "#FF3399", + "#FF33CC", + "#FF33FF", + "#FF6600", + "#FF6633", + "#FF9900", + "#FF9933", + "#FFCC00", + "#FFCC33" + ]; + function useColors() { + if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { + return true; + } + if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + let m; + return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 + typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker + typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); + } + function formatArgs(args) { + args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff); + if (!this.useColors) { + return; + } + const c = "color: " + this.color; + args.splice(1, 0, c, "color: inherit"); + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, (match) => { + if (match === "%%") { + return; + } + index++; + if (match === "%c") { + lastC = index; + } + }); + args.splice(lastC, 0, c); + } + exports.log = console.debug || console.log || (() => { + }); + function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem("debug", namespaces); + } else { + exports.storage.removeItem("debug"); + } + } catch (error) { + } + } + function load() { + let r; + try { + r = exports.storage.getItem("debug"); + } catch (error) { + } + if (!r && typeof process !== "undefined" && "env" in process) { + r = process.env.DEBUG; + } + return r; + } + function localstorage() { + try { + return localStorage; + } catch (error) { + } + } + module2.exports = require_common()(exports); + var { formatters } = module2.exports; + formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (error) { + return "[UnexpectedJSONParseError]: " + error.message; + } + }; + } +}); +var require_has_flag = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports, module2) { + "use strict"; + module2.exports = (flag, argv = process.argv) => { + const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; + const position = argv.indexOf(prefix + flag); + const terminatorPosition = argv.indexOf("--"); + return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); + }; + } +}); +var require_supports_color = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js"(exports, module2) { + "use strict"; + var os = (0, import_chunk_QGM4M3NI.__require)("os"); + var tty = (0, import_chunk_QGM4M3NI.__require)("tty"); + var hasFlag = require_has_flag(); + var { env } = process; + var flagForceColor; + if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) { + flagForceColor = 0; + } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { + flagForceColor = 1; + } + function envForceColor() { + if ("FORCE_COLOR" in env) { + if (env.FORCE_COLOR === "true") { + return 1; + } + if (env.FORCE_COLOR === "false") { + return 0; + } + return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3); + } + } + function translateLevel(level) { + if (level === 0) { + return false; + } + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; + } + function supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) { + const noFlagForceColor = envForceColor(); + if (noFlagForceColor !== void 0) { + flagForceColor = noFlagForceColor; + } + const forceColor = sniffFlags ? flagForceColor : noFlagForceColor; + if (forceColor === 0) { + return 0; + } + if (sniffFlags) { + if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { + return 3; + } + if (hasFlag("color=256")) { + return 2; + } + } + if (haveStream && !streamIsTTY && forceColor === void 0) { + return 0; + } + const min = forceColor || 0; + if (env.TERM === "dumb") { + return min; + } + if (process.platform === "win32") { + const osRelease = os.release().split("."); + if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + return 1; + } + if ("CI" in env) { + if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") { + return 1; + } + return min; + } + if ("TEAMCITY_VERSION" in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } + if (env.COLORTERM === "truecolor") { + return 3; + } + if ("TERM_PROGRAM" in env) { + const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); + switch (env.TERM_PROGRAM) { + case "iTerm.app": + return version >= 3 ? 3 : 2; + case "Apple_Terminal": + return 2; + } + } + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + if ("COLORTERM" in env) { + return 1; + } + return min; + } + function getSupportLevel(stream, options = {}) { + const level = supportsColor(stream, { + streamIsTTY: stream && stream.isTTY, + ...options + }); + return translateLevel(level); + } + module2.exports = { + supportsColor: getSupportLevel, + stdout: getSupportLevel({ isTTY: tty.isatty(1) }), + stderr: getSupportLevel({ isTTY: tty.isatty(2) }) + }; + } +}); +var require_node = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/node.js"(exports, module2) { + "use strict"; + var tty = (0, import_chunk_QGM4M3NI.__require)("tty"); + var util = (0, import_chunk_QGM4M3NI.__require)("util"); + exports.init = init; + exports.log = log; + exports.formatArgs = formatArgs; + exports.save = save; + exports.load = load; + exports.useColors = useColors; + exports.destroy = util.deprecate( + () => { + }, + "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`." + ); + exports.colors = [6, 2, 3, 4, 5, 1]; + try { + const supportsColor = require_supports_color(); + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } + } catch (error) { + } + exports.inspectOpts = Object.keys(process.env).filter((key) => { + return /^debug_/i.test(key); + }).reduce((obj, key) => { + const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === "null") { + val = null; + } else { + val = Number(val); + } + obj[prop] = val; + return obj; + }, {}); + function useColors() { + return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd); + } + function formatArgs(args) { + const { namespace: name, useColors: useColors2 } = this; + if (useColors2) { + const c = this.color; + const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c); + const prefix = ` ${colorCode};1m${name} \x1B[0m`; + args[0] = prefix + args[0].split("\n").join("\n" + prefix); + args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m"); + } else { + args[0] = getDate() + name + " " + args[0]; + } + } + function getDate() { + if (exports.inspectOpts.hideDate) { + return ""; + } + return (/* @__PURE__ */ new Date()).toISOString() + " "; + } + function log(...args) { + return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + "\n"); + } + function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + delete process.env.DEBUG; + } + } + function load() { + return process.env.DEBUG; + } + function init(debug2) { + debug2.inspectOpts = {}; + const keys = Object.keys(exports.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug2.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } + } + module2.exports = require_common()(exports); + var { formatters } = module2.exports; + formatters.o = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); + }; + formatters.O = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); + }; + } +}); +var require_src = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/index.js"(exports, module2) { + "use strict"; + if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) { + module2.exports = require_browser(); + } else { + module2.exports = require_node(); + } + } +}); +var require_helpers = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/agent-base@7.1.0/node_modules/agent-base/dist/helpers.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.req = exports.json = exports.toBuffer = void 0; + var http = __importStar((0, import_chunk_QGM4M3NI.__require)("http")); + var https = __importStar((0, import_chunk_QGM4M3NI.__require)("https")); + async function toBuffer(stream) { + let length = 0; + const chunks = []; + for await (const chunk of stream) { + length += chunk.length; + chunks.push(chunk); + } + return Buffer.concat(chunks, length); + } + exports.toBuffer = toBuffer; + async function json(stream) { + const buf = await toBuffer(stream); + const str = buf.toString("utf8"); + try { + return JSON.parse(str); + } catch (_err) { + const err = _err; + err.message += ` (input: ${str})`; + throw err; + } + } + exports.json = json; + function req(url, opts = {}) { + const href = typeof url === "string" ? url : url.href; + const req2 = (href.startsWith("https:") ? https : http).request(url, opts); + const promise = new Promise((resolve, reject) => { + req2.once("response", resolve).once("error", reject).end(); + }); + req2.then = promise.then.bind(promise); + return req2; + } + exports.req = req; + } +}); +var require_dist = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/agent-base@7.1.0/node_modules/agent-base/dist/index.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __exportStar = exports && exports.__exportStar || function(m, exports2) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding(exports2, m, p); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Agent = void 0; + var http = __importStar((0, import_chunk_QGM4M3NI.__require)("http")); + __exportStar(require_helpers(), exports); + var INTERNAL = Symbol("AgentBaseInternalState"); + var Agent = class extends http.Agent { + constructor(opts) { + super(opts); + this[INTERNAL] = {}; + } + /** + * Determine whether this is an `http` or `https` request. + */ + isSecureEndpoint(options) { + if (options) { + if (typeof options.secureEndpoint === "boolean") { + return options.secureEndpoint; + } + if (typeof options.protocol === "string") { + return options.protocol === "https:"; + } + } + const { stack } = new Error(); + if (typeof stack !== "string") + return false; + return stack.split("\n").some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1); + } + createSocket(req, options, cb) { + const connectOpts = { + ...options, + secureEndpoint: this.isSecureEndpoint(options) + }; + Promise.resolve().then(() => this.connect(req, connectOpts)).then((socket) => { + if (socket instanceof http.Agent) { + return socket.addRequest(req, connectOpts); + } + this[INTERNAL].currentSocket = socket; + super.createSocket(req, options, cb); + }, cb); + } + createConnection() { + const socket = this[INTERNAL].currentSocket; + this[INTERNAL].currentSocket = void 0; + if (!socket) { + throw new Error("No socket was returned in the `connect()` function"); + } + return socket; + } + get defaultPort() { + return this[INTERNAL].defaultPort ?? (this.protocol === "https:" ? 443 : 80); + } + set defaultPort(v) { + if (this[INTERNAL]) { + this[INTERNAL].defaultPort = v; + } + } + get protocol() { + return this[INTERNAL].protocol ?? (this.isSecureEndpoint() ? "https:" : "http:"); + } + set protocol(v) { + if (this[INTERNAL]) { + this[INTERNAL].protocol = v; + } + } + }; + exports.Agent = Agent; + } +}); +var require_dist2 = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/http-proxy-agent@7.0.2/node_modules/http-proxy-agent/dist/index.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __importDefault = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.HttpProxyAgent = void 0; + var net = __importStar((0, import_chunk_QGM4M3NI.__require)("net")); + var tls = __importStar((0, import_chunk_QGM4M3NI.__require)("tls")); + var debug_1 = __importDefault(require_src()); + var events_1 = (0, import_chunk_QGM4M3NI.__require)("events"); + var agent_base_1 = require_dist(); + var url_1 = (0, import_chunk_QGM4M3NI.__require)("url"); + var debug2 = (0, debug_1.default)("http-proxy-agent"); + var HttpProxyAgent2 = class extends agent_base_1.Agent { + constructor(proxy, opts) { + super(opts); + this.proxy = typeof proxy === "string" ? new url_1.URL(proxy) : proxy; + this.proxyHeaders = opts?.headers ?? {}; + debug2("Creating new HttpProxyAgent instance: %o", this.proxy.href); + const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ""); + const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80; + this.connectOpts = { + ...opts ? omit(opts, "headers") : null, + host, + port + }; + } + addRequest(req, opts) { + req._header = null; + this.setRequestProps(req, opts); + super.addRequest(req, opts); + } + setRequestProps(req, opts) { + const { proxy } = this; + const protocol = opts.secureEndpoint ? "https:" : "http:"; + const hostname = req.getHeader("host") || "localhost"; + const base = `${protocol}//${hostname}`; + const url = new url_1.URL(req.path, base); + if (opts.port !== 80) { + url.port = String(opts.port); + } + req.path = String(url); + const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; + if (proxy.username || proxy.password) { + const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; + headers["Proxy-Authorization"] = `Basic ${Buffer.from(auth).toString("base64")}`; + } + if (!headers["Proxy-Connection"]) { + headers["Proxy-Connection"] = this.keepAlive ? "Keep-Alive" : "close"; + } + for (const name of Object.keys(headers)) { + const value = headers[name]; + if (value) { + req.setHeader(name, value); + } + } + } + async connect(req, opts) { + req._header = null; + if (!req.path.includes("://")) { + this.setRequestProps(req, opts); + } + let first; + let endOfHeaders; + debug2("Regenerating stored HTTP header string for request"); + req._implicitHeader(); + if (req.outputData && req.outputData.length > 0) { + debug2("Patching connection write() output buffer with updated header"); + first = req.outputData[0].data; + endOfHeaders = first.indexOf("\r\n\r\n") + 4; + req.outputData[0].data = req._header + first.substring(endOfHeaders); + debug2("Output buffer: %o", req.outputData[0].data); + } + let socket; + if (this.proxy.protocol === "https:") { + debug2("Creating `tls.Socket`: %o", this.connectOpts); + socket = tls.connect(this.connectOpts); + } else { + debug2("Creating `net.Socket`: %o", this.connectOpts); + socket = net.connect(this.connectOpts); + } + await (0, events_1.once)(socket, "connect"); + return socket; + } + }; + HttpProxyAgent2.protocols = ["http", "https"]; + exports.HttpProxyAgent = HttpProxyAgent2; + function omit(obj, ...keys) { + const ret = {}; + let key; + for (key in obj) { + if (!keys.includes(key)) { + ret[key] = obj[key]; + } + } + return ret; + } + } +}); +var require_helpers2 = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/agent-base@7.1.3/node_modules/agent-base/dist/helpers.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.req = exports.json = exports.toBuffer = void 0; + var http = __importStar((0, import_chunk_QGM4M3NI.__require)("http")); + var https = __importStar((0, import_chunk_QGM4M3NI.__require)("https")); + async function toBuffer(stream) { + let length = 0; + const chunks = []; + for await (const chunk of stream) { + length += chunk.length; + chunks.push(chunk); + } + return Buffer.concat(chunks, length); + } + exports.toBuffer = toBuffer; + async function json(stream) { + const buf = await toBuffer(stream); + const str = buf.toString("utf8"); + try { + return JSON.parse(str); + } catch (_err) { + const err = _err; + err.message += ` (input: ${str})`; + throw err; + } + } + exports.json = json; + function req(url, opts = {}) { + const href = typeof url === "string" ? url : url.href; + const req2 = (href.startsWith("https:") ? https : http).request(url, opts); + const promise = new Promise((resolve, reject) => { + req2.once("response", resolve).once("error", reject).end(); + }); + req2.then = promise.then.bind(promise); + return req2; + } + exports.req = req; + } +}); +var require_dist3 = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/agent-base@7.1.3/node_modules/agent-base/dist/index.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __exportStar = exports && exports.__exportStar || function(m, exports2) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding(exports2, m, p); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Agent = void 0; + var net = __importStar((0, import_chunk_QGM4M3NI.__require)("net")); + var http = __importStar((0, import_chunk_QGM4M3NI.__require)("http")); + var https_1 = (0, import_chunk_QGM4M3NI.__require)("https"); + __exportStar(require_helpers2(), exports); + var INTERNAL = Symbol("AgentBaseInternalState"); + var Agent = class extends http.Agent { + constructor(opts) { + super(opts); + this[INTERNAL] = {}; + } + /** + * Determine whether this is an `http` or `https` request. + */ + isSecureEndpoint(options) { + if (options) { + if (typeof options.secureEndpoint === "boolean") { + return options.secureEndpoint; + } + if (typeof options.protocol === "string") { + return options.protocol === "https:"; + } + } + const { stack } = new Error(); + if (typeof stack !== "string") + return false; + return stack.split("\n").some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1); + } + // In order to support async signatures in `connect()` and Node's native + // connection pooling in `http.Agent`, the array of sockets for each origin + // has to be updated synchronously. This is so the length of the array is + // accurate when `addRequest()` is next called. We achieve this by creating a + // fake socket and adding it to `sockets[origin]` and incrementing + // `totalSocketCount`. + incrementSockets(name) { + if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) { + return null; + } + if (!this.sockets[name]) { + this.sockets[name] = []; + } + const fakeSocket = new net.Socket({ writable: false }); + this.sockets[name].push(fakeSocket); + this.totalSocketCount++; + return fakeSocket; + } + decrementSockets(name, socket) { + if (!this.sockets[name] || socket === null) { + return; + } + const sockets = this.sockets[name]; + const index = sockets.indexOf(socket); + if (index !== -1) { + sockets.splice(index, 1); + this.totalSocketCount--; + if (sockets.length === 0) { + delete this.sockets[name]; + } + } + } + // In order to properly update the socket pool, we need to call `getName()` on + // the core `https.Agent` if it is a secureEndpoint. + getName(options) { + const secureEndpoint = typeof options.secureEndpoint === "boolean" ? options.secureEndpoint : this.isSecureEndpoint(options); + if (secureEndpoint) { + return https_1.Agent.prototype.getName.call(this, options); + } + return super.getName(options); + } + createSocket(req, options, cb) { + const connectOpts = { + ...options, + secureEndpoint: this.isSecureEndpoint(options) + }; + const name = this.getName(connectOpts); + const fakeSocket = this.incrementSockets(name); + Promise.resolve().then(() => this.connect(req, connectOpts)).then((socket) => { + this.decrementSockets(name, fakeSocket); + if (socket instanceof http.Agent) { + try { + return socket.addRequest(req, connectOpts); + } catch (err) { + return cb(err); + } + } + this[INTERNAL].currentSocket = socket; + super.createSocket(req, options, cb); + }, (err) => { + this.decrementSockets(name, fakeSocket); + cb(err); + }); + } + createConnection() { + const socket = this[INTERNAL].currentSocket; + this[INTERNAL].currentSocket = void 0; + if (!socket) { + throw new Error("No socket was returned in the `connect()` function"); + } + return socket; + } + get defaultPort() { + return this[INTERNAL].defaultPort ?? (this.protocol === "https:" ? 443 : 80); + } + set defaultPort(v) { + if (this[INTERNAL]) { + this[INTERNAL].defaultPort = v; + } + } + get protocol() { + return this[INTERNAL].protocol ?? (this.isSecureEndpoint() ? "https:" : "http:"); + } + set protocol(v) { + if (this[INTERNAL]) { + this[INTERNAL].protocol = v; + } + } + }; + exports.Agent = Agent; + } +}); +var require_parse_proxy_response = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports) { + "use strict"; + var __importDefault = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.parseProxyResponse = void 0; + var debug_1 = __importDefault(require_src()); + var debug2 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response"); + function parseProxyResponse(socket) { + return new Promise((resolve, reject) => { + let buffersLength = 0; + const buffers = []; + function read() { + const b = socket.read(); + if (b) + ondata(b); + else + socket.once("readable", read); + } + function cleanup() { + socket.removeListener("end", onend); + socket.removeListener("error", onerror); + socket.removeListener("readable", read); + } + function onend() { + cleanup(); + debug2("onend"); + reject(new Error("Proxy connection ended before receiving CONNECT response")); + } + function onerror(err) { + cleanup(); + debug2("onerror %o", err); + reject(err); + } + function ondata(b) { + buffers.push(b); + buffersLength += b.length; + const buffered = Buffer.concat(buffers, buffersLength); + const endOfHeaders = buffered.indexOf("\r\n\r\n"); + if (endOfHeaders === -1) { + debug2("have not received end of HTTP headers yet..."); + read(); + return; + } + const headerParts = buffered.slice(0, endOfHeaders).toString("ascii").split("\r\n"); + const firstLine = headerParts.shift(); + if (!firstLine) { + socket.destroy(); + return reject(new Error("No header received from proxy CONNECT response")); + } + const firstLineParts = firstLine.split(" "); + const statusCode = +firstLineParts[1]; + const statusText = firstLineParts.slice(2).join(" "); + const headers = {}; + for (const header of headerParts) { + if (!header) + continue; + const firstColon = header.indexOf(":"); + if (firstColon === -1) { + socket.destroy(); + return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`)); + } + const key = header.slice(0, firstColon).toLowerCase(); + const value = header.slice(firstColon + 1).trimStart(); + const current = headers[key]; + if (typeof current === "string") { + headers[key] = [current, value]; + } else if (Array.isArray(current)) { + current.push(value); + } else { + headers[key] = value; + } + } + debug2("got proxy server response: %o %o", firstLine, headers); + cleanup(); + resolve({ + connect: { + statusCode, + statusText, + headers + }, + buffered + }); + } + socket.on("error", onerror); + socket.on("end", onend); + read(); + }); + } + exports.parseProxyResponse = parseProxyResponse; + } +}); +var require_dist4 = (0, import_chunk_QGM4M3NI.__commonJS)({ + "../../node_modules/.pnpm/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/index.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __importDefault = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.HttpsProxyAgent = void 0; + var net = __importStar((0, import_chunk_QGM4M3NI.__require)("net")); + var tls = __importStar((0, import_chunk_QGM4M3NI.__require)("tls")); + var assert_1 = __importDefault((0, import_chunk_QGM4M3NI.__require)("assert")); + var debug_1 = __importDefault(require_src()); + var agent_base_1 = require_dist3(); + var url_1 = (0, import_chunk_QGM4M3NI.__require)("url"); + var parse_proxy_response_1 = require_parse_proxy_response(); + var debug2 = (0, debug_1.default)("https-proxy-agent"); + var setServernameFromNonIpHost = (options) => { + if (options.servername === void 0 && options.host && !net.isIP(options.host)) { + return { + ...options, + servername: options.host + }; + } + return options; + }; + var HttpsProxyAgent2 = class extends agent_base_1.Agent { + constructor(proxy, opts) { + super(opts); + this.options = { path: void 0 }; + this.proxy = typeof proxy === "string" ? new url_1.URL(proxy) : proxy; + this.proxyHeaders = opts?.headers ?? {}; + debug2("Creating new HttpsProxyAgent instance: %o", this.proxy.href); + const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ""); + const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80; + this.connectOpts = { + // Attempt to negotiate http/1.1 for proxy servers that support http/2 + ALPNProtocols: ["http/1.1"], + ...opts ? omit(opts, "headers") : null, + host, + port + }; + } + /** + * Called when the node-core HTTP client library is creating a + * new HTTP request. + */ + async connect(req, opts) { + const { proxy } = this; + if (!opts.host) { + throw new TypeError('No "host" provided'); + } + let socket; + if (proxy.protocol === "https:") { + debug2("Creating `tls.Socket`: %o", this.connectOpts); + socket = tls.connect(setServernameFromNonIpHost(this.connectOpts)); + } else { + debug2("Creating `net.Socket`: %o", this.connectOpts); + socket = net.connect(this.connectOpts); + } + const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; + const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host; + let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r +`; + if (proxy.username || proxy.password) { + const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; + headers["Proxy-Authorization"] = `Basic ${Buffer.from(auth).toString("base64")}`; + } + headers.Host = `${host}:${opts.port}`; + if (!headers["Proxy-Connection"]) { + headers["Proxy-Connection"] = this.keepAlive ? "Keep-Alive" : "close"; + } + for (const name of Object.keys(headers)) { + payload += `${name}: ${headers[name]}\r +`; + } + const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket); + socket.write(`${payload}\r +`); + const { connect, buffered } = await proxyResponsePromise; + req.emit("proxyConnect", connect); + this.emit("proxyConnect", connect, req); + if (connect.statusCode === 200) { + req.once("socket", resume); + if (opts.secureEndpoint) { + debug2("Upgrading socket connection to TLS"); + return tls.connect({ + ...omit(setServernameFromNonIpHost(opts), "host", "path", "port"), + socket + }); + } + return socket; + } + socket.destroy(); + const fakeSocket = new net.Socket({ writable: false }); + fakeSocket.readable = true; + req.once("socket", (s) => { + debug2("Replaying proxy buffer for failed request"); + (0, assert_1.default)(s.listenerCount("data") > 0); + s.push(buffered); + s.push(null); + }); + return fakeSocket; + } + }; + HttpsProxyAgent2.protocols = ["http", "https"]; + exports.HttpsProxyAgent = HttpsProxyAgent2; + function resume(socket) { + socket.resume(); + } + function omit(obj, ...keys) { + const ret = {}; + let key; + for (key in obj) { + if (!keys.includes(key)) { + ret[key] = obj[key]; + } + } + return ret; + } + } +}); +var import_http_proxy_agent = (0, import_chunk_QGM4M3NI.__toESM)(require_dist2()); +var import_https_proxy_agent = (0, import_chunk_QGM4M3NI.__toESM)(require_dist4()); +var debug = (0, import_debug.default)("prisma:fetch-engine:getProxyAgent"); +function formatHostname(hostname) { + return hostname.replace(/^\.*/, ".").toLowerCase(); +} +function parseNoProxyZone(zone) { + zone = zone.trim().toLowerCase(); + const zoneParts = zone.split(":", 2); + const zoneHost = formatHostname(zoneParts[0]); + const zonePort = zoneParts[1]; + const hasPort = zone.includes(":"); + return { hostname: zoneHost, port: zonePort, hasPort }; +} +function uriInNoProxy(uri, noProxy) { + const port = uri.port || (uri.protocol === "https:" ? "443" : "80"); + const hostname = formatHostname(uri.hostname); + const noProxyList = noProxy.split(","); + return noProxyList.map(parseNoProxyZone).some(function(noProxyZone) { + const isMatchedAt = hostname.indexOf(noProxyZone.hostname); + const hostnameMatched = isMatchedAt > -1 && isMatchedAt === hostname.length - noProxyZone.hostname.length; + if (noProxyZone.hasPort) { + return port === noProxyZone.port && hostnameMatched; + } + return hostnameMatched; + }); +} +function getProxyFromURI(uri) { + const noProxy = process.env.NO_PROXY || process.env.no_proxy || ""; + if (noProxy) debug(`noProxy is set to "${noProxy}"`); + if (noProxy === "*") { + return null; + } + if (noProxy !== "" && uriInNoProxy(uri, noProxy)) { + return null; + } + if (uri.protocol === "http:") { + const httpProxy = process.env.HTTP_PROXY || process.env.http_proxy || null; + if (httpProxy) debug(`uri.protocol is HTTP and the URL for the proxy is "${httpProxy}"`); + return httpProxy; + } + if (uri.protocol === "https:") { + const httpsProxy = process.env.HTTPS_PROXY || process.env.https_proxy || process.env.HTTP_PROXY || process.env.http_proxy || null; + if (httpsProxy) debug(`uri.protocol is HTTPS and the URL for the proxy is "${httpsProxy}"`); + return httpsProxy; + } + return null; +} +function getProxyAgent(url) { + try { + const uri = new URL(url); + const proxy = getProxyFromURI(uri); + if (!proxy) { + return void 0; + } else if (uri.protocol === "http:") { + try { + return new import_http_proxy_agent.HttpProxyAgent(proxy); + } catch (agentError) { + throw new Error( + `Error while instantiating HttpProxyAgent with URL: "${proxy}" +${agentError} +Check the following env vars "http_proxy" or "HTTP_PROXY". The value should be a valid URL starting with "http://"` + ); + } + } else if (uri.protocol === "https:") { + try { + return new import_https_proxy_agent.HttpsProxyAgent(proxy); + } catch (agentError) { + throw new Error( + `Error while instantiating HttpsProxyAgent with URL: "${proxy}" +${agentError} +Check the following env vars "https_proxy" or "HTTPS_PROXY". The value should be a valid URL starting with "https://"` + ); + } + } + } catch (e) { + console.warn(`An error occurred in getProxyAgent(), no proxy agent will be used.`, e); + } + return void 0; +} diff --git a/backend/node_modules/@prisma/fetch-engine/dist/cleanupCache.d.ts b/backend/node_modules/@prisma/fetch-engine/dist/cleanupCache.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..219f689dcf805d5f5c4c755d4718a3f797aed905 --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/cleanupCache.d.ts @@ -0,0 +1 @@ +export declare function cleanupCache(n?: number): Promise; diff --git a/backend/node_modules/@prisma/fetch-engine/dist/cleanupCache.js b/backend/node_modules/@prisma/fetch-engine/dist/cleanupCache.js new file mode 100644 index 0000000000000000000000000000000000000000..5018e1823ca9b625bd26101f3031525f8854cb81 --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/cleanupCache.js @@ -0,0 +1,28 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var cleanupCache_exports = {}; +__export(cleanupCache_exports, { + cleanupCache: () => import_chunk_3VVCXIQ5.cleanupCache +}); +module.exports = __toCommonJS(cleanupCache_exports); +var import_chunk_3VVCXIQ5 = require("./chunk-3VVCXIQ5.js"); +var import_chunk_FSAAZH62 = require("./chunk-FSAAZH62.js"); +var import_chunk_LONQL55G = require("./chunk-LONQL55G.js"); +var import_chunk_X37PZICB = require("./chunk-X37PZICB.js"); +var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js"); diff --git a/backend/node_modules/@prisma/fetch-engine/dist/download.d.ts b/backend/node_modules/@prisma/fetch-engine/dist/download.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..71b1dbbb8742a310225e37a87e8617ff30f251db --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/download.d.ts @@ -0,0 +1,27 @@ +import { BinaryTarget } from '@prisma/get-platform'; +import { BinaryType } from './BinaryType'; +export declare const vercelPkgPathRegex: RegExp; +export type BinaryDownloadConfiguration = { + [binary in BinaryType]?: string; +}; +export type BinaryPaths = { + [binary in BinaryType]?: { + [binaryTarget in BinaryTarget]: string; + }; +}; +export interface DownloadOptions { + binaries: BinaryDownloadConfiguration; + binaryTargets?: BinaryTarget[]; + showProgress?: boolean; + progressCb?: (progress: number) => void; + version?: string; + skipDownload?: boolean; + failSilent?: boolean; + printVersion?: boolean; + skipCacheIntegrityCheck?: boolean; +} +export declare function download(options: DownloadOptions): Promise; +export declare function getVersion(enginePath: string, binaryName: string): Promise; +export declare function getBinaryName(binaryName: BinaryType, binaryTarget: BinaryTarget): string; +export declare function maybeCopyToTmp(file: string): Promise; +export declare function plusX(file: any): void; diff --git a/backend/node_modules/@prisma/fetch-engine/dist/env.d.ts b/backend/node_modules/@prisma/fetch-engine/dist/env.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2a6e8f3a6776e2f57fa84803788fb16de41a9eb9 --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/env.d.ts @@ -0,0 +1,14 @@ +import { BinaryType } from './BinaryType'; +export declare const engineEnvVarMap: { + "query-engine": string; + "libquery-engine": string; + "schema-engine": string; +}; +export declare const deprecatedEnvVarMap: Partial; +type PathFromEnvValue = { + path: string; + fromEnvVar: string; +}; +export declare function getBinaryEnvVarPath(binaryName: BinaryType): PathFromEnvValue | null; +export declare function allEngineEnvVarsSet(binaries: string[]): boolean; +export {}; diff --git a/backend/node_modules/@prisma/fetch-engine/dist/env.js b/backend/node_modules/@prisma/fetch-engine/dist/env.js new file mode 100644 index 0000000000000000000000000000000000000000..9a603d713df6d0a4fa6786471344a945cb85d87d --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/env.js @@ -0,0 +1,29 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var env_exports = {}; +__export(env_exports, { + allEngineEnvVarsSet: () => import_chunk_QFA3XBMW.allEngineEnvVarsSet, + deprecatedEnvVarMap: () => import_chunk_QFA3XBMW.deprecatedEnvVarMap, + engineEnvVarMap: () => import_chunk_QFA3XBMW.engineEnvVarMap, + getBinaryEnvVarPath: () => import_chunk_QFA3XBMW.getBinaryEnvVarPath +}); +module.exports = __toCommonJS(env_exports); +var import_chunk_QFA3XBMW = require("./chunk-QFA3XBMW.js"); +var import_chunk_X37PZICB = require("./chunk-X37PZICB.js"); +var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js"); diff --git a/backend/node_modules/@prisma/fetch-engine/dist/getHash.js b/backend/node_modules/@prisma/fetch-engine/dist/getHash.js new file mode 100644 index 0000000000000000000000000000000000000000..0ff859ece87a0564c1708e5c4b0402f1ee060d82 --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/getHash.js @@ -0,0 +1,25 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var getHash_exports = {}; +__export(getHash_exports, { + getHash: () => import_chunk_FKGWOTGU.getHash +}); +module.exports = __toCommonJS(getHash_exports); +var import_chunk_FKGWOTGU = require("./chunk-FKGWOTGU.js"); +var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js"); diff --git a/backend/node_modules/@prisma/fetch-engine/dist/getProxyAgent.d.ts b/backend/node_modules/@prisma/fetch-engine/dist/getProxyAgent.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..99dd772b6f730bcd8c4db6561c898d04332df0d9 --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/getProxyAgent.d.ts @@ -0,0 +1,3 @@ +import { HttpProxyAgent } from 'http-proxy-agent'; +import { HttpsProxyAgent } from 'https-proxy-agent'; +export declare function getProxyAgent(url: string): HttpProxyAgent | HttpsProxyAgent | undefined; diff --git a/backend/node_modules/@prisma/fetch-engine/dist/getProxyAgent.js b/backend/node_modules/@prisma/fetch-engine/dist/getProxyAgent.js new file mode 100644 index 0000000000000000000000000000000000000000..d00cb3bb8140a8e14d622d07b156e38aca465cb7 --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/getProxyAgent.js @@ -0,0 +1,25 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var getProxyAgent_exports = {}; +__export(getProxyAgent_exports, { + getProxyAgent: () => import_chunk_VAPNG6TS.getProxyAgent +}); +module.exports = __toCommonJS(getProxyAgent_exports); +var import_chunk_VAPNG6TS = require("./chunk-VAPNG6TS.js"); +var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js"); diff --git a/backend/node_modules/@prisma/fetch-engine/dist/index.js b/backend/node_modules/@prisma/fetch-engine/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..260e1568c881cf02eda3e2d598c610944f0faaba --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/index.js @@ -0,0 +1,49 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var index_exports = {}; +__export(index_exports, { + BinaryType: () => import_chunk_X37PZICB.BinaryType, + allEngineEnvVarsSet: () => import_chunk_QFA3XBMW.allEngineEnvVarsSet, + deprecatedEnvVarMap: () => import_chunk_QFA3XBMW.deprecatedEnvVarMap, + download: () => import_chunk_CCMBPDR2.download, + engineEnvVarMap: () => import_chunk_QFA3XBMW.engineEnvVarMap, + getBinaryEnvVarPath: () => import_chunk_QFA3XBMW.getBinaryEnvVarPath, + getBinaryName: () => import_chunk_CCMBPDR2.getBinaryName, + getCacheDir: () => import_chunk_LONQL55G.getCacheDir, + getProxyAgent: () => import_chunk_VAPNG6TS.getProxyAgent, + getVersion: () => import_chunk_CCMBPDR2.getVersion, + maybeCopyToTmp: () => import_chunk_CCMBPDR2.maybeCopyToTmp, + overwriteFile: () => import_chunk_LONQL55G.overwriteFile, + plusX: () => import_chunk_CCMBPDR2.plusX, + vercelPkgPathRegex: () => import_chunk_CCMBPDR2.vercelPkgPathRegex +}); +module.exports = __toCommonJS(index_exports); +var import_chunk_CCMBPDR2 = require("./chunk-CCMBPDR2.js"); +var import_chunk_MWVY55RY = require("./chunk-MWVY55RY.js"); +var import_chunk_7JLQJWOR = require("./chunk-7JLQJWOR.js"); +var import_chunk_3VVCXIQ5 = require("./chunk-3VVCXIQ5.js"); +var import_chunk_CY52DY2B = require("./chunk-CY52DY2B.js"); +var import_chunk_RXM4EBGR = require("./chunk-RXM4EBGR.js"); +var import_chunk_FSAAZH62 = require("./chunk-FSAAZH62.js"); +var import_chunk_LONQL55G = require("./chunk-LONQL55G.js"); +var import_chunk_QFA3XBMW = require("./chunk-QFA3XBMW.js"); +var import_chunk_X37PZICB = require("./chunk-X37PZICB.js"); +var import_chunk_FKGWOTGU = require("./chunk-FKGWOTGU.js"); +var import_chunk_VAPNG6TS = require("./chunk-VAPNG6TS.js"); +var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js"); diff --git a/backend/node_modules/@prisma/fetch-engine/dist/log.d.ts b/backend/node_modules/@prisma/fetch-engine/dist/log.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..484dcb7b3b76bba772a64f9e13ff7000a2b7fc3d --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/log.d.ts @@ -0,0 +1,2 @@ +import Progress from 'progress'; +export declare function getBar(text: any): Progress; diff --git a/backend/node_modules/@prisma/fetch-engine/dist/log.js b/backend/node_modules/@prisma/fetch-engine/dist/log.js new file mode 100644 index 0000000000000000000000000000000000000000..664102a06e1792a7a473a131ddbab1a9b150e90a --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/log.js @@ -0,0 +1,25 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var log_exports = {}; +__export(log_exports, { + getBar: () => import_chunk_MWVY55RY.getBar +}); +module.exports = __toCommonJS(log_exports); +var import_chunk_MWVY55RY = require("./chunk-MWVY55RY.js"); +var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js"); diff --git a/backend/node_modules/@prisma/fetch-engine/dist/multipart-parser-ASKQAOL4.js b/backend/node_modules/@prisma/fetch-engine/dist/multipart-parser-ASKQAOL4.js new file mode 100644 index 0000000000000000000000000000000000000000..12d1085f6f7dec1af3aacbb2021e0ff091b47e8a --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/multipart-parser-ASKQAOL4.js @@ -0,0 +1,374 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var multipart_parser_ASKQAOL4_exports = {}; +__export(multipart_parser_ASKQAOL4_exports, { + toFormData: () => toFormData +}); +module.exports = __toCommonJS(multipart_parser_ASKQAOL4_exports); +var import_chunk_RXM4EBGR = require("./chunk-RXM4EBGR.js"); +var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js"); +var s = 0; +var S = { + START_BOUNDARY: s++, + HEADER_FIELD_START: s++, + HEADER_FIELD: s++, + HEADER_VALUE_START: s++, + HEADER_VALUE: s++, + HEADER_VALUE_ALMOST_DONE: s++, + HEADERS_ALMOST_DONE: s++, + PART_DATA_START: s++, + PART_DATA: s++, + END: s++ +}; +var f = 1; +var F = { + PART_BOUNDARY: f, + LAST_BOUNDARY: f *= 2 +}; +var LF = 10; +var CR = 13; +var SPACE = 32; +var HYPHEN = 45; +var COLON = 58; +var A = 97; +var Z = 122; +var lower = (c) => c | 32; +var noop = () => { +}; +var MultipartParser = class { + /** + * @param {string} boundary + */ + constructor(boundary) { + this.index = 0; + this.flags = 0; + this.onHeaderEnd = noop; + this.onHeaderField = noop; + this.onHeadersEnd = noop; + this.onHeaderValue = noop; + this.onPartBegin = noop; + this.onPartData = noop; + this.onPartEnd = noop; + this.boundaryChars = {}; + boundary = "\r\n--" + boundary; + const ui8a = new Uint8Array(boundary.length); + for (let i = 0; i < boundary.length; i++) { + ui8a[i] = boundary.charCodeAt(i); + this.boundaryChars[ui8a[i]] = true; + } + this.boundary = ui8a; + this.lookbehind = new Uint8Array(this.boundary.length + 8); + this.state = S.START_BOUNDARY; + } + /** + * @param {Uint8Array} data + */ + write(data) { + let i = 0; + const length_ = data.length; + let previousIndex = this.index; + let { lookbehind, boundary, boundaryChars, index, state, flags } = this; + const boundaryLength = this.boundary.length; + const boundaryEnd = boundaryLength - 1; + const bufferLength = data.length; + let c; + let cl; + const mark = (name) => { + this[name + "Mark"] = i; + }; + const clear = (name) => { + delete this[name + "Mark"]; + }; + const callback = (callbackSymbol, start, end, ui8a) => { + if (start === void 0 || start !== end) { + this[callbackSymbol](ui8a && ui8a.subarray(start, end)); + } + }; + const dataCallback = (name, clear2) => { + const markSymbol = name + "Mark"; + if (!(markSymbol in this)) { + return; + } + if (clear2) { + callback(name, this[markSymbol], i, data); + delete this[markSymbol]; + } else { + callback(name, this[markSymbol], data.length, data); + this[markSymbol] = 0; + } + }; + for (i = 0; i < length_; i++) { + c = data[i]; + switch (state) { + case S.START_BOUNDARY: + if (index === boundary.length - 2) { + if (c === HYPHEN) { + flags |= F.LAST_BOUNDARY; + } else if (c !== CR) { + return; + } + index++; + break; + } else if (index - 1 === boundary.length - 2) { + if (flags & F.LAST_BOUNDARY && c === HYPHEN) { + state = S.END; + flags = 0; + } else if (!(flags & F.LAST_BOUNDARY) && c === LF) { + index = 0; + callback("onPartBegin"); + state = S.HEADER_FIELD_START; + } else { + return; + } + break; + } + if (c !== boundary[index + 2]) { + index = -2; + } + if (c === boundary[index + 2]) { + index++; + } + break; + case S.HEADER_FIELD_START: + state = S.HEADER_FIELD; + mark("onHeaderField"); + index = 0; + // falls through + case S.HEADER_FIELD: + if (c === CR) { + clear("onHeaderField"); + state = S.HEADERS_ALMOST_DONE; + break; + } + index++; + if (c === HYPHEN) { + break; + } + if (c === COLON) { + if (index === 1) { + return; + } + dataCallback("onHeaderField", true); + state = S.HEADER_VALUE_START; + break; + } + cl = lower(c); + if (cl < A || cl > Z) { + return; + } + break; + case S.HEADER_VALUE_START: + if (c === SPACE) { + break; + } + mark("onHeaderValue"); + state = S.HEADER_VALUE; + // falls through + case S.HEADER_VALUE: + if (c === CR) { + dataCallback("onHeaderValue", true); + callback("onHeaderEnd"); + state = S.HEADER_VALUE_ALMOST_DONE; + } + break; + case S.HEADER_VALUE_ALMOST_DONE: + if (c !== LF) { + return; + } + state = S.HEADER_FIELD_START; + break; + case S.HEADERS_ALMOST_DONE: + if (c !== LF) { + return; + } + callback("onHeadersEnd"); + state = S.PART_DATA_START; + break; + case S.PART_DATA_START: + state = S.PART_DATA; + mark("onPartData"); + // falls through + case S.PART_DATA: + previousIndex = index; + if (index === 0) { + i += boundaryEnd; + while (i < bufferLength && !(data[i] in boundaryChars)) { + i += boundaryLength; + } + i -= boundaryEnd; + c = data[i]; + } + if (index < boundary.length) { + if (boundary[index] === c) { + if (index === 0) { + dataCallback("onPartData", true); + } + index++; + } else { + index = 0; + } + } else if (index === boundary.length) { + index++; + if (c === CR) { + flags |= F.PART_BOUNDARY; + } else if (c === HYPHEN) { + flags |= F.LAST_BOUNDARY; + } else { + index = 0; + } + } else if (index - 1 === boundary.length) { + if (flags & F.PART_BOUNDARY) { + index = 0; + if (c === LF) { + flags &= ~F.PART_BOUNDARY; + callback("onPartEnd"); + callback("onPartBegin"); + state = S.HEADER_FIELD_START; + break; + } + } else if (flags & F.LAST_BOUNDARY) { + if (c === HYPHEN) { + callback("onPartEnd"); + state = S.END; + flags = 0; + } else { + index = 0; + } + } else { + index = 0; + } + } + if (index > 0) { + lookbehind[index - 1] = c; + } else if (previousIndex > 0) { + const _lookbehind = new Uint8Array(lookbehind.buffer, lookbehind.byteOffset, lookbehind.byteLength); + callback("onPartData", 0, previousIndex, _lookbehind); + previousIndex = 0; + mark("onPartData"); + i--; + } + break; + case S.END: + break; + default: + throw new Error(`Unexpected state entered: ${state}`); + } + } + dataCallback("onHeaderField"); + dataCallback("onHeaderValue"); + dataCallback("onPartData"); + this.index = index; + this.state = state; + this.flags = flags; + } + end() { + if (this.state === S.HEADER_FIELD_START && this.index === 0 || this.state === S.PART_DATA && this.index === this.boundary.length) { + this.onPartEnd(); + } else if (this.state !== S.END) { + throw new Error("MultipartParser.end(): stream ended unexpectedly"); + } + } +}; +function _fileName(headerValue) { + const m = headerValue.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i); + if (!m) { + return; + } + const match = m[2] || m[3] || ""; + let filename = match.slice(match.lastIndexOf("\\") + 1); + filename = filename.replace(/%22/g, '"'); + filename = filename.replace(/&#(\d{4});/g, (m2, code) => { + return String.fromCharCode(code); + }); + return filename; +} +async function toFormData(Body, ct) { + if (!/multipart/i.test(ct)) { + throw new TypeError("Failed to fetch"); + } + const m = ct.match(/boundary=(?:"([^"]+)"|([^;]+))/i); + if (!m) { + throw new TypeError("no or bad content-type header, no multipart boundary"); + } + const parser = new MultipartParser(m[1] || m[2]); + let headerField; + let headerValue; + let entryValue; + let entryName; + let contentType; + let filename; + const entryChunks = []; + const formData = new import_chunk_RXM4EBGR.FormData(); + const onPartData = (ui8a) => { + entryValue += decoder.decode(ui8a, { stream: true }); + }; + const appendToFile = (ui8a) => { + entryChunks.push(ui8a); + }; + const appendFileToFormData = () => { + const file = new import_chunk_RXM4EBGR.file_default(entryChunks, filename, { type: contentType }); + formData.append(entryName, file); + }; + const appendEntryToFormData = () => { + formData.append(entryName, entryValue); + }; + const decoder = new TextDecoder("utf-8"); + decoder.decode(); + parser.onPartBegin = function() { + parser.onPartData = onPartData; + parser.onPartEnd = appendEntryToFormData; + headerField = ""; + headerValue = ""; + entryValue = ""; + entryName = ""; + contentType = ""; + filename = null; + entryChunks.length = 0; + }; + parser.onHeaderField = function(ui8a) { + headerField += decoder.decode(ui8a, { stream: true }); + }; + parser.onHeaderValue = function(ui8a) { + headerValue += decoder.decode(ui8a, { stream: true }); + }; + parser.onHeaderEnd = function() { + headerValue += decoder.decode(); + headerField = headerField.toLowerCase(); + if (headerField === "content-disposition") { + const m2 = headerValue.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i); + if (m2) { + entryName = m2[2] || m2[3] || ""; + } + filename = _fileName(headerValue); + if (filename) { + parser.onPartData = appendToFile; + parser.onPartEnd = appendFileToFormData; + } + } else if (headerField === "content-type") { + contentType = headerValue; + } + headerValue = ""; + headerField = ""; + }; + for await (const chunk of Body) { + parser.write(chunk); + } + parser.end(); + return formData; +} diff --git a/backend/node_modules/@prisma/fetch-engine/dist/utils.d.ts b/backend/node_modules/@prisma/fetch-engine/dist/utils.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3f8ee8ac0bd5210485609fa99be6a95de2a87b7e --- /dev/null +++ b/backend/node_modules/@prisma/fetch-engine/dist/utils.d.ts @@ -0,0 +1,11 @@ +import { BinaryTarget } from '@prisma/get-platform'; +export declare function getRootCacheDir(): Promise; +export declare function getCacheDir(channel: string, version: string, binaryTarget: string): Promise; +export declare function getDownloadUrl({ channel, version, binaryTarget, binaryName, extension, }: { + channel: string; + version: string; + binaryTarget: BinaryTarget; + binaryName: string; + extension?: string; +}): string; +export declare function overwriteFile(sourcePath: string, targetPath: string): Promise; diff --git a/backend/node_modules/effect/.index/package.json b/backend/node_modules/effect/.index/package.json new file mode 100644 index 0000000000000000000000000000000000000000..ad76d12b84db7d36cefcddb5daf78a77a18d8a32 --- /dev/null +++ b/backend/node_modules/effect/.index/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/.index.js", + "module": "../dist/esm/.index.js", + "types": "../dist/dts/.index.d.ts" +} diff --git a/backend/node_modules/effect/Arbitrary/package.json b/backend/node_modules/effect/Arbitrary/package.json new file mode 100644 index 0000000000000000000000000000000000000000..f77a3c7ffa8073cdfb0a16f52f48491a84da9500 --- /dev/null +++ b/backend/node_modules/effect/Arbitrary/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Arbitrary.js", + "module": "../dist/esm/Arbitrary.js", + "types": "../dist/dts/Arbitrary.d.ts" +} diff --git a/backend/node_modules/effect/Array/package.json b/backend/node_modules/effect/Array/package.json new file mode 100644 index 0000000000000000000000000000000000000000..ebeb6c2ae976daf660cb7313e468ec0bb36e1ca0 --- /dev/null +++ b/backend/node_modules/effect/Array/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Array.js", + "module": "../dist/esm/Array.js", + "types": "../dist/dts/Array.d.ts" +} diff --git a/backend/node_modules/effect/BigDecimal/package.json b/backend/node_modules/effect/BigDecimal/package.json new file mode 100644 index 0000000000000000000000000000000000000000..74a902bacee5e41904c13acff656ef13e8cd72e8 --- /dev/null +++ b/backend/node_modules/effect/BigDecimal/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/BigDecimal.js", + "module": "../dist/esm/BigDecimal.js", + "types": "../dist/dts/BigDecimal.d.ts" +} diff --git a/backend/node_modules/effect/Boolean/package.json b/backend/node_modules/effect/Boolean/package.json new file mode 100644 index 0000000000000000000000000000000000000000..480f9c871b841994e2196b3728c285f31e48f48f --- /dev/null +++ b/backend/node_modules/effect/Boolean/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Boolean.js", + "module": "../dist/esm/Boolean.js", + "types": "../dist/dts/Boolean.d.ts" +} diff --git a/backend/node_modules/effect/Brand/package.json b/backend/node_modules/effect/Brand/package.json new file mode 100644 index 0000000000000000000000000000000000000000..99bf1deec17d0296360f3f186cb92065ee834896 --- /dev/null +++ b/backend/node_modules/effect/Brand/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Brand.js", + "module": "../dist/esm/Brand.js", + "types": "../dist/dts/Brand.d.ts" +} diff --git a/backend/node_modules/effect/Cache/package.json b/backend/node_modules/effect/Cache/package.json new file mode 100644 index 0000000000000000000000000000000000000000..30993e5416a558bb4b5bfd31a96bef55635b1ba6 --- /dev/null +++ b/backend/node_modules/effect/Cache/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Cache.js", + "module": "../dist/esm/Cache.js", + "types": "../dist/dts/Cache.d.ts" +} diff --git a/backend/node_modules/effect/Cause/package.json b/backend/node_modules/effect/Cause/package.json new file mode 100644 index 0000000000000000000000000000000000000000..87ec288e34bf721b138d6bd60ec5cd17de7cb9bc --- /dev/null +++ b/backend/node_modules/effect/Cause/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Cause.js", + "module": "../dist/esm/Cause.js", + "types": "../dist/dts/Cause.d.ts" +} diff --git a/backend/node_modules/effect/Channel/package.json b/backend/node_modules/effect/Channel/package.json new file mode 100644 index 0000000000000000000000000000000000000000..362998e7c43bac6f379bf08b312fa863e2ffc162 --- /dev/null +++ b/backend/node_modules/effect/Channel/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Channel.js", + "module": "../dist/esm/Channel.js", + "types": "../dist/dts/Channel.d.ts" +} diff --git a/backend/node_modules/effect/ChildExecutorDecision/package.json b/backend/node_modules/effect/ChildExecutorDecision/package.json new file mode 100644 index 0000000000000000000000000000000000000000..16496c388d45a8cbd5a0742a4a89ba03bc40649b --- /dev/null +++ b/backend/node_modules/effect/ChildExecutorDecision/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/ChildExecutorDecision.js", + "module": "../dist/esm/ChildExecutorDecision.js", + "types": "../dist/dts/ChildExecutorDecision.d.ts" +} diff --git a/backend/node_modules/effect/Chunk/package.json b/backend/node_modules/effect/Chunk/package.json new file mode 100644 index 0000000000000000000000000000000000000000..a12684f5fa81dc31ffd87c43b7ded2b63da72c09 --- /dev/null +++ b/backend/node_modules/effect/Chunk/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Chunk.js", + "module": "../dist/esm/Chunk.js", + "types": "../dist/dts/Chunk.d.ts" +} diff --git a/backend/node_modules/effect/Config/package.json b/backend/node_modules/effect/Config/package.json new file mode 100644 index 0000000000000000000000000000000000000000..4028c1824e429a489f3aee9090a477965c924608 --- /dev/null +++ b/backend/node_modules/effect/Config/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Config.js", + "module": "../dist/esm/Config.js", + "types": "../dist/dts/Config.d.ts" +} diff --git a/backend/node_modules/effect/ConfigError/package.json b/backend/node_modules/effect/ConfigError/package.json new file mode 100644 index 0000000000000000000000000000000000000000..b0292772d247ce140134df9260a6979d78f14d70 --- /dev/null +++ b/backend/node_modules/effect/ConfigError/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/ConfigError.js", + "module": "../dist/esm/ConfigError.js", + "types": "../dist/dts/ConfigError.d.ts" +} diff --git a/backend/node_modules/effect/DateTime/package.json b/backend/node_modules/effect/DateTime/package.json new file mode 100644 index 0000000000000000000000000000000000000000..4f57f725dbc123dd918ca432e056aabe726984d9 --- /dev/null +++ b/backend/node_modules/effect/DateTime/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/DateTime.js", + "module": "../dist/esm/DateTime.js", + "types": "../dist/dts/DateTime.d.ts" +} diff --git a/backend/node_modules/effect/DefaultServices/package.json b/backend/node_modules/effect/DefaultServices/package.json new file mode 100644 index 0000000000000000000000000000000000000000..e70604712fd7ec290642efcaa4f6515d5a312de7 --- /dev/null +++ b/backend/node_modules/effect/DefaultServices/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/DefaultServices.js", + "module": "../dist/esm/DefaultServices.js", + "types": "../dist/dts/DefaultServices.d.ts" +} diff --git a/backend/node_modules/effect/Deferred/package.json b/backend/node_modules/effect/Deferred/package.json new file mode 100644 index 0000000000000000000000000000000000000000..08025851e58a5f83b2538b4e11cd4beac6fd547a --- /dev/null +++ b/backend/node_modules/effect/Deferred/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Deferred.js", + "module": "../dist/esm/Deferred.js", + "types": "../dist/dts/Deferred.d.ts" +} diff --git a/backend/node_modules/effect/Differ/package.json b/backend/node_modules/effect/Differ/package.json new file mode 100644 index 0000000000000000000000000000000000000000..a8674529d8dd886d70f5c3f80a66f4706fdbeb56 --- /dev/null +++ b/backend/node_modules/effect/Differ/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Differ.js", + "module": "../dist/esm/Differ.js", + "types": "../dist/dts/Differ.d.ts" +} diff --git a/backend/node_modules/effect/Effect/package.json b/backend/node_modules/effect/Effect/package.json new file mode 100644 index 0000000000000000000000000000000000000000..47c0bd5497dd3f055978190462774956544d2b97 --- /dev/null +++ b/backend/node_modules/effect/Effect/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Effect.js", + "module": "../dist/esm/Effect.js", + "types": "../dist/dts/Effect.d.ts" +} diff --git a/backend/node_modules/effect/Encoding/package.json b/backend/node_modules/effect/Encoding/package.json new file mode 100644 index 0000000000000000000000000000000000000000..40e5dbccc676e0a0b7535d1e35315deee919e8dc --- /dev/null +++ b/backend/node_modules/effect/Encoding/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Encoding.js", + "module": "../dist/esm/Encoding.js", + "types": "../dist/dts/Encoding.d.ts" +} diff --git a/backend/node_modules/effect/Equivalence/package.json b/backend/node_modules/effect/Equivalence/package.json new file mode 100644 index 0000000000000000000000000000000000000000..9ffc6a8e8ade64756cc13e683eaa59aba848fa47 --- /dev/null +++ b/backend/node_modules/effect/Equivalence/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Equivalence.js", + "module": "../dist/esm/Equivalence.js", + "types": "../dist/dts/Equivalence.d.ts" +} diff --git a/backend/node_modules/effect/ExecutionPlan/package.json b/backend/node_modules/effect/ExecutionPlan/package.json new file mode 100644 index 0000000000000000000000000000000000000000..31f03acefd6c1b40f36d95f9d2cda0572b7c5a0a --- /dev/null +++ b/backend/node_modules/effect/ExecutionPlan/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/ExecutionPlan.js", + "module": "../dist/esm/ExecutionPlan.js", + "types": "../dist/dts/ExecutionPlan.d.ts" +} diff --git a/backend/node_modules/effect/FastCheck/package.json b/backend/node_modules/effect/FastCheck/package.json new file mode 100644 index 0000000000000000000000000000000000000000..bcdac827d704d0f84ad914d49c8879c941871efb --- /dev/null +++ b/backend/node_modules/effect/FastCheck/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/FastCheck.js", + "module": "../dist/esm/FastCheck.js", + "types": "../dist/dts/FastCheck.d.ts" +} diff --git a/backend/node_modules/effect/FiberRef/package.json b/backend/node_modules/effect/FiberRef/package.json new file mode 100644 index 0000000000000000000000000000000000000000..b36fbad31d5380b1687f116022e39797e99ce6e0 --- /dev/null +++ b/backend/node_modules/effect/FiberRef/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/FiberRef.js", + "module": "../dist/esm/FiberRef.js", + "types": "../dist/dts/FiberRef.d.ts" +} diff --git a/backend/node_modules/effect/FiberRefs/package.json b/backend/node_modules/effect/FiberRefs/package.json new file mode 100644 index 0000000000000000000000000000000000000000..a2c59a37d0fc80a5c53ce5f3f6ddca834365e1d6 --- /dev/null +++ b/backend/node_modules/effect/FiberRefs/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/FiberRefs.js", + "module": "../dist/esm/FiberRefs.js", + "types": "../dist/dts/FiberRefs.d.ts" +} diff --git a/backend/node_modules/effect/FiberSet/package.json b/backend/node_modules/effect/FiberSet/package.json new file mode 100644 index 0000000000000000000000000000000000000000..d019d67e30b87b334f698f1fdcdfbf4b286f97f8 --- /dev/null +++ b/backend/node_modules/effect/FiberSet/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/FiberSet.js", + "module": "../dist/esm/FiberSet.js", + "types": "../dist/dts/FiberSet.d.ts" +} diff --git a/backend/node_modules/effect/FiberStatus/package.json b/backend/node_modules/effect/FiberStatus/package.json new file mode 100644 index 0000000000000000000000000000000000000000..7fe530211f8dec45dfba5479202821541a0830d4 --- /dev/null +++ b/backend/node_modules/effect/FiberStatus/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/FiberStatus.js", + "module": "../dist/esm/FiberStatus.js", + "types": "../dist/dts/FiberStatus.d.ts" +} diff --git a/backend/node_modules/effect/Function/package.json b/backend/node_modules/effect/Function/package.json new file mode 100644 index 0000000000000000000000000000000000000000..37cb9679c22b84dfba5a97be19cf0cfb7da09ead --- /dev/null +++ b/backend/node_modules/effect/Function/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Function.js", + "module": "../dist/esm/Function.js", + "types": "../dist/dts/Function.d.ts" +} diff --git a/backend/node_modules/effect/Graph/package.json b/backend/node_modules/effect/Graph/package.json new file mode 100644 index 0000000000000000000000000000000000000000..f16a601b79acccee82e04945d878bed46bb9cb11 --- /dev/null +++ b/backend/node_modules/effect/Graph/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Graph.js", + "module": "../dist/esm/Graph.js", + "types": "../dist/dts/Graph.d.ts" +} diff --git a/backend/node_modules/effect/GroupBy/package.json b/backend/node_modules/effect/GroupBy/package.json new file mode 100644 index 0000000000000000000000000000000000000000..1c0e3c0637f7e9dc50d74bf58bc4fb9a6f5d8ece --- /dev/null +++ b/backend/node_modules/effect/GroupBy/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/GroupBy.js", + "module": "../dist/esm/GroupBy.js", + "types": "../dist/dts/GroupBy.d.ts" +} diff --git a/backend/node_modules/effect/Hash/package.json b/backend/node_modules/effect/Hash/package.json new file mode 100644 index 0000000000000000000000000000000000000000..9807a47ae322453d9cd80a61dbef29f916320d20 --- /dev/null +++ b/backend/node_modules/effect/Hash/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Hash.js", + "module": "../dist/esm/Hash.js", + "types": "../dist/dts/Hash.d.ts" +} diff --git a/backend/node_modules/effect/HashMap/package.json b/backend/node_modules/effect/HashMap/package.json new file mode 100644 index 0000000000000000000000000000000000000000..3c217b6e2f2efce8406032e4edef1b2f729325b6 --- /dev/null +++ b/backend/node_modules/effect/HashMap/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/HashMap.js", + "module": "../dist/esm/HashMap.js", + "types": "../dist/dts/HashMap.d.ts" +} diff --git a/backend/node_modules/effect/HashRing/package.json b/backend/node_modules/effect/HashRing/package.json new file mode 100644 index 0000000000000000000000000000000000000000..4974c8080d5b9f13a0268592db617b3c08afba28 --- /dev/null +++ b/backend/node_modules/effect/HashRing/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/HashRing.js", + "module": "../dist/esm/HashRing.js", + "types": "../dist/dts/HashRing.d.ts" +} diff --git a/backend/node_modules/effect/HashSet/package.json b/backend/node_modules/effect/HashSet/package.json new file mode 100644 index 0000000000000000000000000000000000000000..86faa6aed60ba8756239ced98e8e6957d324b9fe --- /dev/null +++ b/backend/node_modules/effect/HashSet/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/HashSet.js", + "module": "../dist/esm/HashSet.js", + "types": "../dist/dts/HashSet.d.ts" +} diff --git a/backend/node_modules/effect/JSONSchema/package.json b/backend/node_modules/effect/JSONSchema/package.json new file mode 100644 index 0000000000000000000000000000000000000000..cc45e6605eda40397b0c91256b526ee37b3992ba --- /dev/null +++ b/backend/node_modules/effect/JSONSchema/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/JSONSchema.js", + "module": "../dist/esm/JSONSchema.js", + "types": "../dist/dts/JSONSchema.d.ts" +} diff --git a/backend/node_modules/effect/Layer/package.json b/backend/node_modules/effect/Layer/package.json new file mode 100644 index 0000000000000000000000000000000000000000..0e7c1939986eb672255adbd96d08fb844db0592b --- /dev/null +++ b/backend/node_modules/effect/Layer/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Layer.js", + "module": "../dist/esm/Layer.js", + "types": "../dist/dts/Layer.d.ts" +} diff --git a/backend/node_modules/effect/LayerMap/package.json b/backend/node_modules/effect/LayerMap/package.json new file mode 100644 index 0000000000000000000000000000000000000000..2140d5558e79cca2e84770b3622e5eb9b7a26c1d --- /dev/null +++ b/backend/node_modules/effect/LayerMap/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/LayerMap.js", + "module": "../dist/esm/LayerMap.js", + "types": "../dist/dts/LayerMap.d.ts" +} diff --git a/backend/node_modules/effect/List/package.json b/backend/node_modules/effect/List/package.json new file mode 100644 index 0000000000000000000000000000000000000000..42b77a0012dd5a39989c47fa5bc93c7143bf2cbc --- /dev/null +++ b/backend/node_modules/effect/List/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/List.js", + "module": "../dist/esm/List.js", + "types": "../dist/dts/List.d.ts" +} diff --git a/backend/node_modules/effect/LogLevel/package.json b/backend/node_modules/effect/LogLevel/package.json new file mode 100644 index 0000000000000000000000000000000000000000..e93816274f4c4961fed083787db2ea25bd0eb8f1 --- /dev/null +++ b/backend/node_modules/effect/LogLevel/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/LogLevel.js", + "module": "../dist/esm/LogLevel.js", + "types": "../dist/dts/LogLevel.d.ts" +} diff --git a/backend/node_modules/effect/Logger/package.json b/backend/node_modules/effect/Logger/package.json new file mode 100644 index 0000000000000000000000000000000000000000..08cdce2e5228c63b03e19424e521c53d8bdb75ab --- /dev/null +++ b/backend/node_modules/effect/Logger/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Logger.js", + "module": "../dist/esm/Logger.js", + "types": "../dist/dts/Logger.d.ts" +} diff --git a/backend/node_modules/effect/Mailbox/package.json b/backend/node_modules/effect/Mailbox/package.json new file mode 100644 index 0000000000000000000000000000000000000000..7b6c281c39427cc686682d0f728cf567ad087044 --- /dev/null +++ b/backend/node_modules/effect/Mailbox/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Mailbox.js", + "module": "../dist/esm/Mailbox.js", + "types": "../dist/dts/Mailbox.d.ts" +} diff --git a/backend/node_modules/effect/ManagedRuntime/package.json b/backend/node_modules/effect/ManagedRuntime/package.json new file mode 100644 index 0000000000000000000000000000000000000000..9b7f518d7cd8e9b46b339267b3be9381bba210d6 --- /dev/null +++ b/backend/node_modules/effect/ManagedRuntime/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/ManagedRuntime.js", + "module": "../dist/esm/ManagedRuntime.js", + "types": "../dist/dts/ManagedRuntime.d.ts" +} diff --git a/backend/node_modules/effect/Match/package.json b/backend/node_modules/effect/Match/package.json new file mode 100644 index 0000000000000000000000000000000000000000..0870cb3990f31bd7377cc33f994b23e54f6c0bd8 --- /dev/null +++ b/backend/node_modules/effect/Match/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Match.js", + "module": "../dist/esm/Match.js", + "types": "../dist/dts/Match.d.ts" +} diff --git a/backend/node_modules/effect/MergeDecision/package.json b/backend/node_modules/effect/MergeDecision/package.json new file mode 100644 index 0000000000000000000000000000000000000000..cd69e047f2a6c3e169d4601d7549419144aa6a75 --- /dev/null +++ b/backend/node_modules/effect/MergeDecision/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/MergeDecision.js", + "module": "../dist/esm/MergeDecision.js", + "types": "../dist/dts/MergeDecision.d.ts" +} diff --git a/backend/node_modules/effect/MergeState/package.json b/backend/node_modules/effect/MergeState/package.json new file mode 100644 index 0000000000000000000000000000000000000000..1e9d0d33f46e8c4964ae89aaed718c6310577cd4 --- /dev/null +++ b/backend/node_modules/effect/MergeState/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/MergeState.js", + "module": "../dist/esm/MergeState.js", + "types": "../dist/dts/MergeState.d.ts" +} diff --git a/backend/node_modules/effect/MergeStrategy/package.json b/backend/node_modules/effect/MergeStrategy/package.json new file mode 100644 index 0000000000000000000000000000000000000000..6f8ae03d1c593efc54c11ae92e82ba62db4e8361 --- /dev/null +++ b/backend/node_modules/effect/MergeStrategy/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/MergeStrategy.js", + "module": "../dist/esm/MergeStrategy.js", + "types": "../dist/dts/MergeStrategy.d.ts" +} diff --git a/backend/node_modules/effect/MetricKey/package.json b/backend/node_modules/effect/MetricKey/package.json new file mode 100644 index 0000000000000000000000000000000000000000..bc31c2899ce6ae7a255adac77c13c7bf64d704d9 --- /dev/null +++ b/backend/node_modules/effect/MetricKey/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/MetricKey.js", + "module": "../dist/esm/MetricKey.js", + "types": "../dist/dts/MetricKey.d.ts" +} diff --git a/backend/node_modules/effect/MetricKeyType/package.json b/backend/node_modules/effect/MetricKeyType/package.json new file mode 100644 index 0000000000000000000000000000000000000000..38388a2902b62414b512121b6a4b5e4dc6cc3ea0 --- /dev/null +++ b/backend/node_modules/effect/MetricKeyType/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/MetricKeyType.js", + "module": "../dist/esm/MetricKeyType.js", + "types": "../dist/dts/MetricKeyType.d.ts" +} diff --git a/backend/node_modules/effect/MetricLabel/package.json b/backend/node_modules/effect/MetricLabel/package.json new file mode 100644 index 0000000000000000000000000000000000000000..a24fc6f249c67bd1874a7861b0388702f2e55cf7 --- /dev/null +++ b/backend/node_modules/effect/MetricLabel/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/MetricLabel.js", + "module": "../dist/esm/MetricLabel.js", + "types": "../dist/dts/MetricLabel.d.ts" +} diff --git a/backend/node_modules/effect/MetricPolling/package.json b/backend/node_modules/effect/MetricPolling/package.json new file mode 100644 index 0000000000000000000000000000000000000000..9e5b0f060035846299abca8712302e40c7745833 --- /dev/null +++ b/backend/node_modules/effect/MetricPolling/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/MetricPolling.js", + "module": "../dist/esm/MetricPolling.js", + "types": "../dist/dts/MetricPolling.d.ts" +} diff --git a/backend/node_modules/effect/MetricState/package.json b/backend/node_modules/effect/MetricState/package.json new file mode 100644 index 0000000000000000000000000000000000000000..bc01b0cfe7daae5534d9d2a32cd8028f50276be9 --- /dev/null +++ b/backend/node_modules/effect/MetricState/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/MetricState.js", + "module": "../dist/esm/MetricState.js", + "types": "../dist/dts/MetricState.d.ts" +} diff --git a/backend/node_modules/effect/ModuleVersion/package.json b/backend/node_modules/effect/ModuleVersion/package.json new file mode 100644 index 0000000000000000000000000000000000000000..bb70a68c19e1bb377c371fe6c61d2bfbcc6beb74 --- /dev/null +++ b/backend/node_modules/effect/ModuleVersion/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/ModuleVersion.js", + "module": "../dist/esm/ModuleVersion.js", + "types": "../dist/dts/ModuleVersion.d.ts" +} diff --git a/backend/node_modules/effect/MutableQueue/package.json b/backend/node_modules/effect/MutableQueue/package.json new file mode 100644 index 0000000000000000000000000000000000000000..180d10e277c57cf920e227dbdd9e7789fb138d14 --- /dev/null +++ b/backend/node_modules/effect/MutableQueue/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/MutableQueue.js", + "module": "../dist/esm/MutableQueue.js", + "types": "../dist/dts/MutableQueue.d.ts" +} diff --git a/backend/node_modules/effect/MutableRef/package.json b/backend/node_modules/effect/MutableRef/package.json new file mode 100644 index 0000000000000000000000000000000000000000..419cb37b1d2bbf614d22eb4646d9031dd7ed0520 --- /dev/null +++ b/backend/node_modules/effect/MutableRef/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/MutableRef.js", + "module": "../dist/esm/MutableRef.js", + "types": "../dist/dts/MutableRef.d.ts" +} diff --git a/backend/node_modules/effect/Number/package.json b/backend/node_modules/effect/Number/package.json new file mode 100644 index 0000000000000000000000000000000000000000..70235524f7ad1ba99fe3dfbf2953e7c4d9176dee --- /dev/null +++ b/backend/node_modules/effect/Number/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Number.js", + "module": "../dist/esm/Number.js", + "types": "../dist/dts/Number.d.ts" +} diff --git a/backend/node_modules/effect/Option/package.json b/backend/node_modules/effect/Option/package.json new file mode 100644 index 0000000000000000000000000000000000000000..22fb8284b265f03b4880fa6a73c1fda5ec6e04ed --- /dev/null +++ b/backend/node_modules/effect/Option/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Option.js", + "module": "../dist/esm/Option.js", + "types": "../dist/dts/Option.d.ts" +} diff --git a/backend/node_modules/effect/Ordering/package.json b/backend/node_modules/effect/Ordering/package.json new file mode 100644 index 0000000000000000000000000000000000000000..060f9ea6ccba6fbf30a1bd67952fa02d485db662 --- /dev/null +++ b/backend/node_modules/effect/Ordering/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Ordering.js", + "module": "../dist/esm/Ordering.js", + "types": "../dist/dts/Ordering.d.ts" +} diff --git a/backend/node_modules/effect/ParseResult/package.json b/backend/node_modules/effect/ParseResult/package.json new file mode 100644 index 0000000000000000000000000000000000000000..e26222b44eaf38071a4c150d67856af800ad6f75 --- /dev/null +++ b/backend/node_modules/effect/ParseResult/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/ParseResult.js", + "module": "../dist/esm/ParseResult.js", + "types": "../dist/dts/ParseResult.d.ts" +} diff --git a/backend/node_modules/effect/Pipeable/package.json b/backend/node_modules/effect/Pipeable/package.json new file mode 100644 index 0000000000000000000000000000000000000000..804a7e08f73637f8cbd724d137c536f29a31d85b --- /dev/null +++ b/backend/node_modules/effect/Pipeable/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Pipeable.js", + "module": "../dist/esm/Pipeable.js", + "types": "../dist/dts/Pipeable.d.ts" +} diff --git a/backend/node_modules/effect/RateLimiter/package.json b/backend/node_modules/effect/RateLimiter/package.json new file mode 100644 index 0000000000000000000000000000000000000000..60f48e4a8617ccbbddcd2c4468cde7a57aed4434 --- /dev/null +++ b/backend/node_modules/effect/RateLimiter/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/RateLimiter.js", + "module": "../dist/esm/RateLimiter.js", + "types": "../dist/dts/RateLimiter.d.ts" +} diff --git a/backend/node_modules/effect/RcRef/package.json b/backend/node_modules/effect/RcRef/package.json new file mode 100644 index 0000000000000000000000000000000000000000..3dad5a270cf500dc8fdb247d2b7de95b06f85674 --- /dev/null +++ b/backend/node_modules/effect/RcRef/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/RcRef.js", + "module": "../dist/esm/RcRef.js", + "types": "../dist/dts/RcRef.d.ts" +} diff --git a/backend/node_modules/effect/Record/package.json b/backend/node_modules/effect/Record/package.json new file mode 100644 index 0000000000000000000000000000000000000000..5542f9da4b55f18bcf733553082d6ea4936a9af9 --- /dev/null +++ b/backend/node_modules/effect/Record/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Record.js", + "module": "../dist/esm/Record.js", + "types": "../dist/dts/Record.d.ts" +} diff --git a/backend/node_modules/effect/RedBlackTree/package.json b/backend/node_modules/effect/RedBlackTree/package.json new file mode 100644 index 0000000000000000000000000000000000000000..2b28426ea8614aba3260789856afad23b156e8be --- /dev/null +++ b/backend/node_modules/effect/RedBlackTree/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/RedBlackTree.js", + "module": "../dist/esm/RedBlackTree.js", + "types": "../dist/dts/RedBlackTree.d.ts" +} diff --git a/backend/node_modules/effect/Redacted/package.json b/backend/node_modules/effect/Redacted/package.json new file mode 100644 index 0000000000000000000000000000000000000000..0dbe47e0fd44a1579105e525828f266f3733c87d --- /dev/null +++ b/backend/node_modules/effect/Redacted/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Redacted.js", + "module": "../dist/esm/Redacted.js", + "types": "../dist/dts/Redacted.d.ts" +} diff --git a/backend/node_modules/effect/Reloadable/package.json b/backend/node_modules/effect/Reloadable/package.json new file mode 100644 index 0000000000000000000000000000000000000000..85a97d42e889e2b03ccd16a6eeaa8755eac7deb4 --- /dev/null +++ b/backend/node_modules/effect/Reloadable/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Reloadable.js", + "module": "../dist/esm/Reloadable.js", + "types": "../dist/dts/Reloadable.d.ts" +} diff --git a/backend/node_modules/effect/Runtime/package.json b/backend/node_modules/effect/Runtime/package.json new file mode 100644 index 0000000000000000000000000000000000000000..88d782583cb6d0e69a0d2ca15fc7cdf14395168b --- /dev/null +++ b/backend/node_modules/effect/Runtime/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Runtime.js", + "module": "../dist/esm/Runtime.js", + "types": "../dist/dts/Runtime.d.ts" +} diff --git a/backend/node_modules/effect/RuntimeFlagsPatch/package.json b/backend/node_modules/effect/RuntimeFlagsPatch/package.json new file mode 100644 index 0000000000000000000000000000000000000000..fe9aa3adb6aa8cd5f85683898e5c9b9de9677ff4 --- /dev/null +++ b/backend/node_modules/effect/RuntimeFlagsPatch/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/RuntimeFlagsPatch.js", + "module": "../dist/esm/RuntimeFlagsPatch.js", + "types": "../dist/dts/RuntimeFlagsPatch.d.ts" +} diff --git a/backend/node_modules/effect/STM/package.json b/backend/node_modules/effect/STM/package.json new file mode 100644 index 0000000000000000000000000000000000000000..6519a6b28e095cdb1df4ef65ab57b2627a2039c6 --- /dev/null +++ b/backend/node_modules/effect/STM/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/STM.js", + "module": "../dist/esm/STM.js", + "types": "../dist/dts/STM.d.ts" +} diff --git a/backend/node_modules/effect/ScheduleDecision/package.json b/backend/node_modules/effect/ScheduleDecision/package.json new file mode 100644 index 0000000000000000000000000000000000000000..4cd17308d105667492669e3e32a4f9cf1d1ce9d2 --- /dev/null +++ b/backend/node_modules/effect/ScheduleDecision/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/ScheduleDecision.js", + "module": "../dist/esm/ScheduleDecision.js", + "types": "../dist/dts/ScheduleDecision.d.ts" +} diff --git a/backend/node_modules/effect/ScheduleIntervals/package.json b/backend/node_modules/effect/ScheduleIntervals/package.json new file mode 100644 index 0000000000000000000000000000000000000000..8a87f2cdf93f13a1eee1895615895c5933221c96 --- /dev/null +++ b/backend/node_modules/effect/ScheduleIntervals/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/ScheduleIntervals.js", + "module": "../dist/esm/ScheduleIntervals.js", + "types": "../dist/dts/ScheduleIntervals.d.ts" +} diff --git a/backend/node_modules/effect/Scheduler/package.json b/backend/node_modules/effect/Scheduler/package.json new file mode 100644 index 0000000000000000000000000000000000000000..e73438cedb3657a6606b3e9bf1b5d9b22b002d51 --- /dev/null +++ b/backend/node_modules/effect/Scheduler/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Scheduler.js", + "module": "../dist/esm/Scheduler.js", + "types": "../dist/dts/Scheduler.d.ts" +} diff --git a/backend/node_modules/effect/Schema/package.json b/backend/node_modules/effect/Schema/package.json new file mode 100644 index 0000000000000000000000000000000000000000..4590bc8030f78b1c2666c18cadbfbc5ea7f6cf4a --- /dev/null +++ b/backend/node_modules/effect/Schema/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Schema.js", + "module": "../dist/esm/Schema.js", + "types": "../dist/dts/Schema.d.ts" +} diff --git a/backend/node_modules/effect/Scope/package.json b/backend/node_modules/effect/Scope/package.json new file mode 100644 index 0000000000000000000000000000000000000000..00a16c4d2b97b11be2e8e4ac7c83ddbc723d54eb --- /dev/null +++ b/backend/node_modules/effect/Scope/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Scope.js", + "module": "../dist/esm/Scope.js", + "types": "../dist/dts/Scope.d.ts" +} diff --git a/backend/node_modules/effect/SingleProducerAsyncInput/package.json b/backend/node_modules/effect/SingleProducerAsyncInput/package.json new file mode 100644 index 0000000000000000000000000000000000000000..05fdc3c7e528630f5e8feb9d16f9b97a72caaa6b --- /dev/null +++ b/backend/node_modules/effect/SingleProducerAsyncInput/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/SingleProducerAsyncInput.js", + "module": "../dist/esm/SingleProducerAsyncInput.js", + "types": "../dist/dts/SingleProducerAsyncInput.d.ts" +} diff --git a/backend/node_modules/effect/Sink/package.json b/backend/node_modules/effect/Sink/package.json new file mode 100644 index 0000000000000000000000000000000000000000..8e954e017f1f2981e41f807a3b37507bc240483c --- /dev/null +++ b/backend/node_modules/effect/Sink/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Sink.js", + "module": "../dist/esm/Sink.js", + "types": "../dist/dts/Sink.d.ts" +} diff --git a/backend/node_modules/effect/SortedMap/package.json b/backend/node_modules/effect/SortedMap/package.json new file mode 100644 index 0000000000000000000000000000000000000000..4e28323931ce794ae2280af55ef18c751dcd1e0a --- /dev/null +++ b/backend/node_modules/effect/SortedMap/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/SortedMap.js", + "module": "../dist/esm/SortedMap.js", + "types": "../dist/dts/SortedMap.d.ts" +} diff --git a/backend/node_modules/effect/SortedSet/package.json b/backend/node_modules/effect/SortedSet/package.json new file mode 100644 index 0000000000000000000000000000000000000000..e3692e846e591243f40ca9b8f6968796afe9fbbf --- /dev/null +++ b/backend/node_modules/effect/SortedSet/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/SortedSet.js", + "module": "../dist/esm/SortedSet.js", + "types": "../dist/dts/SortedSet.d.ts" +} diff --git a/backend/node_modules/effect/Stream/package.json b/backend/node_modules/effect/Stream/package.json new file mode 100644 index 0000000000000000000000000000000000000000..a733f2bb922a554332fcb70c7306c8ae8a611a5d --- /dev/null +++ b/backend/node_modules/effect/Stream/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Stream.js", + "module": "../dist/esm/Stream.js", + "types": "../dist/dts/Stream.d.ts" +} diff --git a/backend/node_modules/effect/StreamHaltStrategy/package.json b/backend/node_modules/effect/StreamHaltStrategy/package.json new file mode 100644 index 0000000000000000000000000000000000000000..8116b302ebdf6941dffcc47b7abae3f8700936bc --- /dev/null +++ b/backend/node_modules/effect/StreamHaltStrategy/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/StreamHaltStrategy.js", + "module": "../dist/esm/StreamHaltStrategy.js", + "types": "../dist/dts/StreamHaltStrategy.d.ts" +} diff --git a/backend/node_modules/effect/Streamable/package.json b/backend/node_modules/effect/Streamable/package.json new file mode 100644 index 0000000000000000000000000000000000000000..841448bc914b19a343da0ca3056ead5bc112d232 --- /dev/null +++ b/backend/node_modules/effect/Streamable/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Streamable.js", + "module": "../dist/esm/Streamable.js", + "types": "../dist/dts/Streamable.d.ts" +} diff --git a/backend/node_modules/effect/Struct/package.json b/backend/node_modules/effect/Struct/package.json new file mode 100644 index 0000000000000000000000000000000000000000..665d4c66e08bebeda1c9f598ca1da24c933682c9 --- /dev/null +++ b/backend/node_modules/effect/Struct/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Struct.js", + "module": "../dist/esm/Struct.js", + "types": "../dist/dts/Struct.d.ts" +} diff --git a/backend/node_modules/effect/Subscribable/package.json b/backend/node_modules/effect/Subscribable/package.json new file mode 100644 index 0000000000000000000000000000000000000000..25c513e6a78a20772f4457ff515f3c8cbeb80a63 --- /dev/null +++ b/backend/node_modules/effect/Subscribable/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Subscribable.js", + "module": "../dist/esm/Subscribable.js", + "types": "../dist/dts/Subscribable.d.ts" +} diff --git a/backend/node_modules/effect/SubscriptionRef/package.json b/backend/node_modules/effect/SubscriptionRef/package.json new file mode 100644 index 0000000000000000000000000000000000000000..4756a76c9d701c4cd652836896e18fe21586b734 --- /dev/null +++ b/backend/node_modules/effect/SubscriptionRef/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/SubscriptionRef.js", + "module": "../dist/esm/SubscriptionRef.js", + "types": "../dist/dts/SubscriptionRef.d.ts" +} diff --git a/backend/node_modules/effect/Symbol/package.json b/backend/node_modules/effect/Symbol/package.json new file mode 100644 index 0000000000000000000000000000000000000000..7b6e684bb62d1c74a00b5e89fea071c164989e3a --- /dev/null +++ b/backend/node_modules/effect/Symbol/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Symbol.js", + "module": "../dist/esm/Symbol.js", + "types": "../dist/dts/Symbol.d.ts" +} diff --git a/backend/node_modules/effect/TDeferred/package.json b/backend/node_modules/effect/TDeferred/package.json new file mode 100644 index 0000000000000000000000000000000000000000..9bc58e0730b15cba47bd74e0a0dda2a1859bfc2f --- /dev/null +++ b/backend/node_modules/effect/TDeferred/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/TDeferred.js", + "module": "../dist/esm/TDeferred.js", + "types": "../dist/dts/TDeferred.d.ts" +} diff --git a/backend/node_modules/effect/TQueue/package.json b/backend/node_modules/effect/TQueue/package.json new file mode 100644 index 0000000000000000000000000000000000000000..d6dd8aa99f8a7ae8ffadd5565ba97bf4638dd0a4 --- /dev/null +++ b/backend/node_modules/effect/TQueue/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/TQueue.js", + "module": "../dist/esm/TQueue.js", + "types": "../dist/dts/TQueue.d.ts" +} diff --git a/backend/node_modules/effect/TRandom/package.json b/backend/node_modules/effect/TRandom/package.json new file mode 100644 index 0000000000000000000000000000000000000000..0a73066251cc8c0f998b8126fb2be2bb218372df --- /dev/null +++ b/backend/node_modules/effect/TRandom/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/TRandom.js", + "module": "../dist/esm/TRandom.js", + "types": "../dist/dts/TRandom.d.ts" +} diff --git a/backend/node_modules/effect/TReentrantLock/package.json b/backend/node_modules/effect/TReentrantLock/package.json new file mode 100644 index 0000000000000000000000000000000000000000..6e133c9651fe273777875317f3d439ed0f609f02 --- /dev/null +++ b/backend/node_modules/effect/TReentrantLock/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/TReentrantLock.js", + "module": "../dist/esm/TReentrantLock.js", + "types": "../dist/dts/TReentrantLock.d.ts" +} diff --git a/backend/node_modules/effect/TRef/package.json b/backend/node_modules/effect/TRef/package.json new file mode 100644 index 0000000000000000000000000000000000000000..f73d43d616f381243bb8e0ba50ff8f2e51b03cb8 --- /dev/null +++ b/backend/node_modules/effect/TRef/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/TRef.js", + "module": "../dist/esm/TRef.js", + "types": "../dist/dts/TRef.d.ts" +} diff --git a/backend/node_modules/effect/TSemaphore/package.json b/backend/node_modules/effect/TSemaphore/package.json new file mode 100644 index 0000000000000000000000000000000000000000..3795b9092bde4575145fbfcb5728f9f59258006d --- /dev/null +++ b/backend/node_modules/effect/TSemaphore/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/TSemaphore.js", + "module": "../dist/esm/TSemaphore.js", + "types": "../dist/dts/TSemaphore.d.ts" +} diff --git a/backend/node_modules/effect/TSet/package.json b/backend/node_modules/effect/TSet/package.json new file mode 100644 index 0000000000000000000000000000000000000000..8a962d20600a065759ecf4f87a01ee49f3d21129 --- /dev/null +++ b/backend/node_modules/effect/TSet/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/TSet.js", + "module": "../dist/esm/TSet.js", + "types": "../dist/dts/TSet.d.ts" +} diff --git a/backend/node_modules/effect/Take/package.json b/backend/node_modules/effect/Take/package.json new file mode 100644 index 0000000000000000000000000000000000000000..96c02fa93e3143f327aaba1f6264a16c6dfc1c1d --- /dev/null +++ b/backend/node_modules/effect/Take/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Take.js", + "module": "../dist/esm/Take.js", + "types": "../dist/dts/Take.d.ts" +} diff --git a/backend/node_modules/effect/TestClock/package.json b/backend/node_modules/effect/TestClock/package.json new file mode 100644 index 0000000000000000000000000000000000000000..7414569ed8614e5512cbb8aca89721f8c3e3d308 --- /dev/null +++ b/backend/node_modules/effect/TestClock/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/TestClock.js", + "module": "../dist/esm/TestClock.js", + "types": "../dist/dts/TestClock.d.ts" +} diff --git a/backend/node_modules/effect/TestConfig/package.json b/backend/node_modules/effect/TestConfig/package.json new file mode 100644 index 0000000000000000000000000000000000000000..d10960cdbff4699a624e4a1462e2b11cf4ba02ad --- /dev/null +++ b/backend/node_modules/effect/TestConfig/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/TestConfig.js", + "module": "../dist/esm/TestConfig.js", + "types": "../dist/dts/TestConfig.d.ts" +} diff --git a/backend/node_modules/effect/TestContext/package.json b/backend/node_modules/effect/TestContext/package.json new file mode 100644 index 0000000000000000000000000000000000000000..882212cd6ac8ea545345a80125941b9c69de7556 --- /dev/null +++ b/backend/node_modules/effect/TestContext/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/TestContext.js", + "module": "../dist/esm/TestContext.js", + "types": "../dist/dts/TestContext.d.ts" +} diff --git a/backend/node_modules/effect/TestLive/package.json b/backend/node_modules/effect/TestLive/package.json new file mode 100644 index 0000000000000000000000000000000000000000..bc965f2c1fda9003955776b389edba360c728688 --- /dev/null +++ b/backend/node_modules/effect/TestLive/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/TestLive.js", + "module": "../dist/esm/TestLive.js", + "types": "../dist/dts/TestLive.d.ts" +} diff --git a/backend/node_modules/effect/TestSized/package.json b/backend/node_modules/effect/TestSized/package.json new file mode 100644 index 0000000000000000000000000000000000000000..d1d4dc5c993031e95809fd4b6bc13276bd630502 --- /dev/null +++ b/backend/node_modules/effect/TestSized/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/TestSized.js", + "module": "../dist/esm/TestSized.js", + "types": "../dist/dts/TestSized.d.ts" +} diff --git a/backend/node_modules/effect/Trie/package.json b/backend/node_modules/effect/Trie/package.json new file mode 100644 index 0000000000000000000000000000000000000000..904d9536f4ec95f225249caada102fe269d3037f --- /dev/null +++ b/backend/node_modules/effect/Trie/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Trie.js", + "module": "../dist/esm/Trie.js", + "types": "../dist/dts/Trie.d.ts" +} diff --git a/backend/node_modules/effect/Tuple/package.json b/backend/node_modules/effect/Tuple/package.json new file mode 100644 index 0000000000000000000000000000000000000000..b61db7aa0d6c6831c73faf70d0ff702f4e472b5e --- /dev/null +++ b/backend/node_modules/effect/Tuple/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Tuple.js", + "module": "../dist/esm/Tuple.js", + "types": "../dist/dts/Tuple.d.ts" +} diff --git a/backend/node_modules/effect/Unify/package.json b/backend/node_modules/effect/Unify/package.json new file mode 100644 index 0000000000000000000000000000000000000000..7ef5b2508c10645610fa3730b99d9fcf9773b2b6 --- /dev/null +++ b/backend/node_modules/effect/Unify/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Unify.js", + "module": "../dist/esm/Unify.js", + "types": "../dist/dts/Unify.d.ts" +} diff --git a/backend/node_modules/effect/Utils/package.json b/backend/node_modules/effect/Utils/package.json new file mode 100644 index 0000000000000000000000000000000000000000..9a5ceeca54bc33f0b23229b3bff892935a9a68a4 --- /dev/null +++ b/backend/node_modules/effect/Utils/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [], + "main": "../dist/cjs/Utils.js", + "module": "../dist/esm/Utils.js", + "types": "../dist/dts/Utils.d.ts" +}