drizzle-kit 0.20.14-6ce9d1f → 0.20.14-730d763

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. package/bin.cjs +20593 -20020
  2. package/cli/commands/migrate.d.ts +114 -90
  3. package/cli/commands/mysqlIntrospect.d.ts +8 -14
  4. package/cli/commands/pgIntrospect.d.ts +17 -10
  5. package/cli/commands/sqliteIntrospect.d.ts +9 -9
  6. package/cli/commands/utils.d.ts +8 -261
  7. package/cli/validations/cli.d.ts +107 -0
  8. package/cli/validations/common.d.ts +205 -7
  9. package/cli/validations/mysql.d.ts +6 -1
  10. package/cli/validations/pg.d.ts +6 -1
  11. package/cli/validations/sqlite.d.ts +165 -3
  12. package/cli/views.d.ts +6 -4
  13. package/global.d.ts +3 -1
  14. package/index.js +1 -0
  15. package/introspect-mysql.d.ts +1 -1
  16. package/introspect-pg.d.ts +5 -2
  17. package/introspect-sqlite.d.ts +1 -1
  18. package/jsonDiffer.d.ts +14 -29
  19. package/jsonStatements.d.ts +38 -11
  20. package/package.json +18 -50
  21. package/payload.js +8130 -8617
  22. package/payload.mjs +8252 -8745
  23. package/schemaValidator.d.ts +72 -69
  24. package/serializer/mysqlImports.d.ts +3 -7
  25. package/serializer/mysqlSchema.d.ts +1624 -493
  26. package/serializer/mysqlSerializer.d.ts +2 -2
  27. package/serializer/pgImports.d.ts +2 -2
  28. package/serializer/pgSchema.d.ts +1260 -801
  29. package/serializer/sqliteImports.d.ts +2 -4
  30. package/serializer/sqliteSchema.d.ts +144 -570
  31. package/serializer/sqliteSerializer.d.ts +1 -1
  32. package/snapshotsDiffer.d.ts +1908 -1050
  33. package/utils/words.d.ts +1 -1
  34. package/utils-studio.js +4144 -85
  35. package/utils-studio.mjs +4144 -85
  36. package/utils.d.ts +6 -140
  37. package/utils.js +3906 -7081
  38. package/utils.mjs +3983 -7158
  39. package/cli/commands/check.d.ts +0 -2
  40. package/cli/commands/drop.d.ts +0 -4
  41. package/cli/commands/mysqlUp.d.ts +0 -4
  42. package/cli/commands/pgUp.d.ts +0 -4
  43. package/cli/commands/push.d.ts +0 -6
  44. package/cli/commands/sqliteUp.d.ts +0 -2
  45. package/cli/commands/sqliteUtils.d.ts +0 -162
  46. package/cli/commands/upFolders.d.ts +0 -27
  47. package/cli/index.d.ts +0 -71
  48. package/cli/utils.d.ts +0 -12
  49. package/cli/validations/studio.d.ts +0 -593
  50. package/orm-extenstions/d1-driver/driver.d.ts +0 -8
  51. package/orm-extenstions/d1-driver/session.d.ts +0 -51
  52. package/orm-extenstions/d1-driver/wrangler-client.d.ts +0 -3
  53. package/serializer/studioUtils.d.ts +0 -65
  54. package/utils/certs.d.ts +0 -4
