drizzle-kit 0.20.17-92ad3af → 0.20.17-94708c5
Sign up to get free protection for your applications and to get access to all the features.
- package/@types/utils.d.ts +1 -0
- package/bin.cjs +25592 -26413
- package/cli/commands/migrate.d.ts +41 -41
- package/cli/commands/mysqlIntrospect.d.ts +8 -8
- package/cli/commands/pgIntrospect.d.ts +8 -8
- package/cli/commands/sqliteIntrospect.d.ts +12 -12
- package/cli/commands/utils.d.ts +2 -2
- package/cli/validations/cli.d.ts +29 -29
- package/cli/validations/common.d.ts +35 -35
- package/cli/validations/mysql.d.ts +4 -4
- package/cli/validations/outputs.d.ts +1 -2
- package/cli/validations/pg.d.ts +4 -4
- package/cli/views.d.ts +1 -0
- package/index.d.mts +2 -48
- package/index.d.ts +2 -48
- package/package.json +1 -1
- package/payload.js +482 -1081
- package/payload.mjs +289 -888
- package/schemaValidator.d.ts +222 -222
- package/serializer/mysqlSchema.d.ts +890 -890
- package/serializer/pgSchema.d.ts +745 -745
- package/serializer/sqliteSchema.d.ts +457 -457
- package/serializer/studio.d.ts +4 -2
- package/snapshotsDiffer.d.ts +315 -316
- package/utils-studio.js +847 -948
- package/utils-studio.mjs +820 -921
- package/utils.js +219 -844
- package/utils.mjs +194 -819
package/payload.js
CHANGED
@@ -34,7 +34,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
34
34
|
));
|
35
35
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
36
36
|
|
37
|
-
// node_modules/.pnpm/chalk@5.
|
37
|
+
// node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/vendor/ansi-styles/index.js
|
38
38
|
function assembleStyles() {
|
39
39
|
const codes = /* @__PURE__ */ new Map();
|
40
40
|
for (const [groupName, group] of Object.entries(styles)) {
|
@@ -151,7 +151,7 @@ function assembleStyles() {
|
|
151
151
|
}
|
152
152
|
var ANSI_BACKGROUND_OFFSET, wrapAnsi16, wrapAnsi256, wrapAnsi16m, styles, modifierNames, foregroundColorNames, backgroundColorNames, colorNames, ansiStyles, ansi_styles_default;
|
153
153
|
var init_ansi_styles = __esm({
|
154
|
-
"node_modules/.pnpm/chalk@5.
|
154
|
+
"node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/vendor/ansi-styles/index.js"() {
|
155
155
|
ANSI_BACKGROUND_OFFSET = 10;
|
156
156
|
wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
157
157
|
wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
@@ -225,7 +225,7 @@ var init_ansi_styles = __esm({
|
|
225
225
|
}
|
226
226
|
});
|
227
227
|
|
228
|
-
// node_modules/.pnpm/chalk@5.
|
228
|
+
// node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/vendor/supports-color/index.js
|
229
229
|
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) {
|
230
230
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
231
231
|
const position = argv.indexOf(prefix + flag);
|
@@ -289,7 +289,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
289
289
|
return 1;
|
290
290
|
}
|
291
291
|
if ("CI" in env) {
|
292
|
-
if ("GITHUB_ACTIONS" in env
|
292
|
+
if ("GITHUB_ACTIONS" in env) {
|
293
293
|
return 3;
|
294
294
|
}
|
295
295
|
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
@@ -337,7 +337,7 @@ function createSupportsColor(stream, options = {}) {
|
|
337
337
|
}
|
338
338
|
var import_node_process, import_node_os, import_node_tty, env, flagForceColor, supportsColor, supports_color_default;
|
339
339
|
var init_supports_color = __esm({
|
340
|
-
"node_modules/.pnpm/chalk@5.
|
340
|
+
"node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/vendor/supports-color/index.js"() {
|
341
341
|
import_node_process = __toESM(require("node:process"), 1);
|
342
342
|
import_node_os = __toESM(require("node:os"), 1);
|
343
343
|
import_node_tty = __toESM(require("node:tty"), 1);
|
@@ -355,7 +355,7 @@ var init_supports_color = __esm({
|
|
355
355
|
}
|
356
356
|
});
|
357
357
|
|
358
|
-
// node_modules/.pnpm/chalk@5.
|
358
|
+
// node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/utilities.js
|
359
359
|
function stringReplaceAll(string, substring, replacer) {
|
360
360
|
let index4 = string.indexOf(substring);
|
361
361
|
if (index4 === -1) {
|
@@ -385,20 +385,21 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index4) {
|
|
385
385
|
return returnValue;
|
386
386
|
}
|
387
387
|
var init_utilities = __esm({
|
388
|
-
"node_modules/.pnpm/chalk@5.
|
388
|
+
"node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/utilities.js"() {
|
389
389
|
}
|
390
390
|
});
|
391
391
|
|
392
|
-
// node_modules/.pnpm/chalk@5.
|
392
|
+
// node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/index.js
|
393
393
|
function createChalk(options) {
|
394
394
|
return chalkFactory(options);
|
395
395
|
}
|
396
396
|
var stdoutColor, stderrColor, GENERATOR, STYLER, IS_EMPTY, levelMapping, styles2, applyOptions, chalkFactory, getModelAnsi, usedModels, proto, createStyler, createBuilder, applyStyle, chalk, chalkStderr, source_default;
|
397
397
|
var init_source = __esm({
|
398
|
-
"node_modules/.pnpm/chalk@5.
|
398
|
+
"node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/index.js"() {
|
399
399
|
init_ansi_styles();
|
400
400
|
init_supports_color();
|
401
401
|
init_utilities();
|
402
|
+
init_ansi_styles();
|
402
403
|
({ stdout: stdoutColor, stderr: stderrColor } = supports_color_default);
|
403
404
|
GENERATOR = Symbol("GENERATOR");
|
404
405
|
STYLER = Symbol("STYLER");
|
@@ -546,10 +547,10 @@ var init_source = __esm({
|
|
546
547
|
|
547
548
|
// node_modules/.pnpm/hanji@0.0.5/node_modules/hanji/readline.js
|
548
549
|
var require_readline = __commonJS({
|
549
|
-
"node_modules/.pnpm/hanji@0.0.5/node_modules/hanji/readline.js"(
|
550
|
+
"node_modules/.pnpm/hanji@0.0.5/node_modules/hanji/readline.js"(exports) {
|
550
551
|
"use strict";
|
551
|
-
Object.defineProperty(
|
552
|
-
|
552
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
553
|
+
exports.prepareReadLine = void 0;
|
553
554
|
var prepareReadLine = () => {
|
554
555
|
const stdin = process.stdin;
|
555
556
|
const stdout = process.stdout;
|
@@ -565,13 +566,13 @@ var require_readline = __commonJS({
|
|
565
566
|
closable: rl
|
566
567
|
};
|
567
568
|
};
|
568
|
-
|
569
|
+
exports.prepareReadLine = prepareReadLine;
|
569
570
|
}
|
570
571
|
});
|
571
572
|
|
572
573
|
// node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
|
573
574
|
var require_src = __commonJS({
|
574
|
-
"node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(
|
575
|
+
"node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports, module2) {
|
575
576
|
"use strict";
|
576
577
|
var ESC = "\x1B";
|
577
578
|
var CSI = `${ESC}[`;
|
@@ -632,10 +633,10 @@ var require_src = __commonJS({
|
|
632
633
|
|
633
634
|
// node_modules/.pnpm/hanji@0.0.5/node_modules/hanji/utils.js
|
634
635
|
var require_utils = __commonJS({
|
635
|
-
"node_modules/.pnpm/hanji@0.0.5/node_modules/hanji/utils.js"(
|
636
|
+
"node_modules/.pnpm/hanji@0.0.5/node_modules/hanji/utils.js"(exports) {
|
636
637
|
"use strict";
|
637
|
-
Object.defineProperty(
|
638
|
-
|
638
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
639
|
+
exports.clear = void 0;
|
639
640
|
var sisteransi_1 = require_src();
|
640
641
|
var strip = (str) => {
|
641
642
|
const pattern = [
|
@@ -656,13 +657,13 @@ var require_utils = __commonJS({
|
|
656
657
|
}
|
657
658
|
return sisteransi_1.erase.lines(rows);
|
658
659
|
};
|
659
|
-
|
660
|
+
exports.clear = clear;
|
660
661
|
}
|
661
662
|
});
|
662
663
|
|
663
664
|
// node_modules/.pnpm/lodash.throttle@4.1.1/node_modules/lodash.throttle/index.js
|
664
665
|
var require_lodash = __commonJS({
|
665
|
-
"node_modules/.pnpm/lodash.throttle@4.1.1/node_modules/lodash.throttle/index.js"(
|
666
|
+
"node_modules/.pnpm/lodash.throttle@4.1.1/node_modules/lodash.throttle/index.js"(exports, module2) {
|
666
667
|
var FUNC_ERROR_TEXT = "Expected a function";
|
667
668
|
var NAN = 0 / 0;
|
668
669
|
var symbolTag = "[object Symbol]";
|
@@ -810,9 +811,9 @@ var require_lodash = __commonJS({
|
|
810
811
|
|
811
812
|
// node_modules/.pnpm/hanji@0.0.5/node_modules/hanji/index.js
|
812
813
|
var require_hanji = __commonJS({
|
813
|
-
"node_modules/.pnpm/hanji@0.0.5/node_modules/hanji/index.js"(
|
814
|
+
"node_modules/.pnpm/hanji@0.0.5/node_modules/hanji/index.js"(exports) {
|
814
815
|
"use strict";
|
815
|
-
var __awaiter =
|
816
|
+
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
816
817
|
function adopt(value) {
|
817
818
|
return value instanceof P ? value : new P(function(resolve) {
|
818
819
|
resolve(value);
|
@@ -839,11 +840,11 @@ var require_hanji = __commonJS({
|
|
839
840
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
840
841
|
});
|
841
842
|
};
|
842
|
-
var __importDefault =
|
843
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
843
844
|
return mod && mod.__esModule ? mod : { "default": mod };
|
844
845
|
};
|
845
|
-
Object.defineProperty(
|
846
|
-
|
846
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
847
|
+
exports.onTerminate = exports.renderWithTask = exports.render = exports.TaskTerminal = exports.TaskView = exports.Terminal = exports.deferred = exports.SelectState = exports.Prompt = void 0;
|
847
848
|
var readline_1 = require_readline();
|
848
849
|
var sisteransi_1 = require_src();
|
849
850
|
var utils_1 = require_utils();
|
@@ -878,7 +879,7 @@ var require_hanji = __commonJS({
|
|
878
879
|
this.inputCallbacks.forEach((it) => it(str, key));
|
879
880
|
}
|
880
881
|
};
|
881
|
-
|
882
|
+
exports.Prompt = Prompt3;
|
882
883
|
var SelectState3 = class {
|
883
884
|
constructor(items) {
|
884
885
|
this.items = items;
|
@@ -906,7 +907,7 @@ var require_hanji = __commonJS({
|
|
906
907
|
return false;
|
907
908
|
}
|
908
909
|
};
|
909
|
-
|
910
|
+
exports.SelectState = SelectState3;
|
910
911
|
var deferred = () => {
|
911
912
|
let resolve;
|
912
913
|
let reject;
|
@@ -920,7 +921,7 @@ var require_hanji = __commonJS({
|
|
920
921
|
promise
|
921
922
|
};
|
922
923
|
};
|
923
|
-
|
924
|
+
exports.deferred = deferred;
|
924
925
|
var Terminal = class {
|
925
926
|
constructor(view, stdin, stdout, closable) {
|
926
927
|
this.view = view;
|
@@ -965,7 +966,7 @@ var require_hanji = __commonJS({
|
|
965
966
|
};
|
966
967
|
this.stdin.on("keypress", keypress);
|
967
968
|
this.view.attach(this);
|
968
|
-
const { resolve, promise } = (0,
|
969
|
+
const { resolve, promise } = (0, exports.deferred)();
|
969
970
|
this.resolve = resolve;
|
970
971
|
this.promise = promise;
|
971
972
|
this.renderFunc = (0, lodash_throttle_1.default)((str) => {
|
@@ -996,7 +997,7 @@ var require_hanji = __commonJS({
|
|
996
997
|
this.renderFunc(`${clearPrefix}${string}`);
|
997
998
|
}
|
998
999
|
};
|
999
|
-
|
1000
|
+
exports.Terminal = Terminal;
|
1000
1001
|
var TaskView2 = class {
|
1001
1002
|
constructor() {
|
1002
1003
|
this.attachCallbacks = [];
|
@@ -1021,7 +1022,7 @@ var require_hanji = __commonJS({
|
|
1021
1022
|
}
|
1022
1023
|
}
|
1023
1024
|
};
|
1024
|
-
|
1025
|
+
exports.TaskView = TaskView2;
|
1025
1026
|
var TaskTerminal = class {
|
1026
1027
|
constructor(view, stdout) {
|
1027
1028
|
this.view = view;
|
@@ -1042,7 +1043,7 @@ var require_hanji = __commonJS({
|
|
1042
1043
|
this.stdout.write(`${clearPrefix}${string}`);
|
1043
1044
|
}
|
1044
1045
|
};
|
1045
|
-
|
1046
|
+
exports.TaskTerminal = TaskTerminal;
|
1046
1047
|
function render6(view) {
|
1047
1048
|
const { stdin, stdout, closable } = (0, readline_1.prepareReadLine)();
|
1048
1049
|
if (view instanceof Prompt3) {
|
@@ -1055,7 +1056,7 @@ var require_hanji = __commonJS({
|
|
1055
1056
|
closable.close();
|
1056
1057
|
return;
|
1057
1058
|
}
|
1058
|
-
|
1059
|
+
exports.render = render6;
|
1059
1060
|
function renderWithTask2(view, task) {
|
1060
1061
|
return __awaiter(this, void 0, void 0, function* () {
|
1061
1062
|
const terminal = new TaskTerminal(view, process.stdout);
|
@@ -1065,12 +1066,12 @@ var require_hanji = __commonJS({
|
|
1065
1066
|
return result;
|
1066
1067
|
});
|
1067
1068
|
}
|
1068
|
-
|
1069
|
+
exports.renderWithTask = renderWithTask2;
|
1069
1070
|
var terminateHandler;
|
1070
1071
|
function onTerminate(callback) {
|
1071
1072
|
terminateHandler = callback;
|
1072
1073
|
}
|
1073
|
-
|
1074
|
+
exports.onTerminate = onTerminate;
|
1074
1075
|
}
|
1075
1076
|
});
|
1076
1077
|
|
@@ -1109,12 +1110,11 @@ var init_global = __esm({
|
|
1109
1110
|
}
|
1110
1111
|
});
|
1111
1112
|
|
1112
|
-
// node_modules/.pnpm/zod@3.
|
1113
|
+
// node_modules/.pnpm/zod@3.20.2/node_modules/zod/lib/index.mjs
|
1113
1114
|
function getErrorMap() {
|
1114
1115
|
return overrideErrorMap;
|
1115
1116
|
}
|
1116
1117
|
function addIssueToContext(ctx, issueData) {
|
1117
|
-
const overrideMap = getErrorMap();
|
1118
1118
|
const issue = makeIssue({
|
1119
1119
|
issueData,
|
1120
1120
|
data: ctx.data,
|
@@ -1122,29 +1122,13 @@ function addIssueToContext(ctx, issueData) {
|
|
1122
1122
|
errorMaps: [
|
1123
1123
|
ctx.common.contextualErrorMap,
|
1124
1124
|
ctx.schemaErrorMap,
|
1125
|
-
|
1126
|
-
|
1125
|
+
getErrorMap(),
|
1126
|
+
errorMap
|
1127
1127
|
// then global default map
|
1128
1128
|
].filter((x) => !!x)
|
1129
1129
|
});
|
1130
1130
|
ctx.common.issues.push(issue);
|
1131
1131
|
}
|
1132
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
1133
|
-
if (kind === "a" && !f)
|
1134
|
-
throw new TypeError("Private accessor was defined without a getter");
|
1135
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
1136
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
1137
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
1138
|
-
}
|
1139
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
1140
|
-
if (kind === "m")
|
1141
|
-
throw new TypeError("Private method is not writable");
|
1142
|
-
if (kind === "a" && !f)
|
1143
|
-
throw new TypeError("Private accessor was defined without a setter");
|
1144
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
1145
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
1146
|
-
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
1147
|
-
}
|
1148
1132
|
function processCreateParams(params) {
|
1149
1133
|
if (!params)
|
1150
1134
|
return {};
|
@@ -1155,50 +1139,15 @@ function processCreateParams(params) {
|
|
1155
1139
|
if (errorMap2)
|
1156
1140
|
return { errorMap: errorMap2, description };
|
1157
1141
|
const customMap = (iss, ctx) => {
|
1158
|
-
var _a, _b;
|
1159
|
-
const { message } = params;
|
1160
|
-
if (iss.code === "invalid_enum_value") {
|
1161
|
-
return { message: message !== null && message !== void 0 ? message : ctx.defaultError };
|
1162
|
-
}
|
1163
|
-
if (typeof ctx.data === "undefined") {
|
1164
|
-
return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError };
|
1165
|
-
}
|
1166
1142
|
if (iss.code !== "invalid_type")
|
1167
1143
|
return { message: ctx.defaultError };
|
1168
|
-
|
1144
|
+
if (typeof ctx.data === "undefined") {
|
1145
|
+
return { message: required_error !== null && required_error !== void 0 ? required_error : ctx.defaultError };
|
1146
|
+
}
|
1147
|
+
return { message: invalid_type_error !== null && invalid_type_error !== void 0 ? invalid_type_error : ctx.defaultError };
|
1169
1148
|
};
|
1170
1149
|
return { errorMap: customMap, description };
|
1171
1150
|
}
|
1172
|
-
function timeRegexSource(args) {
|
1173
|
-
let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
|
1174
|
-
if (args.precision) {
|
1175
|
-
regex = `${regex}\\.\\d{${args.precision}}`;
|
1176
|
-
} else if (args.precision == null) {
|
1177
|
-
regex = `${regex}(\\.\\d+)?`;
|
1178
|
-
}
|
1179
|
-
return regex;
|
1180
|
-
}
|
1181
|
-
function timeRegex(args) {
|
1182
|
-
return new RegExp(`^${timeRegexSource(args)}$`);
|
1183
|
-
}
|
1184
|
-
function datetimeRegex(args) {
|
1185
|
-
let regex = `${dateRegexSource}T${timeRegexSource(args)}`;
|
1186
|
-
const opts = [];
|
1187
|
-
opts.push(args.local ? `Z?` : `Z`);
|
1188
|
-
if (args.offset)
|
1189
|
-
opts.push(`([+-]\\d{2}:?\\d{2})`);
|
1190
|
-
regex = `${regex}(${opts.join("|")})`;
|
1191
|
-
return new RegExp(`^${regex}$`);
|
1192
|
-
}
|
1193
|
-
function isValidIP(ip, version) {
|
1194
|
-
if ((version === "v4" || !version) && ipv4Regex.test(ip)) {
|
1195
|
-
return true;
|
1196
|
-
}
|
1197
|
-
if ((version === "v6" || !version) && ipv6Regex.test(ip)) {
|
1198
|
-
return true;
|
1199
|
-
}
|
1200
|
-
return false;
|
1201
|
-
}
|
1202
1151
|
function floatSafeRemainder(val, step) {
|
1203
1152
|
const valDecCount = (val.toString().split(".")[1] || "").length;
|
1204
1153
|
const stepDecCount = (step.toString().split(".")[1] || "").length;
|
@@ -1219,10 +1168,7 @@ function deepPartialify(schema4) {
|
|
1219
1168
|
shape: () => newShape
|
1220
1169
|
});
|
1221
1170
|
} else if (schema4 instanceof ZodArray) {
|
1222
|
-
return
|
1223
|
-
...schema4._def,
|
1224
|
-
type: deepPartialify(schema4.element)
|
1225
|
-
});
|
1171
|
+
return ZodArray.create(deepPartialify(schema4.element));
|
1226
1172
|
} else if (schema4 instanceof ZodOptional) {
|
1227
1173
|
return ZodOptional.create(deepPartialify(schema4.unwrap()));
|
1228
1174
|
} else if (schema4 instanceof ZodNullable) {
|
@@ -1278,9 +1224,9 @@ function createZodEnum(values, params) {
|
|
1278
1224
|
...processCreateParams(params)
|
1279
1225
|
});
|
1280
1226
|
}
|
1281
|
-
var util,
|
1227
|
+
var util, ZodParsedType, getParsedType, ZodIssueCode, ZodError, errorMap, overrideErrorMap, makeIssue, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync, errorUtil, ParseInputLazyPath, handleResult, ZodType, cuidRegex, uuidRegex, emailRegex, datetimeRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, objectUtil, AugmentFactory, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, BRAND, ZodBranded, ZodPipeline, late, ZodFirstPartyTypeKind, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType, coerce;
|
1282
1228
|
var init_lib = __esm({
|
1283
|
-
"node_modules/.pnpm/zod@3.
|
1229
|
+
"node_modules/.pnpm/zod@3.20.2/node_modules/zod/lib/index.mjs"() {
|
1284
1230
|
(function(util2) {
|
1285
1231
|
util2.assertEqual = (val) => val;
|
1286
1232
|
function assertIs(_arg) {
|
@@ -1338,15 +1284,6 @@ var init_lib = __esm({
|
|
1338
1284
|
return value;
|
1339
1285
|
};
|
1340
1286
|
})(util || (util = {}));
|
1341
|
-
(function(objectUtil2) {
|
1342
|
-
objectUtil2.mergeShapes = (first, second) => {
|
1343
|
-
return {
|
1344
|
-
...first,
|
1345
|
-
...second
|
1346
|
-
// second overwrites first
|
1347
|
-
};
|
1348
|
-
};
|
1349
|
-
})(objectUtil || (objectUtil = {}));
|
1350
1287
|
ZodParsedType = util.arrayToEnum([
|
1351
1288
|
"string",
|
1352
1289
|
"nan",
|
@@ -1428,7 +1365,7 @@ var init_lib = __esm({
|
|
1428
1365
|
"not_multiple_of",
|
1429
1366
|
"not_finite"
|
1430
1367
|
]);
|
1431
|
-
ZodError = class
|
1368
|
+
ZodError = class extends Error {
|
1432
1369
|
constructor(issues) {
|
1433
1370
|
super();
|
1434
1371
|
this.issues = [];
|
@@ -1486,11 +1423,6 @@ var init_lib = __esm({
|
|
1486
1423
|
processError(this);
|
1487
1424
|
return fieldErrors;
|
1488
1425
|
}
|
1489
|
-
static assert(value) {
|
1490
|
-
if (!(value instanceof _ZodError)) {
|
1491
|
-
throw new Error(`Not a ZodError: ${value}`);
|
1492
|
-
}
|
1493
|
-
}
|
1494
1426
|
toString() {
|
1495
1427
|
return this.message;
|
1496
1428
|
}
|
@@ -1557,12 +1489,7 @@ var init_lib = __esm({
|
|
1557
1489
|
break;
|
1558
1490
|
case ZodIssueCode.invalid_string:
|
1559
1491
|
if (typeof issue.validation === "object") {
|
1560
|
-
if ("
|
1561
|
-
message = `Invalid input: must include "${issue.validation.includes}"`;
|
1562
|
-
if (typeof issue.validation.position === "number") {
|
1563
|
-
message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;
|
1564
|
-
}
|
1565
|
-
} else if ("startsWith" in issue.validation) {
|
1492
|
+
if ("startsWith" in issue.validation) {
|
1566
1493
|
message = `Invalid input: must start with "${issue.validation.startsWith}"`;
|
1567
1494
|
} else if ("endsWith" in issue.validation) {
|
1568
1495
|
message = `Invalid input: must end with "${issue.validation.endsWith}"`;
|
@@ -1583,7 +1510,7 @@ var init_lib = __esm({
|
|
1583
1510
|
else if (issue.type === "number")
|
1584
1511
|
message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
|
1585
1512
|
else if (issue.type === "date")
|
1586
|
-
message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(
|
1513
|
+
message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(issue.minimum)}`;
|
1587
1514
|
else
|
1588
1515
|
message = "Invalid input";
|
1589
1516
|
break;
|
@@ -1594,10 +1521,8 @@ var init_lib = __esm({
|
|
1594
1521
|
message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;
|
1595
1522
|
else if (issue.type === "number")
|
1596
1523
|
message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
|
1597
|
-
else if (issue.type === "bigint")
|
1598
|
-
message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
|
1599
1524
|
else if (issue.type === "date")
|
1600
|
-
message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(
|
1525
|
+
message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(issue.maximum)}`;
|
1601
1526
|
else
|
1602
1527
|
message = "Invalid input";
|
1603
1528
|
break;
|
@@ -1627,13 +1552,6 @@ var init_lib = __esm({
|
|
1627
1552
|
...issueData,
|
1628
1553
|
path: fullPath
|
1629
1554
|
};
|
1630
|
-
if (issueData.message !== void 0) {
|
1631
|
-
return {
|
1632
|
-
...issueData,
|
1633
|
-
path: fullPath,
|
1634
|
-
message: issueData.message
|
1635
|
-
};
|
1636
|
-
}
|
1637
1555
|
let errorMessage = "";
|
1638
1556
|
const maps = errorMaps.filter((m) => !!m).slice().reverse();
|
1639
1557
|
for (const map of maps) {
|
@@ -1642,7 +1560,7 @@ var init_lib = __esm({
|
|
1642
1560
|
return {
|
1643
1561
|
...issueData,
|
1644
1562
|
path: fullPath,
|
1645
|
-
message: errorMessage
|
1563
|
+
message: issueData.message || errorMessage
|
1646
1564
|
};
|
1647
1565
|
};
|
1648
1566
|
ParseStatus = class _ParseStatus {
|
@@ -1671,11 +1589,9 @@ var init_lib = __esm({
|
|
1671
1589
|
static async mergeObjectAsync(status, pairs) {
|
1672
1590
|
const syncPairs = [];
|
1673
1591
|
for (const pair of pairs) {
|
1674
|
-
const key = await pair.key;
|
1675
|
-
const value = await pair.value;
|
1676
1592
|
syncPairs.push({
|
1677
|
-
key,
|
1678
|
-
value
|
1593
|
+
key: await pair.key,
|
1594
|
+
value: await pair.value
|
1679
1595
|
});
|
1680
1596
|
}
|
1681
1597
|
return _ParseStatus.mergeObjectSync(status, syncPairs);
|
@@ -1692,7 +1608,7 @@ var init_lib = __esm({
|
|
1692
1608
|
status.dirty();
|
1693
1609
|
if (value.status === "dirty")
|
1694
1610
|
status.dirty();
|
1695
|
-
if (
|
1611
|
+
if (typeof value.value !== "undefined" || pair.alwaysSet) {
|
1696
1612
|
finalObject[key.value] = value.value;
|
1697
1613
|
}
|
1698
1614
|
}
|
@@ -1707,28 +1623,20 @@ var init_lib = __esm({
|
|
1707
1623
|
isAborted = (x) => x.status === "aborted";
|
1708
1624
|
isDirty = (x) => x.status === "dirty";
|
1709
1625
|
isValid = (x) => x.status === "valid";
|
1710
|
-
isAsync = (x) => typeof Promise !==
|
1626
|
+
isAsync = (x) => typeof Promise !== void 0 && x instanceof Promise;
|
1711
1627
|
(function(errorUtil2) {
|
1712
1628
|
errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
1713
1629
|
errorUtil2.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
|
1714
1630
|
})(errorUtil || (errorUtil = {}));
|
1715
1631
|
ParseInputLazyPath = class {
|
1716
1632
|
constructor(parent, value, path2, key) {
|
1717
|
-
this._cachedPath = [];
|
1718
1633
|
this.parent = parent;
|
1719
1634
|
this.data = value;
|
1720
1635
|
this._path = path2;
|
1721
1636
|
this._key = key;
|
1722
1637
|
}
|
1723
1638
|
get path() {
|
1724
|
-
|
1725
|
-
if (this._key instanceof Array) {
|
1726
|
-
this._cachedPath.push(...this._path, ...this._key);
|
1727
|
-
} else {
|
1728
|
-
this._cachedPath.push(...this._path, this._key);
|
1729
|
-
}
|
1730
|
-
}
|
1731
|
-
return this._cachedPath;
|
1639
|
+
return this._path.concat(this._key);
|
1732
1640
|
}
|
1733
1641
|
};
|
1734
1642
|
handleResult = (ctx, result) => {
|
@@ -1738,16 +1646,8 @@ var init_lib = __esm({
|
|
1738
1646
|
if (!ctx.common.issues.length) {
|
1739
1647
|
throw new Error("Validation failed but no issues detected.");
|
1740
1648
|
}
|
1741
|
-
|
1742
|
-
|
1743
|
-
get error() {
|
1744
|
-
if (this._error)
|
1745
|
-
return this._error;
|
1746
|
-
const error2 = new ZodError(ctx.common.issues);
|
1747
|
-
this._error = error2;
|
1748
|
-
return this._error;
|
1749
|
-
}
|
1750
|
-
};
|
1649
|
+
const error2 = new ZodError(ctx.common.issues);
|
1650
|
+
return { success: false, error: error2 };
|
1751
1651
|
}
|
1752
1652
|
};
|
1753
1653
|
ZodType = class {
|
@@ -1775,7 +1675,6 @@ var init_lib = __esm({
|
|
1775
1675
|
this.catch = this.catch.bind(this);
|
1776
1676
|
this.describe = this.describe.bind(this);
|
1777
1677
|
this.pipe = this.pipe.bind(this);
|
1778
|
-
this.readonly = this.readonly.bind(this);
|
1779
1678
|
this.isNullable = this.isNullable.bind(this);
|
1780
1679
|
this.isOptional = this.isOptional.bind(this);
|
1781
1680
|
}
|
@@ -1920,29 +1819,28 @@ var init_lib = __esm({
|
|
1920
1819
|
return this._refinement(refinement);
|
1921
1820
|
}
|
1922
1821
|
optional() {
|
1923
|
-
return ZodOptional.create(this
|
1822
|
+
return ZodOptional.create(this);
|
1924
1823
|
}
|
1925
1824
|
nullable() {
|
1926
|
-
return ZodNullable.create(this
|
1825
|
+
return ZodNullable.create(this);
|
1927
1826
|
}
|
1928
1827
|
nullish() {
|
1929
|
-
return this.
|
1828
|
+
return this.optional().nullable();
|
1930
1829
|
}
|
1931
1830
|
array() {
|
1932
|
-
return ZodArray.create(this
|
1831
|
+
return ZodArray.create(this);
|
1933
1832
|
}
|
1934
1833
|
promise() {
|
1935
|
-
return ZodPromise.create(this
|
1834
|
+
return ZodPromise.create(this);
|
1936
1835
|
}
|
1937
1836
|
or(option) {
|
1938
|
-
return ZodUnion.create([this, option]
|
1837
|
+
return ZodUnion.create([this, option]);
|
1939
1838
|
}
|
1940
1839
|
and(incoming) {
|
1941
|
-
return ZodIntersection.create(this, incoming
|
1840
|
+
return ZodIntersection.create(this, incoming);
|
1942
1841
|
}
|
1943
1842
|
transform(transform) {
|
1944
1843
|
return new ZodEffects({
|
1945
|
-
...processCreateParams(this._def),
|
1946
1844
|
schema: this,
|
1947
1845
|
typeName: ZodFirstPartyTypeKind.ZodEffects,
|
1948
1846
|
effect: { type: "transform", transform }
|
@@ -1951,7 +1849,6 @@ var init_lib = __esm({
|
|
1951
1849
|
default(def) {
|
1952
1850
|
const defaultValueFunc = typeof def === "function" ? def : () => def;
|
1953
1851
|
return new ZodDefault({
|
1954
|
-
...processCreateParams(this._def),
|
1955
1852
|
innerType: this,
|
1956
1853
|
defaultValue: defaultValueFunc,
|
1957
1854
|
typeName: ZodFirstPartyTypeKind.ZodDefault
|
@@ -1961,15 +1858,14 @@ var init_lib = __esm({
|
|
1961
1858
|
return new ZodBranded({
|
1962
1859
|
typeName: ZodFirstPartyTypeKind.ZodBranded,
|
1963
1860
|
type: this,
|
1964
|
-
...processCreateParams(
|
1861
|
+
...processCreateParams(void 0)
|
1965
1862
|
});
|
1966
1863
|
}
|
1967
1864
|
catch(def) {
|
1968
|
-
const
|
1865
|
+
const defaultValueFunc = typeof def === "function" ? def : () => def;
|
1969
1866
|
return new ZodCatch({
|
1970
|
-
...processCreateParams(this._def),
|
1971
1867
|
innerType: this,
|
1972
|
-
|
1868
|
+
defaultValue: defaultValueFunc,
|
1973
1869
|
typeName: ZodFirstPartyTypeKind.ZodCatch
|
1974
1870
|
});
|
1975
1871
|
}
|
@@ -1983,9 +1879,6 @@ var init_lib = __esm({
|
|
1983
1879
|
pipe(target) {
|
1984
1880
|
return ZodPipeline.create(this, target);
|
1985
1881
|
}
|
1986
|
-
readonly() {
|
1987
|
-
return ZodReadonly.create(this);
|
1988
|
-
}
|
1989
1882
|
isOptional() {
|
1990
1883
|
return this.safeParse(void 0).success;
|
1991
1884
|
}
|
@@ -1994,19 +1887,43 @@ var init_lib = __esm({
|
|
1994
1887
|
}
|
1995
1888
|
};
|
1996
1889
|
cuidRegex = /^c[^\s-]{8,}$/i;
|
1997
|
-
|
1998
|
-
|
1999
|
-
|
2000
|
-
|
2001
|
-
|
2002
|
-
|
2003
|
-
|
2004
|
-
|
2005
|
-
|
2006
|
-
|
2007
|
-
|
2008
|
-
|
1890
|
+
uuidRegex = /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
1891
|
+
emailRegex = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
|
1892
|
+
datetimeRegex = (args) => {
|
1893
|
+
if (args.precision) {
|
1894
|
+
if (args.offset) {
|
1895
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}(([+-]\\d{2}:\\d{2})|Z)$`);
|
1896
|
+
} else {
|
1897
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}Z$`);
|
1898
|
+
}
|
1899
|
+
} else if (args.precision === 0) {
|
1900
|
+
if (args.offset) {
|
1901
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}:\\d{2})|Z)$`);
|
1902
|
+
} else {
|
1903
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$`);
|
1904
|
+
}
|
1905
|
+
} else {
|
1906
|
+
if (args.offset) {
|
1907
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}:\\d{2})|Z)$`);
|
1908
|
+
} else {
|
1909
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$`);
|
1910
|
+
}
|
1911
|
+
}
|
1912
|
+
};
|
2009
1913
|
ZodString = class _ZodString extends ZodType {
|
1914
|
+
constructor() {
|
1915
|
+
super(...arguments);
|
1916
|
+
this._regex = (regex, validation, message) => this.refinement((data) => regex.test(data), {
|
1917
|
+
validation,
|
1918
|
+
code: ZodIssueCode.invalid_string,
|
1919
|
+
...errorUtil.errToObj(message)
|
1920
|
+
});
|
1921
|
+
this.nonempty = (message) => this.min(1, errorUtil.errToObj(message));
|
1922
|
+
this.trim = () => new _ZodString({
|
1923
|
+
...this._def,
|
1924
|
+
checks: [...this._def.checks, { kind: "trim" }]
|
1925
|
+
});
|
1926
|
+
}
|
2010
1927
|
_parse(input) {
|
2011
1928
|
if (this._def.coerce) {
|
2012
1929
|
input.data = String(input.data);
|
@@ -2014,11 +1931,15 @@ var init_lib = __esm({
|
|
2014
1931
|
const parsedType = this._getType(input);
|
2015
1932
|
if (parsedType !== ZodParsedType.string) {
|
2016
1933
|
const ctx2 = this._getOrReturnCtx(input);
|
2017
|
-
addIssueToContext(
|
2018
|
-
|
2019
|
-
|
2020
|
-
|
2021
|
-
|
1934
|
+
addIssueToContext(
|
1935
|
+
ctx2,
|
1936
|
+
{
|
1937
|
+
code: ZodIssueCode.invalid_type,
|
1938
|
+
expected: ZodParsedType.string,
|
1939
|
+
received: ctx2.parsedType
|
1940
|
+
}
|
1941
|
+
//
|
1942
|
+
);
|
2022
1943
|
return INVALID;
|
2023
1944
|
}
|
2024
1945
|
const status = new ParseStatus();
|
@@ -2086,19 +2007,6 @@ var init_lib = __esm({
|
|
2086
2007
|
});
|
2087
2008
|
status.dirty();
|
2088
2009
|
}
|
2089
|
-
} else if (check.kind === "emoji") {
|
2090
|
-
if (!emojiRegex) {
|
2091
|
-
emojiRegex = new RegExp(_emojiRegex, "u");
|
2092
|
-
}
|
2093
|
-
if (!emojiRegex.test(input.data)) {
|
2094
|
-
ctx = this._getOrReturnCtx(input, ctx);
|
2095
|
-
addIssueToContext(ctx, {
|
2096
|
-
validation: "emoji",
|
2097
|
-
code: ZodIssueCode.invalid_string,
|
2098
|
-
message: check.message
|
2099
|
-
});
|
2100
|
-
status.dirty();
|
2101
|
-
}
|
2102
2010
|
} else if (check.kind === "uuid") {
|
2103
2011
|
if (!uuidRegex.test(input.data)) {
|
2104
2012
|
ctx = this._getOrReturnCtx(input, ctx);
|
@@ -2109,16 +2017,6 @@ var init_lib = __esm({
|
|
2109
2017
|
});
|
2110
2018
|
status.dirty();
|
2111
2019
|
}
|
2112
|
-
} else if (check.kind === "nanoid") {
|
2113
|
-
if (!nanoidRegex.test(input.data)) {
|
2114
|
-
ctx = this._getOrReturnCtx(input, ctx);
|
2115
|
-
addIssueToContext(ctx, {
|
2116
|
-
validation: "nanoid",
|
2117
|
-
code: ZodIssueCode.invalid_string,
|
2118
|
-
message: check.message
|
2119
|
-
});
|
2120
|
-
status.dirty();
|
2121
|
-
}
|
2122
2020
|
} else if (check.kind === "cuid") {
|
2123
2021
|
if (!cuidRegex.test(input.data)) {
|
2124
2022
|
ctx = this._getOrReturnCtx(input, ctx);
|
@@ -2129,26 +2027,6 @@ var init_lib = __esm({
|
|
2129
2027
|
});
|
2130
2028
|
status.dirty();
|
2131
2029
|
}
|
2132
|
-
} else if (check.kind === "cuid2") {
|
2133
|
-
if (!cuid2Regex.test(input.data)) {
|
2134
|
-
ctx = this._getOrReturnCtx(input, ctx);
|
2135
|
-
addIssueToContext(ctx, {
|
2136
|
-
validation: "cuid2",
|
2137
|
-
code: ZodIssueCode.invalid_string,
|
2138
|
-
message: check.message
|
2139
|
-
});
|
2140
|
-
status.dirty();
|
2141
|
-
}
|
2142
|
-
} else if (check.kind === "ulid") {
|
2143
|
-
if (!ulidRegex.test(input.data)) {
|
2144
|
-
ctx = this._getOrReturnCtx(input, ctx);
|
2145
|
-
addIssueToContext(ctx, {
|
2146
|
-
validation: "ulid",
|
2147
|
-
code: ZodIssueCode.invalid_string,
|
2148
|
-
message: check.message
|
2149
|
-
});
|
2150
|
-
status.dirty();
|
2151
|
-
}
|
2152
2030
|
} else if (check.kind === "url") {
|
2153
2031
|
try {
|
2154
2032
|
new URL(input.data);
|
@@ -2175,20 +2053,6 @@ var init_lib = __esm({
|
|
2175
2053
|
}
|
2176
2054
|
} else if (check.kind === "trim") {
|
2177
2055
|
input.data = input.data.trim();
|
2178
|
-
} else if (check.kind === "includes") {
|
2179
|
-
if (!input.data.includes(check.value, check.position)) {
|
2180
|
-
ctx = this._getOrReturnCtx(input, ctx);
|
2181
|
-
addIssueToContext(ctx, {
|
2182
|
-
code: ZodIssueCode.invalid_string,
|
2183
|
-
validation: { includes: check.value, position: check.position },
|
2184
|
-
message: check.message
|
2185
|
-
});
|
2186
|
-
status.dirty();
|
2187
|
-
}
|
2188
|
-
} else if (check.kind === "toLowerCase") {
|
2189
|
-
input.data = input.data.toLowerCase();
|
2190
|
-
} else if (check.kind === "toUpperCase") {
|
2191
|
-
input.data = input.data.toUpperCase();
|
2192
2056
|
} else if (check.kind === "startsWith") {
|
2193
2057
|
if (!input.data.startsWith(check.value)) {
|
2194
2058
|
ctx = this._getOrReturnCtx(input, ctx);
|
@@ -2220,71 +2084,12 @@ var init_lib = __esm({
|
|
2220
2084
|
});
|
2221
2085
|
status.dirty();
|
2222
2086
|
}
|
2223
|
-
} else if (check.kind === "date") {
|
2224
|
-
const regex = dateRegex;
|
2225
|
-
if (!regex.test(input.data)) {
|
2226
|
-
ctx = this._getOrReturnCtx(input, ctx);
|
2227
|
-
addIssueToContext(ctx, {
|
2228
|
-
code: ZodIssueCode.invalid_string,
|
2229
|
-
validation: "date",
|
2230
|
-
message: check.message
|
2231
|
-
});
|
2232
|
-
status.dirty();
|
2233
|
-
}
|
2234
|
-
} else if (check.kind === "time") {
|
2235
|
-
const regex = timeRegex(check);
|
2236
|
-
if (!regex.test(input.data)) {
|
2237
|
-
ctx = this._getOrReturnCtx(input, ctx);
|
2238
|
-
addIssueToContext(ctx, {
|
2239
|
-
code: ZodIssueCode.invalid_string,
|
2240
|
-
validation: "time",
|
2241
|
-
message: check.message
|
2242
|
-
});
|
2243
|
-
status.dirty();
|
2244
|
-
}
|
2245
|
-
} else if (check.kind === "duration") {
|
2246
|
-
if (!durationRegex.test(input.data)) {
|
2247
|
-
ctx = this._getOrReturnCtx(input, ctx);
|
2248
|
-
addIssueToContext(ctx, {
|
2249
|
-
validation: "duration",
|
2250
|
-
code: ZodIssueCode.invalid_string,
|
2251
|
-
message: check.message
|
2252
|
-
});
|
2253
|
-
status.dirty();
|
2254
|
-
}
|
2255
|
-
} else if (check.kind === "ip") {
|
2256
|
-
if (!isValidIP(input.data, check.version)) {
|
2257
|
-
ctx = this._getOrReturnCtx(input, ctx);
|
2258
|
-
addIssueToContext(ctx, {
|
2259
|
-
validation: "ip",
|
2260
|
-
code: ZodIssueCode.invalid_string,
|
2261
|
-
message: check.message
|
2262
|
-
});
|
2263
|
-
status.dirty();
|
2264
|
-
}
|
2265
|
-
} else if (check.kind === "base64") {
|
2266
|
-
if (!base64Regex.test(input.data)) {
|
2267
|
-
ctx = this._getOrReturnCtx(input, ctx);
|
2268
|
-
addIssueToContext(ctx, {
|
2269
|
-
validation: "base64",
|
2270
|
-
code: ZodIssueCode.invalid_string,
|
2271
|
-
message: check.message
|
2272
|
-
});
|
2273
|
-
status.dirty();
|
2274
|
-
}
|
2275
2087
|
} else {
|
2276
2088
|
util.assertNever(check);
|
2277
2089
|
}
|
2278
2090
|
}
|
2279
2091
|
return { status: status.value, value: input.data };
|
2280
2092
|
}
|
2281
|
-
_regex(regex, validation, message) {
|
2282
|
-
return this.refinement((data) => regex.test(data), {
|
2283
|
-
validation,
|
2284
|
-
code: ZodIssueCode.invalid_string,
|
2285
|
-
...errorUtil.errToObj(message)
|
2286
|
-
});
|
2287
|
-
}
|
2288
2093
|
_addCheck(check) {
|
2289
2094
|
return new _ZodString({
|
2290
2095
|
...this._def,
|
@@ -2297,38 +2102,19 @@ var init_lib = __esm({
|
|
2297
2102
|
url(message) {
|
2298
2103
|
return this._addCheck({ kind: "url", ...errorUtil.errToObj(message) });
|
2299
2104
|
}
|
2300
|
-
emoji(message) {
|
2301
|
-
return this._addCheck({ kind: "emoji", ...errorUtil.errToObj(message) });
|
2302
|
-
}
|
2303
2105
|
uuid(message) {
|
2304
2106
|
return this._addCheck({ kind: "uuid", ...errorUtil.errToObj(message) });
|
2305
2107
|
}
|
2306
|
-
nanoid(message) {
|
2307
|
-
return this._addCheck({ kind: "nanoid", ...errorUtil.errToObj(message) });
|
2308
|
-
}
|
2309
2108
|
cuid(message) {
|
2310
2109
|
return this._addCheck({ kind: "cuid", ...errorUtil.errToObj(message) });
|
2311
2110
|
}
|
2312
|
-
cuid2(message) {
|
2313
|
-
return this._addCheck({ kind: "cuid2", ...errorUtil.errToObj(message) });
|
2314
|
-
}
|
2315
|
-
ulid(message) {
|
2316
|
-
return this._addCheck({ kind: "ulid", ...errorUtil.errToObj(message) });
|
2317
|
-
}
|
2318
|
-
base64(message) {
|
2319
|
-
return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message) });
|
2320
|
-
}
|
2321
|
-
ip(options) {
|
2322
|
-
return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) });
|
2323
|
-
}
|
2324
2111
|
datetime(options) {
|
2325
|
-
var _a
|
2112
|
+
var _a;
|
2326
2113
|
if (typeof options === "string") {
|
2327
2114
|
return this._addCheck({
|
2328
2115
|
kind: "datetime",
|
2329
2116
|
precision: null,
|
2330
2117
|
offset: false,
|
2331
|
-
local: false,
|
2332
2118
|
message: options
|
2333
2119
|
});
|
2334
2120
|
}
|
@@ -2336,30 +2122,9 @@ var init_lib = __esm({
|
|
2336
2122
|
kind: "datetime",
|
2337
2123
|
precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
|
2338
2124
|
offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,
|
2339
|
-
local: (_b = options === null || options === void 0 ? void 0 : options.local) !== null && _b !== void 0 ? _b : false,
|
2340
2125
|
...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
|
2341
2126
|
});
|
2342
2127
|
}
|
2343
|
-
date(message) {
|
2344
|
-
return this._addCheck({ kind: "date", message });
|
2345
|
-
}
|
2346
|
-
time(options) {
|
2347
|
-
if (typeof options === "string") {
|
2348
|
-
return this._addCheck({
|
2349
|
-
kind: "time",
|
2350
|
-
precision: null,
|
2351
|
-
message: options
|
2352
|
-
});
|
2353
|
-
}
|
2354
|
-
return this._addCheck({
|
2355
|
-
kind: "time",
|
2356
|
-
precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
|
2357
|
-
...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
|
2358
|
-
});
|
2359
|
-
}
|
2360
|
-
duration(message) {
|
2361
|
-
return this._addCheck({ kind: "duration", ...errorUtil.errToObj(message) });
|
2362
|
-
}
|
2363
2128
|
regex(regex, message) {
|
2364
2129
|
return this._addCheck({
|
2365
2130
|
kind: "regex",
|
@@ -2367,14 +2132,6 @@ var init_lib = __esm({
|
|
2367
2132
|
...errorUtil.errToObj(message)
|
2368
2133
|
});
|
2369
2134
|
}
|
2370
|
-
includes(value, options) {
|
2371
|
-
return this._addCheck({
|
2372
|
-
kind: "includes",
|
2373
|
-
value,
|
2374
|
-
position: options === null || options === void 0 ? void 0 : options.position,
|
2375
|
-
...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
|
2376
|
-
});
|
2377
|
-
}
|
2378
2135
|
startsWith(value, message) {
|
2379
2136
|
return this._addCheck({
|
2380
2137
|
kind: "startsWith",
|
@@ -2410,73 +2167,21 @@ var init_lib = __esm({
|
|
2410
2167
|
...errorUtil.errToObj(message)
|
2411
2168
|
});
|
2412
2169
|
}
|
2413
|
-
/**
|
2414
|
-
* @deprecated Use z.string().min(1) instead.
|
2415
|
-
* @see {@link ZodString.min}
|
2416
|
-
*/
|
2417
|
-
nonempty(message) {
|
2418
|
-
return this.min(1, errorUtil.errToObj(message));
|
2419
|
-
}
|
2420
|
-
trim() {
|
2421
|
-
return new _ZodString({
|
2422
|
-
...this._def,
|
2423
|
-
checks: [...this._def.checks, { kind: "trim" }]
|
2424
|
-
});
|
2425
|
-
}
|
2426
|
-
toLowerCase() {
|
2427
|
-
return new _ZodString({
|
2428
|
-
...this._def,
|
2429
|
-
checks: [...this._def.checks, { kind: "toLowerCase" }]
|
2430
|
-
});
|
2431
|
-
}
|
2432
|
-
toUpperCase() {
|
2433
|
-
return new _ZodString({
|
2434
|
-
...this._def,
|
2435
|
-
checks: [...this._def.checks, { kind: "toUpperCase" }]
|
2436
|
-
});
|
2437
|
-
}
|
2438
2170
|
get isDatetime() {
|
2439
2171
|
return !!this._def.checks.find((ch) => ch.kind === "datetime");
|
2440
2172
|
}
|
2441
|
-
get isDate() {
|
2442
|
-
return !!this._def.checks.find((ch) => ch.kind === "date");
|
2443
|
-
}
|
2444
|
-
get isTime() {
|
2445
|
-
return !!this._def.checks.find((ch) => ch.kind === "time");
|
2446
|
-
}
|
2447
|
-
get isDuration() {
|
2448
|
-
return !!this._def.checks.find((ch) => ch.kind === "duration");
|
2449
|
-
}
|
2450
2173
|
get isEmail() {
|
2451
2174
|
return !!this._def.checks.find((ch) => ch.kind === "email");
|
2452
2175
|
}
|
2453
2176
|
get isURL() {
|
2454
2177
|
return !!this._def.checks.find((ch) => ch.kind === "url");
|
2455
2178
|
}
|
2456
|
-
get isEmoji() {
|
2457
|
-
return !!this._def.checks.find((ch) => ch.kind === "emoji");
|
2458
|
-
}
|
2459
2179
|
get isUUID() {
|
2460
2180
|
return !!this._def.checks.find((ch) => ch.kind === "uuid");
|
2461
2181
|
}
|
2462
|
-
get isNANOID() {
|
2463
|
-
return !!this._def.checks.find((ch) => ch.kind === "nanoid");
|
2464
|
-
}
|
2465
2182
|
get isCUID() {
|
2466
2183
|
return !!this._def.checks.find((ch) => ch.kind === "cuid");
|
2467
2184
|
}
|
2468
|
-
get isCUID2() {
|
2469
|
-
return !!this._def.checks.find((ch) => ch.kind === "cuid2");
|
2470
|
-
}
|
2471
|
-
get isULID() {
|
2472
|
-
return !!this._def.checks.find((ch) => ch.kind === "ulid");
|
2473
|
-
}
|
2474
|
-
get isIP() {
|
2475
|
-
return !!this._def.checks.find((ch) => ch.kind === "ip");
|
2476
|
-
}
|
2477
|
-
get isBase64() {
|
2478
|
-
return !!this._def.checks.find((ch) => ch.kind === "base64");
|
2479
|
-
}
|
2480
2185
|
get minLength() {
|
2481
2186
|
let min = null;
|
2482
2187
|
for (const ch of this._def.checks) {
|
@@ -2678,19 +2383,6 @@ var init_lib = __esm({
|
|
2678
2383
|
message: errorUtil.toString(message)
|
2679
2384
|
});
|
2680
2385
|
}
|
2681
|
-
safe(message) {
|
2682
|
-
return this._addCheck({
|
2683
|
-
kind: "min",
|
2684
|
-
inclusive: true,
|
2685
|
-
value: Number.MIN_SAFE_INTEGER,
|
2686
|
-
message: errorUtil.toString(message)
|
2687
|
-
})._addCheck({
|
2688
|
-
kind: "max",
|
2689
|
-
inclusive: true,
|
2690
|
-
value: Number.MAX_SAFE_INTEGER,
|
2691
|
-
message: errorUtil.toString(message)
|
2692
|
-
});
|
2693
|
-
}
|
2694
2386
|
get minValue() {
|
2695
2387
|
let min = null;
|
2696
2388
|
for (const ch of this._def.checks) {
|
@@ -2712,22 +2404,7 @@ var init_lib = __esm({
|
|
2712
2404
|
return max;
|
2713
2405
|
}
|
2714
2406
|
get isInt() {
|
2715
|
-
return !!this._def.checks.find((ch) => ch.kind === "int"
|
2716
|
-
}
|
2717
|
-
get isFinite() {
|
2718
|
-
let max = null, min = null;
|
2719
|
-
for (const ch of this._def.checks) {
|
2720
|
-
if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
|
2721
|
-
return true;
|
2722
|
-
} else if (ch.kind === "min") {
|
2723
|
-
if (min === null || ch.value > min)
|
2724
|
-
min = ch.value;
|
2725
|
-
} else if (ch.kind === "max") {
|
2726
|
-
if (max === null || ch.value < max)
|
2727
|
-
max = ch.value;
|
2728
|
-
}
|
2729
|
-
}
|
2730
|
-
return Number.isFinite(min) && Number.isFinite(max);
|
2407
|
+
return !!this._def.checks.find((ch) => ch.kind === "int");
|
2731
2408
|
}
|
2732
2409
|
};
|
2733
2410
|
ZodNumber.create = (params) => {
|
@@ -2738,167 +2415,27 @@ var init_lib = __esm({
|
|
2738
2415
|
...processCreateParams(params)
|
2739
2416
|
});
|
2740
2417
|
};
|
2741
|
-
ZodBigInt = class
|
2742
|
-
constructor() {
|
2743
|
-
super(...arguments);
|
2744
|
-
this.min = this.gte;
|
2745
|
-
this.max = this.lte;
|
2746
|
-
}
|
2418
|
+
ZodBigInt = class extends ZodType {
|
2747
2419
|
_parse(input) {
|
2748
2420
|
if (this._def.coerce) {
|
2749
2421
|
input.data = BigInt(input.data);
|
2750
2422
|
}
|
2751
2423
|
const parsedType = this._getType(input);
|
2752
2424
|
if (parsedType !== ZodParsedType.bigint) {
|
2753
|
-
const
|
2754
|
-
addIssueToContext(
|
2425
|
+
const ctx = this._getOrReturnCtx(input);
|
2426
|
+
addIssueToContext(ctx, {
|
2755
2427
|
code: ZodIssueCode.invalid_type,
|
2756
2428
|
expected: ZodParsedType.bigint,
|
2757
|
-
received:
|
2429
|
+
received: ctx.parsedType
|
2758
2430
|
});
|
2759
2431
|
return INVALID;
|
2760
2432
|
}
|
2761
|
-
|
2762
|
-
const status = new ParseStatus();
|
2763
|
-
for (const check of this._def.checks) {
|
2764
|
-
if (check.kind === "min") {
|
2765
|
-
const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;
|
2766
|
-
if (tooSmall) {
|
2767
|
-
ctx = this._getOrReturnCtx(input, ctx);
|
2768
|
-
addIssueToContext(ctx, {
|
2769
|
-
code: ZodIssueCode.too_small,
|
2770
|
-
type: "bigint",
|
2771
|
-
minimum: check.value,
|
2772
|
-
inclusive: check.inclusive,
|
2773
|
-
message: check.message
|
2774
|
-
});
|
2775
|
-
status.dirty();
|
2776
|
-
}
|
2777
|
-
} else if (check.kind === "max") {
|
2778
|
-
const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;
|
2779
|
-
if (tooBig) {
|
2780
|
-
ctx = this._getOrReturnCtx(input, ctx);
|
2781
|
-
addIssueToContext(ctx, {
|
2782
|
-
code: ZodIssueCode.too_big,
|
2783
|
-
type: "bigint",
|
2784
|
-
maximum: check.value,
|
2785
|
-
inclusive: check.inclusive,
|
2786
|
-
message: check.message
|
2787
|
-
});
|
2788
|
-
status.dirty();
|
2789
|
-
}
|
2790
|
-
} else if (check.kind === "multipleOf") {
|
2791
|
-
if (input.data % check.value !== BigInt(0)) {
|
2792
|
-
ctx = this._getOrReturnCtx(input, ctx);
|
2793
|
-
addIssueToContext(ctx, {
|
2794
|
-
code: ZodIssueCode.not_multiple_of,
|
2795
|
-
multipleOf: check.value,
|
2796
|
-
message: check.message
|
2797
|
-
});
|
2798
|
-
status.dirty();
|
2799
|
-
}
|
2800
|
-
} else {
|
2801
|
-
util.assertNever(check);
|
2802
|
-
}
|
2803
|
-
}
|
2804
|
-
return { status: status.value, value: input.data };
|
2805
|
-
}
|
2806
|
-
gte(value, message) {
|
2807
|
-
return this.setLimit("min", value, true, errorUtil.toString(message));
|
2808
|
-
}
|
2809
|
-
gt(value, message) {
|
2810
|
-
return this.setLimit("min", value, false, errorUtil.toString(message));
|
2811
|
-
}
|
2812
|
-
lte(value, message) {
|
2813
|
-
return this.setLimit("max", value, true, errorUtil.toString(message));
|
2814
|
-
}
|
2815
|
-
lt(value, message) {
|
2816
|
-
return this.setLimit("max", value, false, errorUtil.toString(message));
|
2817
|
-
}
|
2818
|
-
setLimit(kind, value, inclusive, message) {
|
2819
|
-
return new _ZodBigInt({
|
2820
|
-
...this._def,
|
2821
|
-
checks: [
|
2822
|
-
...this._def.checks,
|
2823
|
-
{
|
2824
|
-
kind,
|
2825
|
-
value,
|
2826
|
-
inclusive,
|
2827
|
-
message: errorUtil.toString(message)
|
2828
|
-
}
|
2829
|
-
]
|
2830
|
-
});
|
2831
|
-
}
|
2832
|
-
_addCheck(check) {
|
2833
|
-
return new _ZodBigInt({
|
2834
|
-
...this._def,
|
2835
|
-
checks: [...this._def.checks, check]
|
2836
|
-
});
|
2837
|
-
}
|
2838
|
-
positive(message) {
|
2839
|
-
return this._addCheck({
|
2840
|
-
kind: "min",
|
2841
|
-
value: BigInt(0),
|
2842
|
-
inclusive: false,
|
2843
|
-
message: errorUtil.toString(message)
|
2844
|
-
});
|
2845
|
-
}
|
2846
|
-
negative(message) {
|
2847
|
-
return this._addCheck({
|
2848
|
-
kind: "max",
|
2849
|
-
value: BigInt(0),
|
2850
|
-
inclusive: false,
|
2851
|
-
message: errorUtil.toString(message)
|
2852
|
-
});
|
2853
|
-
}
|
2854
|
-
nonpositive(message) {
|
2855
|
-
return this._addCheck({
|
2856
|
-
kind: "max",
|
2857
|
-
value: BigInt(0),
|
2858
|
-
inclusive: true,
|
2859
|
-
message: errorUtil.toString(message)
|
2860
|
-
});
|
2861
|
-
}
|
2862
|
-
nonnegative(message) {
|
2863
|
-
return this._addCheck({
|
2864
|
-
kind: "min",
|
2865
|
-
value: BigInt(0),
|
2866
|
-
inclusive: true,
|
2867
|
-
message: errorUtil.toString(message)
|
2868
|
-
});
|
2869
|
-
}
|
2870
|
-
multipleOf(value, message) {
|
2871
|
-
return this._addCheck({
|
2872
|
-
kind: "multipleOf",
|
2873
|
-
value,
|
2874
|
-
message: errorUtil.toString(message)
|
2875
|
-
});
|
2876
|
-
}
|
2877
|
-
get minValue() {
|
2878
|
-
let min = null;
|
2879
|
-
for (const ch of this._def.checks) {
|
2880
|
-
if (ch.kind === "min") {
|
2881
|
-
if (min === null || ch.value > min)
|
2882
|
-
min = ch.value;
|
2883
|
-
}
|
2884
|
-
}
|
2885
|
-
return min;
|
2886
|
-
}
|
2887
|
-
get maxValue() {
|
2888
|
-
let max = null;
|
2889
|
-
for (const ch of this._def.checks) {
|
2890
|
-
if (ch.kind === "max") {
|
2891
|
-
if (max === null || ch.value < max)
|
2892
|
-
max = ch.value;
|
2893
|
-
}
|
2894
|
-
}
|
2895
|
-
return max;
|
2433
|
+
return OK(input.data);
|
2896
2434
|
}
|
2897
2435
|
};
|
2898
2436
|
ZodBigInt.create = (params) => {
|
2899
2437
|
var _a;
|
2900
2438
|
return new ZodBigInt({
|
2901
|
-
checks: [],
|
2902
2439
|
typeName: ZodFirstPartyTypeKind.ZodBigInt,
|
2903
2440
|
coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
|
2904
2441
|
...processCreateParams(params)
|
@@ -3224,13 +2761,13 @@ var init_lib = __esm({
|
|
3224
2761
|
}
|
3225
2762
|
}
|
3226
2763
|
if (ctx.common.async) {
|
3227
|
-
return Promise.all(
|
2764
|
+
return Promise.all(ctx.data.map((item, i) => {
|
3228
2765
|
return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));
|
3229
2766
|
})).then((result2) => {
|
3230
2767
|
return ParseStatus.mergeArray(status, result2);
|
3231
2768
|
});
|
3232
2769
|
}
|
3233
|
-
const result =
|
2770
|
+
const result = ctx.data.map((item, i) => {
|
3234
2771
|
return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));
|
3235
2772
|
});
|
3236
2773
|
return ParseStatus.mergeArray(status, result);
|
@@ -3270,12 +2807,31 @@ var init_lib = __esm({
|
|
3270
2807
|
...processCreateParams(params)
|
3271
2808
|
});
|
3272
2809
|
};
|
2810
|
+
(function(objectUtil2) {
|
2811
|
+
objectUtil2.mergeShapes = (first, second) => {
|
2812
|
+
return {
|
2813
|
+
...first,
|
2814
|
+
...second
|
2815
|
+
// second overwrites first
|
2816
|
+
};
|
2817
|
+
};
|
2818
|
+
})(objectUtil || (objectUtil = {}));
|
2819
|
+
AugmentFactory = (def) => (augmentation) => {
|
2820
|
+
return new ZodObject({
|
2821
|
+
...def,
|
2822
|
+
shape: () => ({
|
2823
|
+
...def.shape(),
|
2824
|
+
...augmentation
|
2825
|
+
})
|
2826
|
+
});
|
2827
|
+
};
|
3273
2828
|
ZodObject = class _ZodObject extends ZodType {
|
3274
2829
|
constructor() {
|
3275
2830
|
super(...arguments);
|
3276
2831
|
this._cached = null;
|
3277
2832
|
this.nonstrict = this.passthrough;
|
3278
|
-
this.augment = this.
|
2833
|
+
this.augment = AugmentFactory(this._def);
|
2834
|
+
this.extend = AugmentFactory(this._def);
|
3279
2835
|
}
|
3280
2836
|
_getCached() {
|
3281
2837
|
if (this._cached !== null)
|
@@ -3356,10 +2912,9 @@ var init_lib = __esm({
|
|
3356
2912
|
const syncPairs = [];
|
3357
2913
|
for (const pair of pairs) {
|
3358
2914
|
const key = await pair.key;
|
3359
|
-
const value = await pair.value;
|
3360
2915
|
syncPairs.push({
|
3361
2916
|
key,
|
3362
|
-
value,
|
2917
|
+
value: await pair.value,
|
3363
2918
|
alwaysSet: pair.alwaysSet
|
3364
2919
|
});
|
3365
2920
|
}
|
@@ -3406,31 +2961,8 @@ var init_lib = __esm({
|
|
3406
2961
|
unknownKeys: "passthrough"
|
3407
2962
|
});
|
3408
2963
|
}
|
3409
|
-
|
3410
|
-
|
3411
|
-
// <Augmentation extends ZodRawShape>(
|
3412
|
-
// augmentation: Augmentation
|
3413
|
-
// ): ZodObject<
|
3414
|
-
// extendShape<ReturnType<Def["shape"]>, Augmentation>,
|
3415
|
-
// Def["unknownKeys"],
|
3416
|
-
// Def["catchall"]
|
3417
|
-
// > => {
|
3418
|
-
// return new ZodObject({
|
3419
|
-
// ...def,
|
3420
|
-
// shape: () => ({
|
3421
|
-
// ...def.shape(),
|
3422
|
-
// ...augmentation,
|
3423
|
-
// }),
|
3424
|
-
// }) as any;
|
3425
|
-
// };
|
3426
|
-
extend(augmentation) {
|
3427
|
-
return new _ZodObject({
|
3428
|
-
...this._def,
|
3429
|
-
shape: () => ({
|
3430
|
-
...this._def.shape(),
|
3431
|
-
...augmentation
|
3432
|
-
})
|
3433
|
-
});
|
2964
|
+
setKey(key, schema4) {
|
2965
|
+
return this.augment({ [key]: schema4 });
|
3434
2966
|
}
|
3435
2967
|
/**
|
3436
2968
|
* Prior to zod@1.0.12 there was a bug in the
|
@@ -3441,73 +2973,11 @@ var init_lib = __esm({
|
|
3441
2973
|
const merged = new _ZodObject({
|
3442
2974
|
unknownKeys: merging._def.unknownKeys,
|
3443
2975
|
catchall: merging._def.catchall,
|
3444
|
-
shape: () => (
|
3445
|
-
...this._def.shape(),
|
3446
|
-
...merging._def.shape()
|
3447
|
-
}),
|
2976
|
+
shape: () => objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
|
3448
2977
|
typeName: ZodFirstPartyTypeKind.ZodObject
|
3449
2978
|
});
|
3450
2979
|
return merged;
|
3451
2980
|
}
|
3452
|
-
// merge<
|
3453
|
-
// Incoming extends AnyZodObject,
|
3454
|
-
// Augmentation extends Incoming["shape"],
|
3455
|
-
// NewOutput extends {
|
3456
|
-
// [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation
|
3457
|
-
// ? Augmentation[k]["_output"]
|
3458
|
-
// : k extends keyof Output
|
3459
|
-
// ? Output[k]
|
3460
|
-
// : never;
|
3461
|
-
// },
|
3462
|
-
// NewInput extends {
|
3463
|
-
// [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation
|
3464
|
-
// ? Augmentation[k]["_input"]
|
3465
|
-
// : k extends keyof Input
|
3466
|
-
// ? Input[k]
|
3467
|
-
// : never;
|
3468
|
-
// }
|
3469
|
-
// >(
|
3470
|
-
// merging: Incoming
|
3471
|
-
// ): ZodObject<
|
3472
|
-
// extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
|
3473
|
-
// Incoming["_def"]["unknownKeys"],
|
3474
|
-
// Incoming["_def"]["catchall"],
|
3475
|
-
// NewOutput,
|
3476
|
-
// NewInput
|
3477
|
-
// > {
|
3478
|
-
// const merged: any = new ZodObject({
|
3479
|
-
// unknownKeys: merging._def.unknownKeys,
|
3480
|
-
// catchall: merging._def.catchall,
|
3481
|
-
// shape: () =>
|
3482
|
-
// objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
|
3483
|
-
// typeName: ZodFirstPartyTypeKind.ZodObject,
|
3484
|
-
// }) as any;
|
3485
|
-
// return merged;
|
3486
|
-
// }
|
3487
|
-
setKey(key, schema4) {
|
3488
|
-
return this.augment({ [key]: schema4 });
|
3489
|
-
}
|
3490
|
-
// merge<Incoming extends AnyZodObject>(
|
3491
|
-
// merging: Incoming
|
3492
|
-
// ): //ZodObject<T & Incoming["_shape"], UnknownKeys, Catchall> = (merging) => {
|
3493
|
-
// ZodObject<
|
3494
|
-
// extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
|
3495
|
-
// Incoming["_def"]["unknownKeys"],
|
3496
|
-
// Incoming["_def"]["catchall"]
|
3497
|
-
// > {
|
3498
|
-
// // const mergedShape = objectUtil.mergeShapes(
|
3499
|
-
// // this._def.shape(),
|
3500
|
-
// // merging._def.shape()
|
3501
|
-
// // );
|
3502
|
-
// const merged: any = new ZodObject({
|
3503
|
-
// unknownKeys: merging._def.unknownKeys,
|
3504
|
-
// catchall: merging._def.catchall,
|
3505
|
-
// shape: () =>
|
3506
|
-
// objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
|
3507
|
-
// typeName: ZodFirstPartyTypeKind.ZodObject,
|
3508
|
-
// }) as any;
|
3509
|
-
// return merged;
|
3510
|
-
// }
|
3511
2981
|
catchall(index4) {
|
3512
2982
|
return new _ZodObject({
|
3513
2983
|
...this._def,
|
@@ -3516,10 +2986,9 @@ var init_lib = __esm({
|
|
3516
2986
|
}
|
3517
2987
|
pick(mask) {
|
3518
2988
|
const shape = {};
|
3519
|
-
util.objectKeys(mask).
|
3520
|
-
if (
|
2989
|
+
util.objectKeys(mask).map((key) => {
|
2990
|
+
if (this.shape[key])
|
3521
2991
|
shape[key] = this.shape[key];
|
3522
|
-
}
|
3523
2992
|
});
|
3524
2993
|
return new _ZodObject({
|
3525
2994
|
...this._def,
|
@@ -3528,8 +2997,8 @@ var init_lib = __esm({
|
|
3528
2997
|
}
|
3529
2998
|
omit(mask) {
|
3530
2999
|
const shape = {};
|
3531
|
-
util.objectKeys(this.shape).
|
3532
|
-
if (
|
3000
|
+
util.objectKeys(this.shape).map((key) => {
|
3001
|
+
if (util.objectKeys(mask).indexOf(key) === -1) {
|
3533
3002
|
shape[key] = this.shape[key];
|
3534
3003
|
}
|
3535
3004
|
});
|
@@ -3538,22 +3007,29 @@ var init_lib = __esm({
|
|
3538
3007
|
shape: () => shape
|
3539
3008
|
});
|
3540
3009
|
}
|
3541
|
-
/**
|
3542
|
-
* @deprecated
|
3543
|
-
*/
|
3544
3010
|
deepPartial() {
|
3545
3011
|
return deepPartialify(this);
|
3546
3012
|
}
|
3547
3013
|
partial(mask) {
|
3548
3014
|
const newShape = {};
|
3549
|
-
|
3550
|
-
|
3551
|
-
|
3552
|
-
|
3553
|
-
|
3015
|
+
if (mask) {
|
3016
|
+
util.objectKeys(this.shape).map((key) => {
|
3017
|
+
if (util.objectKeys(mask).indexOf(key) === -1) {
|
3018
|
+
newShape[key] = this.shape[key];
|
3019
|
+
} else {
|
3020
|
+
newShape[key] = this.shape[key].optional();
|
3021
|
+
}
|
3022
|
+
});
|
3023
|
+
return new _ZodObject({
|
3024
|
+
...this._def,
|
3025
|
+
shape: () => newShape
|
3026
|
+
});
|
3027
|
+
} else {
|
3028
|
+
for (const key in this.shape) {
|
3029
|
+
const fieldSchema = this.shape[key];
|
3554
3030
|
newShape[key] = fieldSchema.optional();
|
3555
3031
|
}
|
3556
|
-
}
|
3032
|
+
}
|
3557
3033
|
return new _ZodObject({
|
3558
3034
|
...this._def,
|
3559
3035
|
shape: () => newShape
|
@@ -3561,10 +3037,21 @@ var init_lib = __esm({
|
|
3561
3037
|
}
|
3562
3038
|
required(mask) {
|
3563
3039
|
const newShape = {};
|
3564
|
-
|
3565
|
-
|
3566
|
-
|
3567
|
-
|
3040
|
+
if (mask) {
|
3041
|
+
util.objectKeys(this.shape).map((key) => {
|
3042
|
+
if (util.objectKeys(mask).indexOf(key) === -1) {
|
3043
|
+
newShape[key] = this.shape[key];
|
3044
|
+
} else {
|
3045
|
+
const fieldSchema = this.shape[key];
|
3046
|
+
let newField = fieldSchema;
|
3047
|
+
while (newField instanceof ZodOptional) {
|
3048
|
+
newField = newField._def.innerType;
|
3049
|
+
}
|
3050
|
+
newShape[key] = newField;
|
3051
|
+
}
|
3052
|
+
});
|
3053
|
+
} else {
|
3054
|
+
for (const key in this.shape) {
|
3568
3055
|
const fieldSchema = this.shape[key];
|
3569
3056
|
let newField = fieldSchema;
|
3570
3057
|
while (newField instanceof ZodOptional) {
|
@@ -3572,7 +3059,7 @@ var init_lib = __esm({
|
|
3572
3059
|
}
|
3573
3060
|
newShape[key] = newField;
|
3574
3061
|
}
|
3575
|
-
}
|
3062
|
+
}
|
3576
3063
|
return new _ZodObject({
|
3577
3064
|
...this._def,
|
3578
3065
|
shape: () => newShape
|
@@ -3710,25 +3197,15 @@ var init_lib = __esm({
|
|
3710
3197
|
} else if (type instanceof ZodEnum) {
|
3711
3198
|
return type.options;
|
3712
3199
|
} else if (type instanceof ZodNativeEnum) {
|
3713
|
-
return
|
3200
|
+
return Object.keys(type.enum);
|
3714
3201
|
} else if (type instanceof ZodDefault) {
|
3715
3202
|
return getDiscriminator(type._def.innerType);
|
3716
3203
|
} else if (type instanceof ZodUndefined) {
|
3717
3204
|
return [void 0];
|
3718
3205
|
} else if (type instanceof ZodNull) {
|
3719
3206
|
return [null];
|
3720
|
-
} else if (type instanceof ZodOptional) {
|
3721
|
-
return [void 0, ...getDiscriminator(type.unwrap())];
|
3722
|
-
} else if (type instanceof ZodNullable) {
|
3723
|
-
return [null, ...getDiscriminator(type.unwrap())];
|
3724
|
-
} else if (type instanceof ZodBranded) {
|
3725
|
-
return getDiscriminator(type.unwrap());
|
3726
|
-
} else if (type instanceof ZodReadonly) {
|
3727
|
-
return getDiscriminator(type.unwrap());
|
3728
|
-
} else if (type instanceof ZodCatch) {
|
3729
|
-
return getDiscriminator(type._def.innerType);
|
3730
3207
|
} else {
|
3731
|
-
return
|
3208
|
+
return null;
|
3732
3209
|
}
|
3733
3210
|
};
|
3734
3211
|
ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType {
|
@@ -3788,7 +3265,7 @@ var init_lib = __esm({
|
|
3788
3265
|
const optionsMap = /* @__PURE__ */ new Map();
|
3789
3266
|
for (const type of options) {
|
3790
3267
|
const discriminatorValues = getDiscriminator(type.shape[discriminator]);
|
3791
|
-
if (!discriminatorValues
|
3268
|
+
if (!discriminatorValues) {
|
3792
3269
|
throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`);
|
3793
3270
|
}
|
3794
3271
|
for (const value of discriminatorValues) {
|
@@ -3892,7 +3369,7 @@ var init_lib = __esm({
|
|
3892
3369
|
});
|
3893
3370
|
status.dirty();
|
3894
3371
|
}
|
3895
|
-
const items =
|
3372
|
+
const items = ctx.data.map((item, itemIndex) => {
|
3896
3373
|
const schema4 = this._def.items[itemIndex] || this._def.rest;
|
3897
3374
|
if (!schema4)
|
3898
3375
|
return null;
|
@@ -3950,8 +3427,7 @@ var init_lib = __esm({
|
|
3950
3427
|
for (const key in ctx.data) {
|
3951
3428
|
pairs.push({
|
3952
3429
|
key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),
|
3953
|
-
value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key))
|
3954
|
-
alwaysSet: key in ctx.data
|
3430
|
+
value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key))
|
3955
3431
|
});
|
3956
3432
|
}
|
3957
3433
|
if (ctx.common.async) {
|
@@ -3981,12 +3457,6 @@ var init_lib = __esm({
|
|
3981
3457
|
}
|
3982
3458
|
};
|
3983
3459
|
ZodMap = class extends ZodType {
|
3984
|
-
get keySchema() {
|
3985
|
-
return this._def.keyType;
|
3986
|
-
}
|
3987
|
-
get valueSchema() {
|
3988
|
-
return this._def.valueType;
|
3989
|
-
}
|
3990
3460
|
_parse(input) {
|
3991
3461
|
const { status, ctx } = this._processInputParams(input);
|
3992
3462
|
if (ctx.parsedType !== ZodParsedType.map) {
|
@@ -4181,29 +3651,27 @@ var init_lib = __esm({
|
|
4181
3651
|
const params = { errorMap: ctx.common.contextualErrorMap };
|
4182
3652
|
const fn = ctx.data;
|
4183
3653
|
if (this._def.returns instanceof ZodPromise) {
|
4184
|
-
|
4185
|
-
return OK(async function(...args) {
|
3654
|
+
return OK(async (...args) => {
|
4186
3655
|
const error2 = new ZodError([]);
|
4187
|
-
const parsedArgs = await
|
3656
|
+
const parsedArgs = await this._def.args.parseAsync(args, params).catch((e) => {
|
4188
3657
|
error2.addIssue(makeArgsIssue(args, e));
|
4189
3658
|
throw error2;
|
4190
3659
|
});
|
4191
|
-
const result = await
|
4192
|
-
const parsedReturns = await
|
3660
|
+
const result = await fn(...parsedArgs);
|
3661
|
+
const parsedReturns = await this._def.returns._def.type.parseAsync(result, params).catch((e) => {
|
4193
3662
|
error2.addIssue(makeReturnsIssue(result, e));
|
4194
3663
|
throw error2;
|
4195
3664
|
});
|
4196
3665
|
return parsedReturns;
|
4197
3666
|
});
|
4198
3667
|
} else {
|
4199
|
-
|
4200
|
-
|
4201
|
-
const parsedArgs = me._def.args.safeParse(args, params);
|
3668
|
+
return OK((...args) => {
|
3669
|
+
const parsedArgs = this._def.args.safeParse(args, params);
|
4202
3670
|
if (!parsedArgs.success) {
|
4203
3671
|
throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);
|
4204
3672
|
}
|
4205
|
-
const result =
|
4206
|
-
const parsedReturns =
|
3673
|
+
const result = fn(...parsedArgs.data);
|
3674
|
+
const parsedReturns = this._def.returns.safeParse(result, params);
|
4207
3675
|
if (!parsedReturns.success) {
|
4208
3676
|
throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
|
4209
3677
|
}
|
@@ -4268,7 +3736,6 @@ var init_lib = __esm({
|
|
4268
3736
|
if (input.data !== this._def.value) {
|
4269
3737
|
const ctx = this._getOrReturnCtx(input);
|
4270
3738
|
addIssueToContext(ctx, {
|
4271
|
-
received: ctx.data,
|
4272
3739
|
code: ZodIssueCode.invalid_literal,
|
4273
3740
|
expected: this._def.value
|
4274
3741
|
});
|
@@ -4287,11 +3754,7 @@ var init_lib = __esm({
|
|
4287
3754
|
...processCreateParams(params)
|
4288
3755
|
});
|
4289
3756
|
};
|
4290
|
-
ZodEnum = class
|
4291
|
-
constructor() {
|
4292
|
-
super(...arguments);
|
4293
|
-
_ZodEnum_cache.set(this, void 0);
|
4294
|
-
}
|
3757
|
+
ZodEnum = class extends ZodType {
|
4295
3758
|
_parse(input) {
|
4296
3759
|
if (typeof input.data !== "string") {
|
4297
3760
|
const ctx = this._getOrReturnCtx(input);
|
@@ -4303,10 +3766,7 @@ var init_lib = __esm({
|
|
4303
3766
|
});
|
4304
3767
|
return INVALID;
|
4305
3768
|
}
|
4306
|
-
if (
|
4307
|
-
__classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values), "f");
|
4308
|
-
}
|
4309
|
-
if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f").has(input.data)) {
|
3769
|
+
if (this._def.values.indexOf(input.data) === -1) {
|
4310
3770
|
const ctx = this._getOrReturnCtx(input);
|
4311
3771
|
const expectedValues = this._def.values;
|
4312
3772
|
addIssueToContext(ctx, {
|
@@ -4342,26 +3802,9 @@ var init_lib = __esm({
|
|
4342
3802
|
}
|
4343
3803
|
return enumValues;
|
4344
3804
|
}
|
4345
|
-
extract(values, newDef = this._def) {
|
4346
|
-
return _ZodEnum.create(values, {
|
4347
|
-
...this._def,
|
4348
|
-
...newDef
|
4349
|
-
});
|
4350
|
-
}
|
4351
|
-
exclude(values, newDef = this._def) {
|
4352
|
-
return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {
|
4353
|
-
...this._def,
|
4354
|
-
...newDef
|
4355
|
-
});
|
4356
|
-
}
|
4357
3805
|
};
|
4358
|
-
_ZodEnum_cache = /* @__PURE__ */ new WeakMap();
|
4359
3806
|
ZodEnum.create = createZodEnum;
|
4360
3807
|
ZodNativeEnum = class extends ZodType {
|
4361
|
-
constructor() {
|
4362
|
-
super(...arguments);
|
4363
|
-
_ZodNativeEnum_cache.set(this, void 0);
|
4364
|
-
}
|
4365
3808
|
_parse(input) {
|
4366
3809
|
const nativeEnumValues = util.getValidEnumValues(this._def.values);
|
4367
3810
|
const ctx = this._getOrReturnCtx(input);
|
@@ -4374,10 +3817,7 @@ var init_lib = __esm({
|
|
4374
3817
|
});
|
4375
3818
|
return INVALID;
|
4376
3819
|
}
|
4377
|
-
if (
|
4378
|
-
__classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util.getValidEnumValues(this._def.values)), "f");
|
4379
|
-
}
|
4380
|
-
if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f").has(input.data)) {
|
3820
|
+
if (nativeEnumValues.indexOf(input.data) === -1) {
|
4381
3821
|
const expectedValues = util.objectValues(nativeEnumValues);
|
4382
3822
|
addIssueToContext(ctx, {
|
4383
3823
|
received: ctx.data,
|
@@ -4392,7 +3832,6 @@ var init_lib = __esm({
|
|
4392
3832
|
return this._def.values;
|
4393
3833
|
}
|
4394
3834
|
};
|
4395
|
-
_ZodNativeEnum_cache = /* @__PURE__ */ new WeakMap();
|
4396
3835
|
ZodNativeEnum.create = (values, params) => {
|
4397
3836
|
return new ZodNativeEnum({
|
4398
3837
|
values,
|
@@ -4401,9 +3840,6 @@ var init_lib = __esm({
|
|
4401
3840
|
});
|
4402
3841
|
};
|
4403
3842
|
ZodPromise = class extends ZodType {
|
4404
|
-
unwrap() {
|
4405
|
-
return this._def.type;
|
4406
|
-
}
|
4407
3843
|
_parse(input) {
|
4408
3844
|
const { ctx } = this._processInputParams(input);
|
4409
3845
|
if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) {
|
@@ -4440,56 +3876,38 @@ var init_lib = __esm({
|
|
4440
3876
|
_parse(input) {
|
4441
3877
|
const { status, ctx } = this._processInputParams(input);
|
4442
3878
|
const effect = this._def.effect || null;
|
4443
|
-
const checkCtx = {
|
4444
|
-
addIssue: (arg) => {
|
4445
|
-
addIssueToContext(ctx, arg);
|
4446
|
-
if (arg.fatal) {
|
4447
|
-
status.abort();
|
4448
|
-
} else {
|
4449
|
-
status.dirty();
|
4450
|
-
}
|
4451
|
-
},
|
4452
|
-
get path() {
|
4453
|
-
return ctx.path;
|
4454
|
-
}
|
4455
|
-
};
|
4456
|
-
checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);
|
4457
3879
|
if (effect.type === "preprocess") {
|
4458
|
-
const processed = effect.transform(ctx.data
|
3880
|
+
const processed = effect.transform(ctx.data);
|
4459
3881
|
if (ctx.common.async) {
|
4460
|
-
return Promise.resolve(processed).then(
|
4461
|
-
|
4462
|
-
return INVALID;
|
4463
|
-
const result = await this._def.schema._parseAsync({
|
3882
|
+
return Promise.resolve(processed).then((processed2) => {
|
3883
|
+
return this._def.schema._parseAsync({
|
4464
3884
|
data: processed2,
|
4465
3885
|
path: ctx.path,
|
4466
3886
|
parent: ctx
|
4467
3887
|
});
|
4468
|
-
if (result.status === "aborted")
|
4469
|
-
return INVALID;
|
4470
|
-
if (result.status === "dirty")
|
4471
|
-
return DIRTY(result.value);
|
4472
|
-
if (status.value === "dirty")
|
4473
|
-
return DIRTY(result.value);
|
4474
|
-
return result;
|
4475
3888
|
});
|
4476
3889
|
} else {
|
4477
|
-
|
4478
|
-
return INVALID;
|
4479
|
-
const result = this._def.schema._parseSync({
|
3890
|
+
return this._def.schema._parseSync({
|
4480
3891
|
data: processed,
|
4481
3892
|
path: ctx.path,
|
4482
3893
|
parent: ctx
|
4483
3894
|
});
|
4484
|
-
if (result.status === "aborted")
|
4485
|
-
return INVALID;
|
4486
|
-
if (result.status === "dirty")
|
4487
|
-
return DIRTY(result.value);
|
4488
|
-
if (status.value === "dirty")
|
4489
|
-
return DIRTY(result.value);
|
4490
|
-
return result;
|
4491
3895
|
}
|
4492
3896
|
}
|
3897
|
+
const checkCtx = {
|
3898
|
+
addIssue: (arg) => {
|
3899
|
+
addIssueToContext(ctx, arg);
|
3900
|
+
if (arg.fatal) {
|
3901
|
+
status.abort();
|
3902
|
+
} else {
|
3903
|
+
status.dirty();
|
3904
|
+
}
|
3905
|
+
},
|
3906
|
+
get path() {
|
3907
|
+
return ctx.path;
|
3908
|
+
}
|
3909
|
+
};
|
3910
|
+
checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);
|
4493
3911
|
if (effect.type === "refinement") {
|
4494
3912
|
const executeRefinement = (acc) => {
|
4495
3913
|
const result = effect.refinement(acc, checkCtx);
|
@@ -4632,45 +4050,26 @@ var init_lib = __esm({
|
|
4632
4050
|
ZodCatch = class extends ZodType {
|
4633
4051
|
_parse(input) {
|
4634
4052
|
const { ctx } = this._processInputParams(input);
|
4635
|
-
const newCtx = {
|
4636
|
-
...ctx,
|
4637
|
-
common: {
|
4638
|
-
...ctx.common,
|
4639
|
-
issues: []
|
4640
|
-
}
|
4641
|
-
};
|
4642
4053
|
const result = this._def.innerType._parse({
|
4643
|
-
data:
|
4644
|
-
path:
|
4645
|
-
parent:
|
4646
|
-
...newCtx
|
4647
|
-
}
|
4054
|
+
data: ctx.data,
|
4055
|
+
path: ctx.path,
|
4056
|
+
parent: ctx
|
4648
4057
|
});
|
4649
4058
|
if (isAsync(result)) {
|
4650
4059
|
return result.then((result2) => {
|
4651
4060
|
return {
|
4652
4061
|
status: "valid",
|
4653
|
-
value: result2.status === "valid" ? result2.value : this._def.
|
4654
|
-
get error() {
|
4655
|
-
return new ZodError(newCtx.common.issues);
|
4656
|
-
},
|
4657
|
-
input: newCtx.data
|
4658
|
-
})
|
4062
|
+
value: result2.status === "valid" ? result2.value : this._def.defaultValue()
|
4659
4063
|
};
|
4660
4064
|
});
|
4661
4065
|
} else {
|
4662
4066
|
return {
|
4663
4067
|
status: "valid",
|
4664
|
-
value: result.status === "valid" ? result.value : this._def.
|
4665
|
-
get error() {
|
4666
|
-
return new ZodError(newCtx.common.issues);
|
4667
|
-
},
|
4668
|
-
input: newCtx.data
|
4669
|
-
})
|
4068
|
+
value: result.status === "valid" ? result.value : this._def.defaultValue()
|
4670
4069
|
};
|
4671
4070
|
}
|
4672
4071
|
}
|
4673
|
-
|
4072
|
+
removeDefault() {
|
4674
4073
|
return this._def.innerType;
|
4675
4074
|
}
|
4676
4075
|
};
|
@@ -4678,7 +4077,7 @@ var init_lib = __esm({
|
|
4678
4077
|
return new ZodCatch({
|
4679
4078
|
innerType: type,
|
4680
4079
|
typeName: ZodFirstPartyTypeKind.ZodCatch,
|
4681
|
-
|
4080
|
+
defaultValue: typeof params.default === "function" ? params.default : () => params.default,
|
4682
4081
|
...processCreateParams(params)
|
4683
4082
|
});
|
4684
4083
|
};
|
@@ -4773,25 +4172,6 @@ var init_lib = __esm({
|
|
4773
4172
|
});
|
4774
4173
|
}
|
4775
4174
|
};
|
4776
|
-
ZodReadonly = class extends ZodType {
|
4777
|
-
_parse(input) {
|
4778
|
-
const result = this._def.innerType._parse(input);
|
4779
|
-
if (isValid(result)) {
|
4780
|
-
result.value = Object.freeze(result.value);
|
4781
|
-
}
|
4782
|
-
return result;
|
4783
|
-
}
|
4784
|
-
unwrap() {
|
4785
|
-
return this._def.innerType;
|
4786
|
-
}
|
4787
|
-
};
|
4788
|
-
ZodReadonly.create = (type, params) => {
|
4789
|
-
return new ZodReadonly({
|
4790
|
-
innerType: type,
|
4791
|
-
typeName: ZodFirstPartyTypeKind.ZodReadonly,
|
4792
|
-
...processCreateParams(params)
|
4793
|
-
});
|
4794
|
-
};
|
4795
4175
|
late = {
|
4796
4176
|
object: ZodObject.lazycreate
|
4797
4177
|
};
|
@@ -4831,7 +4211,6 @@ var init_lib = __esm({
|
|
4831
4211
|
ZodFirstPartyTypeKind2["ZodPromise"] = "ZodPromise";
|
4832
4212
|
ZodFirstPartyTypeKind2["ZodBranded"] = "ZodBranded";
|
4833
4213
|
ZodFirstPartyTypeKind2["ZodPipeline"] = "ZodPipeline";
|
4834
|
-
ZodFirstPartyTypeKind2["ZodReadonly"] = "ZodReadonly";
|
4835
4214
|
})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
4836
4215
|
stringType = ZodString.create;
|
4837
4216
|
numberType = ZodNumber.create;
|
@@ -4870,10 +4249,7 @@ var init_lib = __esm({
|
|
4870
4249
|
coerce = {
|
4871
4250
|
string: (arg) => ZodString.create({ ...arg, coerce: true }),
|
4872
4251
|
number: (arg) => ZodNumber.create({ ...arg, coerce: true }),
|
4873
|
-
boolean: (arg) => ZodBoolean.create({
|
4874
|
-
...arg,
|
4875
|
-
coerce: true
|
4876
|
-
}),
|
4252
|
+
boolean: (arg) => ZodBoolean.create({ ...arg, coerce: true }),
|
4877
4253
|
bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }),
|
4878
4254
|
date: (arg) => ZodDate.create({ ...arg, coerce: true })
|
4879
4255
|
};
|
@@ -5319,7 +4695,7 @@ var init_pgSchema = __esm({
|
|
5319
4695
|
}).strict();
|
5320
4696
|
pgSchemaInternal = objectType({
|
5321
4697
|
version: literalType("6"),
|
5322
|
-
dialect: literalType("
|
4698
|
+
dialect: literalType("postgresql"),
|
5323
4699
|
tables: recordType(stringType(), table2),
|
5324
4700
|
enums: recordType(stringType(), enumSchema),
|
5325
4701
|
schemas: recordType(stringType(), stringType()),
|
@@ -5348,14 +4724,14 @@ var init_pgSchema = __esm({
|
|
5348
4724
|
}).strict();
|
5349
4725
|
pgSchemaSquashedV4 = objectType({
|
5350
4726
|
version: literalType("4"),
|
5351
|
-
dialect:
|
4727
|
+
dialect: literalType("pg"),
|
5352
4728
|
tables: recordType(stringType(), tableSquashedV42),
|
5353
4729
|
enums: recordType(stringType(), enumSchemaV1),
|
5354
4730
|
schemas: recordType(stringType(), stringType())
|
5355
4731
|
}).strict();
|
5356
4732
|
pgSchemaSquashed = objectType({
|
5357
4733
|
version: literalType("6"),
|
5358
|
-
dialect:
|
4734
|
+
dialect: literalType("postgresql"),
|
5359
4735
|
tables: recordType(stringType(), tableSquashed2),
|
5360
4736
|
enums: recordType(stringType(), enumSchema),
|
5361
4737
|
schemas: recordType(stringType(), stringType())
|
@@ -5466,7 +4842,7 @@ var init_pgSchema = __esm({
|
|
5466
4842
|
};
|
5467
4843
|
dryPg = pgSchema.parse({
|
5468
4844
|
version: snapshotVersion,
|
5469
|
-
dialect: "
|
4845
|
+
dialect: "postgresql",
|
5470
4846
|
id: originUUID,
|
5471
4847
|
prevId: "",
|
5472
4848
|
tables: {},
|
@@ -5695,6 +5071,7 @@ var init_utils = __esm({
|
|
5695
5071
|
init_mysqlSchema();
|
5696
5072
|
init_pgSchema();
|
5697
5073
|
init_sqliteSchema();
|
5074
|
+
init_source();
|
5698
5075
|
init_global();
|
5699
5076
|
copy = (it) => {
|
5700
5077
|
return JSON.parse(JSON.stringify(it));
|
@@ -5899,6 +5276,7 @@ var init_serializer = __esm({
|
|
5899
5276
|
"src/serializer/index.ts"() {
|
5900
5277
|
"use strict";
|
5901
5278
|
glob = __toESM(require("glob"));
|
5279
|
+
init_source();
|
5902
5280
|
init_views();
|
5903
5281
|
sqlToStr = (sql2) => {
|
5904
5282
|
return sql2.toQuery({
|
@@ -5927,7 +5305,8 @@ var init_outputs = __esm({
|
|
5927
5305
|
warning: (str) => `${source_default.white.bgGray(" Warning ")} ${str}`,
|
5928
5306
|
errorWarning: (str) => `${source_default.red(`${source_default.white.bgRed(" Warning ")} ${str}`)}`,
|
5929
5307
|
fullWarning: (str) => `${source_default.black.bgYellow("[Warning]")} ${source_default.bold(str)}`,
|
5930
|
-
suggestion: (str) => `${source_default.white.bgGray(" Suggestion ")} ${str}
|
5308
|
+
suggestion: (str) => `${source_default.white.bgGray(" Suggestion ")} ${str}`,
|
5309
|
+
info: (str) => `${source_default.grey(str)}`
|
5931
5310
|
};
|
5932
5311
|
}
|
5933
5312
|
});
|
@@ -6012,7 +5391,7 @@ var init_schemaValidator = __esm({
|
|
6012
5391
|
init_mysqlSchema();
|
6013
5392
|
init_pgSchema();
|
6014
5393
|
init_sqliteSchema();
|
6015
|
-
dialect3 = enumType(["
|
5394
|
+
dialect3 = enumType(["postgresql", "mysql", "sqlite"]);
|
6016
5395
|
commonSquashedSchema = unionType([
|
6017
5396
|
pgSchemaSquashed,
|
6018
5397
|
mysqlSchemaSquashed,
|
@@ -6132,8 +5511,8 @@ var init_cli = __esm({
|
|
6132
5511
|
dialect: dialect3,
|
6133
5512
|
schema: unionType([stringType(), stringType().array()]).optional(),
|
6134
5513
|
tablesFilter: unionType([stringType(), stringType().array()]).optional(),
|
6135
|
-
|
6136
|
-
driver: stringType(),
|
5514
|
+
schemaFilter: unionType([stringType(), stringType().array()]).optional().default(["public"]),
|
5515
|
+
driver: stringType().optional(),
|
6137
5516
|
// pg
|
6138
5517
|
connectionString: stringType().optional(),
|
6139
5518
|
// mysql
|
@@ -6171,7 +5550,7 @@ var init_cli = __esm({
|
|
6171
5550
|
authToken: stringType().optional(),
|
6172
5551
|
introspectCasing: casing,
|
6173
5552
|
breakpoints: booleanType().optional().default(true)
|
6174
|
-
});
|
5553
|
+
}).passthrough();
|
6175
5554
|
configCheck = objectType({
|
6176
5555
|
dialect: dialect3.optional(),
|
6177
5556
|
out: stringType().optional()
|
@@ -6201,7 +5580,7 @@ var init_es5 = __esm({
|
|
6201
5580
|
|
6202
5581
|
// node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js
|
6203
5582
|
var require_ms = __commonJS({
|
6204
|
-
"node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js"(
|
5583
|
+
"node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js"(exports, module2) {
|
6205
5584
|
var s = 1e3;
|
6206
5585
|
var m = s * 60;
|
6207
5586
|
var h = m * 60;
|
@@ -6317,7 +5696,7 @@ var require_ms = __commonJS({
|
|
6317
5696
|
|
6318
5697
|
// node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js
|
6319
5698
|
var require_common = __commonJS({
|
6320
|
-
"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js"(
|
5699
|
+
"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js"(exports, module2) {
|
6321
5700
|
function setup(env2) {
|
6322
5701
|
createDebug.debug = createDebug;
|
6323
5702
|
createDebug.default = createDebug;
|
@@ -6480,13 +5859,13 @@ var require_common = __commonJS({
|
|
6480
5859
|
|
6481
5860
|
// node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js
|
6482
5861
|
var require_browser = __commonJS({
|
6483
|
-
"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js"(
|
6484
|
-
|
6485
|
-
|
6486
|
-
|
6487
|
-
|
6488
|
-
|
6489
|
-
|
5862
|
+
"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js"(exports, module2) {
|
5863
|
+
exports.formatArgs = formatArgs;
|
5864
|
+
exports.save = save;
|
5865
|
+
exports.load = load;
|
5866
|
+
exports.useColors = useColors;
|
5867
|
+
exports.storage = localstorage();
|
5868
|
+
exports.destroy = /* @__PURE__ */ (() => {
|
6490
5869
|
let warned = false;
|
6491
5870
|
return () => {
|
6492
5871
|
if (!warned) {
|
@@ -6495,7 +5874,7 @@ var require_browser = __commonJS({
|
|
6495
5874
|
}
|
6496
5875
|
};
|
6497
5876
|
})();
|
6498
|
-
|
5877
|
+
exports.colors = [
|
6499
5878
|
"#0000CC",
|
6500
5879
|
"#0000FF",
|
6501
5880
|
"#0033CC",
|
@@ -6606,14 +5985,14 @@ var require_browser = __commonJS({
|
|
6606
5985
|
});
|
6607
5986
|
args.splice(lastC, 0, c);
|
6608
5987
|
}
|
6609
|
-
|
5988
|
+
exports.log = console.debug || console.log || (() => {
|
6610
5989
|
});
|
6611
5990
|
function save(namespaces) {
|
6612
5991
|
try {
|
6613
5992
|
if (namespaces) {
|
6614
|
-
|
5993
|
+
exports.storage.setItem("debug", namespaces);
|
6615
5994
|
} else {
|
6616
|
-
|
5995
|
+
exports.storage.removeItem("debug");
|
6617
5996
|
}
|
6618
5997
|
} catch (error2) {
|
6619
5998
|
}
|
@@ -6621,7 +6000,7 @@ var require_browser = __commonJS({
|
|
6621
6000
|
function load() {
|
6622
6001
|
let r;
|
6623
6002
|
try {
|
6624
|
-
r =
|
6003
|
+
r = exports.storage.getItem("debug");
|
6625
6004
|
} catch (error2) {
|
6626
6005
|
}
|
6627
6006
|
if (!r && typeof process !== "undefined" && "env" in process) {
|
@@ -6635,7 +6014,7 @@ var require_browser = __commonJS({
|
|
6635
6014
|
} catch (error2) {
|
6636
6015
|
}
|
6637
6016
|
}
|
6638
|
-
module2.exports = require_common()(
|
6017
|
+
module2.exports = require_common()(exports);
|
6639
6018
|
var { formatters } = module2.exports;
|
6640
6019
|
formatters.j = function(v) {
|
6641
6020
|
try {
|
@@ -6649,7 +6028,7 @@ var require_browser = __commonJS({
|
|
6649
6028
|
|
6650
6029
|
// node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js
|
6651
6030
|
var require_has_flag = __commonJS({
|
6652
|
-
"node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(
|
6031
|
+
"node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports, module2) {
|
6653
6032
|
"use strict";
|
6654
6033
|
module2.exports = (flag, argv = process.argv) => {
|
6655
6034
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
@@ -6662,7 +6041,7 @@ var require_has_flag = __commonJS({
|
|
6662
6041
|
|
6663
6042
|
// node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
|
6664
6043
|
var require_supports_color = __commonJS({
|
6665
|
-
"node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(
|
6044
|
+
"node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports, module2) {
|
6666
6045
|
"use strict";
|
6667
6046
|
var os2 = require("os");
|
6668
6047
|
var tty2 = require("tty");
|
@@ -6764,25 +6143,25 @@ var require_supports_color = __commonJS({
|
|
6764
6143
|
|
6765
6144
|
// node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js
|
6766
6145
|
var require_node = __commonJS({
|
6767
|
-
"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js"(
|
6146
|
+
"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js"(exports, module2) {
|
6768
6147
|
var tty2 = require("tty");
|
6769
6148
|
var util2 = require("util");
|
6770
|
-
|
6771
|
-
|
6772
|
-
|
6773
|
-
|
6774
|
-
|
6775
|
-
|
6776
|
-
|
6149
|
+
exports.init = init;
|
6150
|
+
exports.log = log;
|
6151
|
+
exports.formatArgs = formatArgs;
|
6152
|
+
exports.save = save;
|
6153
|
+
exports.load = load;
|
6154
|
+
exports.useColors = useColors;
|
6155
|
+
exports.destroy = util2.deprecate(
|
6777
6156
|
() => {
|
6778
6157
|
},
|
6779
6158
|
"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
|
6780
6159
|
);
|
6781
|
-
|
6160
|
+
exports.colors = [6, 2, 3, 4, 5, 1];
|
6782
6161
|
try {
|
6783
6162
|
const supportsColor2 = require_supports_color();
|
6784
6163
|
if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) {
|
6785
|
-
|
6164
|
+
exports.colors = [
|
6786
6165
|
20,
|
6787
6166
|
21,
|
6788
6167
|
26,
|
@@ -6863,7 +6242,7 @@ var require_node = __commonJS({
|
|
6863
6242
|
}
|
6864
6243
|
} catch (error2) {
|
6865
6244
|
}
|
6866
|
-
|
6245
|
+
exports.inspectOpts = Object.keys(process.env).filter((key) => {
|
6867
6246
|
return /^debug_/i.test(key);
|
6868
6247
|
}).reduce((obj, key) => {
|
6869
6248
|
const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_2, k) => {
|
@@ -6883,7 +6262,7 @@ var require_node = __commonJS({
|
|
6883
6262
|
return obj;
|
6884
6263
|
}, {});
|
6885
6264
|
function useColors() {
|
6886
|
-
return "colors" in
|
6265
|
+
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty2.isatty(process.stderr.fd);
|
6887
6266
|
}
|
6888
6267
|
function formatArgs(args) {
|
6889
6268
|
const { namespace: name, useColors: useColors2 } = this;
|
@@ -6898,7 +6277,7 @@ var require_node = __commonJS({
|
|
6898
6277
|
}
|
6899
6278
|
}
|
6900
6279
|
function getDate() {
|
6901
|
-
if (
|
6280
|
+
if (exports.inspectOpts.hideDate) {
|
6902
6281
|
return "";
|
6903
6282
|
}
|
6904
6283
|
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
@@ -6918,12 +6297,12 @@ var require_node = __commonJS({
|
|
6918
6297
|
}
|
6919
6298
|
function init(debug) {
|
6920
6299
|
debug.inspectOpts = {};
|
6921
|
-
const keys = Object.keys(
|
6300
|
+
const keys = Object.keys(exports.inspectOpts);
|
6922
6301
|
for (let i = 0; i < keys.length; i++) {
|
6923
|
-
debug.inspectOpts[keys[i]] =
|
6302
|
+
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
6924
6303
|
}
|
6925
6304
|
}
|
6926
|
-
module2.exports = require_common()(
|
6305
|
+
module2.exports = require_common()(exports);
|
6927
6306
|
var { formatters } = module2.exports;
|
6928
6307
|
formatters.o = function(v) {
|
6929
6308
|
this.inspectOpts.colors = this.useColors;
|
@@ -6938,7 +6317,7 @@ var require_node = __commonJS({
|
|
6938
6317
|
|
6939
6318
|
// node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js
|
6940
6319
|
var require_src2 = __commonJS({
|
6941
|
-
"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js"(
|
6320
|
+
"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js"(exports, module2) {
|
6942
6321
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
6943
6322
|
module2.exports = require_browser();
|
6944
6323
|
} else {
|
@@ -6947,11 +6326,11 @@ var require_src2 = __commonJS({
|
|
6947
6326
|
}
|
6948
6327
|
});
|
6949
6328
|
|
6950
|
-
// node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.19.
|
6329
|
+
// node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.19.7/node_modules/esbuild-register/dist/node.js
|
6951
6330
|
var require_node2 = __commonJS({
|
6952
|
-
"node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.19.
|
6331
|
+
"node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.19.7/node_modules/esbuild-register/dist/node.js"(exports) {
|
6953
6332
|
"use strict";
|
6954
|
-
Object.defineProperty(
|
6333
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6955
6334
|
function _interopRequireDefault2(obj) {
|
6956
6335
|
return obj && obj.__esModule ? obj : { default: obj };
|
6957
6336
|
}
|
@@ -6980,15 +6359,15 @@ var require_node2 = __commonJS({
|
|
6980
6359
|
var __toModule = (module22) => {
|
6981
6360
|
return __exportStar(__markAsModule(__defProp2(module22 != null ? __create2(__getProtoOf2(module22)) : {}, "default", module22 && module22.__esModule && "default" in module22 ? { get: () => module22.default, enumerable: true } : { value: module22, enumerable: true })), module22);
|
6982
6361
|
};
|
6983
|
-
var require_base64 = __commonJS2((
|
6362
|
+
var require_base64 = __commonJS2((exports2) => {
|
6984
6363
|
var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
6985
|
-
|
6364
|
+
exports2.encode = function(number) {
|
6986
6365
|
if (0 <= number && number < intToCharMap.length) {
|
6987
6366
|
return intToCharMap[number];
|
6988
6367
|
}
|
6989
6368
|
throw new TypeError("Must be between 0 and 63: " + number);
|
6990
6369
|
};
|
6991
|
-
|
6370
|
+
exports2.decode = function(charCode) {
|
6992
6371
|
var bigA = 65;
|
6993
6372
|
var bigZ = 90;
|
6994
6373
|
var littleA = 97;
|
@@ -7017,7 +6396,7 @@ var require_node2 = __commonJS({
|
|
7017
6396
|
return -1;
|
7018
6397
|
};
|
7019
6398
|
});
|
7020
|
-
var require_base64_vlq = __commonJS2((
|
6399
|
+
var require_base64_vlq = __commonJS2((exports2) => {
|
7021
6400
|
var base64 = require_base64();
|
7022
6401
|
var VLQ_BASE_SHIFT = 5;
|
7023
6402
|
var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
|
@@ -7031,7 +6410,7 @@ var require_node2 = __commonJS({
|
|
7031
6410
|
var shifted = aValue >> 1;
|
7032
6411
|
return isNegative ? -shifted : shifted;
|
7033
6412
|
}
|
7034
|
-
|
6413
|
+
exports2.encode = function base64VLQ_encode(aValue) {
|
7035
6414
|
var encoded = "";
|
7036
6415
|
var digit;
|
7037
6416
|
var vlq = toVLQSigned(aValue);
|
@@ -7045,7 +6424,7 @@ var require_node2 = __commonJS({
|
|
7045
6424
|
} while (vlq > 0);
|
7046
6425
|
return encoded;
|
7047
6426
|
};
|
7048
|
-
|
6427
|
+
exports2.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
|
7049
6428
|
var strLen = aStr.length;
|
7050
6429
|
var result = 0;
|
7051
6430
|
var shift = 0;
|
@@ -7067,7 +6446,7 @@ var require_node2 = __commonJS({
|
|
7067
6446
|
aOutParam.rest = aIndex;
|
7068
6447
|
};
|
7069
6448
|
});
|
7070
|
-
var require_util = __commonJS2((
|
6449
|
+
var require_util = __commonJS2((exports2) => {
|
7071
6450
|
function getArg(aArgs, aName, aDefaultValue) {
|
7072
6451
|
if (aName in aArgs) {
|
7073
6452
|
return aArgs[aName];
|
@@ -7077,7 +6456,7 @@ var require_node2 = __commonJS({
|
|
7077
6456
|
throw new Error('"' + aName + '" is a required argument.');
|
7078
6457
|
}
|
7079
6458
|
}
|
7080
|
-
|
6459
|
+
exports2.getArg = getArg;
|
7081
6460
|
var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
|
7082
6461
|
var dataUrlRegexp = /^data:.+\,.+$/;
|
7083
6462
|
function urlParse(aUrl) {
|
@@ -7093,7 +6472,7 @@ var require_node2 = __commonJS({
|
|
7093
6472
|
path: match2[5]
|
7094
6473
|
};
|
7095
6474
|
}
|
7096
|
-
|
6475
|
+
exports2.urlParse = urlParse;
|
7097
6476
|
function urlGenerate(aParsedUrl) {
|
7098
6477
|
var url = "";
|
7099
6478
|
if (aParsedUrl.scheme) {
|
@@ -7114,7 +6493,7 @@ var require_node2 = __commonJS({
|
|
7114
6493
|
}
|
7115
6494
|
return url;
|
7116
6495
|
}
|
7117
|
-
|
6496
|
+
exports2.urlGenerate = urlGenerate;
|
7118
6497
|
function normalize(aPath) {
|
7119
6498
|
var path2 = aPath;
|
7120
6499
|
var url = urlParse(aPath);
|
@@ -7124,7 +6503,7 @@ var require_node2 = __commonJS({
|
|
7124
6503
|
}
|
7125
6504
|
path2 = url.path;
|
7126
6505
|
}
|
7127
|
-
var isAbsolute =
|
6506
|
+
var isAbsolute = exports2.isAbsolute(path2);
|
7128
6507
|
var parts = path2.split(/\/+/);
|
7129
6508
|
for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
|
7130
6509
|
part = parts[i];
|
@@ -7152,7 +6531,7 @@ var require_node2 = __commonJS({
|
|
7152
6531
|
}
|
7153
6532
|
return path2;
|
7154
6533
|
}
|
7155
|
-
|
6534
|
+
exports2.normalize = normalize;
|
7156
6535
|
function join2(aRoot, aPath) {
|
7157
6536
|
if (aRoot === "") {
|
7158
6537
|
aRoot = ".";
|
@@ -7185,8 +6564,8 @@ var require_node2 = __commonJS({
|
|
7185
6564
|
}
|
7186
6565
|
return joined;
|
7187
6566
|
}
|
7188
|
-
|
7189
|
-
|
6567
|
+
exports2.join = join2;
|
6568
|
+
exports2.isAbsolute = function(aPath) {
|
7190
6569
|
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
7191
6570
|
};
|
7192
6571
|
function relative(aRoot, aPath) {
|
@@ -7208,7 +6587,7 @@ var require_node2 = __commonJS({
|
|
7208
6587
|
}
|
7209
6588
|
return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
|
7210
6589
|
}
|
7211
|
-
|
6590
|
+
exports2.relative = relative;
|
7212
6591
|
var supportsNullProto = function() {
|
7213
6592
|
var obj = /* @__PURE__ */ Object.create(null);
|
7214
6593
|
return !("__proto__" in obj);
|
@@ -7222,14 +6601,14 @@ var require_node2 = __commonJS({
|
|
7222
6601
|
}
|
7223
6602
|
return aStr;
|
7224
6603
|
}
|
7225
|
-
|
6604
|
+
exports2.toSetString = supportsNullProto ? identity : toSetString;
|
7226
6605
|
function fromSetString(aStr) {
|
7227
6606
|
if (isProtoString(aStr)) {
|
7228
6607
|
return aStr.slice(1);
|
7229
6608
|
}
|
7230
6609
|
return aStr;
|
7231
6610
|
}
|
7232
|
-
|
6611
|
+
exports2.fromSetString = supportsNullProto ? identity : fromSetString;
|
7233
6612
|
function isProtoString(s) {
|
7234
6613
|
if (!s) {
|
7235
6614
|
return false;
|
@@ -7271,7 +6650,7 @@ var require_node2 = __commonJS({
|
|
7271
6650
|
}
|
7272
6651
|
return strcmp(mappingA.name, mappingB.name);
|
7273
6652
|
}
|
7274
|
-
|
6653
|
+
exports2.compareByOriginalPositions = compareByOriginalPositions;
|
7275
6654
|
function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
|
7276
6655
|
var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
7277
6656
|
if (cmp !== 0) {
|
@@ -7295,7 +6674,7 @@ var require_node2 = __commonJS({
|
|
7295
6674
|
}
|
7296
6675
|
return strcmp(mappingA.name, mappingB.name);
|
7297
6676
|
}
|
7298
|
-
|
6677
|
+
exports2.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
|
7299
6678
|
function strcmp(aStr1, aStr2) {
|
7300
6679
|
if (aStr1 === aStr2) {
|
7301
6680
|
return 0;
|
@@ -7334,11 +6713,11 @@ var require_node2 = __commonJS({
|
|
7334
6713
|
}
|
7335
6714
|
return strcmp(mappingA.name, mappingB.name);
|
7336
6715
|
}
|
7337
|
-
|
6716
|
+
exports2.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
|
7338
6717
|
function parseSourceMapInput(str) {
|
7339
6718
|
return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ""));
|
7340
6719
|
}
|
7341
|
-
|
6720
|
+
exports2.parseSourceMapInput = parseSourceMapInput;
|
7342
6721
|
function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
|
7343
6722
|
sourceURL = sourceURL || "";
|
7344
6723
|
if (sourceRoot) {
|
@@ -7362,9 +6741,9 @@ var require_node2 = __commonJS({
|
|
7362
6741
|
}
|
7363
6742
|
return normalize(sourceURL);
|
7364
6743
|
}
|
7365
|
-
|
6744
|
+
exports2.computeSourceURL = computeSourceURL;
|
7366
6745
|
});
|
7367
|
-
var require_array_set = __commonJS2((
|
6746
|
+
var require_array_set = __commonJS2((exports2) => {
|
7368
6747
|
var util2 = require_util();
|
7369
6748
|
var has = Object.prototype.hasOwnProperty;
|
7370
6749
|
var hasNativeMap = typeof Map !== "undefined";
|
@@ -7428,9 +6807,9 @@ var require_node2 = __commonJS({
|
|
7428
6807
|
ArraySet.prototype.toArray = function ArraySet_toArray() {
|
7429
6808
|
return this._array.slice();
|
7430
6809
|
};
|
7431
|
-
|
6810
|
+
exports2.ArraySet = ArraySet;
|
7432
6811
|
});
|
7433
|
-
var require_mapping_list = __commonJS2((
|
6812
|
+
var require_mapping_list = __commonJS2((exports2) => {
|
7434
6813
|
var util2 = require_util();
|
7435
6814
|
function generatedPositionAfter(mappingA, mappingB) {
|
7436
6815
|
var lineA = mappingA.generatedLine;
|
@@ -7463,9 +6842,9 @@ var require_node2 = __commonJS({
|
|
7463
6842
|
}
|
7464
6843
|
return this._array;
|
7465
6844
|
};
|
7466
|
-
|
6845
|
+
exports2.MappingList = MappingList;
|
7467
6846
|
});
|
7468
|
-
var require_source_map_generator = __commonJS2((
|
6847
|
+
var require_source_map_generator = __commonJS2((exports2) => {
|
7469
6848
|
var base64VLQ = require_base64_vlq();
|
7470
6849
|
var util2 = require_util();
|
7471
6850
|
var ArraySet = require_array_set().ArraySet;
|
@@ -7731,11 +7110,11 @@ var require_node2 = __commonJS({
|
|
7731
7110
|
SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
|
7732
7111
|
return JSON.stringify(this.toJSON());
|
7733
7112
|
};
|
7734
|
-
|
7113
|
+
exports2.SourceMapGenerator = SourceMapGenerator;
|
7735
7114
|
});
|
7736
|
-
var require_binary_search = __commonJS2((
|
7737
|
-
|
7738
|
-
|
7115
|
+
var require_binary_search = __commonJS2((exports2) => {
|
7116
|
+
exports2.GREATEST_LOWER_BOUND = 1;
|
7117
|
+
exports2.LEAST_UPPER_BOUND = 2;
|
7739
7118
|
function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
|
7740
7119
|
var mid = Math.floor((aHigh - aLow) / 2) + aLow;
|
7741
7120
|
var cmp = aCompare(aNeedle, aHaystack[mid], true);
|
@@ -7745,7 +7124,7 @@ var require_node2 = __commonJS({
|
|
7745
7124
|
if (aHigh - mid > 1) {
|
7746
7125
|
return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
|
7747
7126
|
}
|
7748
|
-
if (aBias ==
|
7127
|
+
if (aBias == exports2.LEAST_UPPER_BOUND) {
|
7749
7128
|
return aHigh < aHaystack.length ? aHigh : -1;
|
7750
7129
|
} else {
|
7751
7130
|
return mid;
|
@@ -7754,18 +7133,18 @@ var require_node2 = __commonJS({
|
|
7754
7133
|
if (mid - aLow > 1) {
|
7755
7134
|
return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
|
7756
7135
|
}
|
7757
|
-
if (aBias ==
|
7136
|
+
if (aBias == exports2.LEAST_UPPER_BOUND) {
|
7758
7137
|
return mid;
|
7759
7138
|
} else {
|
7760
7139
|
return aLow < 0 ? -1 : aLow;
|
7761
7140
|
}
|
7762
7141
|
}
|
7763
7142
|
}
|
7764
|
-
|
7143
|
+
exports2.search = function search(aNeedle, aHaystack, aCompare, aBias) {
|
7765
7144
|
if (aHaystack.length === 0) {
|
7766
7145
|
return -1;
|
7767
7146
|
}
|
7768
|
-
var index4 = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias ||
|
7147
|
+
var index4 = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports2.GREATEST_LOWER_BOUND);
|
7769
7148
|
if (index4 < 0) {
|
7770
7149
|
return -1;
|
7771
7150
|
}
|
@@ -7778,7 +7157,7 @@ var require_node2 = __commonJS({
|
|
7778
7157
|
return index4;
|
7779
7158
|
};
|
7780
7159
|
});
|
7781
|
-
var require_quick_sort = __commonJS2((
|
7160
|
+
var require_quick_sort = __commonJS2((exports2) => {
|
7782
7161
|
function swap(ary, x, y) {
|
7783
7162
|
var temp = ary[x];
|
7784
7163
|
ary[x] = ary[y];
|
@@ -7805,11 +7184,11 @@ var require_node2 = __commonJS({
|
|
7805
7184
|
doQuickSort(ary, comparator, q + 1, r);
|
7806
7185
|
}
|
7807
7186
|
}
|
7808
|
-
|
7187
|
+
exports2.quickSort = function(ary, comparator) {
|
7809
7188
|
doQuickSort(ary, comparator, 0, ary.length - 1);
|
7810
7189
|
};
|
7811
7190
|
});
|
7812
|
-
var require_source_map_consumer = __commonJS2((
|
7191
|
+
var require_source_map_consumer = __commonJS2((exports2) => {
|
7813
7192
|
var util2 = require_util();
|
7814
7193
|
var binarySearch = require_binary_search();
|
7815
7194
|
var ArraySet = require_array_set().ArraySet;
|
@@ -7926,7 +7305,7 @@ var require_node2 = __commonJS({
|
|
7926
7305
|
}
|
7927
7306
|
return mappings;
|
7928
7307
|
};
|
7929
|
-
|
7308
|
+
exports2.SourceMapConsumer = SourceMapConsumer;
|
7930
7309
|
function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {
|
7931
7310
|
var sourceMap = aSourceMap;
|
7932
7311
|
if (typeof aSourceMap === "string") {
|
@@ -8222,7 +7601,7 @@ var require_node2 = __commonJS({
|
|
8222
7601
|
lastColumn: null
|
8223
7602
|
};
|
8224
7603
|
};
|
8225
|
-
|
7604
|
+
exports2.BasicSourceMapConsumer = BasicSourceMapConsumer;
|
8226
7605
|
function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
|
8227
7606
|
var sourceMap = aSourceMap;
|
8228
7607
|
if (typeof aSourceMap === "string") {
|
@@ -8374,9 +7753,9 @@ var require_node2 = __commonJS({
|
|
8374
7753
|
quickSort(this.__generatedMappings, util2.compareByGeneratedPositionsDeflated);
|
8375
7754
|
quickSort(this.__originalMappings, util2.compareByOriginalPositions);
|
8376
7755
|
};
|
8377
|
-
|
7756
|
+
exports2.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
|
8378
7757
|
});
|
8379
|
-
var require_source_node = __commonJS2((
|
7758
|
+
var require_source_node = __commonJS2((exports2) => {
|
8380
7759
|
var SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
|
8381
7760
|
var util2 = require_util();
|
8382
7761
|
var REGEX_NEWLINE = /(\r?\n)/;
|
@@ -8626,14 +8005,14 @@ var require_node2 = __commonJS({
|
|
8626
8005
|
});
|
8627
8006
|
return { code: generated.code, map: map2 };
|
8628
8007
|
};
|
8629
|
-
|
8008
|
+
exports2.SourceNode = SourceNode;
|
8630
8009
|
});
|
8631
|
-
var require_source_map = __commonJS2((
|
8632
|
-
|
8633
|
-
|
8634
|
-
|
8010
|
+
var require_source_map = __commonJS2((exports2) => {
|
8011
|
+
exports2.SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
|
8012
|
+
exports2.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer;
|
8013
|
+
exports2.SourceNode = require_source_node().SourceNode;
|
8635
8014
|
});
|
8636
|
-
var require_buffer_from = __commonJS2((
|
8015
|
+
var require_buffer_from = __commonJS2((exports2, module22) => {
|
8637
8016
|
var toString = Object.prototype.toString;
|
8638
8017
|
var isModern = typeof Buffer.alloc === "function" && typeof Buffer.allocUnsafe === "function" && typeof Buffer.from === "function";
|
8639
8018
|
function isArrayBuffer(input) {
|
@@ -8678,7 +8057,7 @@ var require_node2 = __commonJS({
|
|
8678
8057
|
}
|
8679
8058
|
module22.exports = bufferFrom;
|
8680
8059
|
});
|
8681
|
-
var require_source_map_support = __commonJS2((
|
8060
|
+
var require_source_map_support = __commonJS2((exports2, module22) => {
|
8682
8061
|
var SourceMapConsumer = require_source_map().SourceMapConsumer;
|
8683
8062
|
var path2 = require("path");
|
8684
8063
|
var fs3;
|
@@ -9052,11 +8431,11 @@ var require_node2 = __commonJS({
|
|
9052
8431
|
}
|
9053
8432
|
var originalRetrieveFileHandlers = retrieveFileHandlers.slice(0);
|
9054
8433
|
var originalRetrieveMapHandlers = retrieveMapHandlers.slice(0);
|
9055
|
-
|
9056
|
-
|
9057
|
-
|
9058
|
-
|
9059
|
-
|
8434
|
+
exports2.wrapCallSite = wrapCallSite;
|
8435
|
+
exports2.getErrorSource = getErrorSource;
|
8436
|
+
exports2.mapSourcePosition = mapSourcePosition;
|
8437
|
+
exports2.retrieveSourceMap = retrieveSourceMap;
|
8438
|
+
exports2.install = function(options) {
|
9060
8439
|
options = options || {};
|
9061
8440
|
if (options.environment) {
|
9062
8441
|
environment = options.environment;
|
@@ -9110,7 +8489,7 @@ var require_node2 = __commonJS({
|
|
9110
8489
|
}
|
9111
8490
|
}
|
9112
8491
|
};
|
9113
|
-
|
8492
|
+
exports2.resetRetrieveHandlers = function() {
|
9114
8493
|
retrieveFileHandlers.length = 0;
|
9115
8494
|
retrieveMapHandlers.length = 0;
|
9116
8495
|
retrieveFileHandlers = originalRetrieveFileHandlers.slice(0);
|
@@ -9119,16 +8498,16 @@ var require_node2 = __commonJS({
|
|
9119
8498
|
retrieveFile = handlerExec(retrieveFileHandlers);
|
9120
8499
|
};
|
9121
8500
|
});
|
9122
|
-
var require_node_modules_regexp = __commonJS2((
|
8501
|
+
var require_node_modules_regexp = __commonJS2((exports2, module22) => {
|
9123
8502
|
"use strict";
|
9124
8503
|
module22.exports = /^(?:.*[\\\/])?node_modules(?:[\\\/].*)?$/;
|
9125
8504
|
});
|
9126
|
-
var require_lib = __commonJS2((
|
8505
|
+
var require_lib = __commonJS2((exports2, module22) => {
|
9127
8506
|
"use strict";
|
9128
|
-
Object.defineProperty(
|
8507
|
+
Object.defineProperty(exports2, "__esModule", {
|
9129
8508
|
value: true
|
9130
8509
|
});
|
9131
|
-
|
8510
|
+
exports2.addHook = addHook2;
|
9132
8511
|
var _module = _interopRequireDefault(require("module"));
|
9133
8512
|
var _path = _interopRequireDefault(require("path"));
|
9134
8513
|
var _nodeModulesRegexp = _interopRequireDefault(require_node_modules_regexp());
|
@@ -9201,12 +8580,12 @@ var require_node2 = __commonJS({
|
|
9201
8580
|
};
|
9202
8581
|
}
|
9203
8582
|
});
|
9204
|
-
var require_lib2 = __commonJS2((
|
8583
|
+
var require_lib2 = __commonJS2((exports2, module22) => {
|
9205
8584
|
"use strict";
|
9206
|
-
Object.defineProperty(
|
8585
|
+
Object.defineProperty(exports2, "__esModule", {
|
9207
8586
|
value: true
|
9208
8587
|
});
|
9209
|
-
|
8588
|
+
exports2.default = void 0;
|
9210
8589
|
var _fs = _interopRequireDefault(require("fs"));
|
9211
8590
|
var _path = _interopRequireDefault(require("path"));
|
9212
8591
|
function _interopRequireDefault(obj) {
|
@@ -9548,14 +8927,14 @@ var require_node2 = __commonJS({
|
|
9548
8927
|
return options;
|
9549
8928
|
}
|
9550
8929
|
};
|
9551
|
-
|
8930
|
+
exports2.default = JoyCon2;
|
9552
8931
|
module22.exports = JoyCon2;
|
9553
8932
|
module22.exports.default = JoyCon2;
|
9554
8933
|
});
|
9555
|
-
var require_filesystem = __commonJS2((
|
8934
|
+
var require_filesystem = __commonJS2((exports2) => {
|
9556
8935
|
"use strict";
|
9557
|
-
Object.defineProperty(
|
9558
|
-
|
8936
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
8937
|
+
exports2.removeExtension = exports2.fileExistsAsync = exports2.readJsonFromDiskAsync = exports2.readJsonFromDiskSync = exports2.fileExistsSync = void 0;
|
9559
8938
|
var fs3 = require("fs");
|
9560
8939
|
function fileExistsSync(path2) {
|
9561
8940
|
if (!fs3.existsSync(path2)) {
|
@@ -9568,14 +8947,14 @@ var require_node2 = __commonJS({
|
|
9568
8947
|
return false;
|
9569
8948
|
}
|
9570
8949
|
}
|
9571
|
-
|
8950
|
+
exports2.fileExistsSync = fileExistsSync;
|
9572
8951
|
function readJsonFromDiskSync(packageJsonPath) {
|
9573
8952
|
if (!fs3.existsSync(packageJsonPath)) {
|
9574
8953
|
return void 0;
|
9575
8954
|
}
|
9576
8955
|
return require(packageJsonPath);
|
9577
8956
|
}
|
9578
|
-
|
8957
|
+
exports2.readJsonFromDiskSync = readJsonFromDiskSync;
|
9579
8958
|
function readJsonFromDiskAsync(path2, callback) {
|
9580
8959
|
fs3.readFile(path2, "utf8", function(err, result) {
|
9581
8960
|
if (err || !result) {
|
@@ -9585,7 +8964,7 @@ var require_node2 = __commonJS({
|
|
9585
8964
|
return callback(void 0, json);
|
9586
8965
|
});
|
9587
8966
|
}
|
9588
|
-
|
8967
|
+
exports2.readJsonFromDiskAsync = readJsonFromDiskAsync;
|
9589
8968
|
function fileExistsAsync(path2, callback2) {
|
9590
8969
|
fs3.stat(path2, function(err, stats) {
|
9591
8970
|
if (err) {
|
@@ -9594,16 +8973,16 @@ var require_node2 = __commonJS({
|
|
9594
8973
|
callback2(void 0, stats ? stats.isFile() : false);
|
9595
8974
|
});
|
9596
8975
|
}
|
9597
|
-
|
8976
|
+
exports2.fileExistsAsync = fileExistsAsync;
|
9598
8977
|
function removeExtension(path2) {
|
9599
8978
|
return path2.substring(0, path2.lastIndexOf(".")) || path2;
|
9600
8979
|
}
|
9601
|
-
|
8980
|
+
exports2.removeExtension = removeExtension;
|
9602
8981
|
});
|
9603
|
-
var require_mapping_entry = __commonJS2((
|
8982
|
+
var require_mapping_entry = __commonJS2((exports2) => {
|
9604
8983
|
"use strict";
|
9605
|
-
Object.defineProperty(
|
9606
|
-
|
8984
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
8985
|
+
exports2.getAbsoluteMappingEntries = void 0;
|
9607
8986
|
var path2 = require("path");
|
9608
8987
|
function getAbsoluteMappingEntries(absoluteBaseUrl, paths, addMatchAll) {
|
9609
8988
|
var sortedKeys = sortByLongestPrefix(Object.keys(paths));
|
@@ -9625,7 +9004,7 @@ var require_node2 = __commonJS({
|
|
9625
9004
|
}
|
9626
9005
|
return absolutePaths;
|
9627
9006
|
}
|
9628
|
-
|
9007
|
+
exports2.getAbsoluteMappingEntries = getAbsoluteMappingEntries;
|
9629
9008
|
function sortByLongestPrefix(arr) {
|
9630
9009
|
return arr.concat().sort(function(a, b) {
|
9631
9010
|
return getPrefixLength(b) - getPrefixLength(a);
|
@@ -9636,10 +9015,10 @@ var require_node2 = __commonJS({
|
|
9636
9015
|
return pattern.substr(0, prefixLength).length;
|
9637
9016
|
}
|
9638
9017
|
});
|
9639
|
-
var require_try_path = __commonJS2((
|
9018
|
+
var require_try_path = __commonJS2((exports2) => {
|
9640
9019
|
"use strict";
|
9641
|
-
Object.defineProperty(
|
9642
|
-
|
9020
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
9021
|
+
exports2.exhaustiveTypeException = exports2.getStrippedPath = exports2.getPathsToTry = void 0;
|
9643
9022
|
var path2 = require("path");
|
9644
9023
|
var path_1 = require("path");
|
9645
9024
|
var filesystem_1 = require_filesystem();
|
@@ -9675,15 +9054,15 @@ var require_node2 = __commonJS({
|
|
9675
9054
|
}
|
9676
9055
|
return pathsToTry.length === 0 ? void 0 : pathsToTry;
|
9677
9056
|
}
|
9678
|
-
|
9057
|
+
exports2.getPathsToTry = getPathsToTry;
|
9679
9058
|
function getStrippedPath(tryPath) {
|
9680
9059
|
return tryPath.type === "index" ? (0, path_1.dirname)(tryPath.path) : tryPath.type === "file" ? tryPath.path : tryPath.type === "extension" ? (0, filesystem_1.removeExtension)(tryPath.path) : tryPath.type === "package" ? tryPath.path : exhaustiveTypeException(tryPath.type);
|
9681
9060
|
}
|
9682
|
-
|
9061
|
+
exports2.getStrippedPath = getStrippedPath;
|
9683
9062
|
function exhaustiveTypeException(check) {
|
9684
9063
|
throw new Error("Unknown type ".concat(check));
|
9685
9064
|
}
|
9686
|
-
|
9065
|
+
exports2.exhaustiveTypeException = exhaustiveTypeException;
|
9687
9066
|
function matchStar(pattern, search) {
|
9688
9067
|
if (search.length < pattern.length) {
|
9689
9068
|
return void 0;
|
@@ -9706,10 +9085,10 @@ var require_node2 = __commonJS({
|
|
9706
9085
|
return search.substr(star2, search.length - part2.length);
|
9707
9086
|
}
|
9708
9087
|
});
|
9709
|
-
var require_match_path_sync = __commonJS2((
|
9088
|
+
var require_match_path_sync = __commonJS2((exports2) => {
|
9710
9089
|
"use strict";
|
9711
|
-
Object.defineProperty(
|
9712
|
-
|
9090
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
9091
|
+
exports2.matchFromAbsolutePaths = exports2.createMatchPath = void 0;
|
9713
9092
|
var path2 = require("path");
|
9714
9093
|
var Filesystem = require_filesystem();
|
9715
9094
|
var MappingEntry = require_mapping_entry();
|
@@ -9726,7 +9105,7 @@ var require_node2 = __commonJS({
|
|
9726
9105
|
return matchFromAbsolutePaths(absolutePaths, requestedModule, readJson, fileExists, extensions, mainFields);
|
9727
9106
|
};
|
9728
9107
|
}
|
9729
|
-
|
9108
|
+
exports2.createMatchPath = createMatchPath2;
|
9730
9109
|
function matchFromAbsolutePaths(absolutePathMappings, requestedModule, readJson, fileExists, extensions, mainFields) {
|
9731
9110
|
if (readJson === void 0) {
|
9732
9111
|
readJson = Filesystem.readJsonFromDiskSync;
|
@@ -9746,7 +9125,7 @@ var require_node2 = __commonJS({
|
|
9746
9125
|
}
|
9747
9126
|
return findFirstExistingPath(tryPaths, readJson, fileExists, mainFields);
|
9748
9127
|
}
|
9749
|
-
|
9128
|
+
exports2.matchFromAbsolutePaths = matchFromAbsolutePaths;
|
9750
9129
|
function findFirstExistingMainFieldMappedFile(packageJson, mainFields, packageJsonPath, fileExists) {
|
9751
9130
|
for (var index4 = 0; index4 < mainFields.length; index4++) {
|
9752
9131
|
var mainFieldSelector = mainFields[index4];
|
@@ -9790,10 +9169,10 @@ var require_node2 = __commonJS({
|
|
9790
9169
|
return void 0;
|
9791
9170
|
}
|
9792
9171
|
});
|
9793
|
-
var require_match_path_async = __commonJS2((
|
9172
|
+
var require_match_path_async = __commonJS2((exports2) => {
|
9794
9173
|
"use strict";
|
9795
|
-
Object.defineProperty(
|
9796
|
-
|
9174
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
9175
|
+
exports2.matchFromAbsolutePathsAsync = exports2.createMatchPathAsync = void 0;
|
9797
9176
|
var path2 = require("path");
|
9798
9177
|
var TryPath = require_try_path();
|
9799
9178
|
var MappingEntry = require_mapping_entry();
|
@@ -9810,7 +9189,7 @@ var require_node2 = __commonJS({
|
|
9810
9189
|
return matchFromAbsolutePathsAsync(absolutePaths, requestedModule, readJson, fileExists, extensions, callback, mainFields);
|
9811
9190
|
};
|
9812
9191
|
}
|
9813
|
-
|
9192
|
+
exports2.createMatchPathAsync = createMatchPathAsync;
|
9814
9193
|
function matchFromAbsolutePathsAsync(absolutePathMappings, requestedModule, readJson, fileExists, extensions, callback, mainFields) {
|
9815
9194
|
if (readJson === void 0) {
|
9816
9195
|
readJson = Filesystem.readJsonFromDiskAsync;
|
@@ -9830,7 +9209,7 @@ var require_node2 = __commonJS({
|
|
9830
9209
|
}
|
9831
9210
|
findFirstExistingPath(tryPaths, readJson, fileExists, callback, 0, mainFields);
|
9832
9211
|
}
|
9833
|
-
|
9212
|
+
exports2.matchFromAbsolutePathsAsync = matchFromAbsolutePathsAsync;
|
9834
9213
|
function findFirstExistingMainFieldMappedFile(packageJson, mainFields, packageJsonPath, fileExistsAsync, doneCallback, index4) {
|
9835
9214
|
if (index4 === void 0) {
|
9836
9215
|
index4 = 0;
|
@@ -9903,12 +9282,12 @@ var require_node2 = __commonJS({
|
|
9903
9282
|
}
|
9904
9283
|
}
|
9905
9284
|
});
|
9906
|
-
var require_unicode = __commonJS2((
|
9285
|
+
var require_unicode = __commonJS2((exports2, module22) => {
|
9907
9286
|
module22.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
9908
9287
|
module22.exports.ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;
|
9909
9288
|
module22.exports.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;
|
9910
9289
|
});
|
9911
|
-
var require_util2 = __commonJS2((
|
9290
|
+
var require_util2 = __commonJS2((exports2, module22) => {
|
9912
9291
|
var unicode = require_unicode();
|
9913
9292
|
module22.exports = {
|
9914
9293
|
isSpaceSeparator(c) {
|
@@ -9928,7 +9307,7 @@ var require_node2 = __commonJS({
|
|
9928
9307
|
}
|
9929
9308
|
};
|
9930
9309
|
});
|
9931
|
-
var require_parse = __commonJS2((
|
9310
|
+
var require_parse = __commonJS2((exports2, module22) => {
|
9932
9311
|
var util2 = require_util2();
|
9933
9312
|
var source;
|
9934
9313
|
var parseState;
|
@@ -10771,7 +10150,7 @@ var require_node2 = __commonJS({
|
|
10771
10150
|
return err;
|
10772
10151
|
}
|
10773
10152
|
});
|
10774
|
-
var require_stringify = __commonJS2((
|
10153
|
+
var require_stringify = __commonJS2((exports2, module22) => {
|
10775
10154
|
var util2 = require_util2();
|
10776
10155
|
module22.exports = function stringify(value, replacer, space) {
|
10777
10156
|
const stack = [];
|
@@ -10986,7 +10365,7 @@ var require_node2 = __commonJS({
|
|
10986
10365
|
}
|
10987
10366
|
};
|
10988
10367
|
});
|
10989
|
-
var require_lib3 = __commonJS2((
|
10368
|
+
var require_lib3 = __commonJS2((exports2, module22) => {
|
10990
10369
|
var parse = require_parse();
|
10991
10370
|
var stringify = require_stringify();
|
10992
10371
|
var JSON5 = {
|
@@ -10995,7 +10374,7 @@ var require_node2 = __commonJS({
|
|
10995
10374
|
};
|
10996
10375
|
module22.exports = JSON5;
|
10997
10376
|
});
|
10998
|
-
var require_strip_bom = __commonJS2((
|
10377
|
+
var require_strip_bom = __commonJS2((exports2, module22) => {
|
10999
10378
|
"use strict";
|
11000
10379
|
module22.exports = (x) => {
|
11001
10380
|
if (typeof x !== "string") {
|
@@ -11007,9 +10386,9 @@ var require_node2 = __commonJS({
|
|
11007
10386
|
return x;
|
11008
10387
|
};
|
11009
10388
|
});
|
11010
|
-
var require_tsconfig_loader = __commonJS2((
|
10389
|
+
var require_tsconfig_loader = __commonJS2((exports2) => {
|
11011
10390
|
"use strict";
|
11012
|
-
var __assign =
|
10391
|
+
var __assign = exports2 && exports2.__assign || function() {
|
11013
10392
|
__assign = Object.assign || function(t) {
|
11014
10393
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
11015
10394
|
s = arguments[i];
|
@@ -11021,8 +10400,8 @@ var require_node2 = __commonJS({
|
|
11021
10400
|
};
|
11022
10401
|
return __assign.apply(this, arguments);
|
11023
10402
|
};
|
11024
|
-
Object.defineProperty(
|
11025
|
-
|
10403
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
10404
|
+
exports2.loadTsconfig = exports2.walkForTsConfig = exports2.tsConfigLoader = void 0;
|
11026
10405
|
var path2 = require("path");
|
11027
10406
|
var fs3 = require("fs");
|
11028
10407
|
var JSON5 = require_lib3();
|
@@ -11034,7 +10413,7 @@ var require_node2 = __commonJS({
|
|
11034
10413
|
var loadResult = loadSync(cwd, TS_NODE_PROJECT, TS_NODE_BASEURL);
|
11035
10414
|
return loadResult;
|
11036
10415
|
}
|
11037
|
-
|
10416
|
+
exports2.tsConfigLoader = tsConfigLoader;
|
11038
10417
|
function loadSyncDefault(cwd, filename, baseUrl) {
|
11039
10418
|
var configPath = resolveConfigPath(cwd, filename);
|
11040
10419
|
if (!configPath) {
|
@@ -11080,7 +10459,7 @@ var require_node2 = __commonJS({
|
|
11080
10459
|
}
|
11081
10460
|
return walkForTsConfig(parentDirectory, readdirSync);
|
11082
10461
|
}
|
11083
|
-
|
10462
|
+
exports2.walkForTsConfig = walkForTsConfig;
|
11084
10463
|
function loadTsconfig(configFilePath, existsSync, readFileSync) {
|
11085
10464
|
if (existsSync === void 0) {
|
11086
10465
|
existsSync = fs3.existsSync;
|
@@ -11115,7 +10494,7 @@ var require_node2 = __commonJS({
|
|
11115
10494
|
}
|
11116
10495
|
return config;
|
11117
10496
|
}
|
11118
|
-
|
10497
|
+
exports2.loadTsconfig = loadTsconfig;
|
11119
10498
|
function loadTsconfigFromExtends(configFilePath, extendedConfigValue, existsSync, readFileSync) {
|
11120
10499
|
var _a;
|
11121
10500
|
if (typeof extendedConfigValue === "string" && extendedConfigValue.indexOf(".json") === -1) {
|
@@ -11139,10 +10518,10 @@ var require_node2 = __commonJS({
|
|
11139
10518
|
return __assign(__assign(__assign({}, base), config), { compilerOptions: __assign(__assign({}, base.compilerOptions), config.compilerOptions) });
|
11140
10519
|
}
|
11141
10520
|
});
|
11142
|
-
var require_config_loader = __commonJS2((
|
10521
|
+
var require_config_loader = __commonJS2((exports2) => {
|
11143
10522
|
"use strict";
|
11144
|
-
Object.defineProperty(
|
11145
|
-
|
10523
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
10524
|
+
exports2.configLoader = exports2.loadConfig = void 0;
|
11146
10525
|
var TsConfigLoader2 = require_tsconfig_loader();
|
11147
10526
|
var path2 = require("path");
|
11148
10527
|
function loadConfig2(cwd) {
|
@@ -11151,7 +10530,7 @@ var require_node2 = __commonJS({
|
|
11151
10530
|
}
|
11152
10531
|
return configLoader({ cwd });
|
11153
10532
|
}
|
11154
|
-
|
10533
|
+
exports2.loadConfig = loadConfig2;
|
11155
10534
|
function configLoader(_a) {
|
11156
10535
|
var cwd = _a.cwd, explicitParams = _a.explicitParams, _b = _a.tsConfigLoader, tsConfigLoader = _b === void 0 ? TsConfigLoader2.tsConfigLoader : _b;
|
11157
10536
|
if (explicitParams) {
|
@@ -11187,9 +10566,9 @@ var require_node2 = __commonJS({
|
|
11187
10566
|
addMatchAll: loadResult.baseUrl !== void 0
|
11188
10567
|
};
|
11189
10568
|
}
|
11190
|
-
|
10569
|
+
exports2.configLoader = configLoader;
|
11191
10570
|
});
|
11192
|
-
var require_minimist = __commonJS2((
|
10571
|
+
var require_minimist = __commonJS2((exports2, module22) => {
|
11193
10572
|
"use strict";
|
11194
10573
|
function hasKey(obj, keys) {
|
11195
10574
|
var o = obj;
|
@@ -11407,9 +10786,9 @@ var require_node2 = __commonJS({
|
|
11407
10786
|
return argv;
|
11408
10787
|
};
|
11409
10788
|
});
|
11410
|
-
var require_register = __commonJS2((
|
10789
|
+
var require_register = __commonJS2((exports2) => {
|
11411
10790
|
"use strict";
|
11412
|
-
var __spreadArray =
|
10791
|
+
var __spreadArray = exports2 && exports2.__spreadArray || function(to, from, pack) {
|
11413
10792
|
if (pack || arguments.length === 2)
|
11414
10793
|
for (var i = 0, l = from.length, ar; i < l; i++) {
|
11415
10794
|
if (ar || !(i in from)) {
|
@@ -11420,8 +10799,8 @@ var require_node2 = __commonJS({
|
|
11420
10799
|
}
|
11421
10800
|
return to.concat(ar || Array.prototype.slice.call(from));
|
11422
10801
|
};
|
11423
|
-
Object.defineProperty(
|
11424
|
-
|
10802
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
10803
|
+
exports2.register = void 0;
|
11425
10804
|
var match_path_sync_1 = require_match_path_sync();
|
11426
10805
|
var config_loader_1 = require_config_loader();
|
11427
10806
|
var noOp2 = function() {
|
@@ -11509,32 +10888,32 @@ var require_node2 = __commonJS({
|
|
11509
10888
|
Module._resolveFilename = originalResolveFilename;
|
11510
10889
|
};
|
11511
10890
|
}
|
11512
|
-
|
10891
|
+
exports2.register = register2;
|
11513
10892
|
});
|
11514
|
-
var require_lib4 = __commonJS2((
|
10893
|
+
var require_lib4 = __commonJS2((exports2) => {
|
11515
10894
|
"use strict";
|
11516
|
-
Object.defineProperty(
|
11517
|
-
|
10895
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
10896
|
+
exports2.loadConfig = exports2.register = exports2.matchFromAbsolutePathsAsync = exports2.createMatchPathAsync = exports2.matchFromAbsolutePaths = exports2.createMatchPath = void 0;
|
11518
10897
|
var match_path_sync_1 = require_match_path_sync();
|
11519
|
-
Object.defineProperty(
|
10898
|
+
Object.defineProperty(exports2, "createMatchPath", { enumerable: true, get: function() {
|
11520
10899
|
return match_path_sync_1.createMatchPath;
|
11521
10900
|
} });
|
11522
|
-
Object.defineProperty(
|
10901
|
+
Object.defineProperty(exports2, "matchFromAbsolutePaths", { enumerable: true, get: function() {
|
11523
10902
|
return match_path_sync_1.matchFromAbsolutePaths;
|
11524
10903
|
} });
|
11525
10904
|
var match_path_async_1 = require_match_path_async();
|
11526
|
-
Object.defineProperty(
|
10905
|
+
Object.defineProperty(exports2, "createMatchPathAsync", { enumerable: true, get: function() {
|
11527
10906
|
return match_path_async_1.createMatchPathAsync;
|
11528
10907
|
} });
|
11529
|
-
Object.defineProperty(
|
10908
|
+
Object.defineProperty(exports2, "matchFromAbsolutePathsAsync", { enumerable: true, get: function() {
|
11530
10909
|
return match_path_async_1.matchFromAbsolutePathsAsync;
|
11531
10910
|
} });
|
11532
10911
|
var register_1 = require_register();
|
11533
|
-
Object.defineProperty(
|
10912
|
+
Object.defineProperty(exports2, "register", { enumerable: true, get: function() {
|
11534
10913
|
return register_1.register;
|
11535
10914
|
} });
|
11536
10915
|
var config_loader_1 = require_config_loader();
|
11537
|
-
Object.defineProperty(
|
10916
|
+
Object.defineProperty(exports2, "loadConfig", { enumerable: true, get: function() {
|
11538
10917
|
return config_loader_1.loadConfig;
|
11539
10918
|
} });
|
11540
10919
|
});
|
@@ -11800,7 +11179,7 @@ var require_node2 = __commonJS({
|
|
11800
11179
|
}
|
11801
11180
|
};
|
11802
11181
|
}
|
11803
|
-
|
11182
|
+
exports.register = register;
|
11804
11183
|
}
|
11805
11184
|
});
|
11806
11185
|
|
@@ -11810,6 +11189,7 @@ var init_utils2 = __esm({
|
|
11810
11189
|
"src/cli/commands/utils.ts"() {
|
11811
11190
|
"use strict";
|
11812
11191
|
init_serializer();
|
11192
|
+
init_source();
|
11813
11193
|
init_views();
|
11814
11194
|
import_hanji2 = __toESM(require_hanji());
|
11815
11195
|
init_global();
|
@@ -11871,11 +11251,11 @@ var init_pgImports = __esm({
|
|
11871
11251
|
import_pg_core = require("drizzle-orm/pg-core");
|
11872
11252
|
import_drizzle_orm = require("drizzle-orm");
|
11873
11253
|
init_utils2();
|
11874
|
-
prepareFromExports = (
|
11254
|
+
prepareFromExports = (exports) => {
|
11875
11255
|
const tables = [];
|
11876
11256
|
const enums = [];
|
11877
11257
|
const schemas = [];
|
11878
|
-
const i0values = Object.values(
|
11258
|
+
const i0values = Object.values(exports);
|
11879
11259
|
i0values.forEach((t) => {
|
11880
11260
|
if ((0, import_pg_core.isPgEnum)(t)) {
|
11881
11261
|
enums.push(t);
|
@@ -12122,7 +11502,7 @@ ${withStyle.errorWarning(
|
|
12122
11502
|
);
|
12123
11503
|
return {
|
12124
11504
|
version: "6",
|
12125
|
-
dialect: "
|
11505
|
+
dialect: "postgresql",
|
12126
11506
|
tables: result,
|
12127
11507
|
enums: enumsToReturn,
|
12128
11508
|
schemas: schemasObject,
|
@@ -12329,7 +11709,7 @@ ${withStyle.errorWarning(
|
|
12329
11709
|
const columnName = columnResponse.attname;
|
12330
11710
|
const columnAdditionalDT = columnResponse.additional_dt;
|
12331
11711
|
const columnDimensions = columnResponse.array_dimensions;
|
12332
|
-
const
|
11712
|
+
const enumType3 = columnResponse.enum_name;
|
12333
11713
|
let columnType = columnResponse.data_type;
|
12334
11714
|
const primaryKey = tableConstraints.filter(
|
12335
11715
|
(mapRow) => columnName === mapRow.column_name && mapRow.constraint_type === "PRIMARY KEY"
|
@@ -12393,8 +11773,8 @@ ${withStyle.errorWarning(
|
|
12393
11773
|
columnTypeMapped = trimChar(columnTypeMapped, '"');
|
12394
11774
|
columnToReturn[columnName] = {
|
12395
11775
|
name: columnName,
|
12396
|
-
type: columnAdditionalDT === "USER-DEFINED" ?
|
12397
|
-
typeSchema: enumsToReturn[`${tableSchema}.${
|
11776
|
+
type: columnAdditionalDT === "USER-DEFINED" ? enumType3 : columnTypeMapped,
|
11777
|
+
typeSchema: enumsToReturn[`${tableSchema}.${enumType3}`] !== void 0 ? enumsToReturn[`${tableSchema}.${enumType3}`].schema : void 0,
|
12398
11778
|
primaryKey: primaryKey.length === 1 && cprimaryKey.length < 2,
|
12399
11779
|
// default: isSerial ? undefined : defaultValue,
|
12400
11780
|
notNull: columnResponse.is_nullable === "NO"
|
@@ -12477,7 +11857,7 @@ ${withStyle.errorWarning(
|
|
12477
11857
|
const schemasObject = Object.fromEntries([...schemas].map((it) => [it, it]));
|
12478
11858
|
return {
|
12479
11859
|
version: "6",
|
12480
|
-
dialect: "
|
11860
|
+
dialect: "postgresql",
|
12481
11861
|
tables: result,
|
12482
11862
|
enums: enumsToReturn,
|
12483
11863
|
schemas: schemasObject,
|
@@ -12569,7 +11949,7 @@ var init_migrationPreparator = __esm({
|
|
12569
11949
|
|
12570
11950
|
// node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js
|
12571
11951
|
var require_balanced_match = __commonJS({
|
12572
|
-
"node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js"(
|
11952
|
+
"node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js"(exports, module2) {
|
12573
11953
|
"use strict";
|
12574
11954
|
module2.exports = balanced;
|
12575
11955
|
function balanced(a, b, str) {
|
@@ -12629,7 +12009,7 @@ var require_balanced_match = __commonJS({
|
|
12629
12009
|
|
12630
12010
|
// node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js
|
12631
12011
|
var require_brace_expansion = __commonJS({
|
12632
|
-
"node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js"(
|
12012
|
+
"node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js"(exports, module2) {
|
12633
12013
|
var balanced = require_balanced_match();
|
12634
12014
|
module2.exports = expandTop;
|
12635
12015
|
var escSlash = "\0SLASH" + Math.random() + "\0";
|
@@ -12778,10 +12158,10 @@ var require_brace_expansion = __commonJS({
|
|
12778
12158
|
}
|
12779
12159
|
});
|
12780
12160
|
|
12781
|
-
// node_modules/.pnpm/minimatch@7.4.
|
12161
|
+
// node_modules/.pnpm/minimatch@7.4.3/node_modules/minimatch/dist/mjs/brace-expressions.js
|
12782
12162
|
var posixClasses, braceEscape, regexpEscape, rangesToString, parseClass;
|
12783
12163
|
var init_brace_expressions = __esm({
|
12784
|
-
"node_modules/.pnpm/minimatch@7.4.
|
12164
|
+
"node_modules/.pnpm/minimatch@7.4.3/node_modules/minimatch/dist/mjs/brace-expressions.js"() {
|
12785
12165
|
posixClasses = {
|
12786
12166
|
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
|
12787
12167
|
"[:alpha:]": ["\\p{L}\\p{Nl}", true],
|
@@ -12893,30 +12273,30 @@ var init_brace_expressions = __esm({
|
|
12893
12273
|
}
|
12894
12274
|
});
|
12895
12275
|
|
12896
|
-
// node_modules/.pnpm/minimatch@7.4.
|
12276
|
+
// node_modules/.pnpm/minimatch@7.4.3/node_modules/minimatch/dist/mjs/escape.js
|
12897
12277
|
var escape;
|
12898
12278
|
var init_escape = __esm({
|
12899
|
-
"node_modules/.pnpm/minimatch@7.4.
|
12279
|
+
"node_modules/.pnpm/minimatch@7.4.3/node_modules/minimatch/dist/mjs/escape.js"() {
|
12900
12280
|
escape = (s, { windowsPathsNoEscape = false } = {}) => {
|
12901
12281
|
return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
|
12902
12282
|
};
|
12903
12283
|
}
|
12904
12284
|
});
|
12905
12285
|
|
12906
|
-
// node_modules/.pnpm/minimatch@7.4.
|
12286
|
+
// node_modules/.pnpm/minimatch@7.4.3/node_modules/minimatch/dist/mjs/unescape.js
|
12907
12287
|
var unescape;
|
12908
12288
|
var init_unescape = __esm({
|
12909
|
-
"node_modules/.pnpm/minimatch@7.4.
|
12289
|
+
"node_modules/.pnpm/minimatch@7.4.3/node_modules/minimatch/dist/mjs/unescape.js"() {
|
12910
12290
|
unescape = (s, { windowsPathsNoEscape = false } = {}) => {
|
12911
12291
|
return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
|
12912
12292
|
};
|
12913
12293
|
}
|
12914
12294
|
});
|
12915
12295
|
|
12916
|
-
// node_modules/.pnpm/minimatch@7.4.
|
12296
|
+
// node_modules/.pnpm/minimatch@7.4.3/node_modules/minimatch/dist/mjs/index.js
|
12917
12297
|
var import_brace_expansion, minimatch, starDotExtRE, starDotExtTest, starDotExtTestDot, starDotExtTestNocase, starDotExtTestNocaseDot, starDotStarRE, starDotStarTest, starDotStarTestDot, dotStarRE, dotStarTest, starRE, starTest, starTestDot, qmarksRE, qmarksTestNocase, qmarksTestNocaseDot, qmarksTestDot, qmarksTest, qmarksTestNoExt, qmarksTestNoExtDot, defaultPlatform, path, sep, GLOBSTAR, plTypes, qmark, star, twoStarDot, twoStarNoDot, charSet, reSpecials, addPatternStartSet, filter, ext, defaults, braceExpand, MAX_PATTERN_LENGTH, assertValidPattern, makeRe, match, globUnescape, globMagic, regExpEscape, Minimatch;
|
12918
12298
|
var init_mjs = __esm({
|
12919
|
-
"node_modules/.pnpm/minimatch@7.4.
|
12299
|
+
"node_modules/.pnpm/minimatch@7.4.3/node_modules/minimatch/dist/mjs/index.js"() {
|
12920
12300
|
import_brace_expansion = __toESM(require_brace_expansion(), 1);
|
12921
12301
|
init_brace_expressions();
|
12922
12302
|
init_escape();
|
@@ -15708,7 +15088,7 @@ var init_snapshotsDiffer = __esm({
|
|
15708
15088
|
const jsonTableAlternations = alteredTables.map((it) => {
|
15709
15089
|
return preparePgAlterColumns(it.name, it.schema, it.altered, json2);
|
15710
15090
|
}).flat();
|
15711
|
-
const
|
15091
|
+
const jsonCreateIndexesFoAlteredTables = alteredTables.map((it) => {
|
15712
15092
|
return prepareCreateIndexesJson(
|
15713
15093
|
it.name,
|
15714
15094
|
it.schema,
|
@@ -15737,14 +15117,21 @@ var init_snapshotsDiffer = __esm({
|
|
15737
15117
|
},
|
15738
15118
|
{}
|
15739
15119
|
);
|
15740
|
-
|
15120
|
+
jsonCreateIndexesFoAlteredTables.push(
|
15741
15121
|
...prepareCreateIndexesJson(it.name, it.schema, createdIndexes || {})
|
15742
15122
|
);
|
15743
15123
|
jsonDropIndexesForAllAlteredTables.push(
|
15744
15124
|
...prepareDropIndexesJson(it.name, it.schema, droppedIndexes || {})
|
15745
15125
|
);
|
15746
15126
|
});
|
15747
|
-
const
|
15127
|
+
const jsonCreateReferencesForCreatedTables = createdTables.map((it) => {
|
15128
|
+
return prepareCreateReferencesJson(
|
15129
|
+
it.name,
|
15130
|
+
it.schema,
|
15131
|
+
it.foreignKeys
|
15132
|
+
);
|
15133
|
+
}).flat();
|
15134
|
+
const jsonReferencesForAlteredTables = alteredTables.map((it) => {
|
15748
15135
|
const forAdded = prepareCreateReferencesJson(
|
15749
15136
|
it.name,
|
15750
15137
|
it.schema,
|
@@ -15762,10 +15149,10 @@ var init_snapshotsDiffer = __esm({
|
|
15762
15149
|
);
|
15763
15150
|
return [...forAdded, ...forAltered, ...alteredFKs];
|
15764
15151
|
}).flat();
|
15765
|
-
const jsonCreatedReferencesForAlteredTables =
|
15152
|
+
const jsonCreatedReferencesForAlteredTables = jsonReferencesForAlteredTables.filter(
|
15766
15153
|
(t) => t.type === "create_reference"
|
15767
15154
|
);
|
15768
|
-
const jsonDroppedReferencesForAlteredTables =
|
15155
|
+
const jsonDroppedReferencesForAlteredTables = jsonReferencesForAlteredTables.filter(
|
15769
15156
|
(t) => t.type === "delete_reference"
|
15770
15157
|
);
|
15771
15158
|
const createEnums = createdEnums.map((it) => {
|
@@ -15792,7 +15179,7 @@ var init_snapshotsDiffer = __esm({
|
|
15792
15179
|
const dropSchemas = prepareDeleteSchemasJson(
|
15793
15180
|
deletedSchemas.map((it) => it.name)
|
15794
15181
|
);
|
15795
|
-
const
|
15182
|
+
const createTables = createdTables.map((it) => {
|
15796
15183
|
return preparePgCreateTableJson(it, curFull);
|
15797
15184
|
});
|
15798
15185
|
jsonStatements.push(...createSchemas);
|
@@ -15801,7 +15188,7 @@ var init_snapshotsDiffer = __esm({
|
|
15801
15188
|
jsonStatements.push(...moveEnums);
|
15802
15189
|
jsonStatements.push(...renameEnums);
|
15803
15190
|
jsonStatements.push(...jsonAlterEnumsWithAddedValues);
|
15804
|
-
jsonStatements.push(...
|
15191
|
+
jsonStatements.push(...createTables);
|
15805
15192
|
jsonStatements.push(...jsonDropTables);
|
15806
15193
|
jsonStatements.push(...jsonSetTableSchemas);
|
15807
15194
|
jsonStatements.push(...jsonRenameTables);
|
@@ -15812,15 +15199,16 @@ var init_snapshotsDiffer = __esm({
|
|
15812
15199
|
jsonStatements.push(...jsonTableAlternations);
|
15813
15200
|
jsonStatements.push(...jsonAddedCompositePKs);
|
15814
15201
|
jsonStatements.push(...jsonAddColumnsStatemets);
|
15202
|
+
jsonStatements.push(...jsonCreateReferencesForCreatedTables);
|
15815
15203
|
jsonStatements.push(...jsonCreateIndexesForCreatedTables);
|
15816
|
-
jsonStatements.push(...jsonCreateIndexesForAllAlteredTables);
|
15817
15204
|
jsonStatements.push(...jsonCreatedReferencesForAlteredTables);
|
15205
|
+
jsonStatements.push(...jsonCreateIndexesFoAlteredTables);
|
15818
15206
|
jsonStatements.push(...jsonDropColumnsStatemets);
|
15819
15207
|
jsonStatements.push(...jsonAlteredCompositePKs);
|
15820
15208
|
jsonStatements.push(...jsonAlteredUniqueConstraints);
|
15821
15209
|
jsonStatements.push(...dropEnums);
|
15822
15210
|
jsonStatements.push(...dropSchemas);
|
15823
|
-
const sqlStatements = fromJson(jsonStatements, "
|
15211
|
+
const sqlStatements = fromJson(jsonStatements, "postgresql");
|
15824
15212
|
const uniqueSqlStatements = [];
|
15825
15213
|
sqlStatements.forEach((ss) => {
|
15826
15214
|
if (!uniqueSqlStatements.includes(ss)) {
|
@@ -16073,6 +15461,13 @@ var init_snapshotsDiffer = __esm({
|
|
16073
15461
|
...prepareDropIndexesJson(it.name, it.schema, droppedIndexes || {})
|
16074
15462
|
);
|
16075
15463
|
});
|
15464
|
+
const jsonCreateReferencesForCreatedTables = createdTables.map((it) => {
|
15465
|
+
return prepareCreateReferencesJson(
|
15466
|
+
it.name,
|
15467
|
+
it.schema,
|
15468
|
+
it.foreignKeys
|
15469
|
+
);
|
15470
|
+
}).flat();
|
16076
15471
|
const jsonReferencesForAllAlteredTables = alteredTables.map((it) => {
|
16077
15472
|
const forAdded = prepareCreateReferencesJson(
|
16078
15473
|
it.name,
|
@@ -16113,9 +15508,10 @@ var init_snapshotsDiffer = __esm({
|
|
16113
15508
|
jsonStatements.push(...jsonAddedUniqueConstraints);
|
16114
15509
|
jsonStatements.push(...jsonDeletedUniqueConstraints);
|
16115
15510
|
jsonStatements.push(...jsonAddColumnsStatemets);
|
15511
|
+
jsonStatements.push(...jsonCreateReferencesForCreatedTables);
|
16116
15512
|
jsonStatements.push(...jsonCreateIndexesForCreatedTables);
|
16117
|
-
jsonStatements.push(...jsonCreateIndexesForAllAlteredTables);
|
16118
15513
|
jsonStatements.push(...jsonCreatedReferencesForAlteredTables);
|
15514
|
+
jsonStatements.push(...jsonCreateIndexesForAllAlteredTables);
|
16119
15515
|
jsonStatements.push(...jsonDropColumnsStatemets);
|
16120
15516
|
jsonStatements.push(...jsonAlteredCompositePKs);
|
16121
15517
|
jsonStatements.push(...jsonAddedUniqueConstraints);
|
@@ -16700,7 +16096,7 @@ var init_sqlgenerator = __esm({
|
|
16700
16096
|
};
|
16701
16097
|
PgCreateTableConvertor = class extends Convertor {
|
16702
16098
|
can(statement, dialect7) {
|
16703
|
-
return statement.type === "create_table" && dialect7 === "
|
16099
|
+
return statement.type === "create_table" && dialect7 === "postgresql";
|
16704
16100
|
}
|
16705
16101
|
convert(st) {
|
16706
16102
|
const { tableName, schema: schema4, columns, compositePKs, uniqueConstraints } = st;
|
@@ -16842,7 +16238,7 @@ var init_sqlgenerator = __esm({
|
|
16842
16238
|
};
|
16843
16239
|
PgAlterTableAddUniqueConstraintConvertor = class extends Convertor {
|
16844
16240
|
can(statement, dialect7) {
|
16845
|
-
return statement.type === "create_unique_constraint" && dialect7 === "
|
16241
|
+
return statement.type === "create_unique_constraint" && dialect7 === "postgresql";
|
16846
16242
|
}
|
16847
16243
|
convert(statement) {
|
16848
16244
|
const unsquashed = PgSquasher.unsquashUnique(statement.data);
|
@@ -16852,7 +16248,7 @@ var init_sqlgenerator = __esm({
|
|
16852
16248
|
};
|
16853
16249
|
PgAlterTableDropUniqueConstraintConvertor = class extends Convertor {
|
16854
16250
|
can(statement, dialect7) {
|
16855
|
-
return statement.type === "delete_unique_constraint" && dialect7 === "
|
16251
|
+
return statement.type === "delete_unique_constraint" && dialect7 === "postgresql";
|
16856
16252
|
}
|
16857
16253
|
convert(statement) {
|
16858
16254
|
const unsquashed = PgSquasher.unsquashUnique(statement.data);
|
@@ -16941,7 +16337,7 @@ var init_sqlgenerator = __esm({
|
|
16941
16337
|
};
|
16942
16338
|
PgDropTableConvertor = class extends Convertor {
|
16943
16339
|
can(statement, dialect7) {
|
16944
|
-
return statement.type === "drop_table" && dialect7 === "
|
16340
|
+
return statement.type === "drop_table" && dialect7 === "postgresql";
|
16945
16341
|
}
|
16946
16342
|
convert(statement) {
|
16947
16343
|
const { tableName, schema: schema4 } = statement;
|
@@ -16969,7 +16365,7 @@ var init_sqlgenerator = __esm({
|
|
16969
16365
|
};
|
16970
16366
|
PgRenameTableConvertor = class extends Convertor {
|
16971
16367
|
can(statement, dialect7) {
|
16972
|
-
return statement.type === "rename_table" && dialect7 === "
|
16368
|
+
return statement.type === "rename_table" && dialect7 === "postgresql";
|
16973
16369
|
}
|
16974
16370
|
convert(statement) {
|
16975
16371
|
const { tableNameFrom, tableNameTo, toSchema, fromSchema } = statement;
|
@@ -17000,7 +16396,7 @@ var init_sqlgenerator = __esm({
|
|
17000
16396
|
};
|
17001
16397
|
PgAlterTableRenameColumnConvertor = class extends Convertor {
|
17002
16398
|
can(statement, dialect7) {
|
17003
|
-
return statement.type === "alter_table_rename_column" && dialect7 === "
|
16399
|
+
return statement.type === "alter_table_rename_column" && dialect7 === "postgresql";
|
17004
16400
|
}
|
17005
16401
|
convert(statement) {
|
17006
16402
|
const { tableName, oldColumnName, newColumnName, schema: schema4 } = statement;
|
@@ -17028,7 +16424,7 @@ var init_sqlgenerator = __esm({
|
|
17028
16424
|
};
|
17029
16425
|
PgAlterTableDropColumnConvertor = class extends Convertor {
|
17030
16426
|
can(statement, dialect7) {
|
17031
|
-
return statement.type === "alter_table_drop_column" && dialect7 === "
|
16427
|
+
return statement.type === "alter_table_drop_column" && dialect7 === "postgresql";
|
17032
16428
|
}
|
17033
16429
|
convert(statement) {
|
17034
16430
|
const { tableName, columnName, schema: schema4 } = statement;
|
@@ -17056,7 +16452,7 @@ var init_sqlgenerator = __esm({
|
|
17056
16452
|
};
|
17057
16453
|
PgAlterTableAddColumnConvertor = class extends Convertor {
|
17058
16454
|
can(statement, dialect7) {
|
17059
|
-
return statement.type === "alter_table_add_column" && dialect7 === "
|
16455
|
+
return statement.type === "alter_table_add_column" && dialect7 === "postgresql";
|
17060
16456
|
}
|
17061
16457
|
convert(statement) {
|
17062
16458
|
const { tableName, column: column4, schema: schema4 } = statement;
|
@@ -17101,7 +16497,7 @@ var init_sqlgenerator = __esm({
|
|
17101
16497
|
};
|
17102
16498
|
PgAlterTableAlterColumnSetTypeConvertor = class extends Convertor {
|
17103
16499
|
can(statement, dialect7) {
|
17104
|
-
return statement.type === "alter_table_alter_column_set_type" && dialect7 === "
|
16500
|
+
return statement.type === "alter_table_alter_column_set_type" && dialect7 === "postgresql";
|
17105
16501
|
}
|
17106
16502
|
convert(statement) {
|
17107
16503
|
const { tableName, columnName, newDataType, schema: schema4 } = statement;
|
@@ -17126,7 +16522,7 @@ var init_sqlgenerator = __esm({
|
|
17126
16522
|
};
|
17127
16523
|
PgAlterTableAlterColumnSetDefaultConvertor = class extends Convertor {
|
17128
16524
|
can(statement, dialect7) {
|
17129
|
-
return statement.type === "alter_table_alter_column_set_default" && dialect7 === "
|
16525
|
+
return statement.type === "alter_table_alter_column_set_default" && dialect7 === "postgresql";
|
17130
16526
|
}
|
17131
16527
|
convert(statement) {
|
17132
16528
|
const { tableName, columnName, schema: schema4 } = statement;
|
@@ -17151,7 +16547,7 @@ var init_sqlgenerator = __esm({
|
|
17151
16547
|
};
|
17152
16548
|
PgAlterTableAlterColumnDropDefaultConvertor = class extends Convertor {
|
17153
16549
|
can(statement, dialect7) {
|
17154
|
-
return statement.type === "alter_table_alter_column_drop_default" && dialect7 === "
|
16550
|
+
return statement.type === "alter_table_alter_column_drop_default" && dialect7 === "postgresql";
|
17155
16551
|
}
|
17156
16552
|
convert(statement) {
|
17157
16553
|
const { tableName, columnName, schema: schema4 } = statement;
|
@@ -17263,7 +16659,7 @@ var init_sqlgenerator = __esm({
|
|
17263
16659
|
};
|
17264
16660
|
PgAlterTableCreateCompositePrimaryKeyConvertor = class extends Convertor {
|
17265
16661
|
can(statement, dialect7) {
|
17266
|
-
return statement.type === "create_composite_pk" && dialect7 === "
|
16662
|
+
return statement.type === "create_composite_pk" && dialect7 === "postgresql";
|
17267
16663
|
}
|
17268
16664
|
convert(statement) {
|
17269
16665
|
const { name, columns } = PgSquasher.unsquashPK(statement.data);
|
@@ -17273,7 +16669,7 @@ var init_sqlgenerator = __esm({
|
|
17273
16669
|
};
|
17274
16670
|
PgAlterTableDeleteCompositePrimaryKeyConvertor = class extends Convertor {
|
17275
16671
|
can(statement, dialect7) {
|
17276
|
-
return statement.type === "delete_composite_pk" && dialect7 === "
|
16672
|
+
return statement.type === "delete_composite_pk" && dialect7 === "postgresql";
|
17277
16673
|
}
|
17278
16674
|
convert(statement) {
|
17279
16675
|
const { name, columns } = PgSquasher.unsquashPK(statement.data);
|
@@ -17283,7 +16679,7 @@ var init_sqlgenerator = __esm({
|
|
17283
16679
|
};
|
17284
16680
|
PgAlterTableAlterCompositePrimaryKeyConvertor = class extends Convertor {
|
17285
16681
|
can(statement, dialect7) {
|
17286
|
-
return statement.type === "alter_composite_pk" && dialect7 === "
|
16682
|
+
return statement.type === "alter_composite_pk" && dialect7 === "postgresql";
|
17287
16683
|
}
|
17288
16684
|
convert(statement) {
|
17289
16685
|
const { name, columns } = PgSquasher.unsquashPK(statement.old);
|
@@ -17406,7 +16802,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
|
|
17406
16802
|
};
|
17407
16803
|
PgAlterTableAlterColumnSetPrimaryKeyConvertor = class extends Convertor {
|
17408
16804
|
can(statement, dialect7) {
|
17409
|
-
return statement.type === "alter_table_alter_column_set_pk" && dialect7 === "
|
16805
|
+
return statement.type === "alter_table_alter_column_set_pk" && dialect7 === "postgresql";
|
17410
16806
|
}
|
17411
16807
|
convert(statement) {
|
17412
16808
|
const { tableName, columnName } = statement;
|
@@ -17416,7 +16812,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
|
|
17416
16812
|
};
|
17417
16813
|
PgAlterTableAlterColumnDropPrimaryKeyConvertor = class extends Convertor {
|
17418
16814
|
can(statement, dialect7) {
|
17419
|
-
return statement.type === "alter_table_alter_column_drop_pk" && dialect7 === "
|
16815
|
+
return statement.type === "alter_table_alter_column_drop_pk" && dialect7 === "postgresql";
|
17420
16816
|
}
|
17421
16817
|
convert(statement) {
|
17422
16818
|
const { tableName, columnName, schema: schema4 } = statement;
|
@@ -17440,7 +16836,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
|
|
17440
16836
|
};
|
17441
16837
|
PgAlterTableAlterColumnSetNotNullConvertor = class extends Convertor {
|
17442
16838
|
can(statement, dialect7) {
|
17443
|
-
return statement.type === "alter_table_alter_column_set_notnull" && dialect7 === "
|
16839
|
+
return statement.type === "alter_table_alter_column_set_notnull" && dialect7 === "postgresql";
|
17444
16840
|
}
|
17445
16841
|
convert(statement) {
|
17446
16842
|
const { tableName, columnName } = statement;
|
@@ -17495,7 +16891,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
|
|
17495
16891
|
};
|
17496
16892
|
PgAlterTableAlterColumnDropNotNullConvertor = class extends Convertor {
|
17497
16893
|
can(statement, dialect7) {
|
17498
|
-
return statement.type === "alter_table_alter_column_drop_notnull" && dialect7 === "
|
16894
|
+
return statement.type === "alter_table_alter_column_drop_notnull" && dialect7 === "postgresql";
|
17499
16895
|
}
|
17500
16896
|
convert(statement) {
|
17501
16897
|
const { tableName, columnName } = statement;
|
@@ -17520,7 +16916,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
|
|
17520
16916
|
};
|
17521
16917
|
PgCreateForeignKeyConvertor = class extends Convertor {
|
17522
16918
|
can(statement, dialect7) {
|
17523
|
-
return statement.type === "create_reference" && dialect7 === "
|
16919
|
+
return statement.type === "create_reference" && dialect7 === "postgresql";
|
17524
16920
|
}
|
17525
16921
|
convert(statement) {
|
17526
16922
|
const {
|
@@ -17585,7 +16981,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
|
|
17585
16981
|
};
|
17586
16982
|
PgAlterForeignKeyConvertor = class extends Convertor {
|
17587
16983
|
can(statement, dialect7) {
|
17588
|
-
return statement.type === "alter_reference" && dialect7 === "
|
16984
|
+
return statement.type === "alter_reference" && dialect7 === "postgresql";
|
17589
16985
|
}
|
17590
16986
|
convert(statement) {
|
17591
16987
|
const newFk = PgSquasher.unsquashFK(statement.data);
|
@@ -17624,7 +17020,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
|
|
17624
17020
|
};
|
17625
17021
|
PgDeleteForeignKeyConvertor = class extends Convertor {
|
17626
17022
|
can(statement, dialect7) {
|
17627
|
-
return statement.type === "delete_reference" && dialect7 === "
|
17023
|
+
return statement.type === "delete_reference" && dialect7 === "postgresql";
|
17628
17024
|
}
|
17629
17025
|
convert(statement) {
|
17630
17026
|
const tableFrom = statement.tableName;
|
@@ -17661,7 +17057,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
|
|
17661
17057
|
};
|
17662
17058
|
CreatePgIndexConvertor = class extends Convertor {
|
17663
17059
|
can(statement, dialect7) {
|
17664
|
-
return statement.type === "create_index" && dialect7 === "
|
17060
|
+
return statement.type === "create_index" && dialect7 === "postgresql";
|
17665
17061
|
}
|
17666
17062
|
convert(statement) {
|
17667
17063
|
const { name, columns, isUnique } = PgSquasher.unsquashIdx(statement.data);
|
@@ -17700,7 +17096,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
|
|
17700
17096
|
};
|
17701
17097
|
PgDropIndexConvertor = class extends Convertor {
|
17702
17098
|
can(statement, dialect7) {
|
17703
|
-
return statement.type === "drop_index" && dialect7 === "
|
17099
|
+
return statement.type === "drop_index" && dialect7 === "postgresql";
|
17704
17100
|
}
|
17705
17101
|
convert(statement) {
|
17706
17102
|
const { name } = PgSquasher.unsquashIdx(statement.data);
|
@@ -17709,7 +17105,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
|
|
17709
17105
|
};
|
17710
17106
|
PgCreateSchemaConvertor = class extends Convertor {
|
17711
17107
|
can(statement, dialect7) {
|
17712
|
-
return statement.type === "create_schema" && dialect7 === "
|
17108
|
+
return statement.type === "create_schema" && dialect7 === "postgresql";
|
17713
17109
|
}
|
17714
17110
|
convert(statement) {
|
17715
17111
|
const { name } = statement;
|
@@ -17719,7 +17115,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
|
|
17719
17115
|
};
|
17720
17116
|
PgRenameSchemaConvertor = class extends Convertor {
|
17721
17117
|
can(statement, dialect7) {
|
17722
|
-
return statement.type === "rename_schema" && dialect7 === "
|
17118
|
+
return statement.type === "rename_schema" && dialect7 === "postgresql";
|
17723
17119
|
}
|
17724
17120
|
convert(statement) {
|
17725
17121
|
const { from, to } = statement;
|
@@ -17729,7 +17125,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
|
|
17729
17125
|
};
|
17730
17126
|
PgDropSchemaConvertor = class extends Convertor {
|
17731
17127
|
can(statement, dialect7) {
|
17732
|
-
return statement.type === "drop_schema" && dialect7 === "
|
17128
|
+
return statement.type === "drop_schema" && dialect7 === "postgresql";
|
17733
17129
|
}
|
17734
17130
|
convert(statement) {
|
17735
17131
|
const { name } = statement;
|
@@ -17739,7 +17135,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
|
|
17739
17135
|
};
|
17740
17136
|
PgAlterTableSetSchemaConvertor = class extends Convertor {
|
17741
17137
|
can(statement, dialect7) {
|
17742
|
-
return statement.type === "alter_table_set_schema" && dialect7 === "
|
17138
|
+
return statement.type === "alter_table_set_schema" && dialect7 === "postgresql";
|
17743
17139
|
}
|
17744
17140
|
convert(statement) {
|
17745
17141
|
const { tableName, schemaFrom, schemaTo } = statement;
|
@@ -17749,7 +17145,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
|
|
17749
17145
|
};
|
17750
17146
|
PgAlterTableSetNewSchemaConvertor = class extends Convertor {
|
17751
17147
|
can(statement, dialect7) {
|
17752
|
-
return statement.type === "alter_table_set_new_schema" && dialect7 === "
|
17148
|
+
return statement.type === "alter_table_set_new_schema" && dialect7 === "postgresql";
|
17753
17149
|
}
|
17754
17150
|
convert(statement) {
|
17755
17151
|
const { tableName, to, from } = statement;
|
@@ -17760,7 +17156,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
|
|
17760
17156
|
};
|
17761
17157
|
PgAlterTableRemoveFromSchemaConvertor = class extends Convertor {
|
17762
17158
|
can(statement, dialect7) {
|
17763
|
-
return statement.type === "alter_table_remove_from_schema" && dialect7 === "
|
17159
|
+
return statement.type === "alter_table_remove_from_schema" && dialect7 === "postgresql";
|
17764
17160
|
}
|
17765
17161
|
convert(statement) {
|
17766
17162
|
const { tableName, schema: schema4 } = statement;
|
@@ -17972,7 +17368,9 @@ function mapSqlToSqliteType(sqlType) {
|
|
17972
17368
|
return "text";
|
17973
17369
|
} else if (lowered.startsWith("blob")) {
|
17974
17370
|
return "blob";
|
17975
|
-
} else if (["real", "double", "double precision", "float"].some(
|
17371
|
+
} else if (["real", "double", "double precision", "float"].some(
|
17372
|
+
(it) => lowered.startsWith(it)
|
17373
|
+
)) {
|
17976
17374
|
return "real";
|
17977
17375
|
} else {
|
17978
17376
|
return "numeric";
|
@@ -18159,7 +17557,7 @@ The unique constraint ${source_default.underline.blue(
|
|
18159
17557
|
`SELECT
|
18160
17558
|
m.name as "tableName", p.name as "columnName", p.type as "columnType", p."notnull" as "notNull", p.dflt_value as "defaultValue", p.pk as pk
|
18161
17559
|
FROM sqlite_master AS m JOIN pragma_table_info(m.name) AS p
|
18162
|
-
WHERE m.type = 'table' and m.tbl_name != 'sqlite_sequence' and m.tbl_name != 'sqlite_stat1' and m.tbl_name != '_litestream_seq' and m.tbl_name != '_litestream_lock' and m.tbl_name != 'libsql_wasm_func_table';
|
17560
|
+
WHERE m.type = 'table' and m.tbl_name != 'sqlite_sequence' and m.tbl_name != 'sqlite_stat1' and m.tbl_name != '_litestream_seq' and m.tbl_name != '_litestream_lock' and m.tbl_name != 'libsql_wasm_func_table' and m.tbl_name != '__drizzle_migrations';
|
18163
17561
|
`
|
18164
17562
|
);
|
18165
17563
|
const tablesWithSeq = [];
|
@@ -18873,9 +18271,9 @@ var init_sqliteImports = __esm({
|
|
18873
18271
|
import_sqlite_core2 = require("drizzle-orm/sqlite-core");
|
18874
18272
|
import_drizzle_orm6 = require("drizzle-orm");
|
18875
18273
|
init_utils2();
|
18876
|
-
prepareFromExports2 = (
|
18274
|
+
prepareFromExports2 = (exports) => {
|
18877
18275
|
const tables = [];
|
18878
|
-
const i0values = Object.values(
|
18276
|
+
const i0values = Object.values(exports);
|
18879
18277
|
i0values.forEach((t) => {
|
18880
18278
|
if ((0, import_drizzle_orm6.is)(t, import_sqlite_core2.SQLiteTable)) {
|
18881
18279
|
tables.push(t);
|
@@ -18911,9 +18309,9 @@ var init_mysqlImports = __esm({
|
|
18911
18309
|
import_mysql_core3 = require("drizzle-orm/mysql-core");
|
18912
18310
|
import_drizzle_orm7 = require("drizzle-orm");
|
18913
18311
|
init_utils2();
|
18914
|
-
prepareFromExports3 = (
|
18312
|
+
prepareFromExports3 = (exports) => {
|
18915
18313
|
const tables = [];
|
18916
|
-
const i0values = Object.values(
|
18314
|
+
const i0values = Object.values(exports);
|
18917
18315
|
i0values.forEach((t) => {
|
18918
18316
|
if ((0, import_drizzle_orm7.is)(t, import_mysql_core3.MySqlTable)) {
|
18919
18317
|
tables.push(t);
|
@@ -19540,7 +18938,7 @@ var pgSuggestions = async (db, statements) => {
|
|
19540
18938
|
}
|
19541
18939
|
}
|
19542
18940
|
}
|
19543
|
-
const stmnt = fromJson([statement], "
|
18941
|
+
const stmnt = fromJson([statement], "postgresql")[0];
|
19544
18942
|
if (typeof stmnt !== "undefined") {
|
19545
18943
|
if (statement.type === "drop_table") {
|
19546
18944
|
statementsToExecute.push(
|
@@ -19668,6 +19066,9 @@ String.prototype.squashSpaces = function() {
|
|
19668
19066
|
String.prototype.camelCase = function() {
|
19669
19067
|
return camelCase(String(this));
|
19670
19068
|
};
|
19069
|
+
String.prototype.capitalise = function() {
|
19070
|
+
return this && this.length > 0 ? `${this[0].toUpperCase()}${this.slice(1)}` : String(this);
|
19071
|
+
};
|
19671
19072
|
String.prototype.concatIf = function(it, condition) {
|
19672
19073
|
return condition ? `${this}${it}` : String(this);
|
19673
19074
|
};
|