@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,439 lines (1,431 loc) • 564 kB
JavaScript
"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/@prisma+prisma-schema-wasm@7.6.0-1.75cbdc1eb7150937890ad5465d861175c6624711/node_modules/@prisma/prisma-schema-wasm/src/prisma_schema_build.js
var require_prisma_schema_build = __commonJS({
"../../node_modules/.pnpm/@prisma+prisma-schema-wasm@7.6.0-1.75cbdc1eb7150937890ad5465d861175c6624711/node_modules/@prisma/prisma-schema-wasm/src/prisma_schema_build.js"(exports2, module2) {
"use strict";
var imports = {};
imports["__wbindgen_placeholder__"] = module2.exports;
var cachedUint8ArrayMemory0 = null;
function getUint8ArrayMemory0() {
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
}
return cachedUint8ArrayMemory0;
}
var cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
cachedTextDecoder.decode();
function decodeText(ptr, len) {
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
}
function getStringFromWasm0(ptr, len) {
ptr = ptr >>> 0;
return decodeText(ptr, len);
}
function takeFromExternrefTable0(idx) {
const value = wasm.__wbindgen_externrefs.get(idx);
wasm.__externref_table_dealloc(idx);
return value;
}
function getArrayU8FromWasm0(ptr, len) {
ptr = ptr >>> 0;
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
}
var WASM_VECTOR_LEN = 0;
var cachedTextEncoder = new TextEncoder();
if (!("encodeInto" in cachedTextEncoder)) {
cachedTextEncoder.encodeInto = function(arg, view) {
const buf = cachedTextEncoder.encode(arg);
view.set(buf);
return {
read: arg.length,
written: buf.length
};
};
}
function passStringToWasm0(arg, malloc, realloc) {
if (realloc === void 0) {
const buf = cachedTextEncoder.encode(arg);
const ptr2 = malloc(buf.length, 1) >>> 0;
getUint8ArrayMemory0().subarray(ptr2, ptr2 + buf.length).set(buf);
WASM_VECTOR_LEN = buf.length;
return ptr2;
}
let len = arg.length;
let ptr = malloc(len, 1) >>> 0;
const mem = getUint8ArrayMemory0();
let offset = 0;
for (; offset < len; offset++) {
const code = arg.charCodeAt(offset);
if (code > 127) break;
mem[ptr + offset] = code;
}
if (offset !== len) {
if (offset !== 0) {
arg = arg.slice(offset);
}
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
const ret = cachedTextEncoder.encodeInto(arg, view);
offset += ret.written;
ptr = realloc(ptr, len, offset, 1) >>> 0;
}
WASM_VECTOR_LEN = offset;
return ptr;
}
exports2.merge_schemas = function(input) {
let deferred3_0;
let deferred3_1;
try {
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.merge_schemas(ptr0, len0);
var ptr2 = ret[0];
var len2 = ret[1];
if (ret[3]) {
ptr2 = 0;
len2 = 0;
throw takeFromExternrefTable0(ret[2]);
}
deferred3_0 = ptr2;
deferred3_1 = len2;
return getStringFromWasm0(ptr2, len2);
} finally {
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
}
};
exports2.native_types = function(input) {
let deferred2_0;
let deferred2_1;
try {
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.native_types(ptr0, len0);
deferred2_0 = ret[0];
deferred2_1 = ret[1];
return getStringFromWasm0(ret[0], ret[1]);
} finally {
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
}
};
exports2.lint = function(input) {
let deferred2_0;
let deferred2_1;
try {
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.lint(ptr0, len0);
deferred2_0 = ret[0];
deferred2_1 = ret[1];
return getStringFromWasm0(ret[0], ret[1]);
} finally {
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
}
};
exports2.get_dmmf = function(params) {
let deferred3_0;
let deferred3_1;
try {
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.get_dmmf(ptr0, len0);
var ptr2 = ret[0];
var len2 = ret[1];
if (ret[3]) {
ptr2 = 0;
len2 = 0;
throw takeFromExternrefTable0(ret[2]);
}
deferred3_0 = ptr2;
deferred3_1 = len2;
return getStringFromWasm0(ptr2, len2);
} finally {
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
}
};
exports2.references = function(schema, params) {
let deferred3_0;
let deferred3_1;
try {
const ptr0 = passStringToWasm0(schema, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ptr1 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len1 = WASM_VECTOR_LEN;
const ret = wasm.references(ptr0, len0, ptr1, len1);
deferred3_0 = ret[0];
deferred3_1 = ret[1];
return getStringFromWasm0(ret[0], ret[1]);
} finally {
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
}
};
exports2.format = function(schema, params) {
let deferred3_0;
let deferred3_1;
try {
const ptr0 = passStringToWasm0(schema, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ptr1 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len1 = WASM_VECTOR_LEN;
const ret = wasm.format(ptr0, len0, ptr1, len1);
deferred3_0 = ret[0];
deferred3_1 = ret[1];
return getStringFromWasm0(ret[0], ret[1]);
} finally {
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
}
};
exports2.validate = function(params) {
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.validate(ptr0, len0);
if (ret[1]) {
throw takeFromExternrefTable0(ret[0]);
}
};
exports2.debug_panic = function() {
wasm.debug_panic();
};
exports2.text_document_completion = function(schema_files, params) {
let deferred3_0;
let deferred3_1;
try {
const ptr0 = passStringToWasm0(schema_files, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ptr1 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len1 = WASM_VECTOR_LEN;
const ret = wasm.text_document_completion(ptr0, len0, ptr1, len1);
deferred3_0 = ret[0];
deferred3_1 = ret[1];
return getStringFromWasm0(ret[0], ret[1]);
} finally {
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
}
};
exports2.referential_actions = function(input) {
let deferred2_0;
let deferred2_1;
try {
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.referential_actions(ptr0, len0);
deferred2_0 = ret[0];
deferred2_1 = ret[1];
return getStringFromWasm0(ret[0], ret[1]);
} finally {
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
}
};
exports2.get_dmmf_buffered = function(params) {
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.get_dmmf_buffered(ptr0, len0);
if (ret[2]) {
throw takeFromExternrefTable0(ret[1]);
}
return DmmfBuffer.__wrap(ret[0]);
};
exports2.get_config = function(params) {
let deferred2_0;
let deferred2_1;
try {
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.get_config(ptr0, len0);
deferred2_0 = ret[0];
deferred2_1 = ret[1];
return getStringFromWasm0(ret[0], ret[1]);
} finally {
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
}
};
exports2.hover = function(schema_files, params) {
let deferred3_0;
let deferred3_1;
try {
const ptr0 = passStringToWasm0(schema_files, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ptr1 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len1 = WASM_VECTOR_LEN;
const ret = wasm.hover(ptr0, len0, ptr1, len1);
deferred3_0 = ret[0];
deferred3_1 = ret[1];
return getStringFromWasm0(ret[0], ret[1]);
} finally {
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
}
};
exports2.get_datamodel = function(params) {
let deferred3_0;
let deferred3_1;
try {
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.get_datamodel(ptr0, len0);
var ptr2 = ret[0];
var len2 = ret[1];
if (ret[3]) {
ptr2 = 0;
len2 = 0;
throw takeFromExternrefTable0(ret[2]);
}
deferred3_0 = ptr2;
deferred3_1 = len2;
return getStringFromWasm0(ptr2, len2);
} finally {
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
}
};
exports2.code_actions = function(schema, params) {
let deferred3_0;
let deferred3_1;
try {
const ptr0 = passStringToWasm0(schema, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ptr1 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len1 = WASM_VECTOR_LEN;
const ret = wasm.code_actions(ptr0, len0, ptr1, len1);
deferred3_0 = ret[0];
deferred3_1 = ret[1];
return getStringFromWasm0(ret[0], ret[1]);
} finally {
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
}
};
exports2.preview_features = function() {
let deferred1_0;
let deferred1_1;
try {
const ret = wasm.preview_features();
deferred1_0 = ret[0];
deferred1_1 = ret[1];
return getStringFromWasm0(ret[0], ret[1]);
} finally {
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
}
};
var DmmfBufferFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
}, unregister: () => {
} } : new FinalizationRegistry((ptr) => wasm.__wbg_dmmfbuffer_free(ptr >>> 0, 1));
var DmmfBuffer = class _DmmfBuffer {
static __wrap(ptr) {
ptr = ptr >>> 0;
const obj = Object.create(_DmmfBuffer.prototype);
obj.__wbg_ptr = ptr;
DmmfBufferFinalization.register(obj, obj.__wbg_ptr, obj);
return obj;
}
__destroy_into_raw() {
const ptr = this.__wbg_ptr;
this.__wbg_ptr = 0;
DmmfBufferFinalization.unregister(this);
return ptr;
}
free() {
const ptr = this.__destroy_into_raw();
wasm.__wbg_dmmfbuffer_free(ptr, 0);
}
/**
* Read a chunk of the buffer as `Uint8Array`.
* `offset` is the byte offset, `length` is the max number of bytes to read.
* Returns a `Vec<u8>` which wasm-bindgen converts to `Uint8Array` on the JS side.
* @param {number} offset
* @param {number} length
* @returns {Uint8Array}
*/
read_chunk(offset, length) {
const ret = wasm.dmmfbuffer_read_chunk(this.__wbg_ptr, offset, length);
if (ret[3]) {
throw takeFromExternrefTable0(ret[2]);
}
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
return v1;
}
/**
* Returns the total byte length of the serialized DMMF JSON.
* @returns {number}
*/
len() {
const ret = wasm.dmmfbuffer_len(this.__wbg_ptr);
return ret >>> 0;
}
/**
* Returns `true` if the buffer is empty.
* @returns {boolean}
*/
is_empty() {
const ret = wasm.dmmfbuffer_is_empty(this.__wbg_ptr);
return ret !== 0;
}
};
if (Symbol.dispose) DmmfBuffer.prototype[Symbol.dispose] = DmmfBuffer.prototype.free;
exports2.DmmfBuffer = DmmfBuffer;
exports2.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
const ret = Error(getStringFromWasm0(arg0, arg1));
return ret;
};
exports2.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
throw new Error(getStringFromWasm0(arg0, arg1));
};
exports2.__wbg_set_message_f22ac4a6869ee695 = function(arg0, arg1) {
global.PRISMA_WASM_PANIC_REGISTRY.set_message(getStringFromWasm0(arg0, arg1));
};
exports2.__wbindgen_init_externref_table = function() {
const table = wasm.__wbindgen_externrefs;
const offset = table.grow(4);
table.set(0, void 0);
table.set(offset + 0, void 0);
table.set(offset + 1, null);
table.set(offset + 2, true);
table.set(offset + 3, false);
;
};
var wasmPath = `${__dirname}/prisma_schema_build_bg.wasm`;
var wasmBytes = require("fs").readFileSync(wasmPath);
var wasmModule = new WebAssembly.Module(wasmBytes);
var wasm = exports2.__wasm = new WebAssembly.Instance(wasmModule, imports).exports;
wasm.__wbindgen_start();
}
});
// ../../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/universalify@2.0.1/node_modules/universalify/index.js
var require_universalify = __commonJS({
"../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js"(exports2) {
"use strict";
exports2.fromCallback = function(fn) {
return Object.defineProperty(function(...args) {
if (typeof args[args.length - 1] === "function") fn.apply(this, args);
else {
return new Promise((resolve3, reject) => {
args.push((err, res) => err != null ? reject(err) : resolve3(res));
fn.apply(this, args);
});
}
}, "name", { value: fn.name });
};
exports2.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((r2) => cb(null, r2), cb);
}
}, "name", { value: fn.name });
};
}
});
// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js
var require_polyfills = __commonJS({
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports2, module2) {
"use strict";
var constants2 = require("constants");
var origCwd = process.cwd;
var cwd = null;
var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
process.cwd = function() {
if (!cwd)
cwd = origCwd.call(process);
return cwd;
};
try {
process.cwd();
} catch (er) {
}
if (typeof process.chdir === "function") {
chdir = process.chdir;
process.chdir = function(d2) {
cwd = null;
chdir.call(process, d2);
};
if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir);
}
var chdir;
module2.exports = patch;
function patch(fs4) {
if (constants2.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(path10, mode2, cb) {
if (cb) process.nextTick(cb);
};
fs4.lchmodSync = function() {
};
}
if (fs4.chown && !fs4.lchown) {
fs4.lchown = function(path10, 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, _2, __) {
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(path10, mode2, callback) {
fs5.open(
path10,
constants2.O_WRONLY | constants2.O_SYMLINK,
mode2,
function(err, fd) {
if (err) {
if (callback) callback(err);
return;
}
fs5.fchmod(fd, mode2, function(err2) {
fs5.close(fd, function(err22) {
if (callback) callback(err2 || err22);
});
});
}
);
};
fs5.lchmodSync = function(path10, mode2) {
var fd = fs5.openSync(path10, constants2.O_WRONLY | constants2.O_SYMLINK, mode2);
var threw = true;
var ret;
try {
ret = fs5.fchmodSync(fd, mode2);
threw = false;
} finally {
if (threw) {
try {
fs5.closeSync(fd);
} catch (er) {
}
} else {
fs5.closeSync(fd);
}
}
return ret;
};
}
function patchLutimes(fs5) {
if (constants2.hasOwnProperty("O_SYMLINK") && fs5.futimes) {
fs5.lutimes = function(path10, at, mt, cb) {
fs5.open(path10, constants2.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(path10, at, mt) {
var fd = fs5.openSync(path10, constants2.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, mode2, cb) {
return orig.call(fs4, target, mode2, function(er) {
if (chownErOk(er)) er = null;
if (cb) cb.apply(this, arguments);
});
};
}
function chmodFixSync(orig) {
if (!orig) return orig;
return function(target, mode2) {
try {
return orig.call(fs4, target, mode2);
} 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, options2, cb) {
if (typeof options2 === "function") {
cb = options2;
options2 = 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 options2 ? orig.call(fs4, target, options2, callback) : orig.call(fs4, target, callback);
};
}
function statFixSync(orig) {
if (!orig) return orig;
return function(target, options2) {
var stats = options2 ? orig.call(fs4, target, options2) : 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;
}
}
}
});
// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js
var require_legacy_streams = __commonJS({
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
"use strict";
var Stream = require("stream").Stream;
module2.exports = legacy;
function legacy(fs4) {
return {
ReadStream,
WriteStream
};
function ReadStream(path10, options2) {
if (!(this instanceof ReadStream)) return new ReadStream(path10, options2);
Stream.call(this);
var self2 = this;
this.path = path10;
this.fd = null;
this.readable = true;
this.paused = false;
this.flags = "r";
this.mode = 438;
this.bufferSize = 64 * 1024;
options2 = options2 || {};
var keys = Object.keys(options2);
for (var index = 0, length = keys.length; index < length; index++) {
var key = keys[index];
this[key] = options2[key];
}
if (this.encoding) this.setEncoding(this.encoding);
if (this.start !== void 0) {
if ("number" !== typeof this.start) {
throw TypeError("start must be a Number");
}
if (this.end === void 0) {
this.end = Infinity;
} else if ("number" !== typeof this.end) {
throw TypeError("end must be a Number");
}
if (this.start > this.end) {
throw new Error("start must be <= end");
}
this.pos = this.start;
}
if (this.fd !== null) {
process.nextTick(function() {
self2._read();
});
return;
}
fs4.open(this.path, this.flags, this.mode, function(err, fd) {
if (err) {
self2.emit("error", err);
self2.readable = false;
return;
}
self2.fd = fd;
self2.emit("open", fd);
self2._read();
});
}
function WriteStream(path10, options2) {
if (!(this instanceof WriteStream)) return new WriteStream(path10, options2);
Stream.call(this);
this.path = path10;
this.fd = null;
this.writable = true;
this.flags = "w";
this.encoding = "binary";
this.mode = 438;
this.bytesWritten = 0;
options2 = options2 || {};
var keys = Object.keys(options2);
for (var index = 0, length = keys.length; index < length; index++) {
var key = keys[index];
this[key] = options2[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();
}
}
}
}
});
// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js
var require_clone = __commonJS({
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(exports2, 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;
}
}
});
// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
var require_graceful_fs = __commonJS({
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
"use strict";
var fs4 = require("fs");
var polyfills = require_polyfills();
var legacy = require_legacy_streams();
var clone = require_clone();
var util2 = 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 noop2() {
}
function publishQueue(context, queue2) {
Object.defineProperty(context, gracefulQueue, {
get: function() {
return queue2;
}
});
}
var debug4 = noop2;
if (util2.debuglog)
debug4 = util2.debuglog("gfs4");
else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
debug4 = function() {
var m2 = util2.format.apply(util2, arguments);
m2 = "GFS4: " + m2.split(/\n/).join("\nGFS4: ");
console.error(m2);
};
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() {
debug4(fs4[gracefulQueue]);
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 = createReadStream2;
fs5.createWriteStream = createWriteStream2;
var fs$readFile = fs5.readFile;
fs5.readFile = readFile;
function readFile(path10, options2, cb) {
if (typeof options2 === "function")
cb = options2, options2 = null;
return go$readFile(path10, options2, cb);
function go$readFile(path11, options3, cb2, startTime) {
return fs$readFile(path11, options3, function(err) {
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
enqueue([go$readFile, [path11, options3, 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(path10, data, options2, cb) {
if (typeof options2 === "function")
cb = options2, options2 = null;
return go$writeFile(path10, data, options2, cb);
function go$writeFile(path11, data2, options3, cb2, startTime) {
return fs$writeFile(path11, data2, options3, function(err) {
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
enqueue([go$writeFile, [path11, data2, options3, 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(path10, data, options2, cb) {
if (typeof options2 === "function")
cb = options2, options2 = null;
return go$appendFile(path10, data, options2, cb);
function go$appendFile(path11, data2, options3, cb2, startTime) {
return fs$appendFile(path11, data2, options3, function(err) {
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
enqueue([go$appendFile, [path11, data2, options3, 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(src2, dest, flags, cb) {
if (typeof flags === "function") {
cb = flags;
flags = 0;
}
return go$copyFile(src2, dest, flags, cb);
function go$copyFile(src3, dest2, flags2, cb2, startTime) {
return fs$copyFile(src3, dest2, flags2, function(err) {
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
enqueue([go$copyFile, [src3, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]);
else {
if (typeof cb2 === "function")
cb2.apply(this, arguments);
}
});
}
}
var fs$readdir = fs5.readdir;
fs5.readdir = readdir;
var noReaddirOptionVersions = /^v[0-5]\./;
function readdir(path10, options2, cb) {
if (typeof options2 === "function")
cb = options2, options2 = null;
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path11, options3, cb2, startTime) {
return fs$readdir(path11, fs$readdirCallback(
path11,
options3,
cb2,
startTime
));
} : function go$readdir2(path11, options3, cb2, startTime) {
return fs$readdir(path11, options3, fs$readdirCallback(
path11,
options3,
cb2,
startTime
));
};
return go$readdir(path10, options2, cb);
function fs$readdirCallback(path11, options3, cb2, startTime) {
return function(err, files) {
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
enqueue([
go$readdir,
[path11, options3, 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() {