@@ -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>;
@@ -1,4 +0,0 @@
1
- import { MySqlSchema, MySqlSchemaV4 } from "../../serializer/mysqlSchema";
2
- export declare const upMysqlHandler: (out: string) => void;
3
- export declare const upMySqlHandlerV4toV5: (obj: MySqlSchemaV4) => MySqlSchema;
4
- export declare const upMysqlHandlerV4: (out: string) => void;
@@ -1,4 +0,0 @@
1
- import { PgSchema, PgSchemaV4 } from "../../serializer/pgSchema";
2
- export declare const upPgHandlerV4toV5: (obj: PgSchemaV4) => PgSchema;
3
- export declare const upPgHandler: (out: string) => void;
4
- export declare const upPgHandlerV4: (out: string) => void;
@@ -1,6 +0,0 @@
1
- import { MySQLPushConfig } from "../validations/mysql";
2
- import { PgPushConfig } from "../validations/pg";
3
- import { SQLitePushConfig } from "../validations/sqlite";
4
- export declare const mysqlPush: (drizzleConfig: MySQLPushConfig, tablesFilter: string[]) => Promise<void>;
5
- export declare const pgPush: (drizzleConfig: PgPushConfig, tablesFilter: string[]) => Promise<void>;
6
- export declare const sqlitePush: (drizzleConfig: SQLitePushConfig, tablesFilter: string[]) => Promise<void>;
@@ -1,2 +0,0 @@
1
- export declare const upSqliteHandler: (out: string) => void;
2
- export declare const upSqliteHandlerV4: (out: string) => void;
@@ -1,162 +0,0 @@
1
- import { TypeOf } from "zod";
2
- import { configIntrospectSchema } from "./utils";
3
- export declare const sqliteConnectionSchema: import("zod").ZodUnion<[import("zod").ZodObject<{
4
- driver: import("zod").ZodLiteral<"turso">;
5
- dbCredentials: import("zod").ZodObject<{
6
- url: import("zod").ZodString;
7
- authToken: import("zod").ZodOptional<import("zod").ZodString>;
8
- }, "strip", import("zod").ZodTypeAny, {
9
- authToken?: string | undefined;
10
- url: string;
11
- }, {
12
- authToken?: string | undefined;
13
- url: string;
14
- }>;
15
- }, "strip", import("zod").ZodTypeAny, {
16
- driver: "turso";
17
- dbCredentials: {
18
- authToken?: string | undefined;
19
- url: string;
20
- };
21
- }, {
22
- driver: "turso";
23
- dbCredentials: {
24
- authToken?: string | undefined;
25
- url: string;
26
- };
27
- }>, import("zod").ZodObject<{
28
- driver: import("zod").ZodLiteral<"libsql">;
29
- dbCredentials: import("zod").ZodObject<{
30
- url: import("zod").ZodString;
31
- }, "strip", import("zod").ZodTypeAny, {
32
- url: string;
33
- }, {
34
- url: string;
35
- }>;
36
- }, "strip", import("zod").ZodTypeAny, {
37
- driver: "libsql";
38
- dbCredentials: {
39
- url: string;
40
- };
41
- }, {
42
- driver: "libsql";
43
- dbCredentials: {
44
- url: string;
45
- };
46
- }>, import("zod").ZodObject<{
47
- driver: import("zod").ZodLiteral<"better-sqlite">;
48
- dbCredentials: import("zod").ZodObject<{
49
- url: import("zod").ZodString;
50
- }, "strip", import("zod").ZodTypeAny, {
51
- url: string;
52
- }, {
53
- url: string;
54
- }>;
55
- }, "strip", import("zod").ZodTypeAny, {
56
- driver: "better-sqlite";
57
- dbCredentials: {
58
- url: string;
59
- };
60
- }, {
61
- driver: "better-sqlite";
62
- dbCredentials: {
63
- url: string;
64
- };
65
- }>]>;
66
- export declare const sqliteCliConfigSchema: import("zod").ZodIntersection<import("zod").ZodObject<{
67
- schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
68
- out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
69
- breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
70
- tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
71
- schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
72
- introspect: import("zod").ZodDefault<import("zod").ZodObject<{
73
- casing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
74
- }, "strip", import("zod").ZodTypeAny, {
75
- casing: "camel" | "preserve";
76
- }, {
77
- casing?: "camel" | "preserve" | undefined;
78
- }>>;
79
- }, "strip", import("zod").ZodTypeAny, {
80
- schema?: string | string[] | undefined;
81
- tablesFilter?: string | string[] | undefined;
82
- out: string;
83
- breakpoints: boolean;
84
- schemaFilter: string | string[];
85
- introspect: {
86
- casing: "camel" | "preserve";
87
- };
88
- }, {
89
- schema?: string | string[] | undefined;
90
- out?: string | undefined;
91
- breakpoints?: boolean | undefined;
92
- tablesFilter?: string | string[] | undefined;
93
- schemaFilter?: string | string[] | undefined;
94
- introspect?: {
95
- casing?: "camel" | "preserve" | undefined;
96
- } | undefined;
97
- }>, import("zod").ZodUnion<[import("zod").ZodObject<{
98
- driver: import("zod").ZodLiteral<"turso">;
99
- dbCredentials: import("zod").ZodObject<{
100
- url: import("zod").ZodString;
101
- authToken: import("zod").ZodOptional<import("zod").ZodString>;
102
- }, "strip", import("zod").ZodTypeAny, {
103
- authToken?: string | undefined;
104
- url: string;
105
- }, {
106
- authToken?: string | undefined;
107
- url: string;
108
- }>;
109
- }, "strip", import("zod").ZodTypeAny, {
110
- driver: "turso";
111
- dbCredentials: {
112
- authToken?: string | undefined;
113
- url: string;
114
- };
115
- }, {
116
- driver: "turso";
117
- dbCredentials: {
118
- authToken?: string | undefined;
119
- url: string;
120
- };
121
- }>, import("zod").ZodObject<{
122
- driver: import("zod").ZodLiteral<"libsql">;
123
- dbCredentials: import("zod").ZodObject<{
124
- url: import("zod").ZodString;
125
- }, "strip", import("zod").ZodTypeAny, {
126
- url: string;
127
- }, {
128
- url: string;
129
- }>;
130
- }, "strip", import("zod").ZodTypeAny, {
131
- driver: "libsql";
132
- dbCredentials: {
133
- url: string;
134
- };
135
- }, {
136
- driver: "libsql";
137
- dbCredentials: {
138
- url: string;
139
- };
140
- }>, import("zod").ZodObject<{
141
- driver: import("zod").ZodLiteral<"better-sqlite">;
142
- dbCredentials: import("zod").ZodObject<{
143
- url: import("zod").ZodString;
144
- }, "strip", import("zod").ZodTypeAny, {
145
- url: string;
146
- }, {
147
- url: string;
148
- }>;
149
- }, "strip", import("zod").ZodTypeAny, {
150
- driver: "better-sqlite";
151
- dbCredentials: {
152
- url: string;
153
- };
154
- }, {
155
- driver: "better-sqlite";
156
- dbCredentials: {
157
- url: string;
158
- };
159
- }>]>>;
160
- export type SQLiteCliConfig = TypeOf<typeof sqliteCliConfigSchema>;
161
- export type SQLiteConnectionConfig = TypeOf<typeof sqliteConnectionSchema>;
162
- export { configIntrospectSchema };
@@ -1,27 +0,0 @@
1
- import { Dialect } from "../../schemaValidator";
2
- import { Named, NamedWithSchema } from "./migrate";
3
- export declare const resolveSchemas: <T extends Named>(missingSchemas: T[], newSchemas: T[], predicate: (leftMissing: T[], created: T) => T | undefined) => {
4
- created: T[];
5
- renamed: {
6
- from: T;
7
- to: T;
8
- }[];
9
- deleted: T[];
10
- };
11
- export declare const resolveTables: <T extends NamedWithSchema>(missingTables: T[], newTables: T[], resolver: (leftMissing: T[], created: T) => T | undefined) => {
12
- created: T[];
13
- renamed: {
14
- from: T;
15
- to: T;
16
- }[];
17
- deleted: T[];
18
- };
19
- export declare const resolveColumns: <T extends Named>(missingColumns: T[], newColumns: T[], predicate: (leftMissing: T[], created: T) => T | undefined) => {
20
- created: T[];
21
- renamed: {
22
- from: T;
23
- to: T;
24
- }[];
25
- deleted: T[];
26
- };
27
- export declare const upgradeFolders: (dialect: Dialect, out: string) => void;
package/cli/index.d.ts DELETED
@@ -1,71 +0,0 @@
1
- import { TypeOf } from "zod";
2
- import "../@types/utils";
3
- import "dotenv/config";
4
- declare const cliParamsPush: import("zod").ZodObject<{
5
- config: import("zod").ZodOptional<import("zod").ZodString>;
6
- dialect: import("zod").ZodEnum<["pg", "mysql", "sqlite"]>;
7
- schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
8
- tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
9
- driver: import("zod").ZodString;
10
- connectionString: import("zod").ZodOptional<import("zod").ZodString>;
11
- host: import("zod").ZodOptional<import("zod").ZodString>;
12
- port: import("zod").ZodOptional<import("zod").ZodString>;
13
- user: import("zod").ZodOptional<import("zod").ZodString>;
14
- password: import("zod").ZodOptional<import("zod").ZodString>;
15
- database: import("zod").ZodOptional<import("zod").ZodString>;
16
- ssl: import("zod").ZodOptional<import("zod").ZodString>;
17
- uri: import("zod").ZodOptional<import("zod").ZodString>;
18
- authToken: import("zod").ZodOptional<import("zod").ZodString>;
19
- verbose: import("zod").ZodDefault<import("zod").ZodBoolean>;
20
- strict: import("zod").ZodDefault<import("zod").ZodBoolean>;
21
- }, "strict", import("zod").ZodTypeAny, {
22
- schema?: string | string[] | undefined;
23
- authToken?: string | undefined;
24
- tablesFilter?: string | string[] | undefined;
25
- config?: string | undefined;
26
- host?: string | undefined;
27
- port?: string | undefined;
28
- user?: string | undefined;
29
- password?: string | undefined;
30
- database?: string | undefined;
31
- ssl?: string | undefined;
32
- connectionString?: string | undefined;
33
- uri?: string | undefined;
34
- strict: boolean;
35
- dialect: "mysql" | "pg" | "sqlite";
36
- driver: string;
37
- verbose: boolean;
38
- }, {
39
- strict?: boolean | undefined;
40
- schema?: string | string[] | undefined;
41
- authToken?: string | undefined;
42
- tablesFilter?: string | string[] | undefined;
43
- config?: string | undefined;
44
- verbose?: boolean | undefined;
45
- host?: string | undefined;
46
- port?: string | undefined;
47
- user?: string | undefined;
48
- password?: string | undefined;
49
- database?: string | undefined;
50
- ssl?: string | undefined;
51
- connectionString?: string | undefined;
52
- uri?: string | undefined;
53
- dialect: "mysql" | "pg" | "sqlite";
54
- driver: string;
55
- }>;
56
- export type CliParamsPush = TypeOf<typeof cliParamsPush>;
57
- export declare const checkSchema: import("zod").ZodObject<{
58
- out: import("zod").ZodOptional<import("zod").ZodString>;
59
- config: import("zod").ZodOptional<import("zod").ZodString>;
60
- driver: import("zod").ZodOptional<import("zod").ZodString>;
61
- }, "strict", import("zod").ZodTypeAny, {
62
- out?: string | undefined;
63
- driver?: string | undefined;
64
- config?: string | undefined;
65
- }, {
66
- out?: string | undefined;
67
- driver?: string | undefined;
68
- config?: string | undefined;
69
- }>;
70
- export type CheckConfig = TypeOf<typeof checkSchema>;
71
- export {};
package/cli/utils.d.ts DELETED
@@ -1,12 +0,0 @@
1
- export declare const assertExists: (it?: any) => void;
2
- export declare const assertStudioNodeVersion: () => void;
3
- export declare const assertPackages: (...pkgs: string[]) => Promise<void>;
4
- export declare const assertEitherPackage: (...pkgs: string[]) => Promise<string[]>;
5
- export declare const assertOrmCoreVersion: () => Promise<void>;
6
- export declare const ormCoreVersions: () => Promise<{
7
- compatibilityVersion: number;
8
- npmVersion: string;
9
- } | {
10
- compatibilityVersion?: undefined;
11
- npmVersion?: undefined;
12
- }>;