drizzle-kit 0.20.14-6ce9d1f → 0.20.14-a77266f

Sign up to get free protection for your applications and to get access to all the features.
package/payload.mjs CHANGED
@@ -2103,7 +2103,7 @@ ${withStyle.errorWarning(
2103
2103
  --end;
2104
2104
  return start > 0 || end < str.length ? str.substring(start, end) : str.toString();
2105
2105
  };
2106
- fromDatabase2 = async (db, tablesFilter = () => true, schemaFilters, progressCallback) => {
2106
+ fromDatabase2 = async (db, tablesFilter = (table4) => true, schemaFilters, progressCallback) => {
2107
2107
  const result = {};
2108
2108
  const internals = { tables: {} };
2109
2109
  const where = schemaFilters.map((t) => `table_schema = '${t}'`).join(" or ");
@@ -6178,226 +6178,6 @@ var init_lib = __esm({
6178
6178
  }
6179
6179
  });
6180
6180
 
6181
- // src/cli/validations/common.ts
6182
- var init_common = __esm({
6183
- "src/cli/validations/common.ts"() {
6184
- init_outputs();
6185
- }
6186
- });
6187
-
6188
- // src/cli/validations/mysql.ts
6189
- var mysqlConnectionCli, mysql2credentials, mysqlConnectionConfig, mysqlConfigIntrospectSchema, mysqlCliIntrospectParams, mysqlCliPushParams, mysqlConfigPushParams;
6190
- var init_mysql = __esm({
6191
- "src/cli/validations/mysql.ts"() {
6192
- init_lib();
6193
- init_utils();
6194
- init_common();
6195
- init_outputs();
6196
- mysqlConnectionCli = unionType([
6197
- objectType({
6198
- driver: literalType("mysql2"),
6199
- host: stringType(),
6200
- port: coerce.number().optional(),
6201
- user: stringType().default("mysql"),
6202
- password: stringType().optional(),
6203
- database: stringType()
6204
- }),
6205
- objectType({
6206
- driver: literalType("mysql2"),
6207
- uri: stringType()
6208
- // TODO: change docs
6209
- })
6210
- ]);
6211
- mysql2credentials = unionType([
6212
- objectType({
6213
- host: stringType(),
6214
- port: coerce.number().optional(),
6215
- user: stringType().default("mysql"),
6216
- password: stringType().optional(),
6217
- database: stringType()
6218
- }),
6219
- objectType({
6220
- uri: stringType()
6221
- // TODO: change docs
6222
- })
6223
- ]);
6224
- mysqlConnectionConfig = objectType({
6225
- driver: literalType("mysql2"),
6226
- dbCredentials: mysql2credentials
6227
- });
6228
- mysqlConfigIntrospectSchema = intersectionType(
6229
- configIntrospectSchema,
6230
- mysqlConnectionConfig
6231
- );
6232
- mysqlCliIntrospectParams = intersectionType(
6233
- configIntrospectCliSchema,
6234
- mysqlConnectionCli
6235
- );
6236
- mysqlCliPushParams = intersectionType(
6237
- configPushSchema,
6238
- mysqlConnectionCli
6239
- );
6240
- mysqlConfigPushParams = intersectionType(
6241
- configPushSchema,
6242
- mysqlConnectionConfig
6243
- );
6244
- }
6245
- });
6246
-
6247
- // src/cli/validations/pg.ts
6248
- var pgConnectionCli, pgConnectionConfig, pgConfigIntrospectSchema, pgCliIntrospectParams, pgCliPushParams, pgConfigPushParams;
6249
- var init_pg = __esm({
6250
- "src/cli/validations/pg.ts"() {
6251
- init_lib();
6252
- init_utils();
6253
- init_common();
6254
- init_outputs();
6255
- pgConnectionCli = unionType([
6256
- objectType({
6257
- driver: literalType("pg"),
6258
- host: stringType(),
6259
- port: coerce.number().optional(),
6260
- user: stringType().default("postgres"),
6261
- password: stringType().optional(),
6262
- database: stringType(),
6263
- ssl: coerce.boolean().optional(),
6264
- type: literalType("params").default("params")
6265
- }),
6266
- objectType({
6267
- driver: literalType("pg"),
6268
- connectionString: stringType(),
6269
- type: literalType("url").default("url")
6270
- })
6271
- ]);
6272
- pgConnectionConfig = unionType([
6273
- objectType({
6274
- driver: literalType("pg"),
6275
- dbCredentials: objectType({
6276
- host: stringType(),
6277
- port: coerce.number().optional(),
6278
- user: stringType().default("postgres"),
6279
- password: stringType().optional(),
6280
- database: stringType(),
6281
- ssl: coerce.boolean().optional(),
6282
- type: literalType("params").default("params").optional()
6283
- })
6284
- }),
6285
- objectType({
6286
- driver: literalType("pg"),
6287
- dbCredentials: objectType({
6288
- connectionString: stringType(),
6289
- type: literalType("url").default("url").optional()
6290
- })
6291
- })
6292
- ]);
6293
- pgConfigIntrospectSchema = intersectionType(
6294
- configIntrospectSchema,
6295
- pgConnectionConfig
6296
- );
6297
- pgCliIntrospectParams = intersectionType(
6298
- configIntrospectCliSchema,
6299
- pgConnectionCli
6300
- );
6301
- pgCliPushParams = intersectionType(
6302
- configPushSchema,
6303
- pgConnectionCli
6304
- );
6305
- pgConfigPushParams = intersectionType(
6306
- configPushSchema,
6307
- pgConnectionConfig
6308
- );
6309
- }
6310
- });
6311
-
6312
- // src/cli/commands/sqliteUtils.ts
6313
- var sqliteConnectionSchema, sqliteCliConfigSchema;
6314
- var init_sqliteUtils = __esm({
6315
- "src/cli/commands/sqliteUtils.ts"() {
6316
- init_lib();
6317
- init_utils();
6318
- sqliteConnectionSchema = unionType([
6319
- objectType({
6320
- driver: literalType("turso"),
6321
- dbCredentials: objectType({
6322
- url: stringType(),
6323
- authToken: stringType().optional()
6324
- })
6325
- }),
6326
- objectType({
6327
- driver: literalType("libsql"),
6328
- dbCredentials: objectType({
6329
- url: stringType()
6330
- })
6331
- }),
6332
- objectType({
6333
- driver: literalType("better-sqlite"),
6334
- dbCredentials: objectType({
6335
- url: stringType()
6336
- })
6337
- })
6338
- ]);
6339
- sqliteCliConfigSchema = intersectionType(
6340
- configIntrospectSchema,
6341
- sqliteConnectionSchema
6342
- );
6343
- }
6344
- });
6345
-
6346
- // src/cli/validations/sqlite.ts
6347
- var sqliteConnectionCli, sqliteCliIntrospectParams, sqliteCliPushParams, sqliteConfigPushParams;
6348
- var init_sqlite = __esm({
6349
- "src/cli/validations/sqlite.ts"() {
6350
- init_lib();
6351
- init_sqliteUtils();
6352
- init_utils();
6353
- init_common();
6354
- init_outputs();
6355
- sqliteConnectionCli = unionType([
6356
- objectType({
6357
- driver: literalType("turso"),
6358
- url: stringType(),
6359
- authToken: stringType()
6360
- }),
6361
- objectType({
6362
- driver: literalType("better-sqlite"),
6363
- url: stringType()
6364
- }),
6365
- objectType({
6366
- driver: literalType("libsql"),
6367
- url: stringType()
6368
- })
6369
- ]);
6370
- sqliteCliIntrospectParams = intersectionType(
6371
- configIntrospectCliSchema,
6372
- sqliteConnectionCli
6373
- );
6374
- sqliteCliPushParams = intersectionType(
6375
- configPushSchema,
6376
- sqliteConnectionCli
6377
- );
6378
- sqliteConfigPushParams = intersectionType(
6379
- configPushSchema,
6380
- sqliteConnectionSchema
6381
- );
6382
- }
6383
- });
6384
-
6385
- // src/global.ts
6386
- var originUUID, snapshotVersion, mapValues;
6387
- var init_global = __esm({
6388
- "src/global.ts"() {
6389
- originUUID = "00000000-0000-0000-0000-000000000000";
6390
- snapshotVersion = "5";
6391
- mapValues = (obj, map) => {
6392
- const result = Object.keys(obj).reduce(function(result2, key) {
6393
- result2[key] = map(obj[key]);
6394
- return result2;
6395
- }, {});
6396
- return result;
6397
- };
6398
- }
6399
- });
6400
-
6401
6181
  // src/cli/commands/_es5.ts
6402
6182
  var es5_exports = {};
6403
6183
  __export(es5_exports, {
@@ -12025,13 +11805,6 @@ var init_utils = __esm({
12025
11805
  init_source();
12026
11806
  init_views();
12027
11807
  import_hanji2 = __toESM(require_hanji());
12028
- init_mysql();
12029
- init_pg();
12030
- init_sqlite();
12031
- init_outputs();
12032
- init_pg();
12033
- init_sqlite();
12034
- init_global();
12035
11808
  assertES5 = async (unregister) => {
12036
11809
  try {
12037
11810
  init_es5();
@@ -12202,6 +11975,22 @@ var init_pgImports = __esm({
12202
11975
  }
12203
11976
  });
12204
11977
 
11978
+ // src/global.ts
11979
+ var originUUID, snapshotVersion, mapValues;
11980
+ var init_global = __esm({
11981
+ "src/global.ts"() {
11982
+ originUUID = "00000000-0000-0000-0000-000000000000";
11983
+ snapshotVersion = "5";
11984
+ mapValues = (obj, map) => {
11985
+ const result = Object.keys(obj).reduce(function(result2, key) {
11986
+ result2[key] = map(obj[key]);
11987
+ return result2;
11988
+ }, {});
11989
+ return result;
11990
+ };
11991
+ }
11992
+ });
11993
+
12205
11994
  // src/serializer/pgSchema.ts
12206
11995
  var indexV2, columnV2, tableV2, enumSchema, pgSchemaV2, references, columnV1, tableV1, pgSchemaV1, index, fk, column, tableV3, compositePK, uniqueConstraint, tableV4, table, schemaHash, pgSchemaInternalV3, pgSchemaInternalV4, pgSchemaExternal, kitInternals, pgSchemaInternal, tableSquashed, tableSquashedV4, pgSchemaSquashedV4, pgSchemaSquashed, pgSchemaV3, pgSchemaV4, pgSchema, backwardCompatiblePgSchema, PgSquasher, squashPgScheme, dryPg;
12207
11996
  var init_pgSchema = __esm({
@@ -12695,12 +12484,9 @@ var init_sqliteSchema = __esm({
12695
12484
  const squashedPKs = mapValues(it[1].compositePrimaryKeys, (pk) => {
12696
12485
  return SQLiteSquasher.squashPK(pk);
12697
12486
  });
12698
- const squashedUniqueConstraints = mapValues(
12699
- it[1].uniqueConstraints,
12700
- (unq) => {
12701
- return SQLiteSquasher.squashUnique(unq);
12702
- }
12703
- );
12487
+ const squashedUniqueConstraints = mapValues(it[1].uniqueConstraints, (unq) => {
12488
+ return SQLiteSquasher.squashUnique(unq);
12489
+ });
12704
12490
  return [
12705
12491
  it[0],
12706
12492
  {
@@ -12734,11 +12520,7 @@ var init_sqliteSchema = __esm({
12734
12520
  }
12735
12521
  });
12736
12522
  sqliteSchema = schema2;
12737
- backwardCompatibleSqliteSchema = unionType([
12738
- schemaV3,
12739
- schemaV4,
12740
- schema2
12741
- ]);
12523
+ backwardCompatibleSqliteSchema = unionType([schemaV3, schemaV4, schema2]);
12742
12524
  }
12743
12525
  });
12744
12526
 
@@ -16388,50 +16170,60 @@ var init_migrate = __esm({
16388
16170
  return { sqlStatements, statements, validatedCur, validatedPrev };
16389
16171
  } catch (e) {
16390
16172
  console.error(e);
16391
- process.exit(1);
16392
16173
  }
16393
16174
  };
16394
16175
  prepareSQLitePush = async (config, snapshot) => {
16395
16176
  const schemaPath = config.schema;
16396
- const { prev, cur } = await prepareSQLiteDbPushSnapshot(snapshot, schemaPath);
16397
- const validatedPrev = sqliteSchema.parse(prev);
16398
- const validatedCur = sqliteSchema.parse(cur);
16399
- const squashedPrev = squashSqliteScheme(validatedPrev);
16400
- const squashedCur = squashSqliteScheme(validatedCur);
16401
- const { sqlStatements, statements, _meta } = await prepareSQL(
16402
- squashedPrev,
16403
- squashedCur,
16404
- "sqlite",
16405
- validatedPrev,
16406
- validatedCur
16407
- );
16408
- return {
16409
- sqlStatements,
16410
- statements,
16411
- squashedPrev,
16412
- squashedCur,
16413
- meta: _meta
16414
- };
16177
+ try {
16178
+ const { prev, cur } = await prepareSQLiteDbPushSnapshot(
16179
+ snapshot,
16180
+ schemaPath
16181
+ );
16182
+ const validatedPrev = sqliteSchema.parse(prev);
16183
+ const validatedCur = sqliteSchema.parse(cur);
16184
+ const squashedPrev = squashSqliteScheme(validatedPrev);
16185
+ const squashedCur = squashSqliteScheme(validatedCur);
16186
+ const { sqlStatements, statements, _meta } = await prepareSQL(
16187
+ squashedPrev,
16188
+ squashedCur,
16189
+ "sqlite",
16190
+ validatedPrev,
16191
+ validatedCur
16192
+ );
16193
+ return {
16194
+ sqlStatements,
16195
+ statements,
16196
+ squashedPrev,
16197
+ squashedCur,
16198
+ meta: _meta
16199
+ };
16200
+ } catch (e) {
16201
+ console.error(e);
16202
+ }
16415
16203
  };
16416
16204
  preparePgPush = async (config, snapshot, schemaFilter) => {
16417
16205
  const schemaPath = config.schema;
16418
- const { prev, cur } = await preparePgDbPushSnapshot(
16419
- snapshot,
16420
- schemaPath,
16421
- schemaFilter
16422
- );
16423
- const validatedPrev = pgSchema.parse(prev);
16424
- const validatedCur = pgSchema.parse(cur);
16425
- const squashedPrev = squashPgScheme(validatedPrev);
16426
- const squashedCur = squashPgScheme(validatedCur);
16427
- const { sqlStatements, statements } = await prepareSQL(
16428
- squashedPrev,
16429
- squashedCur,
16430
- "pg",
16431
- validatedPrev,
16432
- validatedCur
16433
- );
16434
- return { sqlStatements, statements, squashedPrev, squashedCur };
16206
+ try {
16207
+ const { prev, cur } = await preparePgDbPushSnapshot(
16208
+ snapshot,
16209
+ schemaPath,
16210
+ schemaFilter
16211
+ );
16212
+ const validatedPrev = pgSchema.parse(prev);
16213
+ const validatedCur = pgSchema.parse(cur);
16214
+ const squashedPrev = squashPgScheme(validatedPrev);
16215
+ const squashedCur = squashPgScheme(validatedCur);
16216
+ const { sqlStatements, statements } = await prepareSQL(
16217
+ squashedPrev,
16218
+ squashedCur,
16219
+ "pg",
16220
+ validatedPrev,
16221
+ validatedCur
16222
+ );
16223
+ return { sqlStatements, statements, squashedPrev, squashedCur };
16224
+ } catch (e) {
16225
+ console.error(e);
16226
+ }
16435
16227
  };
16436
16228
  prepareAndMigrateMySql = async (config) => {
16437
16229
  const outFolder = config.out;
@@ -1,5 +1,5 @@
1
1
  import { TypeOf } from "zod";
2
- export declare const dialect: import("zod").ZodEnum<["pg", "mysql", "sqlite"]>;
2
+ declare const dialect: import("zod").ZodEnum<["pg", "mysql", "sqlite"]>;
3
3
  export type Dialect = TypeOf<typeof dialect>;
4
4
  declare const commonSquashedSchema: import("zod").ZodUnion<[import("zod").ZodObject<{
5
5
  version: import("zod").ZodLiteral<"5">;
@@ -1,6 +1,6 @@
1
1
  import { AnyMySqlTable, MySqlSchema } from "drizzle-orm/mysql-core";
2
- import { MySqlSchemaInternal } from "../serializer/mysqlSchema";
3
- import { IntrospectStage, IntrospectStatus } from "../cli/views";
2
+ import { MySqlSchemaInternal } from "src/serializer/mysqlSchema";
3
+ import { IntrospectStage, IntrospectStatus } from "src/cli/views";
4
4
  import { DrizzleDbClient } from "src/drivers";
5
5
  export declare const indexName: (tableName: string, columns: string[]) => string;
6
6
  export declare const generateMySqlSnapshot: (tables: AnyMySqlTable[], enums: any[], mysqlSchemas: MySqlSchema[]) => MySqlSchemaInternal;
@@ -1,6 +1,6 @@
1
1
  import type { SQLiteSchemaInternal } from "../serializer/sqliteSchema";
2
2
  import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
3
- import type { IntrospectStage, IntrospectStatus } from "../cli/views";
4
- import type { DrizzleDbClient } from "../drivers";
3
+ import type { IntrospectStage, IntrospectStatus } from "src/cli/views";
4
+ import type { DrizzleDbClient } from "src/drivers";
5
5
  export declare const generateSqliteSnapshot: (tables: AnySQLiteTable[], enums: any[]) => SQLiteSchemaInternal;
6
6
  export declare const fromDatabase: (db: DrizzleDbClient, tablesFilter?: (table: string) => boolean, progressCallback?: ((stage: IntrospectStage, count: number, status: IntrospectStatus) => void) | undefined) => Promise<SQLiteSchemaInternal>;
package/utils-studio.js CHANGED
@@ -1081,14 +1081,6 @@ var init_views = __esm({
1081
1081
  }
1082
1082
  });
1083
1083
 
1084
- // src/global.ts
1085
- var originUUID;
1086
- var init_global = __esm({
1087
- "src/global.ts"() {
1088
- originUUID = "00000000-0000-0000-0000-000000000000";
1089
- }
1090
- });
1091
-
1092
1084
  // src/serializer/index.ts
1093
1085
  var glob;
1094
1086
  var init_serializer = __esm({
@@ -1579,7 +1571,7 @@ var init_pgSerializer = __esm({
1579
1571
  --end;
1580
1572
  return start > 0 || end < str.length ? str.substring(start, end) : str.toString();
1581
1573
  };
1582
- fromDatabase2 = async (db, tablesFilter = () => true, schemaFilters, progressCallback) => {
1574
+ fromDatabase2 = async (db, tablesFilter = (table) => true, schemaFilters, progressCallback) => {
1583
1575
  const result = {};
1584
1576
  const internals = { tables: {} };
1585
1577
  const where = schemaFilters.map((t) => `table_schema = '${t}'`).join(" or ");
@@ -2174,7 +2166,11 @@ var sqliteSchemaToDrizzle = (schema) => {
2174
2166
 
2175
2167
  // src/cli/commands/sqliteIntrospect.ts
2176
2168
  init_views();
2177
- init_global();
2169
+
2170
+ // src/global.ts
2171
+ var originUUID = "00000000-0000-0000-0000-000000000000";
2172
+
2173
+ // src/cli/commands/sqliteIntrospect.ts
2178
2174
  init_sqliteSerializer();
2179
2175
 
2180
2176
  // node_modules/.pnpm/camelcase@7.0.1/node_modules/camelcase/index.js
@@ -3360,7 +3356,6 @@ var import_relations = require("drizzle-orm/relations");
3360
3356
  init_pgSerializer();
3361
3357
 
3362
3358
  // src/cli/commands/pgIntrospect.ts
3363
- init_global();
3364
3359
  var pgPushIntrospect = async (connection, filters, schemaFilters) => {
3365
3360
  const { client } = connection;
3366
3361
  const matchers = filters.map((it) => {
package/utils-studio.mjs CHANGED
@@ -1083,14 +1083,6 @@ var init_views = __esm({
1083
1083
  }
1084
1084
  });
1085
1085
 
1086
- // src/global.ts
1087
- var originUUID;
1088
- var init_global = __esm({
1089
- "src/global.ts"() {
1090
- originUUID = "00000000-0000-0000-0000-000000000000";
1091
- }
1092
- });
1093
-
1094
1086
  // src/serializer/index.ts
1095
1087
  import * as glob from "glob";
1096
1088
  var init_serializer = __esm({
@@ -1588,7 +1580,7 @@ var init_pgSerializer = __esm({
1588
1580
  --end;
1589
1581
  return start > 0 || end < str.length ? str.substring(start, end) : str.toString();
1590
1582
  };
1591
- fromDatabase2 = async (db, tablesFilter = () => true, schemaFilters, progressCallback) => {
1583
+ fromDatabase2 = async (db, tablesFilter = (table) => true, schemaFilters, progressCallback) => {
1592
1584
  const result = {};
1593
1585
  const internals = { tables: {} };
1594
1586
  const where = schemaFilters.map((t) => `table_schema = '${t}'`).join(" or ");
@@ -2208,7 +2200,11 @@ var sqliteSchemaToDrizzle = (schema) => {
2208
2200
 
2209
2201
  // src/cli/commands/sqliteIntrospect.ts
2210
2202
  init_views();
2211
- init_global();
2203
+
2204
+ // src/global.ts
2205
+ var originUUID = "00000000-0000-0000-0000-000000000000";
2206
+
2207
+ // src/cli/commands/sqliteIntrospect.ts
2212
2208
  init_sqliteSerializer();
2213
2209
 
2214
2210
  // node_modules/.pnpm/camelcase@7.0.1/node_modules/camelcase/index.js
@@ -3399,7 +3395,6 @@ import {
3399
3395
  init_pgSerializer();
3400
3396
 
3401
3397
  // src/cli/commands/pgIntrospect.ts
3402
- init_global();
3403
3398
  var pgPushIntrospect = async (connection, filters, schemaFilters) => {
3404
3399
  const { client } = connection;
3405
3400
  const matchers = filters.map((it) => {
package/utils.js CHANGED
@@ -1086,22 +1086,6 @@ var init_views = __esm({
1086
1086
  }
1087
1087
  });
1088
1088
 
1089
- // src/global.ts
1090
- var originUUID, snapshotVersion, mapValues;
1091
- var init_global = __esm({
1092
- "src/global.ts"() {
1093
- originUUID = "00000000-0000-0000-0000-000000000000";
1094
- snapshotVersion = "5";
1095
- mapValues = (obj, map) => {
1096
- const result = Object.keys(obj).reduce(function(result2, key) {
1097
- result2[key] = map(obj[key]);
1098
- return result2;
1099
- }, {});
1100
- return result;
1101
- };
1102
- }
1103
- });
1104
-
1105
1089
  // node_modules/.pnpm/zod@3.20.2/node_modules/zod/lib/index.mjs
1106
1090
  function getErrorMap() {
1107
1091
  return overrideErrorMap;
@@ -4278,8 +4262,18 @@ module.exports = __toCommonJS(utils_exports);
4278
4262
  var import_fs = require("fs");
4279
4263
  init_views();
4280
4264
 
4265
+ // src/global.ts
4266
+ var originUUID = "00000000-0000-0000-0000-000000000000";
4267
+ var snapshotVersion = "5";
4268
+ var mapValues = (obj, map) => {
4269
+ const result = Object.keys(obj).reduce(function(result2, key) {
4270
+ result2[key] = map(obj[key]);
4271
+ return result2;
4272
+ }, {});
4273
+ return result;
4274
+ };
4275
+
4281
4276
  // src/serializer/mysqlSchema.ts
4282
- init_global();
4283
4277
  init_lib();
4284
4278
  var index = objectType({
4285
4279
  name: stringType(),
@@ -4484,7 +4478,6 @@ var dryMySql = mysqlSchema.parse({
4484
4478
  });
4485
4479
 
4486
4480
  // src/serializer/pgSchema.ts
4487
- init_global();
4488
4481
  init_lib();
4489
4482
  var indexV2 = objectType({
4490
4483
  name: stringType(),
@@ -4811,7 +4804,6 @@ var dryPg = pgSchema.parse({
4811
4804
  });
4812
4805
 
4813
4806
  // src/serializer/sqliteSchema.ts
4814
- init_global();
4815
4807
  init_lib();
4816
4808
  var index3 = objectType({
4817
4809
  name: stringType(),
@@ -4968,16 +4960,11 @@ var drySQLite = schema2.parse({
4968
4960
  columns: {}
4969
4961
  }
4970
4962
  });
4971
- var backwardCompatibleSqliteSchema = unionType([
4972
- schemaV32,
4973
- schemaV42,
4974
- schema2
4975
- ]);
4963
+ var backwardCompatibleSqliteSchema = unionType([schemaV32, schemaV42, schema2]);
4976
4964
 
4977
4965
  // src/utils.ts
4978
4966
  init_source();
4979
4967
  var import_path = require("path");
4980
- init_global();
4981
4968
 
4982
4969
  // src/jsonDiffer.js
4983
4970
  var import_json_diff = require("json-diff");
@@ -7724,7 +7711,6 @@ var applySnapshotsDiff = async (json1, json2, dialect3, schemasResolver, tablesR
7724
7711
 
7725
7712
  // src/cli/commands/pgUp.ts
7726
7713
  init_source();
7727
- init_global();
7728
7714
 
7729
7715
  // src/cli/commands/mysqlUp.ts
7730
7716
  init_source();
package/utils.mjs CHANGED
@@ -1088,22 +1088,6 @@ var init_views = __esm({
1088
1088
  }
1089
1089
  });
1090
1090
 
1091
- // src/global.ts
1092
- var originUUID, snapshotVersion, mapValues;
1093
- var init_global = __esm({
1094
- "src/global.ts"() {
1095
- originUUID = "00000000-0000-0000-0000-000000000000";
1096
- snapshotVersion = "5";
1097
- mapValues = (obj, map) => {
1098
- const result = Object.keys(obj).reduce(function(result2, key) {
1099
- result2[key] = map(obj[key]);
1100
- return result2;
1101
- }, {});
1102
- return result;
1103
- };
1104
- }
1105
- });
1106
-
1107
1091
  // node_modules/.pnpm/zod@3.20.2/node_modules/zod/lib/index.mjs
1108
1092
  function getErrorMap() {
1109
1093
  return overrideErrorMap;
@@ -4269,8 +4253,18 @@ import {
4269
4253
  writeFileSync
4270
4254
  } from "fs";
4271
4255
 
4256
+ // src/global.ts
4257
+ var originUUID = "00000000-0000-0000-0000-000000000000";
4258
+ var snapshotVersion = "5";
4259
+ var mapValues = (obj, map) => {
4260
+ const result = Object.keys(obj).reduce(function(result2, key) {
4261
+ result2[key] = map(obj[key]);
4262
+ return result2;
4263
+ }, {});
4264
+ return result;
4265
+ };
4266
+
4272
4267
  // src/serializer/mysqlSchema.ts
4273
- init_global();
4274
4268
  init_lib();
4275
4269
  var index = objectType({
4276
4270
  name: stringType(),
@@ -4475,7 +4469,6 @@ var dryMySql = mysqlSchema.parse({
4475
4469
  });
4476
4470
 
4477
4471
  // src/serializer/pgSchema.ts
4478
- init_global();
4479
4472
  init_lib();
4480
4473
  var indexV2 = objectType({
4481
4474
  name: stringType(),
@@ -4802,7 +4795,6 @@ var dryPg = pgSchema.parse({
4802
4795
  });
4803
4796
 
4804
4797
  // src/serializer/sqliteSchema.ts
4805
- init_global();
4806
4798
  init_lib();
4807
4799
  var index3 = objectType({
4808
4800
  name: stringType(),
@@ -4959,15 +4951,10 @@ var drySQLite = schema2.parse({
4959
4951
  columns: {}
4960
4952
  }
4961
4953
  });
4962
- var backwardCompatibleSqliteSchema = unionType([
4963
- schemaV32,
4964
- schemaV42,
4965
- schema2
4966
- ]);
4954
+ var backwardCompatibleSqliteSchema = unionType([schemaV32, schemaV42, schema2]);
4967
4955
 
4968
4956
  // src/utils.ts
4969
4957
  init_source();
4970
- init_global();
4971
4958
  import { join } from "path";
4972
4959
 
4973
4960
  // src/jsonDiffer.js
@@ -7715,7 +7702,6 @@ var applySnapshotsDiff = async (json1, json2, dialect3, schemasResolver, tablesR
7715
7702
 
7716
7703
  // src/cli/commands/pgUp.ts
7717
7704
  init_source();
7718
- init_global();
7719
7705
 
7720
7706
  // src/cli/commands/mysqlUp.ts
7721
7707
  init_source();
@@ -1,2 +0,0 @@
1
- import { Dialect } from "../../schemaValidator";
2
- export declare const checkHandler: (out: string, dialect: Dialect) => void;
@@ -1,4 +0,0 @@
1
- export declare const dropMigration: ({ out, bundle, }: {
2
- out: string;
3
- bundle?: boolean | undefined;
4
- }) => Promise<void>;