drizzle-kit 0.17.1 → 0.17.2-5f6da95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +249 -241
- package/package.json +1 -1
- package/readme.md +20 -13
- package/utils.js +74 -104
package/index.js
CHANGED
|
@@ -29,9 +29,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
));
|
|
30
30
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
31
31
|
|
|
32
|
-
// node_modules/.pnpm/commander@9.
|
|
32
|
+
// node_modules/.pnpm/commander@9.4.1/node_modules/commander/lib/error.js
|
|
33
33
|
var require_error = __commonJS({
|
|
34
|
-
"node_modules/.pnpm/commander@9.
|
|
34
|
+
"node_modules/.pnpm/commander@9.4.1/node_modules/commander/lib/error.js"(exports) {
|
|
35
35
|
var CommanderError2 = class extends Error {
|
|
36
36
|
constructor(exitCode, code, message) {
|
|
37
37
|
super(message);
|
|
@@ -54,9 +54,9 @@ var require_error = __commonJS({
|
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
|
|
57
|
-
// node_modules/.pnpm/commander@9.
|
|
57
|
+
// node_modules/.pnpm/commander@9.4.1/node_modules/commander/lib/argument.js
|
|
58
58
|
var require_argument = __commonJS({
|
|
59
|
-
"node_modules/.pnpm/commander@9.
|
|
59
|
+
"node_modules/.pnpm/commander@9.4.1/node_modules/commander/lib/argument.js"(exports) {
|
|
60
60
|
var { InvalidArgumentError: InvalidArgumentError2 } = require_error();
|
|
61
61
|
var Argument2 = class {
|
|
62
62
|
constructor(name, description) {
|
|
@@ -134,16 +134,15 @@ var require_argument = __commonJS({
|
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
136
|
|
|
137
|
-
// node_modules/.pnpm/commander@9.
|
|
137
|
+
// node_modules/.pnpm/commander@9.4.1/node_modules/commander/lib/help.js
|
|
138
138
|
var require_help = __commonJS({
|
|
139
|
-
"node_modules/.pnpm/commander@9.
|
|
139
|
+
"node_modules/.pnpm/commander@9.4.1/node_modules/commander/lib/help.js"(exports) {
|
|
140
140
|
var { humanReadableArgName } = require_argument();
|
|
141
141
|
var Help2 = class {
|
|
142
142
|
constructor() {
|
|
143
143
|
this.helpWidth = void 0;
|
|
144
144
|
this.sortSubcommands = false;
|
|
145
145
|
this.sortOptions = false;
|
|
146
|
-
this.showGlobalOptions = false;
|
|
147
146
|
}
|
|
148
147
|
visibleCommands(cmd) {
|
|
149
148
|
const visibleCommands = cmd.commands.filter((cmd2) => !cmd2._hidden);
|
|
@@ -162,12 +161,6 @@ var require_help = __commonJS({
|
|
|
162
161
|
}
|
|
163
162
|
return visibleCommands;
|
|
164
163
|
}
|
|
165
|
-
compareOptions(a, b) {
|
|
166
|
-
const getSortKey = (option) => {
|
|
167
|
-
return option.short ? option.short.replace(/^-/, "") : option.long.replace(/^--/, "");
|
|
168
|
-
};
|
|
169
|
-
return getSortKey(a).localeCompare(getSortKey(b));
|
|
170
|
-
}
|
|
171
164
|
visibleOptions(cmd) {
|
|
172
165
|
const visibleOptions = cmd.options.filter((option) => !option.hidden);
|
|
173
166
|
const showShortHelpFlag = cmd._hasHelpOption && cmd._helpShortFlag && !cmd._findOption(cmd._helpShortFlag);
|
|
@@ -184,23 +177,15 @@ var require_help = __commonJS({
|
|
|
184
177
|
visibleOptions.push(helpOption);
|
|
185
178
|
}
|
|
186
179
|
if (this.sortOptions) {
|
|
187
|
-
|
|
180
|
+
const getSortKey = (option) => {
|
|
181
|
+
return option.short ? option.short.replace(/^-/, "") : option.long.replace(/^--/, "");
|
|
182
|
+
};
|
|
183
|
+
visibleOptions.sort((a, b) => {
|
|
184
|
+
return getSortKey(a).localeCompare(getSortKey(b));
|
|
185
|
+
});
|
|
188
186
|
}
|
|
189
187
|
return visibleOptions;
|
|
190
188
|
}
|
|
191
|
-
visibleGlobalOptions(cmd) {
|
|
192
|
-
if (!this.showGlobalOptions)
|
|
193
|
-
return [];
|
|
194
|
-
const globalOptions = [];
|
|
195
|
-
for (let parentCmd = cmd.parent; parentCmd; parentCmd = parentCmd.parent) {
|
|
196
|
-
const visibleOptions = parentCmd.options.filter((option) => !option.hidden);
|
|
197
|
-
globalOptions.push(...visibleOptions);
|
|
198
|
-
}
|
|
199
|
-
if (this.sortOptions) {
|
|
200
|
-
globalOptions.sort(this.compareOptions);
|
|
201
|
-
}
|
|
202
|
-
return globalOptions;
|
|
203
|
-
}
|
|
204
189
|
visibleArguments(cmd) {
|
|
205
190
|
if (cmd._argsDescription) {
|
|
206
191
|
cmd._args.forEach((argument) => {
|
|
@@ -232,11 +217,6 @@ var require_help = __commonJS({
|
|
|
232
217
|
return Math.max(max, helper.optionTerm(option).length);
|
|
233
218
|
}, 0);
|
|
234
219
|
}
|
|
235
|
-
longestGlobalOptionTermLength(cmd, helper) {
|
|
236
|
-
return helper.visibleGlobalOptions(cmd).reduce((max, option) => {
|
|
237
|
-
return Math.max(max, helper.optionTerm(option).length);
|
|
238
|
-
}, 0);
|
|
239
|
-
}
|
|
240
220
|
longestArgumentTermLength(cmd, helper) {
|
|
241
221
|
return helper.visibleArguments(cmd).reduce((max, argument) => {
|
|
242
222
|
return Math.max(max, helper.argumentTerm(argument).length);
|
|
@@ -334,14 +314,6 @@ var require_help = __commonJS({
|
|
|
334
314
|
if (optionList.length > 0) {
|
|
335
315
|
output = output.concat(["Options:", formatList(optionList), ""]);
|
|
336
316
|
}
|
|
337
|
-
if (this.showGlobalOptions) {
|
|
338
|
-
const globalOptionList = helper.visibleGlobalOptions(cmd).map((option) => {
|
|
339
|
-
return formatItem(helper.optionTerm(option), helper.optionDescription(option));
|
|
340
|
-
});
|
|
341
|
-
if (globalOptionList.length > 0) {
|
|
342
|
-
output = output.concat(["Global Options:", formatList(globalOptionList), ""]);
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
317
|
const commandList = helper.visibleCommands(cmd).map((cmd2) => {
|
|
346
318
|
return formatItem(helper.subcommandTerm(cmd2), helper.subcommandDescription(cmd2));
|
|
347
319
|
});
|
|
@@ -353,7 +325,6 @@ var require_help = __commonJS({
|
|
|
353
325
|
padWidth(cmd, helper) {
|
|
354
326
|
return Math.max(
|
|
355
327
|
helper.longestOptionTermLength(cmd, helper),
|
|
356
|
-
helper.longestGlobalOptionTermLength(cmd, helper),
|
|
357
328
|
helper.longestSubcommandTermLength(cmd, helper),
|
|
358
329
|
helper.longestArgumentTermLength(cmd, helper)
|
|
359
330
|
);
|
|
@@ -381,9 +352,9 @@ var require_help = __commonJS({
|
|
|
381
352
|
}
|
|
382
353
|
});
|
|
383
354
|
|
|
384
|
-
// node_modules/.pnpm/commander@9.
|
|
355
|
+
// node_modules/.pnpm/commander@9.4.1/node_modules/commander/lib/option.js
|
|
385
356
|
var require_option = __commonJS({
|
|
386
|
-
"node_modules/.pnpm/commander@9.
|
|
357
|
+
"node_modules/.pnpm/commander@9.4.1/node_modules/commander/lib/option.js"(exports) {
|
|
387
358
|
var { InvalidArgumentError: InvalidArgumentError2 } = require_error();
|
|
388
359
|
var Option2 = class {
|
|
389
360
|
constructor(flags, description) {
|
|
@@ -529,9 +500,9 @@ var require_option = __commonJS({
|
|
|
529
500
|
}
|
|
530
501
|
});
|
|
531
502
|
|
|
532
|
-
// node_modules/.pnpm/commander@9.
|
|
503
|
+
// node_modules/.pnpm/commander@9.4.1/node_modules/commander/lib/suggestSimilar.js
|
|
533
504
|
var require_suggestSimilar = __commonJS({
|
|
534
|
-
"node_modules/.pnpm/commander@9.
|
|
505
|
+
"node_modules/.pnpm/commander@9.4.1/node_modules/commander/lib/suggestSimilar.js"(exports) {
|
|
535
506
|
var maxDistance = 3;
|
|
536
507
|
function editDistance(a, b) {
|
|
537
508
|
if (Math.abs(a.length - b.length) > maxDistance)
|
|
@@ -608,9 +579,9 @@ var require_suggestSimilar = __commonJS({
|
|
|
608
579
|
}
|
|
609
580
|
});
|
|
610
581
|
|
|
611
|
-
// node_modules/.pnpm/commander@9.
|
|
582
|
+
// node_modules/.pnpm/commander@9.4.1/node_modules/commander/lib/command.js
|
|
612
583
|
var require_command = __commonJS({
|
|
613
|
-
"node_modules/.pnpm/commander@9.
|
|
584
|
+
"node_modules/.pnpm/commander@9.4.1/node_modules/commander/lib/command.js"(exports) {
|
|
614
585
|
var EventEmitter = require("events").EventEmitter;
|
|
615
586
|
var childProcess = require("child_process");
|
|
616
587
|
var path2 = require("path");
|
|
@@ -991,15 +962,6 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
991
962
|
getOptionValueSource(key) {
|
|
992
963
|
return this._optionValueSources[key];
|
|
993
964
|
}
|
|
994
|
-
getOptionValueSourceWithGlobals(key) {
|
|
995
|
-
let source;
|
|
996
|
-
getCommandAndParents(this).forEach((cmd) => {
|
|
997
|
-
if (cmd.getOptionValueSource(key) !== void 0) {
|
|
998
|
-
source = cmd.getOptionValueSource(key);
|
|
999
|
-
}
|
|
1000
|
-
});
|
|
1001
|
-
return source;
|
|
1002
|
-
}
|
|
1003
965
|
_prepareUserArgs(argv, parseOptions) {
|
|
1004
966
|
if (argv !== void 0 && !Array.isArray(argv)) {
|
|
1005
967
|
throw new Error("first parameter to parse must be array or undefined");
|
|
@@ -1797,9 +1759,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1797
1759
|
}
|
|
1798
1760
|
});
|
|
1799
1761
|
|
|
1800
|
-
// node_modules/.pnpm/commander@9.
|
|
1762
|
+
// node_modules/.pnpm/commander@9.4.1/node_modules/commander/index.js
|
|
1801
1763
|
var require_commander = __commonJS({
|
|
1802
|
-
"node_modules/.pnpm/commander@9.
|
|
1764
|
+
"node_modules/.pnpm/commander@9.4.1/node_modules/commander/index.js"(exports, module2) {
|
|
1803
1765
|
var { Argument: Argument2 } = require_argument();
|
|
1804
1766
|
var { Command: Command2 } = require_command();
|
|
1805
1767
|
var { CommanderError: CommanderError2, InvalidArgumentError: InvalidArgumentError2 } = require_error();
|
|
@@ -1817,7 +1779,7 @@ var require_commander = __commonJS({
|
|
|
1817
1779
|
}
|
|
1818
1780
|
});
|
|
1819
1781
|
|
|
1820
|
-
// node_modules/.pnpm/zod@3.20.
|
|
1782
|
+
// node_modules/.pnpm/zod@3.20.2/node_modules/zod/lib/index.mjs
|
|
1821
1783
|
function getErrorMap() {
|
|
1822
1784
|
return overrideErrorMap;
|
|
1823
1785
|
}
|
|
@@ -1930,9 +1892,9 @@ function createZodEnum(values, params) {
|
|
|
1930
1892
|
...processCreateParams(params)
|
|
1931
1893
|
});
|
|
1932
1894
|
}
|
|
1933
|
-
var util, ZodParsedType, getParsedType, ZodIssueCode, ZodError, errorMap, overrideErrorMap, makeIssue, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync, errorUtil, ParseInputLazyPath, handleResult, ZodType, cuidRegex,
|
|
1895
|
+
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;
|
|
1934
1896
|
var init_lib = __esm({
|
|
1935
|
-
"node_modules/.pnpm/zod@3.20.
|
|
1897
|
+
"node_modules/.pnpm/zod@3.20.2/node_modules/zod/lib/index.mjs"() {
|
|
1936
1898
|
(function(util2) {
|
|
1937
1899
|
util2.assertEqual = (val) => val;
|
|
1938
1900
|
function assertIs(_arg) {
|
|
@@ -2329,7 +2291,7 @@ var init_lib = __esm({
|
|
|
2329
2291
|
isAborted = (x) => x.status === "aborted";
|
|
2330
2292
|
isDirty = (x) => x.status === "dirty";
|
|
2331
2293
|
isValid = (x) => x.status === "valid";
|
|
2332
|
-
isAsync = (x) => typeof Promise !==
|
|
2294
|
+
isAsync = (x) => typeof Promise !== void 0 && x instanceof Promise;
|
|
2333
2295
|
(function(errorUtil2) {
|
|
2334
2296
|
errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
2335
2297
|
errorUtil2.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
|
|
@@ -2525,29 +2487,28 @@ var init_lib = __esm({
|
|
|
2525
2487
|
return this._refinement(refinement);
|
|
2526
2488
|
}
|
|
2527
2489
|
optional() {
|
|
2528
|
-
return ZodOptional.create(this
|
|
2490
|
+
return ZodOptional.create(this);
|
|
2529
2491
|
}
|
|
2530
2492
|
nullable() {
|
|
2531
|
-
return ZodNullable.create(this
|
|
2493
|
+
return ZodNullable.create(this);
|
|
2532
2494
|
}
|
|
2533
2495
|
nullish() {
|
|
2534
|
-
return this.
|
|
2496
|
+
return this.optional().nullable();
|
|
2535
2497
|
}
|
|
2536
2498
|
array() {
|
|
2537
|
-
return ZodArray.create(this
|
|
2499
|
+
return ZodArray.create(this);
|
|
2538
2500
|
}
|
|
2539
2501
|
promise() {
|
|
2540
|
-
return ZodPromise.create(this
|
|
2502
|
+
return ZodPromise.create(this);
|
|
2541
2503
|
}
|
|
2542
2504
|
or(option) {
|
|
2543
|
-
return ZodUnion.create([this, option]
|
|
2505
|
+
return ZodUnion.create([this, option]);
|
|
2544
2506
|
}
|
|
2545
2507
|
and(incoming) {
|
|
2546
|
-
return ZodIntersection.create(this, incoming
|
|
2508
|
+
return ZodIntersection.create(this, incoming);
|
|
2547
2509
|
}
|
|
2548
2510
|
transform(transform) {
|
|
2549
2511
|
return new ZodEffects({
|
|
2550
|
-
...processCreateParams(this._def),
|
|
2551
2512
|
schema: this,
|
|
2552
2513
|
typeName: ZodFirstPartyTypeKind.ZodEffects,
|
|
2553
2514
|
effect: { type: "transform", transform }
|
|
@@ -2556,7 +2517,6 @@ var init_lib = __esm({
|
|
|
2556
2517
|
default(def) {
|
|
2557
2518
|
const defaultValueFunc = typeof def === "function" ? def : () => def;
|
|
2558
2519
|
return new ZodDefault({
|
|
2559
|
-
...processCreateParams(this._def),
|
|
2560
2520
|
innerType: this,
|
|
2561
2521
|
defaultValue: defaultValueFunc,
|
|
2562
2522
|
typeName: ZodFirstPartyTypeKind.ZodDefault
|
|
@@ -2566,15 +2526,14 @@ var init_lib = __esm({
|
|
|
2566
2526
|
return new ZodBranded({
|
|
2567
2527
|
typeName: ZodFirstPartyTypeKind.ZodBranded,
|
|
2568
2528
|
type: this,
|
|
2569
|
-
...processCreateParams(
|
|
2529
|
+
...processCreateParams(void 0)
|
|
2570
2530
|
});
|
|
2571
2531
|
}
|
|
2572
2532
|
catch(def) {
|
|
2573
|
-
const
|
|
2533
|
+
const defaultValueFunc = typeof def === "function" ? def : () => def;
|
|
2574
2534
|
return new ZodCatch({
|
|
2575
|
-
...processCreateParams(this._def),
|
|
2576
2535
|
innerType: this,
|
|
2577
|
-
|
|
2536
|
+
defaultValue: defaultValueFunc,
|
|
2578
2537
|
typeName: ZodFirstPartyTypeKind.ZodCatch
|
|
2579
2538
|
});
|
|
2580
2539
|
}
|
|
@@ -2596,25 +2555,24 @@ var init_lib = __esm({
|
|
|
2596
2555
|
}
|
|
2597
2556
|
};
|
|
2598
2557
|
cuidRegex = /^c[^\s-]{8,}$/i;
|
|
2599
|
-
cuid2Regex = /^[a-z][a-z0-9]*$/;
|
|
2600
2558
|
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;
|
|
2601
|
-
emailRegex = /^(([^<>()[\]
|
|
2559
|
+
emailRegex = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
|
|
2602
2560
|
datetimeRegex = (args) => {
|
|
2603
2561
|
if (args.precision) {
|
|
2604
2562
|
if (args.offset) {
|
|
2605
|
-
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}(([+-]\\d{2}
|
|
2563
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}(([+-]\\d{2}:\\d{2})|Z)$`);
|
|
2606
2564
|
} else {
|
|
2607
2565
|
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}Z$`);
|
|
2608
2566
|
}
|
|
2609
2567
|
} else if (args.precision === 0) {
|
|
2610
2568
|
if (args.offset) {
|
|
2611
|
-
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}
|
|
2569
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}:\\d{2})|Z)$`);
|
|
2612
2570
|
} else {
|
|
2613
2571
|
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$`);
|
|
2614
2572
|
}
|
|
2615
2573
|
} else {
|
|
2616
2574
|
if (args.offset) {
|
|
2617
|
-
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}
|
|
2575
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}:\\d{2})|Z)$`);
|
|
2618
2576
|
} else {
|
|
2619
2577
|
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$`);
|
|
2620
2578
|
}
|
|
@@ -2736,16 +2694,6 @@ var init_lib = __esm({
|
|
|
2736
2694
|
});
|
|
2737
2695
|
status.dirty();
|
|
2738
2696
|
}
|
|
2739
|
-
} else if (check.kind === "cuid2") {
|
|
2740
|
-
if (!cuid2Regex.test(input.data)) {
|
|
2741
|
-
ctx = this._getOrReturnCtx(input, ctx);
|
|
2742
|
-
addIssueToContext(ctx, {
|
|
2743
|
-
validation: "cuid2",
|
|
2744
|
-
code: ZodIssueCode.invalid_string,
|
|
2745
|
-
message: check.message
|
|
2746
|
-
});
|
|
2747
|
-
status.dirty();
|
|
2748
|
-
}
|
|
2749
2697
|
} else if (check.kind === "url") {
|
|
2750
2698
|
try {
|
|
2751
2699
|
new URL(input.data);
|
|
@@ -2827,9 +2775,6 @@ var init_lib = __esm({
|
|
|
2827
2775
|
cuid(message) {
|
|
2828
2776
|
return this._addCheck({ kind: "cuid", ...errorUtil.errToObj(message) });
|
|
2829
2777
|
}
|
|
2830
|
-
cuid2(message) {
|
|
2831
|
-
return this._addCheck({ kind: "cuid2", ...errorUtil.errToObj(message) });
|
|
2832
|
-
}
|
|
2833
2778
|
datetime(options) {
|
|
2834
2779
|
var _a;
|
|
2835
2780
|
if (typeof options === "string") {
|
|
@@ -2904,9 +2849,6 @@ var init_lib = __esm({
|
|
|
2904
2849
|
get isCUID() {
|
|
2905
2850
|
return !!this._def.checks.find((ch) => ch.kind === "cuid");
|
|
2906
2851
|
}
|
|
2907
|
-
get isCUID2() {
|
|
2908
|
-
return !!this._def.checks.find((ch) => ch.kind === "cuid2");
|
|
2909
|
-
}
|
|
2910
2852
|
get minLength() {
|
|
2911
2853
|
let min = null;
|
|
2912
2854
|
for (const ch of this._def.checks) {
|
|
@@ -3129,22 +3071,7 @@ var init_lib = __esm({
|
|
|
3129
3071
|
return max;
|
|
3130
3072
|
}
|
|
3131
3073
|
get isInt() {
|
|
3132
|
-
return !!this._def.checks.find((ch) => ch.kind === "int"
|
|
3133
|
-
}
|
|
3134
|
-
get isFinite() {
|
|
3135
|
-
let max = null, min = null;
|
|
3136
|
-
for (const ch of this._def.checks) {
|
|
3137
|
-
if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
|
|
3138
|
-
return true;
|
|
3139
|
-
} else if (ch.kind === "min") {
|
|
3140
|
-
if (min === null || ch.value > min)
|
|
3141
|
-
min = ch.value;
|
|
3142
|
-
} else if (ch.kind === "max") {
|
|
3143
|
-
if (max === null || ch.value < max)
|
|
3144
|
-
max = ch.value;
|
|
3145
|
-
}
|
|
3146
|
-
}
|
|
3147
|
-
return Number.isFinite(min) && Number.isFinite(max);
|
|
3074
|
+
return !!this._def.checks.find((ch) => ch.kind === "int");
|
|
3148
3075
|
}
|
|
3149
3076
|
};
|
|
3150
3077
|
ZodNumber.create = (params) => {
|
|
@@ -3501,13 +3428,13 @@ var init_lib = __esm({
|
|
|
3501
3428
|
}
|
|
3502
3429
|
}
|
|
3503
3430
|
if (ctx.common.async) {
|
|
3504
|
-
return Promise.all(
|
|
3431
|
+
return Promise.all(ctx.data.map((item, i) => {
|
|
3505
3432
|
return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));
|
|
3506
3433
|
})).then((result2) => {
|
|
3507
3434
|
return ParseStatus.mergeArray(status, result2);
|
|
3508
3435
|
});
|
|
3509
3436
|
}
|
|
3510
|
-
const result =
|
|
3437
|
+
const result = ctx.data.map((item, i) => {
|
|
3511
3438
|
return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));
|
|
3512
3439
|
});
|
|
3513
3440
|
return ParseStatus.mergeArray(status, result);
|
|
@@ -3555,12 +3482,22 @@ var init_lib = __esm({
|
|
|
3555
3482
|
};
|
|
3556
3483
|
};
|
|
3557
3484
|
})(objectUtil || (objectUtil = {}));
|
|
3485
|
+
AugmentFactory = (def) => (augmentation) => {
|
|
3486
|
+
return new ZodObject({
|
|
3487
|
+
...def,
|
|
3488
|
+
shape: () => ({
|
|
3489
|
+
...def.shape(),
|
|
3490
|
+
...augmentation
|
|
3491
|
+
})
|
|
3492
|
+
});
|
|
3493
|
+
};
|
|
3558
3494
|
ZodObject = class extends ZodType {
|
|
3559
3495
|
constructor() {
|
|
3560
3496
|
super(...arguments);
|
|
3561
3497
|
this._cached = null;
|
|
3562
3498
|
this.nonstrict = this.passthrough;
|
|
3563
|
-
this.augment = this.
|
|
3499
|
+
this.augment = AugmentFactory(this._def);
|
|
3500
|
+
this.extend = AugmentFactory(this._def);
|
|
3564
3501
|
}
|
|
3565
3502
|
_getCached() {
|
|
3566
3503
|
if (this._cached !== null)
|
|
@@ -3689,14 +3626,8 @@ var init_lib = __esm({
|
|
|
3689
3626
|
unknownKeys: "passthrough"
|
|
3690
3627
|
});
|
|
3691
3628
|
}
|
|
3692
|
-
|
|
3693
|
-
return
|
|
3694
|
-
...this._def,
|
|
3695
|
-
shape: () => ({
|
|
3696
|
-
...this._def.shape(),
|
|
3697
|
-
...augmentation
|
|
3698
|
-
})
|
|
3699
|
-
});
|
|
3629
|
+
setKey(key, schema4) {
|
|
3630
|
+
return this.augment({ [key]: schema4 });
|
|
3700
3631
|
}
|
|
3701
3632
|
merge(merging) {
|
|
3702
3633
|
const merged = new ZodObject({
|
|
@@ -3707,9 +3638,6 @@ var init_lib = __esm({
|
|
|
3707
3638
|
});
|
|
3708
3639
|
return merged;
|
|
3709
3640
|
}
|
|
3710
|
-
setKey(key, schema4) {
|
|
3711
|
-
return this.augment({ [key]: schema4 });
|
|
3712
|
-
}
|
|
3713
3641
|
catchall(index4) {
|
|
3714
3642
|
return new ZodObject({
|
|
3715
3643
|
...this._def,
|
|
@@ -3718,10 +3646,9 @@ var init_lib = __esm({
|
|
|
3718
3646
|
}
|
|
3719
3647
|
pick(mask) {
|
|
3720
3648
|
const shape = {};
|
|
3721
|
-
util.objectKeys(mask).
|
|
3722
|
-
if (
|
|
3649
|
+
util.objectKeys(mask).map((key) => {
|
|
3650
|
+
if (this.shape[key])
|
|
3723
3651
|
shape[key] = this.shape[key];
|
|
3724
|
-
}
|
|
3725
3652
|
});
|
|
3726
3653
|
return new ZodObject({
|
|
3727
3654
|
...this._def,
|
|
@@ -3730,8 +3657,8 @@ var init_lib = __esm({
|
|
|
3730
3657
|
}
|
|
3731
3658
|
omit(mask) {
|
|
3732
3659
|
const shape = {};
|
|
3733
|
-
util.objectKeys(this.shape).
|
|
3734
|
-
if (
|
|
3660
|
+
util.objectKeys(this.shape).map((key) => {
|
|
3661
|
+
if (util.objectKeys(mask).indexOf(key) === -1) {
|
|
3735
3662
|
shape[key] = this.shape[key];
|
|
3736
3663
|
}
|
|
3737
3664
|
});
|
|
@@ -3745,14 +3672,24 @@ var init_lib = __esm({
|
|
|
3745
3672
|
}
|
|
3746
3673
|
partial(mask) {
|
|
3747
3674
|
const newShape = {};
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3675
|
+
if (mask) {
|
|
3676
|
+
util.objectKeys(this.shape).map((key) => {
|
|
3677
|
+
if (util.objectKeys(mask).indexOf(key) === -1) {
|
|
3678
|
+
newShape[key] = this.shape[key];
|
|
3679
|
+
} else {
|
|
3680
|
+
newShape[key] = this.shape[key].optional();
|
|
3681
|
+
}
|
|
3682
|
+
});
|
|
3683
|
+
return new ZodObject({
|
|
3684
|
+
...this._def,
|
|
3685
|
+
shape: () => newShape
|
|
3686
|
+
});
|
|
3687
|
+
} else {
|
|
3688
|
+
for (const key in this.shape) {
|
|
3689
|
+
const fieldSchema = this.shape[key];
|
|
3753
3690
|
newShape[key] = fieldSchema.optional();
|
|
3754
3691
|
}
|
|
3755
|
-
}
|
|
3692
|
+
}
|
|
3756
3693
|
return new ZodObject({
|
|
3757
3694
|
...this._def,
|
|
3758
3695
|
shape: () => newShape
|
|
@@ -3760,10 +3697,21 @@ var init_lib = __esm({
|
|
|
3760
3697
|
}
|
|
3761
3698
|
required(mask) {
|
|
3762
3699
|
const newShape = {};
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3700
|
+
if (mask) {
|
|
3701
|
+
util.objectKeys(this.shape).map((key) => {
|
|
3702
|
+
if (util.objectKeys(mask).indexOf(key) === -1) {
|
|
3703
|
+
newShape[key] = this.shape[key];
|
|
3704
|
+
} else {
|
|
3705
|
+
const fieldSchema = this.shape[key];
|
|
3706
|
+
let newField = fieldSchema;
|
|
3707
|
+
while (newField instanceof ZodOptional) {
|
|
3708
|
+
newField = newField._def.innerType;
|
|
3709
|
+
}
|
|
3710
|
+
newShape[key] = newField;
|
|
3711
|
+
}
|
|
3712
|
+
});
|
|
3713
|
+
} else {
|
|
3714
|
+
for (const key in this.shape) {
|
|
3767
3715
|
const fieldSchema = this.shape[key];
|
|
3768
3716
|
let newField = fieldSchema;
|
|
3769
3717
|
while (newField instanceof ZodOptional) {
|
|
@@ -3771,7 +3719,7 @@ var init_lib = __esm({
|
|
|
3771
3719
|
}
|
|
3772
3720
|
newShape[key] = newField;
|
|
3773
3721
|
}
|
|
3774
|
-
}
|
|
3722
|
+
}
|
|
3775
3723
|
return new ZodObject({
|
|
3776
3724
|
...this._def,
|
|
3777
3725
|
shape: () => newShape
|
|
@@ -4073,7 +4021,7 @@ var init_lib = __esm({
|
|
|
4073
4021
|
});
|
|
4074
4022
|
status.dirty();
|
|
4075
4023
|
}
|
|
4076
|
-
const items =
|
|
4024
|
+
const items = ctx.data.map((item, itemIndex) => {
|
|
4077
4025
|
const schema4 = this._def.items[itemIndex] || this._def.rest;
|
|
4078
4026
|
if (!schema4)
|
|
4079
4027
|
return null;
|
|
@@ -4440,7 +4388,6 @@ var init_lib = __esm({
|
|
|
4440
4388
|
if (input.data !== this._def.value) {
|
|
4441
4389
|
const ctx = this._getOrReturnCtx(input);
|
|
4442
4390
|
addIssueToContext(ctx, {
|
|
4443
|
-
received: ctx.data,
|
|
4444
4391
|
code: ZodIssueCode.invalid_literal,
|
|
4445
4392
|
expected: this._def.value
|
|
4446
4393
|
});
|
|
@@ -4507,12 +4454,6 @@ var init_lib = __esm({
|
|
|
4507
4454
|
}
|
|
4508
4455
|
return enumValues;
|
|
4509
4456
|
}
|
|
4510
|
-
extract(values) {
|
|
4511
|
-
return ZodEnum.create(values);
|
|
4512
|
-
}
|
|
4513
|
-
exclude(values) {
|
|
4514
|
-
return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)));
|
|
4515
|
-
}
|
|
4516
4457
|
};
|
|
4517
4458
|
ZodEnum.create = createZodEnum;
|
|
4518
4459
|
ZodNativeEnum = class extends ZodType {
|
|
@@ -4551,9 +4492,6 @@ var init_lib = __esm({
|
|
|
4551
4492
|
});
|
|
4552
4493
|
};
|
|
4553
4494
|
ZodPromise = class extends ZodType {
|
|
4554
|
-
unwrap() {
|
|
4555
|
-
return this._def.type;
|
|
4556
|
-
}
|
|
4557
4495
|
_parse(input) {
|
|
4558
4496
|
const { ctx } = this._processInputParams(input);
|
|
4559
4497
|
if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) {
|
|
@@ -4767,29 +4705,23 @@ var init_lib = __esm({
|
|
|
4767
4705
|
const result = this._def.innerType._parse({
|
|
4768
4706
|
data: ctx.data,
|
|
4769
4707
|
path: ctx.path,
|
|
4770
|
-
parent:
|
|
4771
|
-
...ctx,
|
|
4772
|
-
common: {
|
|
4773
|
-
...ctx.common,
|
|
4774
|
-
issues: []
|
|
4775
|
-
}
|
|
4776
|
-
}
|
|
4708
|
+
parent: ctx
|
|
4777
4709
|
});
|
|
4778
4710
|
if (isAsync(result)) {
|
|
4779
4711
|
return result.then((result2) => {
|
|
4780
4712
|
return {
|
|
4781
4713
|
status: "valid",
|
|
4782
|
-
value: result2.status === "valid" ? result2.value : this._def.
|
|
4714
|
+
value: result2.status === "valid" ? result2.value : this._def.defaultValue()
|
|
4783
4715
|
};
|
|
4784
4716
|
});
|
|
4785
4717
|
} else {
|
|
4786
4718
|
return {
|
|
4787
4719
|
status: "valid",
|
|
4788
|
-
value: result.status === "valid" ? result.value : this._def.
|
|
4720
|
+
value: result.status === "valid" ? result.value : this._def.defaultValue()
|
|
4789
4721
|
};
|
|
4790
4722
|
}
|
|
4791
4723
|
}
|
|
4792
|
-
|
|
4724
|
+
removeDefault() {
|
|
4793
4725
|
return this._def.innerType;
|
|
4794
4726
|
}
|
|
4795
4727
|
};
|
|
@@ -4797,7 +4729,7 @@ var init_lib = __esm({
|
|
|
4797
4729
|
return new ZodCatch({
|
|
4798
4730
|
innerType: type,
|
|
4799
4731
|
typeName: ZodFirstPartyTypeKind.ZodCatch,
|
|
4800
|
-
|
|
4732
|
+
defaultValue: typeof params.default === "function" ? params.default : () => params.default,
|
|
4801
4733
|
...processCreateParams(params)
|
|
4802
4734
|
});
|
|
4803
4735
|
};
|
|
@@ -4969,10 +4901,7 @@ var init_lib = __esm({
|
|
|
4969
4901
|
coerce = {
|
|
4970
4902
|
string: (arg) => ZodString.create({ ...arg, coerce: true }),
|
|
4971
4903
|
number: (arg) => ZodNumber.create({ ...arg, coerce: true }),
|
|
4972
|
-
boolean: (arg) => ZodBoolean.create({
|
|
4973
|
-
...arg,
|
|
4974
|
-
coerce: true
|
|
4975
|
-
}),
|
|
4904
|
+
boolean: (arg) => ZodBoolean.create({ ...arg, coerce: true }),
|
|
4976
4905
|
bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }),
|
|
4977
4906
|
date: (arg) => ZodDate.create({ ...arg, coerce: true })
|
|
4978
4907
|
};
|
|
@@ -17544,6 +17473,10 @@ var init_upFolders = __esm({
|
|
|
17544
17473
|
(it) => it.length === 14 && /^\d+$/.test(it)
|
|
17545
17474
|
);
|
|
17546
17475
|
oldMigrationFolders.sort();
|
|
17476
|
+
const metaFolder = (0, import_path.join)(`${out}`, "meta");
|
|
17477
|
+
if ((0, import_fs3.existsSync)((0, import_path.join)(metaFolder, "_journal.json"))) {
|
|
17478
|
+
return;
|
|
17479
|
+
}
|
|
17547
17480
|
const res = oldMigrationFolders.reduce(
|
|
17548
17481
|
(res2, it) => {
|
|
17549
17482
|
const date = new Date();
|
|
@@ -17575,7 +17508,6 @@ var init_upFolders = __esm({
|
|
|
17575
17508
|
idx: 0
|
|
17576
17509
|
}
|
|
17577
17510
|
);
|
|
17578
|
-
const metaFolder = (0, import_path.join)(`${out}`, "meta");
|
|
17579
17511
|
if (!(0, import_fs3.existsSync)(metaFolder)) {
|
|
17580
17512
|
(0, import_fs3.mkdirSync)(metaFolder, { recursive: true });
|
|
17581
17513
|
}
|
|
@@ -28367,9 +28299,9 @@ var require_pg_types = __commonJS({
|
|
|
28367
28299
|
}
|
|
28368
28300
|
});
|
|
28369
28301
|
|
|
28370
|
-
// node_modules/.pnpm/pg@8.
|
|
28302
|
+
// node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/defaults.js
|
|
28371
28303
|
var require_defaults = __commonJS({
|
|
28372
|
-
"node_modules/.pnpm/pg@8.
|
|
28304
|
+
"node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/defaults.js"(exports, module2) {
|
|
28373
28305
|
"use strict";
|
|
28374
28306
|
module2.exports = {
|
|
28375
28307
|
host: "localhost",
|
|
@@ -28406,9 +28338,9 @@ var require_defaults = __commonJS({
|
|
|
28406
28338
|
}
|
|
28407
28339
|
});
|
|
28408
28340
|
|
|
28409
|
-
// node_modules/.pnpm/pg@8.
|
|
28341
|
+
// node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/utils.js
|
|
28410
28342
|
var require_utils2 = __commonJS({
|
|
28411
|
-
"node_modules/.pnpm/pg@8.
|
|
28343
|
+
"node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/utils.js"(exports, module2) {
|
|
28412
28344
|
"use strict";
|
|
28413
28345
|
var crypto = require("crypto");
|
|
28414
28346
|
var defaults = require_defaults();
|
|
@@ -28544,9 +28476,9 @@ var require_utils2 = __commonJS({
|
|
|
28544
28476
|
}
|
|
28545
28477
|
});
|
|
28546
28478
|
|
|
28547
|
-
// node_modules/.pnpm/pg@8.
|
|
28479
|
+
// node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/sasl.js
|
|
28548
28480
|
var require_sasl = __commonJS({
|
|
28549
|
-
"node_modules/.pnpm/pg@8.
|
|
28481
|
+
"node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/sasl.js"(exports, module2) {
|
|
28550
28482
|
"use strict";
|
|
28551
28483
|
var crypto = require("crypto");
|
|
28552
28484
|
function startSession(mechanisms) {
|
|
@@ -28568,9 +28500,6 @@ var require_sasl = __commonJS({
|
|
|
28568
28500
|
if (typeof password !== "string") {
|
|
28569
28501
|
throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string");
|
|
28570
28502
|
}
|
|
28571
|
-
if (password === "") {
|
|
28572
|
-
throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a non-empty string");
|
|
28573
|
-
}
|
|
28574
28503
|
if (typeof serverData !== "string") {
|
|
28575
28504
|
throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: serverData must be a string");
|
|
28576
28505
|
}
|
|
@@ -28581,7 +28510,7 @@ var require_sasl = __commonJS({
|
|
|
28581
28510
|
throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce is too short");
|
|
28582
28511
|
}
|
|
28583
28512
|
var saltBytes = Buffer.from(sv.salt, "base64");
|
|
28584
|
-
var saltedPassword =
|
|
28513
|
+
var saltedPassword = Hi(password, saltBytes, sv.iteration);
|
|
28585
28514
|
var clientKey = hmacSha256(saltedPassword, "Client Key");
|
|
28586
28515
|
var storedKey = sha256(clientKey);
|
|
28587
28516
|
var clientFirstMessageBare = "n=*,r=" + session.clientNonce;
|
|
@@ -28693,6 +28622,15 @@ var require_sasl = __commonJS({
|
|
|
28693
28622
|
function hmacSha256(key, msg) {
|
|
28694
28623
|
return crypto.createHmac("sha256", key).update(msg).digest();
|
|
28695
28624
|
}
|
|
28625
|
+
function Hi(password, saltBytes, iterations) {
|
|
28626
|
+
var ui1 = hmacSha256(password, Buffer.concat([saltBytes, Buffer.from([0, 0, 0, 1])]));
|
|
28627
|
+
var ui = ui1;
|
|
28628
|
+
for (var i = 0; i < iterations - 1; i++) {
|
|
28629
|
+
ui1 = hmacSha256(password, ui1);
|
|
28630
|
+
ui = xorBuffers(ui, ui1);
|
|
28631
|
+
}
|
|
28632
|
+
return ui;
|
|
28633
|
+
}
|
|
28696
28634
|
module2.exports = {
|
|
28697
28635
|
startSession,
|
|
28698
28636
|
continueSession,
|
|
@@ -28701,9 +28639,9 @@ var require_sasl = __commonJS({
|
|
|
28701
28639
|
}
|
|
28702
28640
|
});
|
|
28703
28641
|
|
|
28704
|
-
// node_modules/.pnpm/split2@4.
|
|
28642
|
+
// node_modules/.pnpm/split2@4.2.0/node_modules/split2/index.js
|
|
28705
28643
|
var require_split2 = __commonJS({
|
|
28706
|
-
"node_modules/.pnpm/split2@4.
|
|
28644
|
+
"node_modules/.pnpm/split2@4.2.0/node_modules/split2/index.js"(exports, module2) {
|
|
28707
28645
|
"use strict";
|
|
28708
28646
|
var { Transform } = require("stream");
|
|
28709
28647
|
var { StringDecoder } = require("string_decoder");
|
|
@@ -28765,7 +28703,7 @@ var require_split2 = __commonJS({
|
|
|
28765
28703
|
if (typeof matcher === "function") {
|
|
28766
28704
|
mapper = matcher;
|
|
28767
28705
|
matcher = /\r?\n/;
|
|
28768
|
-
} else if (typeof matcher === "object" && !(matcher instanceof RegExp)) {
|
|
28706
|
+
} else if (typeof matcher === "object" && !(matcher instanceof RegExp) && !matcher[Symbol.split]) {
|
|
28769
28707
|
options = matcher;
|
|
28770
28708
|
matcher = /\r?\n/;
|
|
28771
28709
|
}
|
|
@@ -28990,9 +28928,9 @@ var require_lib2 = __commonJS({
|
|
|
28990
28928
|
}
|
|
28991
28929
|
});
|
|
28992
28930
|
|
|
28993
|
-
// node_modules/.pnpm/pg@8.
|
|
28931
|
+
// node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/type-overrides.js
|
|
28994
28932
|
var require_type_overrides = __commonJS({
|
|
28995
|
-
"node_modules/.pnpm/pg@8.
|
|
28933
|
+
"node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/type-overrides.js"(exports, module2) {
|
|
28996
28934
|
"use strict";
|
|
28997
28935
|
var types = require_pg_types();
|
|
28998
28936
|
function TypeOverrides(userTypes) {
|
|
@@ -29110,9 +29048,9 @@ var require_pg_connection_string = __commonJS({
|
|
|
29110
29048
|
}
|
|
29111
29049
|
});
|
|
29112
29050
|
|
|
29113
|
-
// node_modules/.pnpm/pg@8.
|
|
29051
|
+
// node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/connection-parameters.js
|
|
29114
29052
|
var require_connection_parameters = __commonJS({
|
|
29115
|
-
"node_modules/.pnpm/pg@8.
|
|
29053
|
+
"node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/connection-parameters.js"(exports, module2) {
|
|
29116
29054
|
"use strict";
|
|
29117
29055
|
var dns = require("dns");
|
|
29118
29056
|
var defaults = require_defaults();
|
|
@@ -29249,9 +29187,9 @@ var require_connection_parameters = __commonJS({
|
|
|
29249
29187
|
}
|
|
29250
29188
|
});
|
|
29251
29189
|
|
|
29252
|
-
// node_modules/.pnpm/pg@8.
|
|
29190
|
+
// node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/result.js
|
|
29253
29191
|
var require_result = __commonJS({
|
|
29254
|
-
"node_modules/.pnpm/pg@8.
|
|
29192
|
+
"node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/result.js"(exports, module2) {
|
|
29255
29193
|
"use strict";
|
|
29256
29194
|
var types = require_pg_types();
|
|
29257
29195
|
var matchRegexp = /^([A-Za-z]+)(?: (\d+))?(?: (\d+))?/;
|
|
@@ -29334,9 +29272,9 @@ var require_result = __commonJS({
|
|
|
29334
29272
|
}
|
|
29335
29273
|
});
|
|
29336
29274
|
|
|
29337
|
-
// node_modules/.pnpm/pg@8.
|
|
29275
|
+
// node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/query.js
|
|
29338
29276
|
var require_query = __commonJS({
|
|
29339
|
-
"node_modules/.pnpm/pg@8.
|
|
29277
|
+
"node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/query.js"(exports, module2) {
|
|
29340
29278
|
"use strict";
|
|
29341
29279
|
var { EventEmitter } = require("events");
|
|
29342
29280
|
var Result = require_result();
|
|
@@ -30302,9 +30240,9 @@ var require_dist = __commonJS({
|
|
|
30302
30240
|
}
|
|
30303
30241
|
});
|
|
30304
30242
|
|
|
30305
|
-
// node_modules/.pnpm/pg@8.
|
|
30243
|
+
// node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/connection.js
|
|
30306
30244
|
var require_connection = __commonJS({
|
|
30307
|
-
"node_modules/.pnpm/pg@8.
|
|
30245
|
+
"node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/connection.js"(exports, module2) {
|
|
30308
30246
|
"use strict";
|
|
30309
30247
|
var net = require("net");
|
|
30310
30248
|
var EventEmitter = require("events").EventEmitter;
|
|
@@ -30317,9 +30255,6 @@ var require_connection = __commonJS({
|
|
|
30317
30255
|
super();
|
|
30318
30256
|
config = config || {};
|
|
30319
30257
|
this.stream = config.stream || new net.Socket();
|
|
30320
|
-
if (typeof this.stream === "function") {
|
|
30321
|
-
this.stream = this.stream(config);
|
|
30322
|
-
}
|
|
30323
30258
|
this._keepAlive = config.keepAlive;
|
|
30324
30259
|
this._keepAliveInitialDelayMillis = config.keepAliveInitialDelayMillis;
|
|
30325
30260
|
this.lastBuffer = false;
|
|
@@ -30448,6 +30383,7 @@ var require_connection = __commonJS({
|
|
|
30448
30383
|
}
|
|
30449
30384
|
sync() {
|
|
30450
30385
|
this._ending = true;
|
|
30386
|
+
this._send(flushBuffer);
|
|
30451
30387
|
this._send(syncBuffer);
|
|
30452
30388
|
}
|
|
30453
30389
|
ref() {
|
|
@@ -30486,11 +30422,12 @@ var require_connection = __commonJS({
|
|
|
30486
30422
|
}
|
|
30487
30423
|
});
|
|
30488
30424
|
|
|
30489
|
-
// node_modules/.pnpm/pg@8.
|
|
30425
|
+
// node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/client.js
|
|
30490
30426
|
var require_client = __commonJS({
|
|
30491
|
-
"node_modules/.pnpm/pg@8.
|
|
30427
|
+
"node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/client.js"(exports, module2) {
|
|
30492
30428
|
"use strict";
|
|
30493
30429
|
var EventEmitter = require("events").EventEmitter;
|
|
30430
|
+
var util2 = require("util");
|
|
30494
30431
|
var utils = require_utils2();
|
|
30495
30432
|
var sasl = require_sasl();
|
|
30496
30433
|
var pgPass = require_lib2();
|
|
@@ -30686,29 +30623,17 @@ var require_client = __commonJS({
|
|
|
30686
30623
|
}
|
|
30687
30624
|
_handleAuthSASL(msg) {
|
|
30688
30625
|
this._checkPgPass(() => {
|
|
30689
|
-
|
|
30690
|
-
|
|
30691
|
-
this.connection.sendSASLInitialResponseMessage(this.saslSession.mechanism, this.saslSession.response);
|
|
30692
|
-
} catch (err2) {
|
|
30693
|
-
this.connection.emit("error", err2);
|
|
30694
|
-
}
|
|
30626
|
+
this.saslSession = sasl.startSession(msg.mechanisms);
|
|
30627
|
+
this.connection.sendSASLInitialResponseMessage(this.saslSession.mechanism, this.saslSession.response);
|
|
30695
30628
|
});
|
|
30696
30629
|
}
|
|
30697
30630
|
_handleAuthSASLContinue(msg) {
|
|
30698
|
-
|
|
30699
|
-
|
|
30700
|
-
this.connection.sendSCRAMClientFinalMessage(this.saslSession.response);
|
|
30701
|
-
} catch (err2) {
|
|
30702
|
-
this.connection.emit("error", err2);
|
|
30703
|
-
}
|
|
30631
|
+
sasl.continueSession(this.saslSession, this.password, msg.data);
|
|
30632
|
+
this.connection.sendSCRAMClientFinalMessage(this.saslSession.response);
|
|
30704
30633
|
}
|
|
30705
30634
|
_handleAuthSASLFinal(msg) {
|
|
30706
|
-
|
|
30707
|
-
|
|
30708
|
-
this.saslSession = null;
|
|
30709
|
-
} catch (err2) {
|
|
30710
|
-
this.connection.emit("error", err2);
|
|
30711
|
-
}
|
|
30635
|
+
sasl.finalizeSession(this.saslSession, msg.data);
|
|
30636
|
+
this.saslSession = null;
|
|
30712
30637
|
}
|
|
30713
30638
|
_handleBackendKeyData(msg) {
|
|
30714
30639
|
this.processID = msg.processID;
|
|
@@ -30987,9 +30912,9 @@ var require_client = __commonJS({
|
|
|
30987
30912
|
}
|
|
30988
30913
|
});
|
|
30989
30914
|
|
|
30990
|
-
// node_modules/.pnpm/pg-pool@3.
|
|
30915
|
+
// node_modules/.pnpm/pg-pool@3.6.0_pg@8.8.0/node_modules/pg-pool/index.js
|
|
30991
30916
|
var require_pg_pool = __commonJS({
|
|
30992
|
-
"node_modules/.pnpm/pg-pool@3.
|
|
30917
|
+
"node_modules/.pnpm/pg-pool@3.6.0_pg@8.8.0/node_modules/pg-pool/index.js"(exports, module2) {
|
|
30993
30918
|
"use strict";
|
|
30994
30919
|
var EventEmitter = require("events").EventEmitter;
|
|
30995
30920
|
var NOOP = function() {
|
|
@@ -31251,6 +31176,7 @@ var require_pg_pool = __commonJS({
|
|
|
31251
31176
|
_release(client, idleListener, err2) {
|
|
31252
31177
|
client.on("error", idleListener);
|
|
31253
31178
|
client._poolUseCount = (client._poolUseCount || 0) + 1;
|
|
31179
|
+
this.emit("release", err2, client);
|
|
31254
31180
|
if (err2 || this.ending || !client._queryable || client._ending || client._poolUseCount >= this.options.maxUses) {
|
|
31255
31181
|
if (client._poolUseCount >= this.options.maxUses) {
|
|
31256
31182
|
this.log("remove expended client");
|
|
@@ -31362,9 +31288,72 @@ var require_pg_pool = __commonJS({
|
|
|
31362
31288
|
}
|
|
31363
31289
|
});
|
|
31364
31290
|
|
|
31365
|
-
// node_modules/.pnpm/pg@8.
|
|
31291
|
+
// node_modules/.pnpm/pg@8.8.0/node_modules/pg/package.json
|
|
31292
|
+
var require_package = __commonJS({
|
|
31293
|
+
"node_modules/.pnpm/pg@8.8.0/node_modules/pg/package.json"(exports, module2) {
|
|
31294
|
+
module2.exports = {
|
|
31295
|
+
name: "pg",
|
|
31296
|
+
version: "8.8.0",
|
|
31297
|
+
description: "PostgreSQL client - pure javascript & libpq with the same API",
|
|
31298
|
+
keywords: [
|
|
31299
|
+
"database",
|
|
31300
|
+
"libpq",
|
|
31301
|
+
"pg",
|
|
31302
|
+
"postgre",
|
|
31303
|
+
"postgres",
|
|
31304
|
+
"postgresql",
|
|
31305
|
+
"rdbms"
|
|
31306
|
+
],
|
|
31307
|
+
homepage: "https://github.com/brianc/node-postgres",
|
|
31308
|
+
repository: {
|
|
31309
|
+
type: "git",
|
|
31310
|
+
url: "git://github.com/brianc/node-postgres.git",
|
|
31311
|
+
directory: "packages/pg"
|
|
31312
|
+
},
|
|
31313
|
+
author: "Brian Carlson <brian.m.carlson@gmail.com>",
|
|
31314
|
+
main: "./lib",
|
|
31315
|
+
dependencies: {
|
|
31316
|
+
"buffer-writer": "2.0.0",
|
|
31317
|
+
"packet-reader": "1.0.0",
|
|
31318
|
+
"pg-connection-string": "^2.5.0",
|
|
31319
|
+
"pg-pool": "^3.5.2",
|
|
31320
|
+
"pg-protocol": "^1.5.0",
|
|
31321
|
+
"pg-types": "^2.1.0",
|
|
31322
|
+
pgpass: "1.x"
|
|
31323
|
+
},
|
|
31324
|
+
devDependencies: {
|
|
31325
|
+
async: "2.6.4",
|
|
31326
|
+
bluebird: "3.5.2",
|
|
31327
|
+
co: "4.6.0",
|
|
31328
|
+
"pg-copy-streams": "0.3.0"
|
|
31329
|
+
},
|
|
31330
|
+
peerDependencies: {
|
|
31331
|
+
"pg-native": ">=3.0.1"
|
|
31332
|
+
},
|
|
31333
|
+
peerDependenciesMeta: {
|
|
31334
|
+
"pg-native": {
|
|
31335
|
+
optional: true
|
|
31336
|
+
}
|
|
31337
|
+
},
|
|
31338
|
+
scripts: {
|
|
31339
|
+
test: "make test-all"
|
|
31340
|
+
},
|
|
31341
|
+
files: [
|
|
31342
|
+
"lib",
|
|
31343
|
+
"SPONSORS.md"
|
|
31344
|
+
],
|
|
31345
|
+
license: "MIT",
|
|
31346
|
+
engines: {
|
|
31347
|
+
node: ">= 8.0.0"
|
|
31348
|
+
},
|
|
31349
|
+
gitHead: "c99fb2c127ddf8d712500db2c7b9a5491a178655"
|
|
31350
|
+
};
|
|
31351
|
+
}
|
|
31352
|
+
});
|
|
31353
|
+
|
|
31354
|
+
// node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/native/query.js
|
|
31366
31355
|
var require_query2 = __commonJS({
|
|
31367
|
-
"node_modules/.pnpm/pg@8.
|
|
31356
|
+
"node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/native/query.js"(exports, module2) {
|
|
31368
31357
|
"use strict";
|
|
31369
31358
|
var EventEmitter = require("events").EventEmitter;
|
|
31370
31359
|
var util2 = require("util");
|
|
@@ -31503,12 +31492,13 @@ var require_query2 = __commonJS({
|
|
|
31503
31492
|
}
|
|
31504
31493
|
});
|
|
31505
31494
|
|
|
31506
|
-
// node_modules/.pnpm/pg@8.
|
|
31495
|
+
// node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/native/client.js
|
|
31507
31496
|
var require_client2 = __commonJS({
|
|
31508
|
-
"node_modules/.pnpm/pg@8.
|
|
31497
|
+
"node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/native/client.js"(exports, module2) {
|
|
31509
31498
|
"use strict";
|
|
31510
31499
|
var Native = require("pg-native");
|
|
31511
31500
|
var TypeOverrides = require_type_overrides();
|
|
31501
|
+
var pkg = require_package();
|
|
31512
31502
|
var EventEmitter = require("events").EventEmitter;
|
|
31513
31503
|
var util2 = require("util");
|
|
31514
31504
|
var ConnectionParameters = require_connection_parameters();
|
|
@@ -31735,17 +31725,17 @@ var require_client2 = __commonJS({
|
|
|
31735
31725
|
}
|
|
31736
31726
|
});
|
|
31737
31727
|
|
|
31738
|
-
// node_modules/.pnpm/pg@8.
|
|
31728
|
+
// node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/native/index.js
|
|
31739
31729
|
var require_native = __commonJS({
|
|
31740
|
-
"node_modules/.pnpm/pg@8.
|
|
31730
|
+
"node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/native/index.js"(exports, module2) {
|
|
31741
31731
|
"use strict";
|
|
31742
31732
|
module2.exports = require_client2();
|
|
31743
31733
|
}
|
|
31744
31734
|
});
|
|
31745
31735
|
|
|
31746
|
-
// node_modules/.pnpm/pg@8.
|
|
31736
|
+
// node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/index.js
|
|
31747
31737
|
var require_lib3 = __commonJS({
|
|
31748
|
-
"node_modules/.pnpm/pg@8.
|
|
31738
|
+
"node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/index.js"(exports, module2) {
|
|
31749
31739
|
"use strict";
|
|
31750
31740
|
var Client = require_client();
|
|
31751
31741
|
var defaults = require_defaults();
|
|
@@ -45691,9 +45681,9 @@ var require_connection_config = __commonJS({
|
|
|
45691
45681
|
}
|
|
45692
45682
|
});
|
|
45693
45683
|
|
|
45694
|
-
// node_modules/.pnpm/lru-cache@7.18.
|
|
45684
|
+
// node_modules/.pnpm/lru-cache@7.18.3/node_modules/lru-cache/index.js
|
|
45695
45685
|
var require_lru_cache2 = __commonJS({
|
|
45696
|
-
"node_modules/.pnpm/lru-cache@7.18.
|
|
45686
|
+
"node_modules/.pnpm/lru-cache@7.18.3/node_modules/lru-cache/index.js"(exports, module2) {
|
|
45697
45687
|
var perf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
|
|
45698
45688
|
var hasAbortController = typeof AbortController === "function";
|
|
45699
45689
|
var AC = hasAbortController ? AbortController : class AbortController {
|
|
@@ -46088,46 +46078,46 @@ var require_lru_cache2 = __commonJS({
|
|
|
46088
46078
|
}
|
|
46089
46079
|
}
|
|
46090
46080
|
isValidIndex(index4) {
|
|
46091
|
-
return this.keyMap.get(this.keyList[index4]) === index4;
|
|
46081
|
+
return index4 !== void 0 && this.keyMap.get(this.keyList[index4]) === index4;
|
|
46092
46082
|
}
|
|
46093
46083
|
*entries() {
|
|
46094
46084
|
for (const i of this.indexes()) {
|
|
46095
|
-
if (!this.isBackgroundFetch(this.valList[i])) {
|
|
46085
|
+
if (this.valList[i] !== void 0 && this.keyList[i] !== void 0 && !this.isBackgroundFetch(this.valList[i])) {
|
|
46096
46086
|
yield [this.keyList[i], this.valList[i]];
|
|
46097
46087
|
}
|
|
46098
46088
|
}
|
|
46099
46089
|
}
|
|
46100
46090
|
*rentries() {
|
|
46101
46091
|
for (const i of this.rindexes()) {
|
|
46102
|
-
if (!this.isBackgroundFetch(this.valList[i])) {
|
|
46092
|
+
if (this.valList[i] !== void 0 && this.keyList[i] !== void 0 && !this.isBackgroundFetch(this.valList[i])) {
|
|
46103
46093
|
yield [this.keyList[i], this.valList[i]];
|
|
46104
46094
|
}
|
|
46105
46095
|
}
|
|
46106
46096
|
}
|
|
46107
46097
|
*keys() {
|
|
46108
46098
|
for (const i of this.indexes()) {
|
|
46109
|
-
if (!this.isBackgroundFetch(this.valList[i])) {
|
|
46099
|
+
if (this.keyList[i] !== void 0 && !this.isBackgroundFetch(this.valList[i])) {
|
|
46110
46100
|
yield this.keyList[i];
|
|
46111
46101
|
}
|
|
46112
46102
|
}
|
|
46113
46103
|
}
|
|
46114
46104
|
*rkeys() {
|
|
46115
46105
|
for (const i of this.rindexes()) {
|
|
46116
|
-
if (!this.isBackgroundFetch(this.valList[i])) {
|
|
46106
|
+
if (this.keyList[i] !== void 0 && !this.isBackgroundFetch(this.valList[i])) {
|
|
46117
46107
|
yield this.keyList[i];
|
|
46118
46108
|
}
|
|
46119
46109
|
}
|
|
46120
46110
|
}
|
|
46121
46111
|
*values() {
|
|
46122
46112
|
for (const i of this.indexes()) {
|
|
46123
|
-
if (!this.isBackgroundFetch(this.valList[i])) {
|
|
46113
|
+
if (this.valList[i] !== void 0 && !this.isBackgroundFetch(this.valList[i])) {
|
|
46124
46114
|
yield this.valList[i];
|
|
46125
46115
|
}
|
|
46126
46116
|
}
|
|
46127
46117
|
}
|
|
46128
46118
|
*rvalues() {
|
|
46129
46119
|
for (const i of this.rindexes()) {
|
|
46130
|
-
if (!this.isBackgroundFetch(this.valList[i])) {
|
|
46120
|
+
if (this.valList[i] !== void 0 && !this.isBackgroundFetch(this.valList[i])) {
|
|
46131
46121
|
yield this.valList[i];
|
|
46132
46122
|
}
|
|
46133
46123
|
}
|
|
@@ -46135,21 +46125,33 @@ var require_lru_cache2 = __commonJS({
|
|
|
46135
46125
|
[Symbol.iterator]() {
|
|
46136
46126
|
return this.entries();
|
|
46137
46127
|
}
|
|
46138
|
-
find(fn, getOptions
|
|
46128
|
+
find(fn, getOptions) {
|
|
46139
46129
|
for (const i of this.indexes()) {
|
|
46140
|
-
|
|
46130
|
+
const v = this.valList[i];
|
|
46131
|
+
const value = this.isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
46132
|
+
if (value === void 0)
|
|
46133
|
+
continue;
|
|
46134
|
+
if (fn(value, this.keyList[i], this)) {
|
|
46141
46135
|
return this.get(this.keyList[i], getOptions);
|
|
46142
46136
|
}
|
|
46143
46137
|
}
|
|
46144
46138
|
}
|
|
46145
46139
|
forEach(fn, thisp = this) {
|
|
46146
46140
|
for (const i of this.indexes()) {
|
|
46147
|
-
|
|
46141
|
+
const v = this.valList[i];
|
|
46142
|
+
const value = this.isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
46143
|
+
if (value === void 0)
|
|
46144
|
+
continue;
|
|
46145
|
+
fn.call(thisp, value, this.keyList[i], this);
|
|
46148
46146
|
}
|
|
46149
46147
|
}
|
|
46150
46148
|
rforEach(fn, thisp = this) {
|
|
46151
46149
|
for (const i of this.rindexes()) {
|
|
46152
|
-
|
|
46150
|
+
const v = this.valList[i];
|
|
46151
|
+
const value = this.isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
46152
|
+
if (value === void 0)
|
|
46153
|
+
continue;
|
|
46154
|
+
fn.call(thisp, value, this.keyList[i], this);
|
|
46153
46155
|
}
|
|
46154
46156
|
}
|
|
46155
46157
|
get prune() {
|
|
@@ -49234,7 +49236,7 @@ __export(cli_exports, {
|
|
|
49234
49236
|
});
|
|
49235
49237
|
module.exports = __toCommonJS(cli_exports);
|
|
49236
49238
|
|
|
49237
|
-
// node_modules/.pnpm/commander@9.
|
|
49239
|
+
// node_modules/.pnpm/commander@9.4.1/node_modules/commander/esm.mjs
|
|
49238
49240
|
var import_index = __toESM(require_commander(), 1);
|
|
49239
49241
|
var {
|
|
49240
49242
|
program,
|
|
@@ -49341,7 +49343,7 @@ init_source();
|
|
|
49341
49343
|
// package.json
|
|
49342
49344
|
var package_default = {
|
|
49343
49345
|
name: "drizzle-kit",
|
|
49344
|
-
version: "0.17.
|
|
49346
|
+
version: "0.17.2",
|
|
49345
49347
|
repository: "https://github.com/drizzle-team/drizzle-kit-mirror",
|
|
49346
49348
|
author: "Drizzle Team",
|
|
49347
49349
|
license: "MIT",
|
|
@@ -49601,7 +49603,13 @@ var prepareGenerateConfig = (options) => {
|
|
|
49601
49603
|
const drizzleConfig = JSON.parse(
|
|
49602
49604
|
import_fs10.default.readFileSync(import_path6.default.join(import_path6.default.resolve(path2))).toString()
|
|
49603
49605
|
);
|
|
49604
|
-
|
|
49606
|
+
const generateConfig = {
|
|
49607
|
+
out: drizzleConfig.out,
|
|
49608
|
+
schema: drizzleConfig.schema,
|
|
49609
|
+
breakpoints: drizzleConfig.breakpoints,
|
|
49610
|
+
custom
|
|
49611
|
+
};
|
|
49612
|
+
return generateConfig;
|
|
49605
49613
|
}
|
|
49606
49614
|
if (!schema4) {
|
|
49607
49615
|
return new Error(`'schema' param must be set`);
|