drizzle-kit 0.20.14-c82ab68 → 0.20.14-dc0459e

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. package/bin.cjs +36904 -34432
  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 +8 -7
  28. package/payload.js +1534 -2210
  29. package/payload.mjs +1538 -2213
  30. package/schemaValidator.d.ts +40 -40
  31. package/serializer/mysqlSchema.d.ts +616 -1854
  32. package/serializer/mysqlSerializer.d.ts +2 -2
  33. package/serializer/pgSchema.d.ts +684 -1009
  34. package/serializer/sqliteSchema.d.ts +570 -144
  35. package/serializer/sqliteSerializer.d.ts +2 -2
  36. package/snapshotsDiffer.d.ts +20 -24
  37. package/utils-studio.js +15 -390
  38. package/utils-studio.mjs +15 -389
  39. package/utils.d.ts +12 -12
  40. package/utils.js +735 -849
  41. package/utils.mjs +736 -849
  42. package/cli/validations/cli.d.ts +0 -104
  43. 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-dc0459e",
4
4
  "repository": "https://github.com/drizzle-team/drizzle-kit-mirror",
5
5
  "author": "Drizzle Team",
6
6
  "license": "MIT",
@@ -56,8 +56,9 @@
56
56
  ]
57
57
  },
58
58
  "dependencies": {
59
- "@drizzle-team/studio": "^0.0.39",
60
59
  "@esbuild-kit/esm-loader": "^2.5.5",
60
+ "@hono/node-server": "^1.9.0",
61
+ "@hono/zod-validator": "^0.2.0",
61
62
  "camelcase": "^7.0.1",
62
63
  "chalk": "^5.2.0",
63
64
  "commander": "^9.4.1",
@@ -66,10 +67,11 @@
66
67
  "esbuild-register": "^3.5.0",
67
68
  "glob": "^8.1.0",
68
69
  "hanji": "^0.0.5",
70
+ "hono": "^4.1.4",
69
71
  "json-diff": "0.9.0",
70
72
  "minimatch": "^7.4.3",
71
- "pluralize": "^8.0.0",
72
73
  "semver": "^7.5.4",
74
+ "superjson": "^2.2.1",
73
75
  "zod": "^3.20.2"
74
76
  },
75
77
  "devDependencies": {
@@ -81,16 +83,15 @@
81
83
  "@types/minimatch": "^5.1.2",
82
84
  "@types/node": "^18.11.15",
83
85
  "@types/pg": "^8.10.7",
84
- "@types/pluralize": "^0.0.33",
85
86
  "@types/semver": "^7.5.5",
86
87
  "@typescript-eslint/eslint-plugin": "^5.46.1",
87
88
  "@typescript-eslint/parser": "^5.46.1",
88
89
  "ava": "^5.1.0",
89
- "better-sqlite3": "^8.4.0",
90
+ "better-sqlite3": "^9.4.3",
90
91
  "dockerode": "^3.3.4",
91
92
  "dotenv": "^16.0.3",
92
- "drizzle-kit": "0.19.13",
93
- "drizzle-orm": "0.29.3",
93
+ "drizzle-kit": "0.20.14",
94
+ "drizzle-orm": "0.30.5",
94
95
  "esbuild-node-externals": "^1.9.0",
95
96
  "eslint": "^8.29.0",
96
97
  "eslint-config-prettier": "^8.5.0",