UNPKG

@prisma/client

Version:

Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.

1,539 lines (1,514 loc) 625 kB
"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 __esm = (fn, res) => function __init() { return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; }; var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; 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); // ../../node_modules/.pnpm/pluralize@8.0.0/node_modules/pluralize/pluralize.js var require_pluralize = __commonJS({ "../../node_modules/.pnpm/pluralize@8.0.0/node_modules/pluralize/pluralize.js"(exports2, module2) { "use strict"; (function(root, pluralize3) { if (typeof require === "function" && typeof exports2 === "object" && typeof module2 === "object") { module2.exports = pluralize3(); } else if (typeof define === "function" && define.amd) { define(function() { return pluralize3(); }); } else { root.pluralize = pluralize3(); } })(exports2, function() { var pluralRules = []; var singularRules = []; var uncountables = {}; var irregularPlurals = {}; var irregularSingles = {}; function sanitizeRule(rule) { if (typeof rule === "string") { return new RegExp("^" + rule + "$", "i"); } return rule; } function restoreCase(word, token) { if (word === token) return token; if (word === word.toLowerCase()) return token.toLowerCase(); if (word === word.toUpperCase()) return token.toUpperCase(); if (word[0] === word[0].toUpperCase()) { return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase(); } return token.toLowerCase(); } function interpolate(str, args) { return str.replace(/\$(\d{1,2})/g, function(match, index) { return args[index] || ""; }); } function replace(word, rule) { return word.replace(rule[0], function(match, index) { var result = interpolate(rule[1], arguments); if (match === "") { return restoreCase(word[index - 1], result); } return restoreCase(match, result); }); } function sanitizeWord(token, word, rules) { if (!token.length || uncountables.hasOwnProperty(token)) { return word; } var len = rules.length; while (len--) { var rule = rules[len]; if (rule[0].test(word)) return replace(word, rule); } return word; } function replaceWord(replaceMap, keepMap, rules) { return function(word) { var token = word.toLowerCase(); if (keepMap.hasOwnProperty(token)) { return restoreCase(word, token); } if (replaceMap.hasOwnProperty(token)) { return restoreCase(word, replaceMap[token]); } return sanitizeWord(token, word, rules); }; } function checkWord(replaceMap, keepMap, rules, bool) { return function(word) { var token = word.toLowerCase(); if (keepMap.hasOwnProperty(token)) return true; if (replaceMap.hasOwnProperty(token)) return false; return sanitizeWord(token, token, rules) === token; }; } function pluralize3(word, count, inclusive) { var pluralized = count === 1 ? pluralize3.singular(word) : pluralize3.plural(word); return (inclusive ? count + " " : "") + pluralized; } pluralize3.plural = replaceWord( irregularSingles, irregularPlurals, pluralRules ); pluralize3.isPlural = checkWord( irregularSingles, irregularPlurals, pluralRules ); pluralize3.singular = replaceWord( irregularPlurals, irregularSingles, singularRules ); pluralize3.isSingular = checkWord( irregularPlurals, irregularSingles, singularRules ); pluralize3.addPluralRule = function(rule, replacement) { pluralRules.push([sanitizeRule(rule), replacement]); }; pluralize3.addSingularRule = function(rule, replacement) { singularRules.push([sanitizeRule(rule), replacement]); }; pluralize3.addUncountableRule = function(word) { if (typeof word === "string") { uncountables[word.toLowerCase()] = true; return; } pluralize3.addPluralRule(word, "$0"); pluralize3.addSingularRule(word, "$0"); }; pluralize3.addIrregularRule = function(single, plural) { plural = plural.toLowerCase(); single = single.toLowerCase(); irregularSingles[single] = plural; irregularPlurals[plural] = single; }; [ // Pronouns. ["I", "we"], ["me", "us"], ["he", "they"], ["she", "they"], ["them", "them"], ["myself", "ourselves"], ["yourself", "yourselves"], ["itself", "themselves"], ["herself", "themselves"], ["himself", "themselves"], ["themself", "themselves"], ["is", "are"], ["was", "were"], ["has", "have"], ["this", "these"], ["that", "those"], // Words ending in with a consonant and `o`. ["echo", "echoes"], ["dingo", "dingoes"], ["volcano", "volcanoes"], ["tornado", "tornadoes"], ["torpedo", "torpedoes"], // Ends with `us`. ["genus", "genera"], ["viscus", "viscera"], // Ends with `ma`. ["stigma", "stigmata"], ["stoma", "stomata"], ["dogma", "dogmata"], ["lemma", "lemmata"], ["schema", "schemata"], ["anathema", "anathemata"], // Other irregular rules. ["ox", "oxen"], ["axe", "axes"], ["die", "dice"], ["yes", "yeses"], ["foot", "feet"], ["eave", "eaves"], ["goose", "geese"], ["tooth", "teeth"], ["quiz", "quizzes"], ["human", "humans"], ["proof", "proofs"], ["carve", "carves"], ["valve", "valves"], ["looey", "looies"], ["thief", "thieves"], ["groove", "grooves"], ["pickaxe", "pickaxes"], ["passerby", "passersby"] ].forEach(function(rule) { return pluralize3.addIrregularRule(rule[0], rule[1]); }); [ [/s?$/i, "s"], [/[^\u0000-\u007F]$/i, "$0"], [/([^aeiou]ese)$/i, "$1"], [/(ax|test)is$/i, "$1es"], [/(alias|[^aou]us|t[lm]as|gas|ris)$/i, "$1es"], [/(e[mn]u)s?$/i, "$1s"], [/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, "$1"], [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1i"], [/(alumn|alg|vertebr)(?:a|ae)$/i, "$1ae"], [/(seraph|cherub)(?:im)?$/i, "$1im"], [/(her|at|gr)o$/i, "$1oes"], [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, "$1a"], [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, "$1a"], [/sis$/i, "ses"], [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, "$1$2ves"], [/([^aeiouy]|qu)y$/i, "$1ies"], [/([^ch][ieo][ln])ey$/i, "$1ies"], [/(x|ch|ss|sh|zz)$/i, "$1es"], [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, "$1ices"], [/\b((?:tit)?m|l)(?:ice|ouse)$/i, "$1ice"], [/(pe)(?:rson|ople)$/i, "$1ople"], [/(child)(?:ren)?$/i, "$1ren"], [/eaux$/i, "$0"], [/m[ae]n$/i, "men"], ["thou", "you"] ].forEach(function(rule) { return pluralize3.addPluralRule(rule[0], rule[1]); }); [ [/s$/i, ""], [/(ss)$/i, "$1"], [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, "$1fe"], [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, "$1f"], [/ies$/i, "y"], [/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, "$1ie"], [/\b(mon|smil)ies$/i, "$1ey"], [/\b((?:tit)?m|l)ice$/i, "$1ouse"], [/(seraph|cherub)im$/i, "$1"], [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, "$1"], [/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, "$1sis"], [/(movie|twelve|abuse|e[mn]u)s$/i, "$1"], [/(test)(?:is|es)$/i, "$1is"], [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1us"], [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, "$1um"], [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, "$1on"], [/(alumn|alg|vertebr)ae$/i, "$1a"], [/(cod|mur|sil|vert|ind)ices$/i, "$1ex"], [/(matr|append)ices$/i, "$1ix"], [/(pe)(rson|ople)$/i, "$1rson"], [/(child)ren$/i, "$1"], [/(eau)x?$/i, "$1"], [/men$/i, "man"] ].forEach(function(rule) { return pluralize3.addSingularRule(rule[0], rule[1]); }); [ // Singular words with no plurals. "adulthood", "advice", "agenda", "aid", "aircraft", "alcohol", "ammo", "analytics", "anime", "athletics", "audio", "bison", "blood", "bream", "buffalo", "butter", "carp", "cash", "chassis", "chess", "clothing", "cod", "commerce", "cooperation", "corps", "debris", "diabetes", "digestion", "elk", "energy", "equipment", "excretion", "expertise", "firmware", "flounder", "fun", "gallows", "garbage", "graffiti", "hardware", "headquarters", "health", "herpes", "highjinks", "homework", "housework", "information", "jeans", "justice", "kudos", "labour", "literature", "machinery", "mackerel", "mail", "media", "mews", "moose", "music", "mud", "manga", "news", "only", "personnel", "pike", "plankton", "pliers", "police", "pollution", "premises", "rain", "research", "rice", "salmon", "scissors", "series", "sewage", "shambles", "shrimp", "software", "species", "staff", "swine", "tennis", "traffic", "transportation", "trout", "tuna", "wealth", "welfare", "whiting", "wildebeest", "wildlife", "you", /pok[eé]mon$/i, // Regexes. /[^aeiou]ese$/i, // "chinese", "japanese" /deer$/i, // "deer", "reindeer" /fish$/i, // "fish", "blowfish", "angelfish" /measles$/i, /o[iu]s$/i, // "carnivorous" /pox$/i, // "chickpox", "smallpox" /sheep$/i ].forEach(pluralize3.addUncountableRule); return pluralize3; }); } }); // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js var require_windows = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports2, module2) { "use strict"; module2.exports = isexe2; isexe2.sync = sync2; var fs5 = require("fs"); function checkPathExt2(path11, options2) { var pathext = options2.pathExt !== void 0 ? options2.pathExt : process.env.PATHEXT; if (!pathext) { return true; } pathext = pathext.split(";"); if (pathext.indexOf("") !== -1) { return true; } for (var i2 = 0; i2 < pathext.length; i2++) { var p2 = pathext[i2].toLowerCase(); if (p2 && path11.substr(-p2.length).toLowerCase() === p2) { return true; } } return false; } function checkStat2(stat, path11, options2) { if (!stat.isSymbolicLink() && !stat.isFile()) { return false; } return checkPathExt2(path11, options2); } function isexe2(path11, options2, cb) { fs5.stat(path11, function(er, stat) { cb(er, er ? false : checkStat2(stat, path11, options2)); }); } function sync2(path11, options2) { return checkStat2(fs5.statSync(path11), path11, options2); } } }); // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js var require_mode = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports2, module2) { "use strict"; module2.exports = isexe2; isexe2.sync = sync2; var fs5 = require("fs"); function isexe2(path11, options2, cb) { fs5.stat(path11, function(er, stat) { cb(er, er ? false : checkStat2(stat, options2)); }); } function sync2(path11, options2) { return checkStat2(fs5.statSync(path11), options2); } function checkStat2(stat, options2) { return stat.isFile() && checkMode2(stat, options2); } function checkMode2(stat, options2) { var mod = stat.mode; var uid = stat.uid; var gid = stat.gid; var myUid = options2.uid !== void 0 ? options2.uid : process.getuid && process.getuid(); var myGid = options2.gid !== void 0 ? options2.gid : process.getgid && process.getgid(); var u2 = parseInt("100", 8); var g = parseInt("010", 8); var o2 = parseInt("001", 8); var ug = u2 | g; var ret = mod & o2 || mod & g && gid === myGid || mod & u2 && uid === myUid || mod & ug && myUid === 0; return ret; } } }); // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js var require_isexe = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports2, module2) { "use strict"; var fs5 = require("fs"); var core2; if (process.platform === "win32" || global.TESTING_WINDOWS) { core2 = require_windows(); } else { core2 = require_mode(); } module2.exports = isexe2; isexe2.sync = sync2; function isexe2(path11, options2, cb) { if (typeof options2 === "function") { cb = options2; options2 = {}; } if (!cb) { if (typeof Promise !== "function") { throw new TypeError("callback not provided"); } return new Promise(function(resolve3, reject) { isexe2(path11, options2 || {}, function(er, is) { if (er) { reject(er); } else { resolve3(is); } }); }); } core2(path11, options2 || {}, function(er, is) { if (er) { if (er.code === "EACCES" || options2 && options2.ignoreErrors) { er = null; is = false; } } cb(er, is); }); } function sync2(path11, options2) { try { return core2.sync(path11, options2 || {}); } catch (er) { if (options2 && options2.ignoreErrors || er.code === "EACCES") { return false; } else { throw er; } } } } }); // ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js var require_which = __commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports2, module2) { "use strict"; var isWindows2 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys"; var path11 = require("path"); var COLON2 = isWindows2 ? ";" : ":"; var isexe2 = require_isexe(); var getNotFoundError2 = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }); var getPathInfo2 = (cmd, opt) => { const colon = opt.colon || COLON2; const pathEnv = cmd.match(/\//) || isWindows2 && cmd.match(/\\/) ? [""] : [ // windows always checks the cwd first ...isWindows2 ? [process.cwd()] : [], ...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */ "").split(colon) ]; const pathExtExe = isWindows2 ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : ""; const pathExt = isWindows2 ? pathExtExe.split(colon) : [""]; if (isWindows2) { if (cmd.indexOf(".") !== -1 && pathExt[0] !== "") pathExt.unshift(""); } return { pathEnv, pathExt, pathExtExe }; }; var which2 = (cmd, opt, cb) => { if (typeof opt === "function") { cb = opt; opt = {}; } if (!opt) opt = {}; const { pathEnv, pathExt, pathExtExe } = getPathInfo2(cmd, opt); const found = []; const step = (i2) => new Promise((resolve3, reject) => { if (i2 === pathEnv.length) return opt.all && found.length ? resolve3(found) : reject(getNotFoundError2(cmd)); const ppRaw = pathEnv[i2]; const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; const pCmd = path11.join(pathPart, cmd); const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; resolve3(subStep(p2, i2, 0)); }); const subStep = (p2, i2, ii) => new Promise((resolve3, reject) => { if (ii === pathExt.length) return resolve3(step(i2 + 1)); const ext = pathExt[ii]; isexe2(p2 + ext, { pathExt: pathExtExe }, (er, is) => { if (!er && is) { if (opt.all) found.push(p2 + ext); else return resolve3(p2 + ext); } return resolve3(subStep(p2, i2, ii + 1)); }); }); return cb ? step(0).then((res) => cb(null, res), cb) : step(0); }; var whichSync2 = (cmd, opt) => { opt = opt || {}; const { pathEnv, pathExt, pathExtExe } = getPathInfo2(cmd, opt); const found = []; for (let i2 = 0; i2 < pathEnv.length; i2++) { const ppRaw = pathEnv[i2]; const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; const pCmd = path11.join(pathPart, cmd); const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; for (let j2 = 0; j2 < pathExt.length; j2++) { const cur = p2 + pathExt[j2]; try { const is = isexe2.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 getNotFoundError2(cmd); }; module2.exports = which2; which2.sync = whichSync2; } }); // ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js var require_path_key = __commonJS({ "../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports2, module2) { "use strict"; var pathKey2 = (options2 = {}) => { const environment = options2.env || process.env; const platform = options2.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; } }); // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js var require_resolveCommand = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) { "use strict"; var path11 = require("path"); var which2 = require_which(); var getPathKey2 = require_path_key(); function resolveCommandAttempt2(parsed, withoutPathExt) { const env3 = parsed.options.env || process.env; const cwd2 = 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 = which2.sync(parsed.command, { path: env3[getPathKey2({ env: env3 })], pathExt: withoutPathExt ? path11.delimiter : void 0 }); } catch (e2) { } finally { if (shouldSwitchCwd) { process.chdir(cwd2); } } if (resolved) { resolved = path11.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved); } return resolved; } function resolveCommand2(parsed) { return resolveCommandAttempt2(parsed) || resolveCommandAttempt2(parsed, true); } module2.exports = resolveCommand2; } }); // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js var require_escape = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js"(exports2, module2) { "use strict"; var metaCharsRegExp2 = /([()\][%!^"`<>&|;, *?])/g; function escapeCommand2(arg) { arg = arg.replace(metaCharsRegExp2, "^$1"); return arg; } function escapeArgument2(arg, doubleEscapeMetaChars) { arg = `${arg}`; arg = arg.replace(/(\\*)"/g, '$1$1\\"'); arg = arg.replace(/(\\*)$/, "$1$1"); arg = `"${arg}"`; arg = arg.replace(metaCharsRegExp2, "^$1"); if (doubleEscapeMetaChars) { arg = arg.replace(metaCharsRegExp2, "^$1"); } return arg; } module2.exports.command = escapeCommand2; module2.exports.argument = escapeArgument2; } }); // ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js var require_shebang_regex = __commonJS({ "../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports2, module2) { "use strict"; module2.exports = /^#!(.*)/; } }); // ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js var require_shebang_command = __commonJS({ "../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports2, module2) { "use strict"; var shebangRegex2 = require_shebang_regex(); module2.exports = (string = "") => { const match = string.match(shebangRegex2); if (!match) { return null; } const [path11, argument] = match[0].replace(/#! ?/, "").split(" "); const binary = path11.split("/").pop(); if (binary === "env") { return argument; } return argument ? `${binary} ${argument}` : binary; }; } }); // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js var require_readShebang = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) { "use strict"; var fs5 = require("fs"); var shebangCommand2 = require_shebang_command(); function readShebang2(command) { const size = 150; const buffer = Buffer.alloc(size); let fd; try { fd = fs5.openSync(command, "r"); fs5.readSync(fd, buffer, 0, size, 0); fs5.closeSync(fd); } catch (e2) { } return shebangCommand2(buffer.toString()); } module2.exports = readShebang2; } }); // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js var require_parse = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js"(exports2, module2) { "use strict"; var path11 = require("path"); var resolveCommand2 = require_resolveCommand(); var escape2 = require_escape(); var readShebang2 = require_readShebang(); var isWin2 = process.platform === "win32"; var isExecutableRegExp2 = /\.(?:com|exe)$/i; var isCmdShimRegExp2 = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; function detectShebang2(parsed) { parsed.file = resolveCommand2(parsed); const shebang = parsed.file && readShebang2(parsed.file); if (shebang) { parsed.args.unshift(parsed.file); parsed.command = shebang; return resolveCommand2(parsed); } return parsed.file; } function parseNonShell2(parsed) { if (!isWin2) { return parsed; } const commandFile = detectShebang2(parsed); const needsShell = !isExecutableRegExp2.test(commandFile); if (parsed.options.forceShell || needsShell) { const needsDoubleEscapeMetaChars = isCmdShimRegExp2.test(commandFile); parsed.command = path11.normalize(parsed.command); parsed.command = escape2.command(parsed.command); parsed.args = parsed.args.map((arg) => escape2.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 parse2(command, args, options2) { if (args && !Array.isArray(args)) { options2 = args; args = null; } args = args ? args.slice(0) : []; options2 = Object.assign({}, options2); const parsed = { command, args, options: options2, file: void 0, original: { command, args } }; return options2.shell ? parsed : parseNonShell2(parsed); } module2.exports = parse2; } }); // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js var require_enoent = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js"(exports2, module2) { "use strict"; var isWin2 = process.platform === "win32"; function notFoundError2(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 hookChildProcess2(cp2, parsed) { if (!isWin2) { return; } const originalEmit = cp2.emit; cp2.emit = function(name, arg1) { if (name === "exit") { const err = verifyENOENT2(arg1, parsed, "spawn"); if (err) { return originalEmit.call(cp2, "error", err); } } return originalEmit.apply(cp2, arguments); }; } function verifyENOENT2(status, parsed) { if (isWin2 && status === 1 && !parsed.file) { return notFoundError2(parsed.original, "spawn"); } return null; } function verifyENOENTSync2(status, parsed) { if (isWin2 && status === 1 && !parsed.file) { return notFoundError2(parsed.original, "spawnSync"); } return null; } module2.exports = { hookChildProcess: hookChildProcess2, verifyENOENT: verifyENOENT2, verifyENOENTSync: verifyENOENTSync2, notFoundError: notFoundError2 }; } }); // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js var require_cross_spawn = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js"(exports2, module2) { "use strict"; var cp2 = require("child_process"); var parse2 = require_parse(); var enoent2 = require_enoent(); function spawn2(command, args, options2) { const parsed = parse2(command, args, options2); const spawned = cp2.spawn(parsed.command, parsed.args, parsed.options); enoent2.hookChildProcess(spawned, parsed); return spawned; } function spawnSync2(command, args, options2) { const parsed = parse2(command, args, options2); const result = cp2.spawnSync(parsed.command, parsed.args, parsed.options); result.error = result.error || enoent2.verifyENOENTSync(result.status, parsed); return result; } module2.exports = spawn2; module2.exports.spawn = spawn2; module2.exports.sync = spawnSync2; module2.exports._parse = parse2; module2.exports._enoent = enoent2; } }); // ../../node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js var require_strip_final_newline = __commonJS({ "../../node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js"(exports2, module2) { "use strict"; module2.exports = (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, input.length - 1); } if (input[input.length - 1] === CR) { input = input.slice(0, input.length - 1); } return input; }; } }); // ../../node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js var require_npm_run_path = __commonJS({ "../../node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js"(exports2, module2) { "use strict"; var path11 = require("path"); var pathKey2 = require_path_key(); var npmRunPath2 = (options2) => { options2 = { cwd: process.cwd(), path: process.env[pathKey2()], execPath: process.execPath, ...options2 }; let previous; let cwdPath = path11.resolve(options2.cwd); const result = []; while (previous !== cwdPath) { result.push(path11.join(cwdPath, "node_modules/.bin")); previous = cwdPath; cwdPath = path11.resolve(cwdPath, ".."); } const execPathDir = path11.resolve(options2.cwd, options2.execPath, ".."); result.push(execPathDir); return result.concat(options2.path).join(path11.delimiter); }; module2.exports = npmRunPath2; module2.exports.default = npmRunPath2; module2.exports.env = (options2) => { options2 = { env: process.env, ...options2 }; const env3 = { ...options2.env }; const path12 = pathKey2({ env: env3 }); options2.path = env3[path12]; env3[path12] = module2.exports(options2); return env3; }; } }); // ../../node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js var require_mimic_fn = __commonJS({ "../../node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js"(exports2, module2) { "use strict"; var mimicFn = (to, from) => { for (const prop of Reflect.ownKeys(from)) { Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop)); } return to; }; module2.exports = mimicFn; module2.exports.default = mimicFn; } }); // ../../node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js var require_onetime = __commonJS({ "../../node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js"(exports2, module2) { "use strict"; var mimicFn = require_mimic_fn(); var calledFunctions2 = /* @__PURE__ */ new WeakMap(); var onetime2 = (function_, options2 = {}) => { if (typeof function_ !== "function") { throw new TypeError("Expected a function"); } let returnValue; let callCount = 0; const functionName = function_.displayName || function_.name || "<anonymous>"; const onetime3 = function(...arguments_) { calledFunctions2.set(onetime3, ++callCount); if (callCount === 1) { returnValue = function_.apply(this, arguments_); function_ = null; } else if (options2.throw === true) { throw new Error(`Function \`${functionName}\` can only be called once`); } return returnValue; }; mimicFn(onetime3, function_); calledFunctions2.set(onetime3, callCount); return onetime3; }; module2.exports = onetime2; module2.exports.default = onetime2; module2.exports.callCount = (function_) => { if (!calledFunctions2.has(function_)) { throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`); } return calledFunctions2.get(function_); }; } }); // ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js var require_core = __commonJS({ "../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SIGNALS = void 0; var SIGNALS2 = [ { 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" } ]; exports2.SIGNALS = SIGNALS2; } }); // ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js var require_realtime = __commonJS({ "../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SIGRTMAX = exports2.getRealtimeSignals = void 0; var getRealtimeSignals2 = function() { const length = SIGRTMAX2 - SIGRTMIN2 + 1; return Array.from({ length }, getRealtimeSignal2); }; exports2.getRealtimeSignals = getRealtimeSignals2; var getRealtimeSignal2 = function(value, index) { return { name: `SIGRT${index + 1}`, number: SIGRTMIN2 + index, action: "terminate", description: "Application-specific signal (realtime)", standard: "posix" }; }; var SIGRTMIN2 = 34; var SIGRTMAX2 = 64; exports2.SIGRTMAX = SIGRTMAX2; } }); // ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js var require_signals = __commonJS({ "../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getSignals = void 0; var _os = require("os"); var _core = require_core(); var _realtime = require_realtime(); var getSignals2 = function() { const realtimeSignals = (0, _realtime.getRealtimeSignals)(); const signals2 = [..._core.SIGNALS, ...realtimeSignals].map(normalizeSignal2); return signals2; }; exports2.getSignals = getSignals2; var normalizeSignal2 = function({ name, number: defaultNumber, description, action: action2, forced = false, standard }) { const { signals: { [name]: constantSignal } } = _os.constants; const supported = constantSignal !== void 0; const number2 = supported ? constantSignal : defaultNumber; return { name, number: number2, description, supported, action: action2, forced, standard }; }; } }); // ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js var require_main = __commonJS({ "../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.signalsByNumber = exports2.signalsByName = void 0; var _os = require("os"); var _signals = require_signals(); var _realtime = require_realtime(); var getSignalsByName2 = function() { const signals2 = (0, _signals.getSignals)(); return signals2.reduce(getSignalByName2, {}); }; var getSignalByName2 = function(signalByNameMemo, { name, number: number2, description, supported, action: action2, forced, standard }) { return { ...signalByNameMemo, [name]: { name, number: number2, description, supported, action: action2, forced, standard } }; }; var signalsByName2 = getSignalsByName2(); exports2.signalsByName = signalsByName2; var getSignalsByNumber2 = function() { const signals2 = (0, _signals.getSignals)(); const length = _realtime.SIGRTMAX + 1; const signalsA = Array.from({ length }, (value, number2) => getSignalByNumber2(number2, signals2)); return Object.assign({}, ...signalsA); }; var getSignalByNumber2 = function(number2, signals2) { const signal = findSignalByNumber2(number2, signals2); if (signal === void 0) { return {}; } const { name, description, supported, action: action2, forced, standard } = signal; return { [number2]: { name, number: number2, description, supported, action: action2, forced, standard } }; }; var findSignalByNumber2 = function(number2, signals2) { const signal = signals2.find(({ name }) => _os.constants.signals[name] === number2); if (signal !== void 0) { return signal; } return signals2.find((signalA) => signalA.number === number2); }; var signalsByNumber = getSignalsByNumber2(); exports2.signalsByNumber = signalsByNumber; } }); // ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js var require_error = __commonJS({ "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js"(exports2, module2) { "use strict"; var { signalsByName: signalsByName2 } = require_main(); var getErrorPrefix2 = ({ 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 makeError2 = ({ stdout, stderr, all, error, signal, exitCode, command, escapedCommand, timedOut, isCanceled, killed, parsed: { options: { timeout } } }) => { exitCode = exitCode === null ? void 0 : exitCode; signal = signal === null ? void 0 : signal; const signalDescription = signal === void 0 ? void 0 : signalsByName2[signal].description; const errorCode = error && error.code; const prefix = getErrorPrefix2({ 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; 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; }; module2.exports = makeError2; } }); // ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js var require_stdio = __commonJS({ "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js"(exports2, module2) { "use strict"; var aliases2 = ["stdin", "stdout", "stderr"]; var hasAlias2 = (options2) => aliases2.some((alias) => options2[alias] !== void 0); var normalizeStdio2 = (options2) => { if (!options2) { return; } const { stdio } = options2; if (stdio === void 0) { return aliases2.map((alias) => options2[alias]); } if (hasAlias2(options2)) { throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases2.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, aliases2.length); return Array.from({ length }, (value, index) => stdio[index]); }; module2.exports = normalizeStdio2; module2.exports.node = (options2) => { const stdio = normalizeStdio2(options2); if (stdio === "ipc") { return "ipc"; } if (stdio === void 0 || typeof stdio === "string") { return [stdio, stdio, stdio, "ipc"]; } if (stdio.includes("ipc")) { return stdio; } return [...stdio, "ipc"]; }; } }); // ../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js var require_signals2 = __commonJS({ "../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js"(exports2, module2) { "use strict"; module2.exports = [ "SIGABRT", "SIGALRM", "SIGHUP", "SIGINT", "SIGTERM" ]; if (process.platform !== "win32") { module2.exports.push( "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT" // shou