drizzle-kit 0.17.1 → 0.17.2

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.
Files changed (4) hide show
  1. package/index.js +245 -240
  2. package/package.json +1 -1
  3. package/readme.md +11 -11
  4. 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.5.0/node_modules/commander/lib/error.js
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.5.0/node_modules/commander/lib/error.js"(exports) {
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.5.0/node_modules/commander/lib/argument.js
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.5.0/node_modules/commander/lib/argument.js"(exports) {
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.5.0/node_modules/commander/lib/help.js
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.5.0/node_modules/commander/lib/help.js"(exports) {
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
- visibleOptions.sort(this.compareOptions);
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.5.0/node_modules/commander/lib/option.js
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.5.0/node_modules/commander/lib/option.js"(exports) {
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.5.0/node_modules/commander/lib/suggestSimilar.js
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.5.0/node_modules/commander/lib/suggestSimilar.js"(exports) {
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.5.0/node_modules/commander/lib/command.js
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.5.0/node_modules/commander/lib/command.js"(exports) {
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.5.0/node_modules/commander/index.js
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.5.0/node_modules/commander/index.js"(exports, module2) {
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.6/node_modules/zod/lib/index.mjs
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, cuid2Regex, uuidRegex, emailRegex, datetimeRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, objectUtil, 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;
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.6/node_modules/zod/lib/index.mjs"() {
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 !== "undefined" && x instanceof 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, this._def);
2490
+ return ZodOptional.create(this);
2529
2491
  }
2530
2492
  nullable() {
2531
- return ZodNullable.create(this, this._def);
2493
+ return ZodNullable.create(this);
2532
2494
  }
2533
2495
  nullish() {
2534
- return this.nullable().optional();
2496
+ return this.optional().nullable();
2535
2497
  }
2536
2498
  array() {
2537
- return ZodArray.create(this, this._def);
2499
+ return ZodArray.create(this);
2538
2500
  }
2539
2501
  promise() {
2540
- return ZodPromise.create(this, this._def);
2502
+ return ZodPromise.create(this);
2541
2503
  }
2542
2504
  or(option) {
2543
- return ZodUnion.create([this, option], this._def);
2505
+ return ZodUnion.create([this, option]);
2544
2506
  }
2545
2507
  and(incoming) {
2546
- return ZodIntersection.create(this, incoming, this._def);
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(this._def)
2529
+ ...processCreateParams(void 0)
2570
2530
  });
2571
2531
  }
