drizzle-kit 0.20.14-c82ab68 → 0.20.14-d8f1e46

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. package/bin.cjs +7142 -7442
  2. package/cli/commands/migrate.d.ts +24 -24
  3. package/cli/commands/mysqlIntrospect.d.ts +8 -8
  4. package/cli/commands/mysqlPushUtils.d.ts +2 -2
  5. package/cli/commands/mysqlUp.d.ts +2 -2
  6. package/cli/commands/pgConnect.d.ts +1 -1
  7. package/cli/commands/pgIntrospect.d.ts +9 -12
  8. package/cli/commands/pgPushUtils.d.ts +2 -2
  9. package/cli/commands/pgUp.d.ts +2 -2
  10. package/cli/commands/sqliteIntrospect.d.ts +9 -9
  11. package/cli/commands/sqlitePushUtils.d.ts +3 -3
  12. package/cli/commands/sqliteUtils.d.ts +162 -0
  13. package/cli/commands/upFolders.d.ts +1 -1
  14. package/cli/commands/utils.d.ts +259 -14
  15. package/cli/validations/common.d.ts +7 -205
  16. package/cli/validations/mysql.d.ts +1 -6
  17. package/cli/validations/pg.d.ts +1 -6
  18. package/cli/views.d.ts +1 -1
  19. package/global.d.ts +1 -1
  20. package/index.d.mts +6 -8
  21. package/index.d.ts +6 -8
  22. package/index.js +0 -1
  23. package/introspect-mysql.d.ts +1 -1
  24. package/introspect-pg.d.ts +2 -5
  25. package/introspect-sqlite.d.ts +1 -1
  26. package/jsonStatements.d.ts +1 -1
  27. package/package.json +2 -3
  28. package/payload.d.mts +988 -18
  29. package/payload.d.ts +988 -18
  30. package/payload.js +1616 -13426
  31. package/payload.mjs +1538 -2213
  32. package/schemaValidator.d.ts +40 -40
  33. package/serializer/mysqlSchema.d.ts +616 -1854
  34. package/serializer/mysqlSerializer.d.ts +2 -2
  35. package/serializer/pgSchema.d.ts +684 -1009
  36. package/serializer/sqliteSchema.d.ts +570 -144
  37. package/serializer/sqliteSerializer.d.ts +2 -2
  38. package/snapshotsDiffer.d.ts +20 -24
  39. package/utils-studio.js +15 -390
  40. package/utils-studio.mjs +15 -389
  41. package/utils.d.ts +12 -12
  42. package/utils.js +735 -849
  43. package/utils.mjs +736 -849
  44. package/cli/validations/cli.d.ts +0 -104
  45. package/cli/validations/sqlite.d.ts +0 -382
