drizzle-kit 0.20.17-ab24478 → 0.20.17-ae6e691

Sign up to get free protection for your applications and to get access to all the features.
package/utils-studio.js CHANGED
@@ -573,7 +573,7 @@ var init_global = __esm({
573
573
  }
574
574
  });
575
575
 
576
- // node_modules/.pnpm/zod@3.23.6/node_modules/zod/lib/index.mjs
576
+ // node_modules/.pnpm/zod@3.23.5/node_modules/zod/lib/index.mjs
577
577
  function getErrorMap() {
578
578
  return overrideErrorMap;
579
579
  }
@@ -744,7 +744,7 @@ function createZodEnum(values, params) {
744
744
  }
745
745
  var util, objectUtil, ZodParsedType, getParsedType, ZodIssueCode, ZodError, errorMap, overrideErrorMap, makeIssue, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync, errorUtil, _ZodEnum_cache, _ZodNativeEnum_cache, ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv6Regex, base64Regex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, BRAND, ZodBranded, ZodPipeline, ZodReadonly, 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;
746
746
  var init_lib = __esm({
747
- "node_modules/.pnpm/zod@3.23.6/node_modules/zod/lib/index.mjs"() {
747
+ "node_modules/.pnpm/zod@3.23.5/node_modules/zod/lib/index.mjs"() {
748
748
  (function(util2) {
749
749
  util2.assertEqual = (val) => val;
750
750
  function assertIs(_arg) {
@@ -4240,13 +4240,10 @@ var init_lib = __esm({
4240
4240
  ZodReadonly = class extends ZodType {
4241
4241
  _parse(input) {
4242
4242
  const result = this._def.innerType._parse(input);
4243
- const freeze = (data) => {
4244
- if (isValid(data)) {
4245
- data.value = Object.freeze(data.value);
4246
- }
4247
- return data;
4248
- };
4249
- return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);
4243
+ if (isValid(result)) {
4244
+ result.value = Object.freeze(result.value);
4245
+ }
4246
+ return result;
4250
4247
  }
4251
4248
  unwrap() {
4252
4249
  return this._def.innerType;
@@ -4746,7 +4743,7 @@ var init_pgSchema = __esm({
4746
4743
  });
4747
4744
 
4748
4745
  // src/serializer/sqliteSchema.ts
4749
- var index3, fk3, compositePK3, column3, tableV33, uniqueConstraint3, table3, dialect2, schemaHash3, schemaInternalV32, schemaInternalV42, schemaInternalV52, latestVersion, schemaInternal2, schemaV32, schemaV42, schemaV52, schema2, tableSquashed3, schemaSquashed2, drySQLite, sqliteSchemaV5, backwardCompatibleSqliteSchema;
4746
+ var index3, fk3, compositePK3, column3, tableV33, uniqueConstraint3, table3, dialect2, schemaHash3, schemaInternalV32, schemaInternalV42, latestVersion, schemaInternal2, schemaV32, schemaV42, schema2, tableSquashed3, schemaSquashed2, drySQLite;
4750
4747
  var init_sqliteSchema = __esm({
4751
4748
  "src/serializer/sqliteSchema.ts"() {
4752
4749
  "use strict";
@@ -4814,17 +4811,7 @@ var init_sqliteSchema = __esm({
4814
4811
  tables: recordType(stringType(), table3),
4815
4812
  enums: objectType({})
4816
4813
  }).strict();
4817
- schemaInternalV52 = objectType({
4818
- version: literalType("5"),
4819
- dialect: dialect2,
4820
- tables: recordType(stringType(), table3),
4821
- enums: objectType({}),
4822
- _meta: objectType({
4823
- tables: recordType(stringType(), stringType()),
4824
- columns: recordType(stringType(), stringType())
4825
- })
4826
- }).strict();
4827
- latestVersion = literalType("6");
4814
+ latestVersion = literalType("5");
4828
4815
  schemaInternal2 = objectType({
4829
4816
  version: latestVersion,
4830
4817
  dialect: dialect2,
@@ -4837,7 +4824,6 @@ var init_sqliteSchema = __esm({
4837
4824
  }).strict();
4838
4825
  schemaV32 = schemaInternalV32.merge(schemaHash3).strict();
4839
4826
  schemaV42 = schemaInternalV42.merge(schemaHash3).strict();
4840
- schemaV52 = schemaInternalV52.merge(schemaHash3).strict();
4841
4827
  schema2 = schemaInternal2.merge(schemaHash3).strict();
4842
4828
  tableSquashed3 = objectType({
4843
4829
  name: stringType(),
@@ -4854,7 +4840,7 @@ var init_sqliteSchema = __esm({
4854
4840
  enums: anyType()
4855
4841
  }).strict();
4856
4842
  drySQLite = schema2.parse({
4857
- version: "6",
4843
+ version: "5",
4858
4844
  dialect: "sqlite",
4859
4845
  id: originUUID,
4860
4846
  prevId: "",
@@ -4865,8 +4851,6 @@ var init_sqliteSchema = __esm({
4865
4851
  columns: {}
4866
4852
  }
4867
4853
  });
4868
- sqliteSchemaV5 = schemaV52;
4869
- backwardCompatibleSqliteSchema = unionType([sqliteSchemaV5, schema2]);
4870
4854
  }
4871
4855
  });
4872
4856
 
@@ -5144,7 +5128,7 @@ WHERE
5144
5128
  progressCallback("enums", 0, "done");
5145
5129
  }
5146
5130
  return {
5147
- version: "6",
5131
+ version: "5",
5148
5132
  dialect: "sqlite",
5149
5133
  tables: result,
5150
5134
  enums: {},
package/utils-studio.mjs CHANGED
@@ -574,7 +574,7 @@ var init_global = __esm({
574
574
  }
575
575
  });
576
576
 
577
- // node_modules/.pnpm/zod@3.23.6/node_modules/zod/lib/index.mjs
577
+ // node_modules/.pnpm/zod@3.23.5/node_modules/zod/lib/index.mjs
578
578
  function getErrorMap() {
579
579
  return overrideErrorMap;
580
580
  }
@@ -745,7 +745,7 @@ function createZodEnum(values, params) {
745
745
  }
746
746
  var util, objectUtil, ZodParsedType, getParsedType, ZodIssueCode, ZodError, errorMap, overrideErrorMap, makeIssue, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync, errorUtil, _ZodEnum_cache, _ZodNativeEnum_cache, ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv6Regex, base64Regex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, BRAND, ZodBranded, ZodPipeline, ZodReadonly, 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;
747
747
  var init_lib = __esm({
748
- "node_modules/.pnpm/zod@3.23.6/node_modules/zod/lib/index.mjs"() {
748
+ "node_modules/.pnpm/zod@3.23.5/node_modules/zod/lib/index.mjs"() {
749
749
  (function(util2) {
750
750
  util2.assertEqual = (val) => val;
751
751
  function assertIs(_arg) {
@@ -4241,13 +4241,10 @@ var init_lib = __esm({
4241
4241
  ZodReadonly = class extends ZodType {
4242
4242
  _parse(input) {
4243
4243
  const result = this._def.innerType._parse(input);
4244
- const freeze = (data) => {
4245
- if (isValid(data)) {
4246
- data.value = Object.freeze(data.value);
4247
- }
4248
- return data;
4249
- };
4250
- return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);
4244
+ if (isValid(result)) {
4245
+ result.value = Object.freeze(result.value);
4246
+ }
4247
+ return result;
4251
4248
  }
4252
4249
  unwrap() {
4253
4250
  return this._def.innerType;
@@ -4747,7 +4744,7 @@ var init_pgSchema = __esm({
4747
4744
  });
4748
4745
 
4749
4746
  // src/serializer/sqliteSchema.ts
4750
- var index3, fk3, compositePK3, column3, tableV33, uniqueConstraint3, table3, dialect2, schemaHash3, schemaInternalV32, schemaInternalV42, schemaInternalV52, latestVersion, schemaInternal2, schemaV32, schemaV42, schemaV52, schema2, tableSquashed3, schemaSquashed2, drySQLite, sqliteSchemaV5, backwardCompatibleSqliteSchema;
4747
+ var index3, fk3, compositePK3, column3, tableV33, uniqueConstraint3, table3, dialect2, schemaHash3, schemaInternalV32, schemaInternalV42, latestVersion, schemaInternal2, schemaV32, schemaV42, schema2, tableSquashed3, schemaSquashed2, drySQLite;
4751
4748
  var init_sqliteSchema = __esm({
4752
4749
  "src/serializer/sqliteSchema.ts"() {
4753
4750
  "use strict";
@@ -4815,17 +4812,7 @@ var init_sqliteSchema = __esm({
4815
4812
  tables: recordType(stringType(), table3),
4816
4813
  enums: objectType({})
4817
4814
  }).strict();
4818
- schemaInternalV52 = objectType({
4819
- version: literalType("5"),
4820
- dialect: dialect2,
4821
- tables: recordType(stringType(), table3),
4822
- enums: objectType({}),
4823
- _meta: objectType({
4824
- tables: recordType(stringType(), stringType()),
4825
- columns: recordType(stringType(), stringType())
4826
- })
4827
- }).strict();
4828
- latestVersion = literalType("6");
4815
+ latestVersion = literalType("5");
4829
4816
  schemaInternal2 = objectType({
4830
4817
  version: latestVersion,
4831
4818
  dialect: dialect2,
@@ -4838,7 +4825,6 @@ var init_sqliteSchema = __esm({
4838
4825
  }).strict();
4839
4826
  schemaV32 = schemaInternalV32.merge(schemaHash3).strict();
4840
4827
  schemaV42 = schemaInternalV42.merge(schemaHash3).strict();
4841
- schemaV52 = schemaInternalV52.merge(schemaHash3).strict();
4842
4828
  schema2 = schemaInternal2.merge(schemaHash3).strict();
4843
4829
  tableSquashed3 = objectType({
4844
4830
  name: stringType(),
@@ -4855,7 +4841,7 @@ var init_sqliteSchema = __esm({
4855
4841
  enums: anyType()
4856
4842
  }).strict();
4857
4843
  drySQLite = schema2.parse({
4858
- version: "6",
4844
+ version: "5",
4859
4845
  dialect: "sqlite",
4860
4846
  id: originUUID,
4861
4847
  prevId: "",
@@ -4866,8 +4852,6 @@ var init_sqliteSchema = __esm({
4866
4852
  columns: {}
4867
4853
  }
4868
4854
  });
4869
- sqliteSchemaV5 = schemaV52;
4870
- backwardCompatibleSqliteSchema = unionType([sqliteSchemaV5, schema2]);
4871
4855
  }
4872
4856
  });
4873
4857
 
@@ -5149,7 +5133,7 @@ WHERE
5149
5133
  progressCallback("enums", 0, "done");
5150
5134
  }
5151
5135
  return {
5152
- version: "6",
5136
+ version: "5",
5153
5137
  dialect: "sqlite",
5154
5138
  tables: result,
5155
5139
  enums: {},
package/utils.js CHANGED
@@ -1079,7 +1079,7 @@ var info = (msg, greyMsg = "") => {
1079
1079
  var originUUID = "00000000-0000-0000-0000-000000000000";
1080
1080
  var snapshotVersion = "6";
1081
1081
 
1082
- // node_modules/.pnpm/zod@3.23.6/node_modules/zod/lib/index.mjs
1082
+ // node_modules/.pnpm/zod@3.23.5/node_modules/zod/lib/index.mjs
1083
1083
  var util;
1084
1084
  (function(util2) {
1085
1085
  util2.assertEqual = (val) => val;
@@ -4749,13 +4749,10 @@ var ZodPipeline = class _ZodPipeline extends ZodType {
4749
4749
  var ZodReadonly = class extends ZodType {
4750
4750
  _parse(input) {
4751
4751
  const result = this._def.innerType._parse(input);
4752
- const freeze = (data) => {
4753
- if (isValid(data)) {
4754
- data.value = Object.freeze(data.value);
4755
- }
4756
- return data;
4757
- };
4758
- return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);
4752
+ if (isValid(result)) {
4753
+ result.value = Object.freeze(result.value);
4754
+ }
4755
+ return result;
4759
4756
  }
4760
4757
  unwrap() {
4761
4758
  return this._def.innerType;
@@ -5300,17 +5297,7 @@ var schemaInternalV42 = objectType({
5300
5297
  tables: recordType(stringType(), table3),
5301
5298
  enums: objectType({})
5302
5299
  }).strict();
5303
- var schemaInternalV52 = objectType({
5304
- version: literalType("5"),
5305
- dialect: dialect2,
5306
- tables: recordType(stringType(), table3),
5307
- enums: objectType({}),
5308
- _meta: objectType({
5309
- tables: recordType(stringType(), stringType()),
5310
- columns: recordType(stringType(), stringType())
5311
- })
5312
- }).strict();
5313
- var latestVersion = literalType("6");
5300
+ var latestVersion = literalType("5");
5314
5301
  var schemaInternal2 = objectType({
5315
5302
  version: latestVersion,
5316
5303
  dialect: dialect2,
@@ -5323,7 +5310,6 @@ var schemaInternal2 = objectType({
5323
5310
  }).strict();
5324
5311
  var schemaV32 = schemaInternalV32.merge(schemaHash3).strict();
5325
5312
  var schemaV42 = schemaInternalV42.merge(schemaHash3).strict();
5326
- var schemaV52 = schemaInternalV52.merge(schemaHash3).strict();
5327
5313
  var schema2 = schemaInternal2.merge(schemaHash3).strict();
5328
5314
  var tableSquashed3 = objectType({
5329
5315
  name: stringType(),
@@ -5340,7 +5326,7 @@ var schemaSquashed2 = objectType({
5340
5326
  enums: anyType()
5341
5327
  }).strict();
5342
5328
  var drySQLite = schema2.parse({
5343
- version: "6",
5329
+ version: "5",
5344
5330
  dialect: "sqlite",
5345
5331
  id: originUUID,
5346
5332
  prevId: "",
@@ -5351,8 +5337,7 @@ var drySQLite = schema2.parse({
5351
5337
  columns: {}
5352
5338
  }
5353
5339
  });
5354
- var sqliteSchemaV5 = schemaV52;
5355
- var backwardCompatibleSqliteSchema = unionType([sqliteSchemaV5, schema2]);
5340
+ var backwardCompatibleSqliteSchema = schema2;
5356
5341
 
5357
5342
  // src/utils.ts
5358
5343
  var import_path = require("path");
@@ -5401,7 +5386,7 @@ var validatorForDialect = (dialect3) => {
5401
5386
  case "postgresql":
5402
5387
  return { validator: backwardCompatiblePgSchema, version: 6 };
5403
5388
  case "sqlite":
5404
- return { validator: backwardCompatibleSqliteSchema, version: 6 };
5389
+ return { validator: backwardCompatibleSqliteSchema, version: 5 };
5405
5390
  case "mysql":
5406
5391
  return { validator: backwardCompatibleMysqlSchema, version: 5 };
5407
5392
  }
@@ -5422,7 +5407,6 @@ var validateWithReport = (snapshots, dialect3) => {
5422
5407
  }
5423
5408
  const result2 = validator.safeParse(raw);
5424
5409
  if (!result2.success) {
5425
- console.error(result2.error);
5426
5410
  accum.malformed.push(it);
5427
5411
  return accum;
5428
5412
  }
package/utils.mjs CHANGED
@@ -1070,7 +1070,7 @@ var info = (msg, greyMsg = "") => {
1070
1070
  var originUUID = "00000000-0000-0000-0000-000000000000";
1071
1071
  var snapshotVersion = "6";
1072
1072
 
1073
- // node_modules/.pnpm/zod@3.23.6/node_modules/zod/lib/index.mjs
1073
+ // node_modules/.pnpm/zod@3.23.5/node_modules/zod/lib/index.mjs
1074
1074
  var util;
1075
1075
  (function(util2) {
1076
1076
  util2.assertEqual = (val) => val;
@@ -4740,13 +4740,10 @@ var ZodPipeline = class _ZodPipeline extends ZodType {
4740
4740
  var ZodReadonly = class extends ZodType {
4741
4741
  _parse(input) {
4742
4742
  const result = this._def.innerType._parse(input);
4743
- const freeze = (data) => {
4744
- if (isValid(data)) {
4745
- data.value = Object.freeze(data.value);
4746
- }
4747
- return data;
4748
- };
4749
- return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);
4743
+ if (isValid(result)) {
4744
+ result.value = Object.freeze(result.value);
4745
+ }
4746
+ return result;
4750
4747
  }
4751
4748
  unwrap() {
4752
4749
  return this._def.innerType;
@@ -5291,17 +5288,7 @@ var schemaInternalV42 = objectType({
5291
5288
  tables: recordType(stringType(), table3),
5292
5289
  enums: objectType({})
5293
5290
  }).strict();
5294
- var schemaInternalV52 = objectType({
5295
- version: literalType("5"),
5296
- dialect: dialect2,
5297
- tables: recordType(stringType(), table3),
5298
- enums: objectType({}),
5299
- _meta: objectType({
5300
- tables: recordType(stringType(), stringType()),
5301
- columns: recordType(stringType(), stringType())
5302
- })
5303
- }).strict();
5304
- var latestVersion = literalType("6");
5291
+ var latestVersion = literalType("5");
5305
5292
  var schemaInternal2 = objectType({
5306
5293
  version: latestVersion,
5307
5294
  dialect: dialect2,
@@ -5314,7 +5301,6 @@ var schemaInternal2 = objectType({
5314
5301
  }).strict();
5315
5302
  var schemaV32 = schemaInternalV32.merge(schemaHash3).strict();
5316
5303
  var schemaV42 = schemaInternalV42.merge(schemaHash3).strict();
5317
- var schemaV52 = schemaInternalV52.merge(schemaHash3).strict();
5318
5304
  var schema2 = schemaInternal2.merge(schemaHash3).strict();
5319
5305
  var tableSquashed3 = objectType({
5320
5306
  name: stringType(),
@@ -5331,7 +5317,7 @@ var schemaSquashed2 = objectType({
5331
5317
  enums: anyType()
5332
5318
  }).strict();
5333
5319
  var drySQLite = schema2.parse({
5334
- version: "6",
5320
+ version: "5",
5335
5321
  dialect: "sqlite",
5336
5322
  id: originUUID,
5337
5323
  prevId: "",
@@ -5342,8 +5328,7 @@ var drySQLite = schema2.parse({
5342
5328
  columns: {}
5343
5329
  }
5344
5330
  });
5345
- var sqliteSchemaV5 = schemaV52;
5346
- var backwardCompatibleSqliteSchema = unionType([sqliteSchemaV5, schema2]);
5331
+ var backwardCompatibleSqliteSchema = schema2;
5347
5332
 
5348
5333
  // src/utils.ts
5349
5334
  import { join } from "path";
@@ -5392,7 +5377,7 @@ var validatorForDialect = (dialect3) => {
5392
5377
  case "postgresql":
5393
5378
  return { validator: backwardCompatiblePgSchema, version: 6 };
5394
5379
  case "sqlite":
5395
- return { validator: backwardCompatibleSqliteSchema, version: 6 };
5380
+ return { validator: backwardCompatibleSqliteSchema, version: 5 };
5396
5381
  case "mysql":
5397
5382
  return { validator: backwardCompatibleMysqlSchema, version: 5 };
5398
5383
  }
@@ -5413,7 +5398,6 @@ var validateWithReport = (snapshots, dialect3) => {
5413
5398
  }
5414
5399
  const result2 = validator.safeParse(raw);
5415
5400
  if (!result2.success) {
5416
- console.error(result2.error);
5417
5401
  accum.malformed.push(it);
5418
5402
  return accum;
5419
5403
  }