drizzle-kit 0.20.17-e0821c1 → 0.20.17-e38e63d
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +7536 -765
- package/index.d.mts +25 -13
- package/index.d.ts +25 -13
- package/package.json +5 -16
- package/payload.d.mts +987 -18
- package/payload.d.ts +987 -18
- package/payload.js +19058 -16831
- package/payload.mjs +19094 -16842
- package/utils-studio.js +2 -2
- package/utils-studio.mjs +2 -2
- package/utils.js +1 -1
- package/utils.mjs +1 -1
- package/@types/utils.d.ts +0 -13
- package/cli/commands/migrate.d.ts +0 -287
- package/cli/commands/mysqlIntrospect.d.ts +0 -50
- package/cli/commands/mysqlPushUtils.d.ts +0 -14
- package/cli/commands/pgIntrospect.d.ts +0 -59
- package/cli/commands/pgPushUtils.d.ts +0 -11
- package/cli/commands/sqliteIntrospect.d.ts +0 -103
- package/cli/commands/sqlitePushUtils.d.ts +0 -15
- package/cli/commands/utils.d.ts +0 -180
- package/cli/connections.d.ts +0 -18
- package/cli/selector-ui.d.ts +0 -13
- package/cli/utils.d.ts +0 -13
- package/cli/validations/cli.d.ts +0 -169
- package/cli/validations/common.d.ts +0 -214
- package/cli/validations/mysql.d.ts +0 -29
- package/cli/validations/outputs.d.ts +0 -41
- package/cli/validations/pg.d.ts +0 -46
- package/cli/validations/sqlite.d.ts +0 -22
- package/cli/validations/studio.d.ts +0 -92
- package/cli/views.d.ts +0 -70
- package/global.d.ts +0 -6
- package/introspect-sqlite.d.ts +0 -10
- package/jsonDiffer.d.ts +0 -61
- package/jsonStatements.d.ts +0 -376
- package/migrationPreparator.d.ts +0 -35
- package/schemaValidator.d.ts +0 -1316
- package/serializer/index.d.ts +0 -9
- package/serializer/mysqlImports.d.ts +0 -7
- package/serializer/mysqlSchema.d.ts +0 -4650
- package/serializer/mysqlSerializer.d.ts +0 -7
- package/serializer/pgImports.d.ts +0 -11
- package/serializer/pgSchema.d.ts +0 -4792
- package/serializer/pgSerializer.d.ts +0 -7
- package/serializer/schemaToDrizzle.d.ts +0 -7
- package/serializer/sqliteImports.d.ts +0 -7
- package/serializer/sqliteSchema.d.ts +0 -2801
- package/serializer/sqliteSerializer.d.ts +0 -6
- package/serializer/studio.d.ts +0 -68
- package/snapshotsDiffer.d.ts +0 -3936
- package/sqlgenerator.d.ts +0 -33
- package/utils/words.d.ts +0 -7
- package/utils-studio.d.mts +0 -4
- package/utils-studio.d.ts +0 -4
- package/utils.d.ts +0 -78
@@ -1,41 +0,0 @@
|
|
1
|
-
export declare const withStyle: {
|
2
|
-
error: (str: string) => string;
|
3
|
-
warning: (str: string) => string;
|
4
|
-
errorWarning: (str: string) => string;
|
5
|
-
fullWarning: (str: string) => string;
|
6
|
-
suggestion: (str: string) => string;
|
7
|
-
info: (str: string) => string;
|
8
|
-
};
|
9
|
-
export declare const outputs: {
|
10
|
-
studio: {
|
11
|
-
drivers: (param: string) => string;
|
12
|
-
noCredentials: () => string;
|
13
|
-
noDriver: () => string;
|
14
|
-
noDialect: () => string;
|
15
|
-
};
|
16
|
-
common: {
|
17
|
-
ambiguousParams: (command: string) => string;
|
18
|
-
schema: (command: string) => string;
|
19
|
-
};
|
20
|
-
postgres: {
|
21
|
-
connection: {
|
22
|
-
required: () => string;
|
23
|
-
awsDataApi: () => void;
|
24
|
-
};
|
25
|
-
};
|
26
|
-
mysql: {
|
27
|
-
connection: {
|
28
|
-
driver: () => string;
|
29
|
-
required: () => string;
|
30
|
-
};
|
31
|
-
};
|
32
|
-
sqlite: {
|
33
|
-
connection: {
|
34
|
-
driver: () => string;
|
35
|
-
url: (driver: string) => string;
|
36
|
-
authToken: (driver: string) => string;
|
37
|
-
};
|
38
|
-
introspect: {};
|
39
|
-
push: {};
|
40
|
-
};
|
41
|
-
};
|
package/cli/validations/pg.d.ts
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
import { TypeOf } from "zod";
|
2
|
-
export declare const postgresCredentials: import("zod").ZodUnion<[import("zod").ZodObject<{
|
3
|
-
host: import("zod").ZodString;
|
4
|
-
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
5
|
-
user: import("zod").ZodDefault<import("zod").ZodString>;
|
6
|
-
password: import("zod").ZodOptional<import("zod").ZodString>;
|
7
|
-
database: import("zod").ZodString;
|
8
|
-
ssl: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
9
|
-
}, "strip", import("zod").ZodTypeAny, {
|
10
|
-
host: string;
|
11
|
-
user: string;
|
12
|
-
database: string;
|
13
|
-
port?: number | undefined;
|
14
|
-
password?: string | undefined;
|
15
|
-
ssl?: boolean | undefined;
|
16
|
-
}, {
|
17
|
-
host: string;
|
18
|
-
database: string;
|
19
|
-
port?: number | undefined;
|
20
|
-
user?: string | undefined;
|
21
|
-
password?: string | undefined;
|
22
|
-
ssl?: boolean | undefined;
|
23
|
-
}>, import("zod").ZodObject<{
|
24
|
-
url: import("zod").ZodString;
|
25
|
-
}, "strip", import("zod").ZodTypeAny, {
|
26
|
-
url: string;
|
27
|
-
}, {
|
28
|
-
url: string;
|
29
|
-
}>, import("zod").ZodObject<{
|
30
|
-
driver: import("zod").ZodLiteral<"aws-data-api">;
|
31
|
-
database: import("zod").ZodString;
|
32
|
-
secretArn: import("zod").ZodString;
|
33
|
-
resourceArn: import("zod").ZodString;
|
34
|
-
}, "strip", import("zod").ZodTypeAny, {
|
35
|
-
database: string;
|
36
|
-
driver: "aws-data-api";
|
37
|
-
secretArn: string;
|
38
|
-
resourceArn: string;
|
39
|
-
}, {
|
40
|
-
database: string;
|
41
|
-
driver: "aws-data-api";
|
42
|
-
secretArn: string;
|
43
|
-
resourceArn: string;
|
44
|
-
}>]>;
|
45
|
-
export type PostgresCredentials = TypeOf<typeof postgresCredentials>;
|
46
|
-
export declare const printConfigConnectionIssues: (options: Record<string, unknown>) => void;
|
@@ -1,22 +0,0 @@
|
|
1
|
-
import { TypeOf } from "zod";
|
2
|
-
export declare const sqliteCredentials: import("zod").ZodUnion<[import("zod").ZodObject<{
|
3
|
-
driver: import("zod").ZodLiteral<"turso">;
|
4
|
-
url: import("zod").ZodString;
|
5
|
-
authToken: import("zod").ZodString;
|
6
|
-
}, "strip", import("zod").ZodTypeAny, {
|
7
|
-
url: string;
|
8
|
-
driver: "turso";
|
9
|
-
authToken: string;
|
10
|
-
}, {
|
11
|
-
url: string;
|
12
|
-
driver: "turso";
|
13
|
-
authToken: string;
|
14
|
-
}>, import("zod").ZodObject<{
|
15
|
-
url: import("zod").ZodString;
|
16
|
-
}, "strip", import("zod").ZodTypeAny, {
|
17
|
-
url: string;
|
18
|
-
}, {
|
19
|
-
url: string;
|
20
|
-
}>]>;
|
21
|
-
export type SqliteCredentials = TypeOf<typeof sqliteCredentials>;
|
22
|
-
export declare const printConfigConnectionIssues: (options: Record<string, unknown>) => void;
|
@@ -1,92 +0,0 @@
|
|
1
|
-
import { TypeOf } from "zod";
|
2
|
-
export declare const credentials: import("zod").ZodIntersection<import("zod").ZodUnion<[import("zod").ZodObject<{
|
3
|
-
host: import("zod").ZodString;
|
4
|
-
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
5
|
-
user: import("zod").ZodDefault<import("zod").ZodString>;
|
6
|
-
password: import("zod").ZodOptional<import("zod").ZodString>;
|
7
|
-
database: import("zod").ZodString;
|
8
|
-
ssl: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
9
|
-
}, "strip", import("zod").ZodTypeAny, {
|
10
|
-
host: string;
|
11
|
-
user: string;
|
12
|
-
database: string;
|
13
|
-
port?: number | undefined;
|
14
|
-
password?: string | undefined;
|
15
|
-
ssl?: boolean | undefined;
|
16
|
-
}, {
|
17
|
-
host: string;
|
18
|
-
database: string;
|
19
|
-
port?: number | undefined;
|
20
|
-
user?: string | undefined;
|
21
|
-
password?: string | undefined;
|
22
|
-
ssl?: boolean | undefined;
|
23
|
-
}>, import("zod").ZodObject<{
|
24
|
-
url: import("zod").ZodString;
|
25
|
-
}, "strip", import("zod").ZodTypeAny, {
|
26
|
-
url: string;
|
27
|
-
}, {
|
28
|
-
url: string;
|
29
|
-
}>, import("zod").ZodObject<{
|
30
|
-
driver: import("zod").ZodLiteral<"aws-data-api">;
|
31
|
-
database: import("zod").ZodString;
|
32
|
-
secretArn: import("zod").ZodString;
|
33
|
-
resourceArn: import("zod").ZodString;
|
34
|
-
}, "strip", import("zod").ZodTypeAny, {
|
35
|
-
database: string;
|
36
|
-
driver: "aws-data-api";
|
37
|
-
secretArn: string;
|
38
|
-
resourceArn: string;
|
39
|
-
}, {
|
40
|
-
database: string;
|
41
|
-
driver: "aws-data-api";
|
42
|
-
secretArn: string;
|
43
|
-
resourceArn: string;
|
44
|
-
}>]>, import("zod").ZodUnion<[import("zod").ZodObject<{
|
45
|
-
host: import("zod").ZodString;
|
46
|
-
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
47
|
-
user: import("zod").ZodDefault<import("zod").ZodString>;
|
48
|
-
password: import("zod").ZodOptional<import("zod").ZodString>;
|
49
|
-
database: import("zod").ZodString;
|
50
|
-
}, "strip", import("zod").ZodTypeAny, {
|
51
|
-
host: string;
|
52
|
-
user: string;
|
53
|
-
database: string;
|
54
|
-
port?: number | undefined;
|
55
|
-
password?: string | undefined;
|
56
|
-
}, {
|
57
|
-
host: string;
|
58
|
-
database: string;
|
59
|
-
port?: number | undefined;
|
60
|
-
user?: string | undefined;
|
61
|
-
password?: string | undefined;
|
62
|
-
}>, import("zod").ZodObject<{
|
63
|
-
url: import("zod").ZodString;
|
64
|
-
}, "strip", import("zod").ZodTypeAny, {
|
65
|
-
url: string;
|
66
|
-
}, {
|
67
|
-
url: string;
|
68
|
-
}>]>>;
|
69
|
-
export type Credentials = TypeOf<typeof credentials>;
|
70
|
-
export declare const studioCliParams: import("zod").ZodObject<{
|
71
|
-
port: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
72
|
-
host: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
73
|
-
config: import("zod").ZodOptional<import("zod").ZodString>;
|
74
|
-
}, "strip", import("zod").ZodTypeAny, {
|
75
|
-
host: string;
|
76
|
-
port: number;
|
77
|
-
config?: string | undefined;
|
78
|
-
}, {
|
79
|
-
host?: string | undefined;
|
80
|
-
port?: number | undefined;
|
81
|
-
config?: string | undefined;
|
82
|
-
}>;
|
83
|
-
export declare const studioConfig: import("zod").ZodObject<{
|
84
|
-
dialect: import("zod").ZodEnum<["postgresql", "mysql", "sqlite"]>;
|
85
|
-
schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
|
86
|
-
}, "strip", import("zod").ZodTypeAny, {
|
87
|
-
schema: string | string[];
|
88
|
-
dialect: "postgresql" | "mysql" | "sqlite";
|
89
|
-
}, {
|
90
|
-
schema: string | string[];
|
91
|
-
dialect: "postgresql" | "mysql" | "sqlite";
|
92
|
-
}>;
|
package/cli/views.d.ts
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
import { Prompt, TaskView } from "hanji";
|
2
|
-
import type { CommonSchema } from "../schemaValidator";
|
3
|
-
import type { Named, NamedWithSchema } from "./commands/migrate";
|
4
|
-
export declare const warning: (msg: string) => void;
|
5
|
-
export declare const err: (msg: string) => void;
|
6
|
-
export declare const info: (msg: string, greyMsg?: string) => string;
|
7
|
-
export declare const grey: (msg: string) => string;
|
8
|
-
export declare const error: (error: string, greyMsg?: string) => string;
|
9
|
-
export declare const schema: (schema: CommonSchema) => string;
|
10
|
-
export interface RenamePropmtItem<T> {
|
11
|
-
from: T;
|
12
|
-
to: T;
|
13
|
-
}
|
14
|
-
export declare const isRenamePromptItem: <T extends Named>(item: RenamePropmtItem<T> | T) => item is RenamePropmtItem<T>;
|
15
|
-
export declare class ResolveColumnSelect<T extends Named> extends Prompt<RenamePropmtItem<T> | T> {
|
16
|
-
private readonly tableName;
|
17
|
-
private readonly base;
|
18
|
-
private readonly data;
|
19
|
-
constructor(tableName: string, base: Named, data: (RenamePropmtItem<T> | T)[]);
|
20
|
-
render(status: "idle" | "submitted" | "aborted"): string;
|
21
|
-
result(): RenamePropmtItem<T> | T;
|
22
|
-
}
|
23
|
-
export declare const tableKey: (it: NamedWithSchema) => string;
|
24
|
-
export declare class ResolveSelect<T extends NamedWithSchema> extends Prompt<RenamePropmtItem<T> | T> {
|
25
|
-
private readonly base;
|
26
|
-
private readonly entityType;
|
27
|
-
private readonly state;
|
28
|
-
constructor(base: T, data: (RenamePropmtItem<T> | T)[], entityType: "table" | "enum");
|
29
|
-
render(status: "idle" | "submitted" | "aborted"): string;
|
30
|
-
result(): RenamePropmtItem<T> | T;
|
31
|
-
}
|
32
|
-
export declare class ResolveSchemasSelect<T extends Named> extends Prompt<RenamePropmtItem<T> | T> {
|
33
|
-
private readonly base;
|
34
|
-
private readonly state;
|
35
|
-
constructor(base: Named, data: (RenamePropmtItem<T> | T)[]);
|
36
|
-
render(status: "idle" | "submitted" | "aborted"): string;
|
37
|
-
result(): RenamePropmtItem<T> | T;
|
38
|
-
}
|
39
|
-
export type IntrospectStatus = "fetching" | "done";
|
40
|
-
export type IntrospectStage = "tables" | "columns" | "enums" | "indexes" | "fks";
|
41
|
-
export declare class IntrospectProgress extends TaskView {
|
42
|
-
private readonly spinner;
|
43
|
-
private timeout;
|
44
|
-
private state;
|
45
|
-
constructor();
|
46
|
-
update(stage: IntrospectStage, count: number, status: IntrospectStatus): void;
|
47
|
-
private formatCount;
|
48
|
-
private statusText;
|
49
|
-
render(): string;
|
50
|
-
}
|
51
|
-
export declare class MigrateProgress extends TaskView {
|
52
|
-
private readonly spinner;
|
53
|
-
private timeout;
|
54
|
-
constructor();
|
55
|
-
render(status: "pending" | "done"): string;
|
56
|
-
}
|
57
|
-
export declare class DropMigrationView<T extends {
|
58
|
-
tag: string;
|
59
|
-
}> extends Prompt<T> {
|
60
|
-
private readonly data;
|
61
|
-
constructor(data: T[]);
|
62
|
-
render(status: "idle" | "submitted" | "aborted"): string;
|
63
|
-
result(): T;
|
64
|
-
}
|
65
|
-
export declare const trimmedRange: <T>(arr: T[], index: number, limitLines: number) => {
|
66
|
-
trimmed: T[];
|
67
|
-
offset: number;
|
68
|
-
startTrimmed: boolean;
|
69
|
-
endTrimmed: boolean;
|
70
|
-
};
|
package/global.d.ts
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
export declare const originUUID = "00000000-0000-0000-0000-000000000000";
|
2
|
-
export declare const snapshotVersion = "6";
|
3
|
-
export declare function assertUnreachable(x: never): never;
|
4
|
-
export declare const mapValues: <IN, OUT>(obj: Record<string, IN>, map: (input: IN) => OUT) => Record<string, OUT>;
|
5
|
-
export declare const mapKeys: <T>(obj: Record<string, T>, map: (key: string, value: T) => string) => Record<string, T>;
|
6
|
-
export declare const mapEntries: <T>(obj: Record<string, T>, map: (key: string, value: T) => [string, T]) => Record<string, T>;
|
package/introspect-sqlite.d.ts
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
import "./@types/utils";
|
2
|
-
import type { Casing } from "./cli/validations/common";
|
3
|
-
import type { SQLiteSchemaInternal } from "./serializer/sqliteSchema";
|
4
|
-
export declare const indexName: (tableName: string, columns: string[]) => string;
|
5
|
-
export declare const schemaToTypeScript: (schema: SQLiteSchemaInternal, casing: Casing) => {
|
6
|
-
file: string;
|
7
|
-
imports: string;
|
8
|
-
decalrations: string;
|
9
|
-
schemaEntry: string;
|
10
|
-
};
|
package/jsonDiffer.d.ts
DELETED
@@ -1,61 +0,0 @@
|
|
1
|
-
export function diffForRenamedTables(pairs: any): any;
|
2
|
-
export function diffForRenamedColumn(t1: any, t2: any): any;
|
3
|
-
export function diffSchemasOrTables(left: any, right: any): {
|
4
|
-
added: any[];
|
5
|
-
deleted: any[];
|
6
|
-
};
|
7
|
-
export function diffColumns(left: any, right: any): {
|
8
|
-
[k: string]: any;
|
9
|
-
};
|
10
|
-
export function applyJsonDiff(json1: any, json2: any): {
|
11
|
-
alteredTablesWithColumns: {
|
12
|
-
name: any;
|
13
|
-
schema: any;
|
14
|
-
altered: any[];
|
15
|
-
addedIndexes: {
|
16
|
-
[k: string]: any;
|
17
|
-
};
|
18
|
-
deletedIndexes: {
|
19
|
-
[k: string]: any;
|
20
|
-
};
|
21
|
-
alteredIndexes: {
|
22
|
-
[k: string]: any;
|
23
|
-
};
|
24
|
-
addedForeignKeys: {
|
25
|
-
[k: string]: any;
|
26
|
-
};
|
27
|
-
deletedForeignKeys: {
|
28
|
-
[k: string]: any;
|
29
|
-
};
|
30
|
-
alteredForeignKeys: {
|
31
|
-
[k: string]: any;
|
32
|
-
};
|
33
|
-
addedCompositePKs: {
|
34
|
-
[k: string]: any;
|
35
|
-
};
|
36
|
-
deletedCompositePKs: {
|
37
|
-
[k: string]: any;
|
38
|
-
};
|
39
|
-
alteredCompositePKs: {
|
40
|
-
[k: string]: any;
|
41
|
-
};
|
42
|
-
addedUniqueConstraints: {
|
43
|
-
[k: string]: any;
|
44
|
-
};
|
45
|
-
deletedUniqueConstraints: {
|
46
|
-
[k: string]: any;
|
47
|
-
};
|
48
|
-
alteredUniqueConstraints: {
|
49
|
-
[k: string]: any;
|
50
|
-
};
|
51
|
-
}[];
|
52
|
-
alteredEnums: {
|
53
|
-
name: any;
|
54
|
-
schema: any;
|
55
|
-
addedValues: {
|
56
|
-
before: any;
|
57
|
-
value: any;
|
58
|
-
}[];
|
59
|
-
deletedValues: any[];
|
60
|
-
}[];
|
61
|
-
};
|