prisma
Version:
Prisma is an open-source database toolkit. It includes a JavaScript/TypeScript ORM for Node.js, migrations and a modern GUI to view and edit the data in your database. You can use Prisma in new projects or add it to an existing one.
1,670 lines (1,650 loc) • 3.6 MB
JavaScript
var __create2 = Object.create;
var __defProp2 = Object.defineProperty;
var __getProtoOf2 = Object.getPrototypeOf;
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
var __getOwnPropNames2 = Object.getOwnPropertyNames;
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
var __markAsModule2 = (target) => __defProp2(target, "__esModule", {value: true});
var __name = (target, value) => __defProp2(target, "name", {value, configurable: true});
var __commonJS2 = (callback, module2) => () => {
if (!module2) {
module2 = {exports: {}};
callback(module2.exports, module2);
}
return module2.exports;
};
var __export2 = (target, all) => {
for (var name in all)
__defProp2(target, name, {get: all[name], enumerable: true});
};
var __exportStar2 = (target, module2, desc) => {
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
for (let key of __getOwnPropNames2(module2))
if (!__hasOwnProp2.call(target, key) && key !== "default")
__defProp2(target, key, {get: () => module2[key], enumerable: !(desc = __getOwnPropDesc2(module2, key)) || desc.enumerable});
}
return target;
};
var __toModule2 = (module2) => {
if (module2 && module2.__esModule)
return module2;
return __exportStar2(__markAsModule2(__defProp2(module2 != null ? __create2(__getProtoOf2(module2)) : {}, "default", {value: module2, enumerable: true})), module2);
};
// ../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js
var require_ms2 = __commonJS2((exports2, module2) => {
var s2 = 1e3;
var m2 = s2 * 60;
var h2 = m2 * 60;
var d2 = h2 * 24;
var w2 = d2 * 7;
var y2 = d2 * 365.25;
module2.exports = function(val, options) {
options = options || {};
var type = typeof val;
if (type === "string" && val.length > 0) {
return parse2(val);
} else if (type === "number" && isFinite(val)) {
return options.long ? fmtLong2(val) : fmtShort2(val);
}
throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
};
function parse2(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 * y2;
case "weeks":
case "week":
case "w":
return n * w2;
case "days":
case "day":
case "d":
return n * d2;
case "hours":
case "hour":
case "hrs":
case "hr":
case "h":
return n * h2;
case "minutes":
case "minute":
case "mins":
case "min":
case "m":
return n * m2;
case "seconds":
case "second":
case "secs":
case "sec":
case "s":
return n * s2;
case "milliseconds":
case "millisecond":
case "msecs":
case "msec":
case "ms":
return n;
default:
return void 0;
}
}
__name(parse2, "parse");
function fmtShort2(ms2) {
var msAbs = Math.abs(ms2);
if (msAbs >= d2) {
return Math.round(ms2 / d2) + "d";
}
if (msAbs >= h2) {
return Math.round(ms2 / h2) + "h";
}
if (msAbs >= m2) {
return Math.round(ms2 / m2) + "m";
}
if (msAbs >= s2) {
return Math.round(ms2 / s2) + "s";
}
return ms2 + "ms";
}
__name(fmtShort2, "fmtShort");
function fmtLong2(ms2) {
var msAbs = Math.abs(ms2);
if (msAbs >= d2) {
return plural2(ms2, msAbs, d2, "day");
}
if (msAbs >= h2) {
return plural2(ms2, msAbs, h2, "hour");
}
if (msAbs >= m2) {
return plural2(ms2, msAbs, m2, "minute");
}
if (msAbs >= s2) {
return plural2(ms2, msAbs, s2, "second");
}
return ms2 + " ms";
}
__name(fmtLong2, "fmtLong");
function plural2(ms2, msAbs, n, name) {
var isPlural = msAbs >= n * 1.5;
return Math.round(ms2 / n) + " " + name + (isPlural ? "s" : "");
}
__name(plural2, "plural");
});
// ../../node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/common.js
var require_common6 = __commonJS2((exports2, module2) => {
function setup(env2) {
createDebug.debug = createDebug;
createDebug.default = createDebug;
createDebug.coerce = coerce;
createDebug.disable = disable;
createDebug.enable = enable;
createDebug.enabled = enabled;
createDebug.humanize = require_ms2();
createDebug.destroy = destroy;
Object.keys(env2).forEach((key) => {
createDebug[key] = env2[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];
}
__name(selectColor, "selectColor");
createDebug.selectColor = selectColor;
function createDebug(namespace) {
let prevTime;
let enableOverride = null;
let namespacesCache;
let enabledCache;
function debug4(...args) {
if (!debug4.enabled) {
return;
}
const self2 = debug4;
const curr = Number(new Date());
const ms2 = curr - (prevTime || curr);
self2.diff = ms2;
self2.prev = prevTime;
self2.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, format2) => {
if (match === "%%") {
return "%";
}
index++;
const formatter = createDebug.formatters[format2];
if (typeof formatter === "function") {
const val = args[index];
match = formatter.call(self2, val);
args.splice(index, 1);
index--;
}
return match;
});
createDebug.formatArgs.call(self2, args);
const logFn = self2.log || createDebug.log;
logFn.apply(self2, args);
}
__name(debug4, "debug");
debug4.namespace = namespace;
debug4.useColors = createDebug.useColors();
debug4.color = createDebug.selectColor(namespace);
debug4.extend = extend;
debug4.destroy = createDebug.destroy;
Object.defineProperty(debug4, "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(debug4);
}
return debug4;
}
__name(createDebug, "createDebug");
function extend(namespace, delimiter) {
const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
newDebug.log = this.log;
return newDebug;
}
__name(extend, "extend");
function enable(namespaces) {
createDebug.save(namespaces);
createDebug.namespaces = namespaces;
createDebug.names = [];
createDebug.skips = [];
let i;
const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
const len = split.length;
for (i = 0; i < len; i++) {
if (!split[i]) {
continue;
}
namespaces = split[i].replace(/\*/g, ".*?");
if (namespaces[0] === "-") {
createDebug.skips.push(new RegExp("^" + namespaces.substr(1) + "$"));
} else {
createDebug.names.push(new RegExp("^" + namespaces + "$"));
}
}
}
__name(enable, "enable");
function disable() {
const namespaces = [
...createDebug.names.map(toNamespace),
...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)
].join(",");
createDebug.enable("");
return namespaces;
}
__name(disable, "disable");
function enabled(name) {
if (name[name.length - 1] === "*") {
return true;
}
let i;
let len;
for (i = 0, len = createDebug.skips.length; i < len; i++) {
if (createDebug.skips[i].test(name)) {
return false;
}
}
for (i = 0, len = createDebug.names.length; i < len; i++) {
if (createDebug.names[i].test(name)) {
return true;
}
}
return false;
}
__name(enabled, "enabled");
function toNamespace(regexp) {
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
}
__name(toNamespace, "toNamespace");
function coerce(val) {
if (val instanceof Error) {
return val.stack || val.message;
}
return val;
}
__name(coerce, "coerce");
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`.");
}
__name(destroy, "destroy");
createDebug.enable(createDebug.load());
return createDebug;
}
__name(setup, "setup");
module2.exports = setup;
});
// ../../node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/browser.js
var require_browser2 = __commonJS2((exports2, module2) => {
exports2.formatArgs = formatArgs;
exports2.save = save;
exports2.load = load2;
exports2.useColors = useColors;
exports2.storage = localstorage();
exports2.destroy = (() => {
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`.");
}
};
})();
exports2.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;
}
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
}
__name(useColors, "useColors");
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);
}
__name(formatArgs, "formatArgs");
exports2.log = console.debug || console.log || (() => {
});
function save(namespaces) {
try {
if (namespaces) {
exports2.storage.setItem("debug", namespaces);
} else {
exports2.storage.removeItem("debug");
}
} catch (error) {
}
}
__name(save, "save");
function load2() {
let r;
try {
r = exports2.storage.getItem("debug");
} catch (error) {
}
if (!r && typeof process !== "undefined" && "env" in process) {
r = process.env.DEBUG;
}
return r;
}
__name(load2, "load");
function localstorage() {
try {
return localStorage;
} catch (error) {
}
}
__name(localstorage, "localstorage");
module2.exports = require_common6()(exports2);
var {formatters} = module2.exports;
formatters.j = function(v) {
try {
return JSON.stringify(v);
} catch (error) {
return "[UnexpectedJSONParseError]: " + error.message;
}
};
});
// ../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js
var require_has_flag2 = __commonJS2((exports2, 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);
};
});
// ../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
var require_supports_color2 = __commonJS2((exports2, module2) => {
"use strict";
var os2 = require("os");
var tty = require("tty");
var hasFlag = require_has_flag2();
var {env: env2} = process;
var forceColor;
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
forceColor = 0;
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
forceColor = 1;
}
if ("FORCE_COLOR" in env2) {
if (env2.FORCE_COLOR === "true") {
forceColor = 1;
} else if (env2.FORCE_COLOR === "false") {
forceColor = 0;
} else {
forceColor = env2.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env2.FORCE_COLOR, 10), 3);
}
}
function translateLevel(level) {
if (level === 0) {
return false;
}
return {
level,
hasBasic: true,
has256: level >= 2,
has16m: level >= 3
};
}
__name(translateLevel, "translateLevel");
function supportsColor(haveStream, streamIsTTY) {
if (forceColor === 0) {
return 0;
}
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 min2 = forceColor || 0;
if (env2.TERM === "dumb") {
return min2;
}
if (process.platform === "win32") {
const osRelease = os2.release().split(".");
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
return Number(osRelease[2]) >= 14931 ? 3 : 2;
}
return 1;
}
if ("CI" in env2) {
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign2) => sign2 in env2) || env2.CI_NAME === "codeship") {
return 1;
}
return min2;
}
if ("TEAMCITY_VERSION" in env2) {
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
}
if (env2.COLORTERM === "truecolor") {
return 3;
}
if ("TERM_PROGRAM" in env2) {
const version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
switch (env2.TERM_PROGRAM) {
case "iTerm.app":
return version >= 3 ? 3 : 2;
case "Apple_Terminal":
return 2;
}
}
if (/-256(color)?$/i.test(env2.TERM)) {
return 2;
}
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
return 1;
}
if ("COLORTERM" in env2) {
return 1;
}
return min2;
}
__name(supportsColor, "supportsColor");
function getSupportLevel(stream) {
const level = supportsColor(stream, stream && stream.isTTY);
return translateLevel(level);
}
__name(getSupportLevel, "getSupportLevel");
module2.exports = {
supportsColor: getSupportLevel,
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
};
});
// ../../node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/node.js
var require_node3 = __commonJS2((exports2, module2) => {
var tty = require("tty");
var util2 = require("util");
exports2.init = init;
exports2.log = log3;
exports2.formatArgs = formatArgs;
exports2.save = save;
exports2.load = load2;
exports2.useColors = useColors;
exports2.destroy = util2.deprecate(() => {
}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
exports2.colors = [6, 2, 3, 4, 5, 1];
try {
const supportsColor = require_supports_color2();
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
exports2.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) {
}
exports2.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, (_2, 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 exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd);
}
__name(useColors, "useColors");
function formatArgs(args) {
const {namespace: name, useColors: useColors2} = this;
if (useColors2) {
const c = this.color;
const colorCode = "[3" + (c < 8 ? c : "8;5;" + c);
const prefix = ` ${colorCode};1m${name} [0m`;
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "[0m");
} else {
args[0] = getDate() + name + " " + args[0];
}
}
__name(formatArgs, "formatArgs");
function getDate() {
if (exports2.inspectOpts.hideDate) {
return "";
}
return new Date().toISOString() + " ";
}
__name(getDate, "getDate");
function log3(...args) {
return process.stderr.write(util2.format(...args) + "\n");
}
__name(log3, "log");
function save(namespaces) {
if (namespaces) {
process.env.DEBUG = namespaces;
} else {
delete process.env.DEBUG;
}
}
__name(save, "save");
function load2() {
return process.env.DEBUG;
}
__name(load2, "load");
function init(debug4) {
debug4.inspectOpts = {};
const keys = Object.keys(exports2.inspectOpts);
for (let i = 0; i < keys.length; i++) {
debug4.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]];
}
}
__name(init, "init");
module2.exports = require_common6()(exports2);
var {formatters} = module2.exports;
formatters.o = function(v) {
this.inspectOpts.colors = this.useColors;
return util2.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
};
formatters.O = function(v) {
this.inspectOpts.colors = this.useColors;
return util2.inspect(v, this.inspectOpts);
};
});
// ../../node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/index.js
var require_src3 = __commonJS2((exports2, module2) => {
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
module2.exports = require_browser2();
} else {
module2.exports = require_node3();
}
});
// ../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
var require_ms3 = __commonJS2((exports2, module2) => {
var s2 = 1e3;
var m2 = s2 * 60;
var h2 = m2 * 60;
var d2 = h2 * 24;
var w2 = d2 * 7;
var y2 = d2 * 365.25;
module2.exports = function(val, options) {
options = options || {};
var type = typeof val;
if (type === "string" && val.length > 0) {
return parse2(val);
} else if (type === "number" && isFinite(val)) {
return options.long ? fmtLong2(val) : fmtShort2(val);
}
throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
};
function parse2(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 * y2;
case "weeks":
case "week":
case "w":
return n * w2;
case "days":
case "day":
case "d":
return n * d2;
case "hours":
case "hour":
case "hrs":
case "hr":
case "h":
return n * h2;
case "minutes":
case "minute":
case "mins":
case "min":
case "m":
return n * m2;
case "seconds":
case "second":
case "secs":
case "sec":
case "s":
return n * s2;
case "milliseconds":
case "millisecond":
case "msecs":
case "msec":
case "ms":
return n;
default:
return void 0;
}
}
__name(parse2, "parse");
function fmtShort2(ms2) {
var msAbs = Math.abs(ms2);
if (msAbs >= d2) {
return Math.round(ms2 / d2) + "d";
}
if (msAbs >= h2) {
return Math.round(ms2 / h2) + "h";
}
if (msAbs >= m2) {
return Math.round(ms2 / m2) + "m";
}
if (msAbs >= s2) {
return Math.round(ms2 / s2) + "s";
}
return ms2 + "ms";
}
__name(fmtShort2, "fmtShort");
function fmtLong2(ms2) {
var msAbs = Math.abs(ms2);
if (msAbs >= d2) {
return plural2(ms2, msAbs, d2, "day");
}
if (msAbs >= h2) {
return plural2(ms2, msAbs, h2, "hour");
}
if (msAbs >= m2) {
return plural2(ms2, msAbs, m2, "minute");
}
if (msAbs >= s2) {
return plural2(ms2, msAbs, s2, "second");
}
return ms2 + " ms";
}
__name(fmtLong2, "fmtLong");
function plural2(ms2, msAbs, n, name) {
var isPlural = msAbs >= n * 1.5;
return Math.round(ms2 / n) + " " + name + (isPlural ? "s" : "");
}
__name(plural2, "plural");
});
// ../debug/dist/common.js
var require_common7 = __commonJS2((exports2) => {
var __defProp3 = Object.defineProperty;
var __markAsModule3 = /* @__PURE__ */ __name((target) => __defProp3(target, "__esModule", {value: true}), "__markAsModule");
var __export3 = /* @__PURE__ */ __name((target, all) => {
__markAsModule3(target);
for (var name in all)
__defProp3(target, name, {get: all[name], enumerable: true});
}, "__export");
__export3(exports2, {
setup: () => setup
});
function setup(env2) {
const createDebug = /* @__PURE__ */ __name((namespace, logger2) => {
let prevTime;
let enableOverride = null;
let namespacesCache;
let enabledCache;
const debug4 = /* @__PURE__ */ __name((...args) => {
const self2 = debug4;
const curr = Number(new Date());
const ms2 = curr - (prevTime || curr);
self2.diff = ms2;
self2.prev = prevTime;
self2.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, format2) => {
if (match === "%%") {
return "%";
}
index++;
const formatter = createDebug.formatters[format2];
if (typeof formatter === "function") {
const val = args[index];
match = formatter.call(self2, val);
args.splice(index, 1);
index--;
}
return match;
});
createDebug.formatArgs.call(self2, args);
if (logger2 && typeof logger2 === "function") {
logger2.apply(self2, args);
}
if (debug4.enabled) {
const logFn = self2.log || createDebug.log;
logFn.apply(self2, args);
}
}, "debug");
debug4.namespace = namespace;
debug4.useColors = createDebug.useColors();
debug4.color = createDebug.selectColor(namespace);
debug4.extend = extend;
debug4.destroy = createDebug.destroy;
Object.defineProperty(debug4, "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(debug4);
}
return debug4;
}, "createDebug");
createDebug.debug = createDebug;
createDebug.default = createDebug;
createDebug.coerce = coerce;
createDebug.disable = disable;
createDebug.enable = enable;
createDebug.enabled = enabled;
createDebug.humanize = require_ms3();
createDebug.destroy = destroy;
Object.keys(env2).forEach((key) => {
createDebug[key] = env2[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];
}
__name(selectColor, "selectColor");
createDebug.selectColor = selectColor;
function extend(namespace, delimiter) {
const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
newDebug.log = this.log;
return newDebug;
}
__name(extend, "extend");
function enable(namespaces) {
createDebug.save(namespaces);
createDebug.namespaces = namespaces;
createDebug.names = [];
createDebug.skips = [];
let i;
const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
const len = split.length;
for (i = 0; i < len; i++) {
if (!split[i]) {
continue;
}
namespaces = split[i].replace(/\*/g, ".*?");
if (namespaces[0] === "-") {
createDebug.skips.push(new RegExp("^" + namespaces.substr(1) + "$"));
} else {
createDebug.names.push(new RegExp("^" + namespaces + "$"));
}
}
}
__name(enable, "enable");
function disable() {
const namespaces = [
...createDebug.names.map(toNamespace),
...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)
].join(",");
createDebug.enable("");
return namespaces;
}
__name(disable, "disable");
function enabled(name) {
if (name[name.length - 1] === "*") {
return true;
}
let i;
let len;
for (i = 0, len = createDebug.skips.length; i < len; i++) {
if (createDebug.skips[i].test(name)) {
return false;
}
}
for (i = 0, len = createDebug.names.length; i < len; i++) {
if (createDebug.names[i].test(name)) {
return true;
}
}
return false;
}
__name(enabled, "enabled");
function toNamespace(regexp) {
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
}
__name(toNamespace, "toNamespace");
function coerce(val) {
if (val instanceof Error) {
return val.stack || val.message;
}
return val;
}
__name(coerce, "coerce");
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`.");
}
__name(destroy, "destroy");
createDebug.enable(createDebug.load());
return createDebug;
}
__name(setup, "setup");
});
// ../debug/dist/node.js
var require_node4 = __commonJS2((exports2, module2) => {
var __create3 = Object.create;
var __defProp3 = Object.defineProperty;
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
var __getOwnPropNames3 = Object.getOwnPropertyNames;
var __getProtoOf3 = Object.getPrototypeOf;
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
var __markAsModule3 = /* @__PURE__ */ __name((target) => __defProp3(target, "__esModule", {value: true}), "__markAsModule");
var __export3 = /* @__PURE__ */ __name((target, all) => {
__markAsModule3(target);
for (var name in all)
__defProp3(target, name, {get: all[name], enumerable: true});
}, "__export");
var __reExport2 = /* @__PURE__ */ __name((target, module22, desc) => {
if (module22 && typeof module22 === "object" || typeof module22 === "function") {
for (let key of __getOwnPropNames3(module22))
if (!__hasOwnProp3.call(target, key) && key !== "default")
__defProp3(target, key, {get: () => module22[key], enumerable: !(desc = __getOwnPropDesc3(module22, key)) || desc.enumerable});
}
return target;
}, "__reExport");
var __toModule3 = /* @__PURE__ */ __name((module22) => {
return __reExport2(__markAsModule3(__defProp3(module22 != null ? __create3(__getProtoOf3(module22)) : {}, "default", module22 && module22.__esModule && "default" in module22 ? {get: () => module22.default, enumerable: true} : {value: module22, enumerable: true})), module22);
}, "__toModule");
__export3(exports2, {
default: () => node_default
});
var import_common10 = __toModule3(require_common7());
var tty = require("tty");
var util2 = require("util");
exports2.init = init;
exports2.log = log3;
exports2.formatArgs = formatArgs;
exports2.save = save;
exports2.load = load2;
exports2.useColors = useColors;
exports2.destroy = util2.deprecate(() => {
}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
exports2.colors = [6, 2, 3, 4, 5, 1];
try {
const supportsColor = require("supports-color");
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
exports2.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) {
}
exports2.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, (_2, 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 exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd);
}
__name(useColors, "useColors");
function formatArgs(args) {
const {namespace: name, useColors: useColors2} = this;
if (useColors2) {
const c = this.color;
const colorCode = "[3" + (c < 8 ? c : "8;5;" + c);
const prefix = ` ${colorCode};1m${name} [0m`;
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "[0m");
} else {
args[0] = getDate() + name + " " + args[0];
}
}
__name(formatArgs, "formatArgs");
function getDate() {
if (exports2.inspectOpts.hideDate) {
return "";
}
return new Date().toISOString() + " ";
}
__name(getDate, "getDate");
function log3(...args) {
return process.stderr.write(util2.format(...args) + "\n");
}
__name(log3, "log");
function save(namespaces) {
if (namespaces) {
process.env.DEBUG = namespaces;
} else {
delete process.env.DEBUG;
}
}
__name(save, "save");
function load2() {
return process.env.DEBUG;
}
__name(load2, "load");
function init(debug4) {
debug4.inspectOpts = {};
const keys = Object.keys(exports2.inspectOpts);
for (let i = 0; i < keys.length; i++) {
debug4.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]];
}
}
__name(init, "init");
var mod2 = (0, import_common10.setup)(exports2);
module2.exports = mod2;
var node_default = mod2;
var {formatters} = mod2;
formatters.o = function(v) {
this.inspectOpts.colors = this.useColors;
return util2.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
};
formatters.O = function(v) {
this.inspectOpts.colors = this.useColors;
return util2.inspect(v, this.inspectOpts);
};
});
// ../debug/dist/index.js
var require_dist7 = __commonJS2((exports2) => {
var __create3 = Object.create;
var __defProp3 = Object.defineProperty;
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
var __getOwnPropNames3 = Object.getOwnPropertyNames;
var __getProtoOf3 = Object.getPrototypeOf;
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
var __markAsModule3 = /* @__PURE__ */ __name((target) => __defProp3(target, "__esModule", {value: true}), "__markAsModule");
var __export3 = /* @__PURE__ */ __name((target, all) => {
__markAsModule3(target);
for (var name in all)
__defProp3(target, name, {get: all[name], enumerable: true});
}, "__export");
var __reExport2 = /* @__PURE__ */ __name((target, module22, desc) => {
if (module22 && typeof module22 === "object" || typeof module22 === "function") {
for (let key of __getOwnPropNames3(module22))
if (!__hasOwnProp3.call(target, key) && key !== "default")
__defProp3(target, key, {get: () => module22[key], enumerable: !(desc = __getOwnPropDesc3(module22, key)) || desc.enumerable});
}
return target;
}, "__reExport");
var __toModule3 = /* @__PURE__ */ __name((module22) => {
return __reExport2(__markAsModule3(__defProp3(module22 != null ? __create3(__getProtoOf3(module22)) : {}, "default", module22 && module22.__esModule && "default" in module22 ? {get: () => module22.default, enumerable: true} : {value: module22, enumerable: true})), module22);
}, "__toModule");
__export3(exports2, {
Debug: () => Debug2,
default: () => Debug2,
getLogs: () => getLogs
});
var import_debug3 = __toModule3(require_src3());
var import_node = __toModule3(require_node4());
var cache = [];
var MAX_LOGS = 100;
function Debug2(namespace) {
const debug4 = (0, import_node.default)(namespace, (...args) => {
cache.push(args);
if (cache.length > MAX_LOGS) {
cache.shift();
}
});
return debug4;
}
__name(Debug2, "Debug");
Debug2.enable = (namespace) => {
import_node.default.enable(namespace);
};
Debug2.enabled = (namespace) => import_node.default.enabled(namespace);
function getLogs(numChars = 7500) {
const output = cache.map((c) => c.map((item) => {
if (typeof item === "string") {
return item;
}
return JSON.stringify(item);
}).join(" ")).join("\n");
if (output.length < numChars) {
return output;
}
return output.slice(-numChars);
}
__name(getLogs, "getLogs");
});
// ../../node_modules/.pnpm/@prisma+engines-version@3.2.0-23.e80f22958574bd57ee5c4f141957d97836d88c6f/node_modules/@prisma/engines-version/package.json
var require_package2 = __commonJS2((exports2, module2) => {
module2.exports = {
name: "@prisma/engines-version",
version: "3.2.0-23.e80f22958574bd57ee5c4f141957d97836d88c6f",
main: "index.js",
types: "index.d.ts",
license: "Apache-2.0",
author: "Tim Suchanek <suchanek@prisma.io>",
prisma: {
enginesVersion: "e80f22958574bd57ee5c4f141957d97836d88c6f"
},
devDependencies: {
"@types/node": "14.17.19",
typescript: "4.4.3"
},
files: [
"index.js",
"index.d.ts"
],
scripts: {
build: "tsc -d"
}
};
});
// ../../node_modules/.pnpm/@prisma+engines-version@3.2.0-23.e80f22958574bd57ee5c4f141957d97836d88c6f/node_modules/@prisma/engines-version/index.js
var require_engines_version2 = __commonJS2((exports2) => {
"use strict";
Object.defineProperty(exports2, "__esModule", {value: true});
exports2.enginesVersion = void 0;
exports2.enginesVersion = require_package2().prisma.enginesVersion;
});
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
var require_windows2 = __commonJS2((exports2, module2) => {
module2.exports = isexe;
isexe.sync = sync2;
var fs2 = 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;
}
__name(checkPathExt, "checkPathExt");
function checkStat(stat2, path4, options) {
if (!stat2.isSymbolicLink() && !stat2.isFile()) {
return false;
}
return checkPathExt(path4, options);
}
__name(checkStat, "checkStat");
function isexe(path4, options, cb) {
fs2.stat(path4, function(er, stat2) {
cb(er, er ? false : checkStat(stat2, path4, options));
});
}
__name(isexe, "isexe");
function sync2(path4, options) {
return checkStat(fs2.statSync(path4), path4, options);
}
__name(sync2, "sync");
});
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
var require_mode2 = __commonJS2((exports2, module2) => {
module2.exports = isexe;
isexe.sync = sync2;
var fs2 = require("fs");
function isexe(path4, options, cb) {
fs2.stat(path4, function(er, stat2) {
cb(er, er ? false : checkStat(stat2, options));
});
}
__name(isexe, "isexe");
function sync2(path4, options) {
return checkStat(fs2.statSync(path4), options);
}
__name(sync2, "sync");
function checkStat(stat2, options) {
return stat2.isFile() && checkMode(stat2, options);
}
__name(checkStat, "checkStat");
function checkMode(stat2, options) {
var mod2 = stat2.mode;
var uid = stat2.uid;
var gid = stat2.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 = mod2 & o || mod2 & g && gid === myGid || mod2 & u && uid === myUid || mod2 & ug && myUid === 0;
return ret;
}
__name(checkMode, "checkMode");
});
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
var require_isexe2 = __commonJS2((exports2, module2) => {
var fs2 = require("fs");
var core;
if (process.platform === "win32" || global.TESTING_WINDOWS) {
core = require_windows2();
} else {
core = require_mode2();
}
module2.exports = isexe;
isexe.sync = sync2;
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);
});
}
__name(isexe, "isexe");
function sync2(path4, options) {
try {
return core.sync(path4, options || {});
} catch (er) {
if (options && options.ignoreErrors || er.code === "EACCES") {
return false;
} else {
throw er;
}
}
}
__name(sync2, "sync");
});
// ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
var require_which2 = __commonJS2((exports2, module2) => {
var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
var path4 = require("path");
var COLON = isWindows ? ";" : ":";
var isexe = require_isexe2();
var getNotFoundError = /* @__PURE__ */ __name((cmd) => Object.assign(new Error(`not found: ${cmd}`), {code: "ENOENT"}), "getNotFoundError");
var getPathInfo = /* @__PURE__ */ __name((cmd, opt) => {
const colon = opt.colon || COLON;
const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [
...isWindows ? [process.cwd()] : [],
...(opt.path || process.env.PATH || "").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
};
}, "getPathInfo");
var which = /* @__PURE__ */ __name((cmd, opt, cb) => {
if (typeof opt === "function") {
cb = opt;
opt = {};
}
if (!opt)
opt = {};
const {pathEnv, pathExt, pathExtExe} = getPathInfo(cmd, opt);
const found = [];
const step = /* @__PURE__ */ __name((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));
}), "step");
const subStep = /* @__PURE__ */ __name((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));
});
}), "subStep");
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
}, "which");
var whichSync = /* @__PURE__ */ __name((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);
}, "whichSync");
module2.exports = which;
which.sync = whichSync;
});
// ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
var require_path_key2 = __commonJS2((exports2, module2) => {
"use strict";
var pathKey = /* @__PURE__ */ __name((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";
}, "pathKey");
module2.exports = pathKey;
module2.exports.default = pathKey;
});
// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js
var require_resolveCommand2 = __commonJS2((exports2, module2) => {
"use strict";
var path4 = require("path");
var which = require_which2();
var getPathKey = require_path_key2();
function resolveCommandAttempt(parsed, withoutPathExt) {
const env2 = 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: env2[getPathKey({env: env2})],
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;
}
__name(resolveCommandAttempt, "resolveCommandAttempt");
function resolveCommand(parsed) {
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
}
__name(resolveCommand, "resolveCommand");
module2.exports = resolveCommand;
});
// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js
var require_escape2 = __commonJS2((exports2, module2) => {
"use strict";
var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
function escapeCommand(arg2) {
arg2 = arg2.replace(metaCharsReg