package/index.d.mts CHANGED
@@ -1,4 +1,3 @@
1
- import { Dialect } from "./schemaValidator";
2
1
  export type DbConnection = {
3
2
  driver: "turso";
4
3
  dbCredentials: {
@@ -46,14 +45,13 @@ export type DbConnection = {
46
45
  };
47
46
  };
48
47
  export type Config = {
49
- dialect?: Dialect;
50
- out?: string;
51
- breakpoints?: boolean;
52
- tablesFilter?: string | string[];
53
- schemaFilter?: string | string[];
48
+ out?: string | undefined;
49
+ breakpoints?: boolean | undefined;
50
+ tablesFilter?: string | string[] | undefined;
51
+ schemaFilter?: string | string[] | undefined;
54
52
  schema?: string | string[];
55
- verbose?: boolean;
56
- strict?: boolean;
53
+ verbose?: boolean | undefined;
54
+ strict?: boolean | undefined;
57
55
  } & {
58
56
  introspect?: {
59
57
  casing: "camel" | "preserve";
package/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { Dialect } from "./schemaValidator";
2
1
  export type DbConnection = {
3
2
  driver: "turso";
4
3
  dbCredentials: {
@@ -46,14 +45,13 @@ export type DbConnection = {
46
45
  };
47
46
  };
48
47
  export type Config = {
49
- dialect?: Dialect;
50
- out?: string;
51
- breakpoints?: boolean;
52
- tablesFilter?: string | string[];
53
- schemaFilter?: string | string[];
48
+ out?: string | undefined;
49
+ breakpoints?: boolean | undefined;
50
+ tablesFilter?: string | string[] | undefined;
51
+ schemaFilter?: string | string[] | undefined;
54
52
  schema?: string | string[];
55
- verbose?: boolean;
56
- strict?: boolean;
53
+ verbose?: boolean | undefined;
54
+ strict?: boolean | undefined;
57
55
  } & {
58
56
  introspect?: {
59
57
  casing: "camel" | "preserve";
package/index.js CHANGED
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,5 +1,5 @@
1
1
  import "./@types/utils";
2
- import type { ConfigIntrospectCasing } from "./cli/validations/common";
2
+ import { ConfigIntrospectCasing } from "./cli/commands/utils";
3
3
  import { MySqlSchemaInternal } from "./serializer/mysqlSchema";
4
4
  export declare const schemaToTypeScript: (schema: MySqlSchemaInternal, casing: ConfigIntrospectCasing["casing"]) => {
5
5
  file: string;
@@ -1,12 +1,9 @@
1
1
  import { AnyPgTable } from "drizzle-orm/pg-core";
2
2
  import { Relation, Relations } from "drizzle-orm/relations";
3
3
  import "./@types/utils";
4
- import type { ConfigIntrospectCasing } from "./cli/validations/common";
4
+ import { ConfigIntrospectCasing } from "./cli/commands/utils";
5
5
  import { PgSchemaInternal } from "./serializer/pgSchema";
6
- export declare const relationsToTypeScriptForStudio: (schema: Record<string, Record<string, AnyPgTable<{}>>>, relations: Record<string, Relations<string, Record<string, Relation<string>>>>) => string;
7
- export declare const relationsToTypeScript: (schema: PgSchemaInternal, casing: ConfigIntrospectCasing) => {
8
- file: string;
9
- };
6
+ export declare const relationsToTypeScript: (schema: Record<string, Record<string, AnyPgTable<{}>>>, relations: Record<string, Relations<string, Record<string, Relation<string>>>>) => string;
10
7
  export declare const schemaToTypeScript: (schema: PgSchemaInternal, casing: ConfigIntrospectCasing) => {
11
8
  file: string;
12
9
  imports: string;
@@ -1,5 +1,5 @@
1
1
  import "./@types/utils";
2
- import type { ConfigIntrospectCasing } from "./cli/validations/common";
2
+ import type { ConfigIntrospectCasing } from "./cli/commands/utils";
3
3
  import type { SQLiteSchemaInternal } from "./serializer/sqliteSchema";
4
4
  export declare const indexName: (tableName: string, columns: string[]) => string;
5
5
  export declare const schemaToTypeScript: (schema: SQLiteSchemaInternal, casing: ConfigIntrospectCasing["casing"]) => {
@@ -294,7 +294,7 @@ export interface JsonRenameSchema {
294
294
  export type JsonAlterColumnStatement = JsonRenameColumnStatement | JsonAlterColumnTypeStatement | JsonAlterColumnSetDefaultStatement | JsonAlterColumnDropDefaultStatement | JsonAlterColumnSetNotNullStatement | JsonAlterColumnDropNotNullStatement | JsonAlterColumnDropOnUpdateStatement | JsonAlterColumnSetOnUpdateStatement | JsonAlterColumnDropAutoincrementStatement | JsonAlterColumnSetAutoincrementStatement | JsonAlterColumnSetPrimaryKeyStatement | JsonAlterColumnDropPrimaryKeyStatement;
295
295
  export type JsonStatement = JsonAlterColumnStatement | JsonCreateTableStatement | JsonDropTableStatement | JsonRenameTableStatement | JsonCreateEnumStatement | JsonAddValueToEnumStatement | JsonDropColumnStatement | JsonAddColumnStatement | JsonCreateIndexStatement | JsonCreateReferenceStatement | JsonAlterReferenceStatement | JsonDeleteReferenceStatement | JsonDropIndexStatement | JsonReferenceStatement | JsonSqliteCreateTableStatement | JsonSqliteAddColumnStatement | JsonCreateCompositePK | JsonDeleteCompositePK | JsonAlterCompositePK | JsonCreateUniqueConstraint | JsonDeleteUniqueConstraint | JsonAlterUniqueConstraint | JsonCreateSchema | JsonDropSchema | JsonRenameSchema | JsonAlterTableSetSchema | JsonAlterTableRemoveFromSchema | JsonAlterTableSetNewSchema;
296
296
  export declare const preparePgCreateTableJson: (table: Table, json2: PgSchema) => JsonCreateTableStatement;
297
- export declare const prepareMySqlCreateTableJson: (table: Table, json2: MySqlSchema) => JsonCreateTableStatement;
297
+ export declare const prepareMySqlCreateTableJson: (table: Table, json2: PgSchema) => JsonCreateTableStatement;
298
298
  export declare const prepareSQLiteCreateTable: (table: Table) => JsonSqliteCreateTableStatement;
299
299
  export declare const prepareDropTableJson: (table: Table) => JsonDropTableStatement;
300
300
  export declare const prepareRenameTableJson: (tableFrom: Table, tableTo: Table) => JsonRenameTableStatement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drizzle-kit",
3
- "version": "0.20.14-c82ab68",
3
+ "version": "0.20.14-d8f1e46",
4
4
  "repository": "https://github.com/drizzle-team/drizzle-kit-mirror",
5
5
  "author": "Drizzle Team",
6
6
  "license": "MIT",
@@ -68,7 +68,6 @@
68
68
  "hanji": "^0.0.5",
69
69
  "json-diff": "0.9.0",
70
70
  "minimatch": "^7.4.3",
71
- "pluralize": "^8.0.0",
72
71
  "semver": "^7.5.4",
73
72
  "zod": "^3.20.2"
74
73
  },
@@ -81,7 +80,6 @@
81
80
  "@types/minimatch": "^5.1.2",
82
81
  "@types/node": "^18.11.15",
83
82
  "@types/pg": "^8.10.7",
84
- "@types/pluralize": "^0.0.33",
85
83
  "@types/semver": "^7.5.5",
86
84
  "@typescript-eslint/eslint-plugin": "^5.46.1",
87
85
  "@typescript-eslint/parser": "^5.46.1",
@@ -100,6 +98,7 @@
100
98
  "pg": "^8.11.3",
101
99
  "postgres": "^3.3.5",
102
100
  "prettier": "^2.8.1",
101
+ "tsup": "^8.0.2",
103
102
  "tsx": "^3.12.1",
104
103
  "typescript": "^4.9.4",
105
104
  "uvu": "^0.5.6",