2572
2532
  catch(def) {
2573
- const catchValueFunc = typeof def === "function" ? def : () => def;
2533
+ const defaultValueFunc = typeof def === "function" ? def : () => def;
2574
2534
  return new ZodCatch({
2575
- ...processCreateParams(this._def),
2576
2535
  innerType: this,
2577
- catchValue: catchValueFunc,
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 = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|([^-]([a-zA-Z0-9-]*\.)+[a-zA-Z]{2,}))$/;
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}(:?\\d{2})?)|Z)$`);
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}(:?\\d{2})?)|Z)$`);
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}(:?\\d{2})?)|Z)$`);
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" || ch.kind === "multipleOf" && util.isInteger(ch.value));
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([...ctx.data].map((item, i) => {
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 = [...ctx.data].map((item, i) => {
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.extend;
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
- extend(augmentation) {
3693
- return new ZodObject({
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).forEach((key) => {
3722
- if (mask[key] && this.shape[key]) {
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).forEach((key) => {
3734
- if (!mask[key]) {
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
- util.objectKeys(this.shape).forEach((key) => {
3749
- const fieldSchema = this.shape[key];
3750
- if (mask && !mask[key]) {
3751
- newShape[key] = fieldSchema;
3752
- } else {
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
- util.objectKeys(this.shape).forEach((key) => {
3764
- if (mask && !mask[key]) {
3765
- newShape[key] = this.shape[key];
3766
- } else {
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 = [...ctx.data].map((item, itemIndex) => {
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.catchValue()
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.catchValue()
4720
+ value: result.status === "valid" ? result.value : this._def.defaultValue()
4789
4721
  };
4790
4722
  }
4791
4723
  }
4792
- removeCatch() {
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
- catchValue: typeof params.catch === "function" ? params.catch : () => params.catch,
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
  };
@@ -28367,9 +28296,9 @@ var require_pg_types = __commonJS({
28367
28296
  }
28368
28297
  });
28369
28298
 
28370
- // node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/defaults.js
28299
+ // node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/defaults.js
28371
28300
  var require_defaults = __commonJS({
28372
- "node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/defaults.js"(exports, module2) {
28301
+ "node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/defaults.js"(exports, module2) {
28373
28302
  "use strict";
28374
28303
  module2.exports = {
28375
28304
  host: "localhost",
@@ -28406,9 +28335,9 @@ var require_defaults = __commonJS({
28406
28335
  }
28407
28336
  });
28408
28337
 
28409
- // node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/utils.js
28338
+ // node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/utils.js
28410
28339
  var require_utils2 = __commonJS({
28411
- "node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/utils.js"(exports, module2) {
28340
+ "node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/utils.js"(exports, module2) {
28412
28341
  "use strict";
28413
28342
  var crypto = require("crypto");
28414
28343
  var defaults = require_defaults();
@@ -28544,9 +28473,9 @@ var require_utils2 = __commonJS({
28544
28473
  }
28545
28474
  });
28546
28475
 
28547
- // node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/sasl.js
28476
+ // node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/sasl.js
28548
28477
  var require_sasl = __commonJS({
28549
- "node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/sasl.js"(exports, module2) {
28478
+ "node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/sasl.js"(exports, module2) {
28550
28479
  "use strict";
28551
28480
  var crypto = require("crypto");
28552
28481
  function startSession(mechanisms) {
@@ -28568,9 +28497,6 @@ var require_sasl = __commonJS({
28568
28497
  if (typeof password !== "string") {
28569
28498
  throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string");
28570
28499
  }
28571
- if (password === "") {
28572
- throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a non-empty string");
28573
- }
28574
28500
  if (typeof serverData !== "string") {
28575
28501
  throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: serverData must be a string");
28576
28502
  }
@@ -28581,7 +28507,7 @@ var require_sasl = __commonJS({
28581
28507
  throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce is too short");
28582
28508
  }
28583
28509
  var saltBytes = Buffer.from(sv.salt, "base64");
28584
- var saltedPassword = crypto.pbkdf2Sync(password, saltBytes, sv.iteration, 32, "sha256");
28510
+ var saltedPassword = Hi(password, saltBytes, sv.iteration);
28585
28511
  var clientKey = hmacSha256(saltedPassword, "Client Key");
28586
28512
  var storedKey = sha256(clientKey);
28587
28513
  var clientFirstMessageBare = "n=*,r=" + session.clientNonce;
@@ -28693,6 +28619,15 @@ var require_sasl = __commonJS({
28693
28619
  function hmacSha256(key, msg) {
28694
28620
  return crypto.createHmac("sha256", key).update(msg).digest();
28695
28621
  }
28622
+ function Hi(password, saltBytes, iterations) {
28623
+ var ui1 = hmacSha256(password, Buffer.concat([saltBytes, Buffer.from([0, 0, 0, 1])]));
28624
+ var ui = ui1;
28625
+ for (var i = 0; i < iterations - 1; i++) {
28626
+ ui1 = hmacSha256(password, ui1);
28627
+ ui = xorBuffers(ui, ui1);
28628
+ }
28629
+ return ui;
28630
+ }
28696
28631
  module2.exports = {
28697
28632
  startSession,
28698
28633
  continueSession,
@@ -28701,9 +28636,9 @@ var require_sasl = __commonJS({
28701
28636
  }
28702
28637
  });
28703
28638
 
28704
- // node_modules/.pnpm/split2@4.1.0/node_modules/split2/index.js
28639
+ // node_modules/.pnpm/split2@4.2.0/node_modules/split2/index.js
28705
28640
  var require_split2 = __commonJS({
28706
- "node_modules/.pnpm/split2@4.1.0/node_modules/split2/index.js"(exports, module2) {
28641
+ "node_modules/.pnpm/split2@4.2.0/node_modules/split2/index.js"(exports, module2) {
28707
28642
  "use strict";
28708
28643
  var { Transform } = require("stream");
28709
28644
  var { StringDecoder } = require("string_decoder");
@@ -28765,7 +28700,7 @@ var require_split2 = __commonJS({
28765
28700
  if (typeof matcher === "function") {
28766
28701
  mapper = matcher;
28767
28702
  matcher = /\r?\n/;
28768
- } else if (typeof matcher === "object" && !(matcher instanceof RegExp)) {
28703
+ } else if (typeof matcher === "object" && !(matcher instanceof RegExp) && !matcher[Symbol.split]) {
28769
28704
  options = matcher;
28770
28705
  matcher = /\r?\n/;
28771
28706
  }
@@ -28990,9 +28925,9 @@ var require_lib2 = __commonJS({
28990
28925
  }
28991
28926
  });
28992
28927
 
28993
- // node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/type-overrides.js
28928
+ // node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/type-overrides.js
28994
28929
  var require_type_overrides = __commonJS({
28995
- "node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/type-overrides.js"(exports, module2) {
28930
+ "node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/type-overrides.js"(exports, module2) {
28996
28931
  "use strict";
28997
28932
  var types = require_pg_types();
28998
28933
  function TypeOverrides(userTypes) {
@@ -29110,9 +29045,9 @@ var require_pg_connection_string = __commonJS({
29110
29045
  }
29111
29046
  });
29112
29047
 
29113
- // node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/connection-parameters.js
29048
+ // node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/connection-parameters.js
29114
29049
  var require_connection_parameters = __commonJS({
29115
- "node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/connection-parameters.js"(exports, module2) {
29050
+ "node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/connection-parameters.js"(exports, module2) {
29116
29051
  "use strict";
29117
29052
  var dns = require("dns");
29118
29053
  var defaults = require_defaults();
@@ -29249,9 +29184,9 @@ var require_connection_parameters = __commonJS({
29249
29184
  }
29250
29185
  });
29251
29186
 
29252
- // node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/result.js
29187
+ // node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/result.js
29253
29188
  var require_result = __commonJS({
29254
- "node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/result.js"(exports, module2) {
29189
+ "node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/result.js"(exports, module2) {
29255
29190
  "use strict";
29256
29191
  var types = require_pg_types();
29257
29192
  var matchRegexp = /^([A-Za-z]+)(?: (\d+))?(?: (\d+))?/;
@@ -29334,9 +29269,9 @@ var require_result = __commonJS({
29334
29269
  }
29335
29270
  });
29336
29271
 
29337
- // node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/query.js
29272
+ // node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/query.js
29338
29273
  var require_query = __commonJS({
29339
- "node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/query.js"(exports, module2) {
29274
+ "node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/query.js"(exports, module2) {
29340
29275
  "use strict";
29341
29276
  var { EventEmitter } = require("events");
29342
29277
  var Result = require_result();
@@ -30302,9 +30237,9 @@ var require_dist = __commonJS({
30302
30237
  }
30303
30238
  });
30304
30239
 
30305
- // node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/connection.js
30240
+ // node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/connection.js
30306
30241
  var require_connection = __commonJS({
30307
- "node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/connection.js"(exports, module2) {
30242
+ "node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/connection.js"(exports, module2) {
30308
30243
  "use strict";
30309
30244
  var net = require("net");
30310
30245
  var EventEmitter = require("events").EventEmitter;
@@ -30317,9 +30252,6 @@ var require_connection = __commonJS({
30317
30252
  super();
30318
30253
  config = config || {};
30319
30254
  this.stream = config.stream || new net.Socket();
30320
- if (typeof this.stream === "function") {
30321
- this.stream = this.stream(config);
30322
- }
30323
30255
  this._keepAlive = config.keepAlive;
30324
30256
  this._keepAliveInitialDelayMillis = config.keepAliveInitialDelayMillis;
30325
30257
  this.lastBuffer = false;
@@ -30448,6 +30380,7 @@ var require_connection = __commonJS({
30448
30380
  }
30449
30381
  sync() {
30450
30382
  this._ending = true;
30383
+ this._send(flushBuffer);
30451
30384
  this._send(syncBuffer);
30452
30385
  }
30453
30386
  ref() {
@@ -30486,11 +30419,12 @@ var require_connection = __commonJS({
30486
30419
  }
30487
30420
  });
30488
30421
 
30489
- // node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/client.js
30422
+ // node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/client.js
30490
30423
  var require_client = __commonJS({
30491
- "node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/client.js"(exports, module2) {
30424
+ "node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/client.js"(exports, module2) {
30492
30425
  "use strict";
30493
30426
  var EventEmitter = require("events").EventEmitter;
30427
+ var util2 = require("util");
30494
30428
  var utils = require_utils2();
30495
30429
  var sasl = require_sasl();
30496
30430
  var pgPass = require_lib2();
@@ -30686,29 +30620,17 @@ var require_client = __commonJS({
30686
30620
  }
30687
30621
  _handleAuthSASL(msg) {
30688
30622
  this._checkPgPass(() => {
30689
- try {
30690
- this.saslSession = sasl.startSession(msg.mechanisms);
30691
- this.connection.sendSASLInitialResponseMessage(this.saslSession.mechanism, this.saslSession.response);
30692
- } catch (err2) {
30693
- this.connection.emit("error", err2);
30694
- }
30623
+ this.saslSession = sasl.startSession(msg.mechanisms);
30624
+ this.connection.sendSASLInitialResponseMessage(this.saslSession.mechanism, this.saslSession.response);
30695
30625
  });
30696
30626
  }
30697
30627
  _handleAuthSASLContinue(msg) {
30698
- try {
30699
- sasl.continueSession(this.saslSession, this.password, msg.data);
30700
- this.connection.sendSCRAMClientFinalMessage(this.saslSession.response);
30701
- } catch (err2) {
30702
- this.connection.emit("error", err2);
30703
- }
30628
+ sasl.continueSession(this.saslSession, this.password, msg.data);
30629
+ this.connection.sendSCRAMClientFinalMessage(this.saslSession.response);
30704
30630
  }
30705
30631
  _handleAuthSASLFinal(msg) {
30706
- try {
30707
- sasl.finalizeSession(this.saslSession, msg.data);
30708
- this.saslSession = null;
30709
- } catch (err2) {
30710
- this.connection.emit("error", err2);
30711
- }
30632
+ sasl.finalizeSession(this.saslSession, msg.data);
30633
+ this.saslSession = null;
30712
30634
  }
30713
30635
  _handleBackendKeyData(msg) {
30714
30636
  this.processID = msg.processID;
@@ -30987,9 +30909,9 @@ var require_client = __commonJS({
30987
30909
  }
30988
30910
  });
30989
30911
 
30990
- // node_modules/.pnpm/pg-pool@3.5.2_pg@8.9.0/node_modules/pg-pool/index.js
30912
+ // node_modules/.pnpm/pg-pool@3.6.0_pg@8.8.0/node_modules/pg-pool/index.js
30991
30913
  var require_pg_pool = __commonJS({
30992
- "node_modules/.pnpm/pg-pool@3.5.2_pg@8.9.0/node_modules/pg-pool/index.js"(exports, module2) {
30914
+ "node_modules/.pnpm/pg-pool@3.6.0_pg@8.8.0/node_modules/pg-pool/index.js"(exports, module2) {
30993
30915
  "use strict";
30994
30916
  var EventEmitter = require("events").EventEmitter;
30995
30917
  var NOOP = function() {
@@ -31251,6 +31173,7 @@ var require_pg_pool = __commonJS({
31251
31173
  _release(client, idleListener, err2) {
31252
31174
  client.on("error", idleListener);
31253
31175
  client._poolUseCount = (client._poolUseCount || 0) + 1;
31176
+ this.emit("release", err2, client);
31254
31177
  if (err2 || this.ending || !client._queryable || client._ending || client._poolUseCount >= this.options.maxUses) {
31255
31178
  if (client._poolUseCount >= this.options.maxUses) {
31256
31179
  this.log("remove expended client");
@@ -31362,9 +31285,72 @@ var require_pg_pool = __commonJS({
31362
31285
  }
31363
31286
  });
31364
31287
 
31365
- // node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/native/query.js
31288
+ // node_modules/.pnpm/pg@8.8.0/node_modules/pg/package.json
31289
+ var require_package = __commonJS({
31290
+ "node_modules/.pnpm/pg@8.8.0/node_modules/pg/package.json"(exports, module2) {
31291
+ module2.exports = {
31292
+ name: "pg",
31293
+ version: "8.8.0",
31294
+ description: "PostgreSQL client - pure javascript & libpq with the same API",
31295
+ keywords: [
31296
+ "database",
31297
+ "libpq",
31298
+ "pg",
31299
+ "postgre",
31300
+ "postgres",
31301
+ "postgresql",
31302
+ "rdbms"
31303
+ ],
31304
+ homepage: "https://github.com/brianc/node-postgres",
31305
+ repository: {
31306
+ type: "git",
31307
+ url: "git://github.com/brianc/node-postgres.git",
31308
+ directory: "packages/pg"
31309
+ },
31310
+ author: "Brian Carlson <brian.m.carlson@gmail.com>",
31311
+ main: "./lib",
31312
+ dependencies: {
31313
+ "buffer-writer": "2.0.0",
31314
+ "packet-reader": "1.0.0",
31315
+ "pg-connection-string": "^2.5.0",
31316
+ "pg-pool": "^3.5.2",
31317
+ "pg-protocol": "^1.5.0",
31318
+ "pg-types": "^2.1.0",
31319
+ pgpass: "1.x"
31320
+ },
31321
+ devDependencies: {
31322
+ async: "2.6.4",
31323
+ bluebird: "3.5.2",
31324
+ co: "4.6.0",
31325
+ "pg-copy-streams": "0.3.0"
31326
+ },
31327
+ peerDependencies: {
31328
+ "pg-native": ">=3.0.1"
31329
+ },
31330
+ peerDependenciesMeta: {
31331
+ "pg-native": {
31332
+ optional: true
31333
+ }
31334
+ },
31335
+ scripts: {
31336
+ test: "make test-all"
31337
+ },
31338
+ files: [
31339
+ "lib",
31340
+ "SPONSORS.md"
31341
+ ],
31342
+ license: "MIT",
31343
+ engines: {
31344
+ node: ">= 8.0.0"
31345
+ },
31346
+ gitHead: "c99fb2c127ddf8d712500db2c7b9a5491a178655"
31347
+ };
31348
+ }
31349
+ });
31350
+
31351
+ // node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/native/query.js
31366
31352
  var require_query2 = __commonJS({
31367
- "node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/native/query.js"(exports, module2) {
31353
+ "node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/native/query.js"(exports, module2) {
31368
31354
  "use strict";
31369
31355
  var EventEmitter = require("events").EventEmitter;
31370
31356
  var util2 = require("util");
@@ -31503,12 +31489,13 @@ var require_query2 = __commonJS({
31503
31489
  }
31504
31490
  });
31505
31491
 
31506
- // node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/native/client.js
31492
+ // node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/native/client.js
31507
31493
  var require_client2 = __commonJS({
31508
- "node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/native/client.js"(exports, module2) {
31494
+ "node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/native/client.js"(exports, module2) {
31509
31495
  "use strict";
31510
31496
  var Native = require("pg-native");
31511
31497
  var TypeOverrides = require_type_overrides();
31498
+ var pkg = require_package();
31512
31499
  var EventEmitter = require("events").EventEmitter;
31513
31500
  var util2 = require("util");
31514
31501
  var ConnectionParameters = require_connection_parameters();
@@ -31735,17 +31722,17 @@ var require_client2 = __commonJS({
31735
31722
  }
31736
31723
  });
31737
31724
 
31738
- // node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/native/index.js
31725
+ // node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/native/index.js
31739
31726
  var require_native = __commonJS({
31740
- "node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/native/index.js"(exports, module2) {
31727
+ "node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/native/index.js"(exports, module2) {
31741
31728
  "use strict";
31742
31729
  module2.exports = require_client2();
31743
31730
  }
31744
31731
  });
31745
31732
 
31746
- // node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/index.js
31733
+ // node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/index.js
31747
31734
  var require_lib3 = __commonJS({
31748
- "node_modules/.pnpm/pg@8.9.0/node_modules/pg/lib/index.js"(exports, module2) {
31735
+ "node_modules/.pnpm/pg@8.8.0/node_modules/pg/lib/index.js"(exports, module2) {
31749
31736
  "use strict";
31750
31737
  var Client = require_client();
31751
31738
  var defaults = require_defaults();
@@ -45691,9 +45678,9 @@ var require_connection_config = __commonJS({
45691
45678
  }
45692
45679
  });
45693
45680
 
45694
- // node_modules/.pnpm/lru-cache@7.18.1/node_modules/lru-cache/index.js
45681
+ // node_modules/.pnpm/lru-cache@7.18.3/node_modules/lru-cache/index.js
45695
45682
  var require_lru_cache2 = __commonJS({
45696
- "node_modules/.pnpm/lru-cache@7.18.1/node_modules/lru-cache/index.js"(exports, module2) {
45683
+ "node_modules/.pnpm/lru-cache@7.18.3/node_modules/lru-cache/index.js"(exports, module2) {
45697
45684
  var perf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
45698
45685
  var hasAbortController = typeof AbortController === "function";
45699
45686
  var AC = hasAbortController ? AbortController : class AbortController {
@@ -46088,46 +46075,46 @@ var require_lru_cache2 = __commonJS({
46088
46075
  }
46089
46076
  }
46090
46077
  isValidIndex(index4) {
46091
- return this.keyMap.get(this.keyList[index4]) === index4;
46078
+ return index4 !== void 0 && this.keyMap.get(this.keyList[index4]) === index4;
46092
46079
  }
46093
46080
  *entries() {
46094
46081
  for (const i of this.indexes()) {
46095
- if (!this.isBackgroundFetch(this.valList[i])) {
46082
+ if (this.valList[i] !== void 0 && this.keyList[i] !== void 0 && !this.isBackgroundFetch(this.valList[i])) {
46096
46083
  yield [this.keyList[i], this.valList[i]];
46097
46084
  }
46098
46085
  }
46099
46086
  }
46100
46087
  *rentries() {
46101
46088
  for (const i of this.rindexes()) {
46102
- if (!this.isBackgroundFetch(this.valList[i])) {
46089
+ if (this.valList[i] !== void 0 && this.keyList[i] !== void 0 && !this.isBackgroundFetch(this.valList[i])) {
46103
46090
  yield [this.keyList[i], this.valList[i]];
46104
46091
  }
46105
46092
  }
46106
46093
  }
46107
46094
  *keys() {
46108
46095
  for (const i of this.indexes()) {
46109
- if (!this.isBackgroundFetch(this.valList[i])) {
46096
+ if (this.keyList[i] !== void 0 && !this.isBackgroundFetch(this.valList[i])) {
46110
46097
  yield this.keyList[i];
46111
46098
  }
46112
46099
  }
46113
46100
  }
46114
46101
  *rkeys() {
46115
46102
  for (const i of this.rindexes()) {
46116
- if (!this.isBackgroundFetch(this.valList[i])) {
46103
+ if (this.keyList[i] !== void 0 && !this.isBackgroundFetch(this.valList[i])) {
46117
46104
  yield this.keyList[i];
46118
46105
  }
46119
46106
  }
46120
46107
  }
46121
46108
  *values() {
46122
46109
  for (const i of this.indexes()) {
46123
- if (!this.isBackgroundFetch(this.valList[i])) {
46110
+ if (this.valList[i] !== void 0 && !this.isBackgroundFetch(this.valList[i])) {
46124
46111
  yield this.valList[i];
46125
46112
  }
46126
46113
  }
46127
46114
  }
46128
46115
  *rvalues() {
46129
46116
  for (const i of this.rindexes()) {
46130
- if (!this.isBackgroundFetch(this.valList[i])) {
46117
+ if (this.valList[i] !== void 0 && !this.isBackgroundFetch(this.valList[i])) {
46131
46118
  yield this.valList[i];
46132
46119
  }
46133
46120
  }
@@ -46135,21 +46122,33 @@ var require_lru_cache2 = __commonJS({
46135
46122
  [Symbol.iterator]() {
46136
46123
  return this.entries();
46137
46124
  }
46138
- find(fn, getOptions = {}) {
46125
+ find(fn, getOptions) {
46139
46126
  for (const i of this.indexes()) {
46140
- if (fn(this.valList[i], this.keyList[i], this)) {
46127
+ const v = this.valList[i];
46128
+ const value = this.isBackgroundFetch(v) ? v.__staleWhileFetching : v;
46129
+ if (value === void 0)
46130
+ continue;
46131
+ if (fn(value, this.keyList[i], this)) {
46141
46132
  return this.get(this.keyList[i], getOptions);
46142
46133
  }
46143
46134
  }
46144
46135
  }
46145
46136
  forEach(fn, thisp = this) {
46146
46137
  for (const i of this.indexes()) {
46147
- fn.call(thisp, this.valList[i], this.keyList[i], this);
46138
+ const v = this.valList[i];
46139
+ const value = this.isBackgroundFetch(v) ? v.__staleWhileFetching : v;
46140
+ if (value === void 0)
46141
+ continue;
46142
+ fn.call(thisp, value, this.keyList[i], this);
46148
46143
  }
46149
46144
  }
46150
46145
  rforEach(fn, thisp = this) {
46151
46146
  for (const i of this.rindexes()) {
46152
- fn.call(thisp, this.valList[i], this.keyList[i], this);
46147
+ const v = this.valList[i];
46148
+ const value = this.isBackgroundFetch(v) ? v.__staleWhileFetching : v;
46149
+ if (value === void 0)
46150
+ continue;
46151
+ fn.call(thisp, value, this.keyList[i], this);
46153
46152
  }
46154
46153
  }
46155
46154
  get prune() {
@@ -49234,7 +49233,7 @@ __export(cli_exports, {
49234
49233
  });
49235
49234
  module.exports = __toCommonJS(cli_exports);
49236
49235
 
49237
- // node_modules/.pnpm/commander@9.5.0/node_modules/commander/esm.mjs
49236
+ // node_modules/.pnpm/commander@9.4.1/node_modules/commander/esm.mjs
49238
49237
  var import_index = __toESM(require_commander(), 1);
49239
49238
  var {
49240
49239
  program,
@@ -49341,7 +49340,7 @@ init_source();
49341
49340
  // package.json
49342
49341
  var package_default = {
49343
49342
  name: "drizzle-kit",
49344
- version: "0.17.1",
49343
+ version: "0.17.2",
49345
49344
  repository: "https://github.com/drizzle-team/drizzle-kit-mirror",
49346
49345
  author: "Drizzle Team",
49347
49346
  license: "MIT",
@@ -49601,7 +49600,13 @@ var prepareGenerateConfig = (options) => {
49601
49600
  const drizzleConfig = JSON.parse(
49602
49601
  import_fs10.default.readFileSync(import_path6.default.join(import_path6.default.resolve(path2))).toString()
49603
49602
  );
49604
- return drizzleConfig;
49603
+ const generateConfig = {
49604
+ out: drizzleConfig.out,
49605
+ schema: drizzleConfig.schema,
49606
+ breakpoints: drizzleConfig.breakpoints,
49607
+ custom
49608
+ };
49609
+ return generateConfig;
49605
49610
  }
49606
49611
  if (!schema4) {
49607
49612
  return new Error(`'schema' param must be set`);