initial commit
This commit is contained in:
commit
b25eb51ff0
280 changed files with 178550 additions and 0 deletions
35
database-service/node_modules/@prisma/debug/dist/index.d.ts
generated
vendored
Normal file
35
database-service/node_modules/@prisma/debug/dist/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/**
|
||||
* Create a new debug instance with the given namespace.
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* import Debug from '@prisma/debug'
|
||||
* const debug = Debug('prisma:client')
|
||||
* debug('Hello World')
|
||||
* ```
|
||||
*/
|
||||
declare function debugCreate(namespace: string): ((...args: any[]) => void) & {
|
||||
color: string;
|
||||
enabled: boolean;
|
||||
namespace: string;
|
||||
log: (...args: string[]) => void;
|
||||
extend: () => void;
|
||||
};
|
||||
declare const Debug: typeof debugCreate & {
|
||||
enable(namespace: any): void;
|
||||
disable(): any;
|
||||
enabled(namespace: string): boolean;
|
||||
log: (...args: string[]) => void;
|
||||
formatters: {};
|
||||
};
|
||||
/**
|
||||
* We can get the logs for all the last {@link MAX_ARGS_HISTORY} ${@link debugCall} that
|
||||
* have happened in the different packages. Useful to generate error report links.
|
||||
* @see https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers
|
||||
* @param numChars
|
||||
* @returns
|
||||
*/
|
||||
export declare function getLogs(numChars?: number): string;
|
||||
export declare function clearLogs(): void;
|
||||
export { Debug };
|
||||
export default Debug;
|
||||
236
database-service/node_modules/@prisma/debug/dist/index.js
generated
vendored
Normal file
236
database-service/node_modules/@prisma/debug/dist/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,236 @@
|
|||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/index.ts
|
||||
var src_exports = {};
|
||||
__export(src_exports, {
|
||||
Debug: () => Debug,
|
||||
clearLogs: () => clearLogs,
|
||||
default: () => src_default,
|
||||
getLogs: () => getLogs
|
||||
});
|
||||
module.exports = __toCommonJS(src_exports);
|
||||
|
||||
// ../../node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs
|
||||
var colors_exports = {};
|
||||
__export(colors_exports, {
|
||||
$: () => $,
|
||||
bgBlack: () => bgBlack,
|
||||
bgBlue: () => bgBlue,
|
||||
bgCyan: () => bgCyan,
|
||||
bgGreen: () => bgGreen,
|
||||
bgMagenta: () => bgMagenta,
|
||||
bgRed: () => bgRed,
|
||||
bgWhite: () => bgWhite,
|
||||
bgYellow: () => bgYellow,
|
||||
black: () => black,
|
||||
blue: () => blue,
|
||||
bold: () => bold,
|
||||
cyan: () => cyan,
|
||||
dim: () => dim,
|
||||
gray: () => gray,
|
||||
green: () => green,
|
||||
grey: () => grey,
|
||||
hidden: () => hidden,
|
||||
inverse: () => inverse,
|
||||
italic: () => italic,
|
||||
magenta: () => magenta,
|
||||
red: () => red,
|
||||
reset: () => reset,
|
||||
strikethrough: () => strikethrough,
|
||||
underline: () => underline,
|
||||
white: () => white,
|
||||
yellow: () => yellow
|
||||
});
|
||||
var FORCE_COLOR;
|
||||
var NODE_DISABLE_COLORS;
|
||||
var NO_COLOR;
|
||||
var TERM;
|
||||
var isTTY = true;
|
||||
if (typeof process !== "undefined") {
|
||||
({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {});
|
||||
isTTY = process.stdout && process.stdout.isTTY;
|
||||
}
|
||||
var $ = {
|
||||
enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY)
|
||||
};
|
||||
function init(x, y) {
|
||||
let rgx = new RegExp(`\\x1b\\[${y}m`, "g");
|
||||
let open = `\x1B[${x}m`, close = `\x1B[${y}m`;
|
||||
return function(txt) {
|
||||
if (!$.enabled || txt == null) return txt;
|
||||
return open + (!!~("" + txt).indexOf(close) ? txt.replace(rgx, close + open) : txt) + close;
|
||||
};
|
||||
}
|
||||
var reset = init(0, 0);
|
||||
var bold = init(1, 22);
|
||||
var dim = init(2, 22);
|
||||
var italic = init(3, 23);
|
||||
var underline = init(4, 24);
|
||||
var inverse = init(7, 27);
|
||||
var hidden = init(8, 28);
|
||||
var strikethrough = init(9, 29);
|
||||
var black = init(30, 39);
|
||||
var red = init(31, 39);
|
||||
var green = init(32, 39);
|
||||
var yellow = init(33, 39);
|
||||
var blue = init(34, 39);
|
||||
var magenta = init(35, 39);
|
||||
var cyan = init(36, 39);
|
||||
var white = init(37, 39);
|
||||
var gray = init(90, 39);
|
||||
var grey = init(90, 39);
|
||||
var bgBlack = init(40, 49);
|
||||
var bgRed = init(41, 49);
|
||||
var bgGreen = init(42, 49);
|
||||
var bgYellow = init(43, 49);
|
||||
var bgBlue = init(44, 49);
|
||||
var bgMagenta = init(45, 49);
|
||||
var bgCyan = init(46, 49);
|
||||
var bgWhite = init(47, 49);
|
||||
|
||||
// src/index.ts
|
||||
var MAX_ARGS_HISTORY = 100;
|
||||
var COLORS = ["green", "yellow", "blue", "magenta", "cyan", "red"];
|
||||
var argsHistory = [];
|
||||
var lastTimestamp = Date.now();
|
||||
var lastColor = 0;
|
||||
var processEnv = typeof process !== "undefined" ? process.env : {};
|
||||
globalThis.DEBUG ??= processEnv.DEBUG ?? "";
|
||||
globalThis.DEBUG_COLORS ??= processEnv.DEBUG_COLORS ? processEnv.DEBUG_COLORS === "true" : true;
|
||||
var topProps = {
|
||||
enable(namespace) {
|
||||
if (typeof namespace === "string") {
|
||||
globalThis.DEBUG = namespace;
|
||||
}
|
||||
},
|
||||
disable() {
|
||||
const prev = globalThis.DEBUG;
|
||||
globalThis.DEBUG = "";
|
||||
return prev;
|
||||
},
|
||||
// this is the core logic to check if logging should happen or not
|
||||
enabled(namespace) {
|
||||
const listenedNamespaces = globalThis.DEBUG.split(",").map((s) => {
|
||||
return s.replace(/[.+?^${}()|[\]\\]/g, "\\$&");
|
||||
});
|
||||
const isListened = listenedNamespaces.some((listenedNamespace) => {
|
||||
if (listenedNamespace === "" || listenedNamespace[0] === "-") return false;
|
||||
return namespace.match(RegExp(listenedNamespace.split("*").join(".*") + "$"));
|
||||
});
|
||||
const isExcluded = listenedNamespaces.some((listenedNamespace) => {
|
||||
if (listenedNamespace === "" || listenedNamespace[0] !== "-") return false;
|
||||
return namespace.match(RegExp(listenedNamespace.slice(1).split("*").join(".*") + "$"));
|
||||
});
|
||||
return isListened && !isExcluded;
|
||||
},
|
||||
log: (...args) => {
|
||||
const [namespace, format, ...rest] = args;
|
||||
const logWithFormatting = console.warn ?? console.log;
|
||||
logWithFormatting(`${namespace} ${format}`, ...rest);
|
||||
},
|
||||
formatters: {}
|
||||
// not implemented
|
||||
};
|
||||
function debugCreate(namespace) {
|
||||
const instanceProps = {
|
||||
color: COLORS[lastColor++ % COLORS.length],
|
||||
enabled: topProps.enabled(namespace),
|
||||
namespace,
|
||||
log: topProps.log,
|
||||
extend: () => {
|
||||
}
|
||||
// not implemented
|
||||
};
|
||||
const debugCall = (...args) => {
|
||||
const { enabled, namespace: namespace2, color, log } = instanceProps;
|
||||
if (args.length !== 0) {
|
||||
argsHistory.push([namespace2, ...args]);
|
||||
}
|
||||
if (argsHistory.length > MAX_ARGS_HISTORY) {
|
||||
argsHistory.shift();
|
||||
}
|
||||
if (topProps.enabled(namespace2) || enabled) {
|
||||
const stringArgs = args.map((arg) => {
|
||||
if (typeof arg === "string") {
|
||||
return arg;
|
||||
}
|
||||
return safeStringify(arg);
|
||||
});
|
||||
const ms = `+${Date.now() - lastTimestamp}ms`;
|
||||
lastTimestamp = Date.now();
|
||||
if (globalThis.DEBUG_COLORS) {
|
||||
log(colors_exports[color](bold(namespace2)), ...stringArgs, colors_exports[color](ms));
|
||||
} else {
|
||||
log(namespace2, ...stringArgs, ms);
|
||||
}
|
||||
}
|
||||
};
|
||||
return new Proxy(debugCall, {
|
||||
get: (_, prop) => instanceProps[prop],
|
||||
set: (_, prop, value) => instanceProps[prop] = value
|
||||
});
|
||||
}
|
||||
var Debug = new Proxy(debugCreate, {
|
||||
get: (_, prop) => topProps[prop],
|
||||
set: (_, prop, value) => topProps[prop] = value
|
||||
});
|
||||
function safeStringify(value, indent = 2) {
|
||||
const cache = /* @__PURE__ */ new Set();
|
||||
return JSON.stringify(
|
||||
value,
|
||||
(key, value2) => {
|
||||
if (typeof value2 === "object" && value2 !== null) {
|
||||
if (cache.has(value2)) {
|
||||
return `[Circular *]`;
|
||||
}
|
||||
cache.add(value2);
|
||||
} else if (typeof value2 === "bigint") {
|
||||
return value2.toString();
|
||||
}
|
||||
return value2;
|
||||
},
|
||||
indent
|
||||
);
|
||||
}
|
||||
function getLogs(numChars = 7500) {
|
||||
const logs = argsHistory.map(([namespace, ...args]) => {
|
||||
return `${namespace} ${args.map((arg) => {
|
||||
if (typeof arg === "string") {
|
||||
return arg;
|
||||
} else {
|
||||
return JSON.stringify(arg);
|
||||
}
|
||||
}).join(" ")}`;
|
||||
}).join("\n");
|
||||
if (logs.length < numChars) {
|
||||
return logs;
|
||||
}
|
||||
return logs.slice(-numChars);
|
||||
}
|
||||
function clearLogs() {
|
||||
argsHistory.length = 0;
|
||||
}
|
||||
var src_default = Debug;
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
Debug,
|
||||
clearLogs,
|
||||
getLogs
|
||||
});
|
||||
2
database-service/node_modules/@prisma/debug/dist/util.d.ts
generated
vendored
Normal file
2
database-service/node_modules/@prisma/debug/dist/util.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export declare function removeISODate(str: string): string;
|
||||
export declare function sanitizeTestLogs(str: string): string;
|
||||
74
database-service/node_modules/@prisma/debug/dist/util.js
generated
vendored
Normal file
74
database-service/node_modules/@prisma/debug/dist/util.js
generated
vendored
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
"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 __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/ansi-regex@5.0.1/node_modules/ansi-regex/index.js
|
||||
var require_ansi_regex = __commonJS({
|
||||
"../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js"(exports2, module2) {
|
||||
"use strict";
|
||||
module2.exports = ({ onlyFirst = false } = {}) => {
|
||||
const pattern = [
|
||||
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
||||
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
||||
].join("|");
|
||||
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// ../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js
|
||||
var require_strip_ansi = __commonJS({
|
||||
"../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"(exports2, module2) {
|
||||
"use strict";
|
||||
var ansiRegex = require_ansi_regex();
|
||||
module2.exports = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string;
|
||||
}
|
||||
});
|
||||
|
||||
// src/util.ts
|
||||
var util_exports = {};
|
||||
__export(util_exports, {
|
||||
removeISODate: () => removeISODate,
|
||||
sanitizeTestLogs: () => sanitizeTestLogs
|
||||
});
|
||||
module.exports = __toCommonJS(util_exports);
|
||||
var import_strip_ansi = __toESM(require_strip_ansi());
|
||||
function removeISODate(str) {
|
||||
return str.replace(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/gim, "");
|
||||
}
|
||||
function sanitizeTestLogs(str) {
|
||||
return (0, import_strip_ansi.default)(str).split("\n").map((l) => removeISODate(l.replace(/\+\d+ms$/, "")).trim()).join("\n");
|
||||
}
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
removeISODate,
|
||||
sanitizeTestLogs
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue