drizzle-kit 0.20.14-95be75d → 0.20.14-a183d8b
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +40380 -40424
- package/cli/commands/mysqlIntrospect.d.ts +3 -3
- package/cli/commands/mysqlPushUtils.d.ts +2 -2
- package/cli/commands/sqliteIntrospect.d.ts +1 -1
- package/cli/commands/utils.d.ts +5 -258
- package/cli/index.d.ts +41 -18
- package/cli/validations/common.d.ts +205 -7
- package/cli/validations/mysql.d.ts +6 -1
- package/cli/validations/pg.d.ts +6 -1
- package/cli/validations/sqlite.d.ts +165 -3
- package/drivers/index.d.ts +14 -0
- package/global.d.ts +1 -0
- package/index.d.mts +8 -6
- package/index.d.ts +8 -6
- package/introspect-mysql.d.ts +1 -1
- package/introspect-pg.d.ts +1 -1
- package/introspect-sqlite.d.ts +1 -1
- package/package.json +15 -3
- package/payload.d.mts +33 -0
- package/payload.d.ts +33 -0
- package/payload.js +37016 -0
- package/payload.mjs +37035 -0
- package/serializer/mysqlImports.d.ts +5 -0
- package/serializer/mysqlSerializer.d.ts +2 -2
- package/serializer/sqliteImports.d.ts +4 -0
- package/utils-studio.js +1 -1
- package/utils-studio.mjs +1 -1
- package/utils.d.ts +1 -15
- package/utils.js +2971 -54354
- package/utils.mjs +8115 -0
- package/cli/commands/sqliteUtils.d.ts +0 -162
package/introspect-pg.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
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 { ConfigIntrospectCasing } from "./cli/
|
4
|
+
import type { ConfigIntrospectCasing } from "./cli/validations/common";
|
5
5
|
import { PgSchemaInternal } from "./serializer/pgSchema";
|
6
6
|
export declare const relationsToTypeScript: (schema: Record<string, Record<string, AnyPgTable<{}>>>, relations: Record<string, Relations<string, Record<string, Relation<string>>>>) => string;
|
7
7
|
export declare const schemaToTypeScript: (schema: PgSchemaInternal, casing: ConfigIntrospectCasing) => {
|
package/introspect-sqlite.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import "./@types/utils";
|
2
|
-
import type { ConfigIntrospectCasing } from "./cli/
|
2
|
+
import type { ConfigIntrospectCasing } from "./cli/validations/common";
|
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"]) => {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "drizzle-kit",
|
3
|
-
"version": "0.20.14-
|
3
|
+
"version": "0.20.14-a183d8b",
|
4
4
|
"repository": "https://github.com/drizzle-team/drizzle-kit-mirror",
|
5
5
|
"author": "Drizzle Team",
|
6
6
|
"license": "MIT",
|
@@ -36,7 +36,7 @@
|
|
36
36
|
"sim:sqlite": "node -r esbuild-register ./dev/sqlite/index.ts",
|
37
37
|
"test": "ava test --timeout=60s",
|
38
38
|
"build": "rm -rf ./dist && tsc -p tsconfig.cli-types.json && pnpm mts && tsx build.ts",
|
39
|
-
"mts": "cp dist/index.d.ts dist/index.d.mts && cp dist/utils-studio.d.ts dist/utils-studio.d.mts",
|
39
|
+
"mts": "cp dist/index.d.ts dist/index.d.mts && cp dist/utils-studio.d.ts dist/utils-studio.d.mts && cp dist/payload.d.ts dist/payload.d.mts",
|
40
40
|
"build:dev": "rm -rf ./dist && tsx build.dev.ts && tsc -p tsconfig.cli-types.json && chmod +x ./dist/index.cjs",
|
41
41
|
"packit": "pnpm build && cp package.json dist/ && cd dist && pnpm pack",
|
42
42
|
"tsc": "tsc -p tsconfig.build.json",
|
@@ -73,7 +73,7 @@
|
|
73
73
|
},
|
74
74
|
"devDependencies": {
|
75
75
|
"@cloudflare/workers-types": "^4.20230518.0",
|
76
|
-
"@libsql/client": "^0.
|
76
|
+
"@libsql/client": "^0.4.2",
|
77
77
|
"@types/better-sqlite3": "^7.6.4",
|
78
78
|
"@types/dockerode": "^3.3.14",
|
79
79
|
"@types/glob": "^8.1.0",
|
@@ -128,6 +128,18 @@
|
|
128
128
|
},
|
129
129
|
"types": "./utils-studio.d.mts",
|
130
130
|
"default": "./utils-studio.mjs"
|
131
|
+
},
|
132
|
+
"./payload": {
|
133
|
+
"import": {
|
134
|
+
"types": "./payload.d.mts",
|
135
|
+
"default": "./payload.mjs"
|
136
|
+
},
|
137
|
+
"require": {
|
138
|
+
"types": "./payload.d.ts",
|
139
|
+
"default": "./payload.js"
|
140
|
+
},
|
141
|
+
"types": "./payload.d.mts",
|
142
|
+
"default": "./payload.mjs"
|
131
143
|
}
|
132
144
|
}
|
133
145
|
}
|
package/payload.d.mts
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
import { PgDatabase } from "drizzle-orm/pg-core";
|
2
|
+
import { PgSchema as PgSchemaKit } from "./serializer/pgSchema";
|
3
|
+
import { SQLiteSchema as SQLiteSchemaKit } from "./serializer/sqliteSchema";
|
4
|
+
import { MySqlSchema as MySQLSchemaKit } from "./serializer/mysqlSchema";
|
5
|
+
import { MySql2Database } from "drizzle-orm/mysql2";
|
6
|
+
import { BetterSQLite3Database } from "drizzle-orm/better-sqlite3";
|
7
|
+
export type DrizzleSnapshotJSON = PgSchemaKit;
|
8
|
+
export type DrizzleSQLiteSnapshotJSON = SQLiteSchemaKit;
|
9
|
+
export type DrizzleMySQLSnapshotJSON = MySQLSchemaKit;
|
10
|
+
export declare const generateDrizzleJson: (imports: Record<string, unknown>, prevId?: string) => PgSchemaKit;
|
11
|
+
export declare const generateMigration: (prev: DrizzleSnapshotJSON, cur: DrizzleSnapshotJSON) => Promise<string[]>;
|
12
|
+
export declare const pushSchema: (imports: Record<string, unknown>, db: PgDatabase<any>) => Promise<{
|
13
|
+
hasDataLoss: boolean;
|
14
|
+
warnings: string[];
|
15
|
+
statementsToExecute: string[];
|
16
|
+
apply: () => Promise<void>;
|
17
|
+
}>;
|
18
|
+
export declare const generateSQLiteDrizzleJson: (imports: Record<string, unknown>, prevId?: string) => Promise<SQLiteSchemaKit>;
|
19
|
+
export declare const generateSQLiteMigration: (prev: DrizzleSQLiteSnapshotJSON, cur: DrizzleSQLiteSnapshotJSON) => Promise<string[]>;
|
20
|
+
export declare const pushSQLiteSchema: (imports: Record<string, unknown>, db: BetterSQLite3Database<any>) => Promise<{
|
21
|
+
hasDataLoss: boolean;
|
22
|
+
warnings: string[];
|
23
|
+
statementsToExecute: string[];
|
24
|
+
apply: () => Promise<void>;
|
25
|
+
}>;
|
26
|
+
export declare const generateMySQLDrizzleJson: (imports: Record<string, unknown>, prevId?: string) => Promise<MySQLSchemaKit>;
|
27
|
+
export declare const generateMySQLMigration: (prev: DrizzleMySQLSnapshotJSON, cur: DrizzleMySQLSnapshotJSON) => Promise<string[]>;
|
28
|
+
export declare const pushMySQLSchema: (imports: Record<string, unknown>, db: MySql2Database<any>, databaseName: string) => Promise<{
|
29
|
+
hasDataLoss: boolean;
|
30
|
+
warnings: string[];
|
31
|
+
statementsToExecute: string[];
|
32
|
+
apply: () => Promise<void>;
|
33
|
+
}>;
|
package/payload.d.ts
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
import { PgDatabase } from "drizzle-orm/pg-core";
|
2
|
+
import { PgSchema as PgSchemaKit } from "./serializer/pgSchema";
|
3
|
+
import { SQLiteSchema as SQLiteSchemaKit } from "./serializer/sqliteSchema";
|
4
|
+
import { MySqlSchema as MySQLSchemaKit } from "./serializer/mysqlSchema";
|
5
|
+
import { MySql2Database } from "drizzle-orm/mysql2";
|
6
|
+
import { BetterSQLite3Database } from "drizzle-orm/better-sqlite3";
|
7
|
+
export type DrizzleSnapshotJSON = PgSchemaKit;
|
8
|
+
export type DrizzleSQLiteSnapshotJSON = SQLiteSchemaKit;
|
9
|
+
export type DrizzleMySQLSnapshotJSON = MySQLSchemaKit;
|
10
|
+
export declare const generateDrizzleJson: (imports: Record<string, unknown>, prevId?: string) => PgSchemaKit;
|
11
|
+
export declare const generateMigration: (prev: DrizzleSnapshotJSON, cur: DrizzleSnapshotJSON) => Promise<string[]>;
|
12
|
+
export declare const pushSchema: (imports: Record<string, unknown>, db: PgDatabase<any>) => Promise<{
|
13
|
+
hasDataLoss: boolean;
|
14
|
+
warnings: string[];
|
15
|
+
statementsToExecute: string[];
|
16
|
+
apply: () => Promise<void>;
|
17
|
+
}>;
|
18
|
+
export declare const generateSQLiteDrizzleJson: (imports: Record<string, unknown>, prevId?: string) => Promise<SQLiteSchemaKit>;
|
19
|
+
export declare const generateSQLiteMigration: (prev: DrizzleSQLiteSnapshotJSON, cur: DrizzleSQLiteSnapshotJSON) => Promise<string[]>;
|
20
|
+
export declare const pushSQLiteSchema: (imports: Record<string, unknown>, db: BetterSQLite3Database<any>) => Promise<{
|
21
|
+
hasDataLoss: boolean;
|
22
|
+
warnings: string[];
|
23
|
+
statementsToExecute: string[];
|
24
|
+
apply: () => Promise<void>;
|
25
|
+
}>;
|
26
|
+
export declare const generateMySQLDrizzleJson: (imports: Record<string, unknown>, prevId?: string) => Promise<MySQLSchemaKit>;
|
27
|
+
export declare const generateMySQLMigration: (prev: DrizzleMySQLSnapshotJSON, cur: DrizzleMySQLSnapshotJSON) => Promise<string[]>;
|
28
|
+
export declare const pushMySQLSchema: (imports: Record<string, unknown>, db: MySql2Database<any>, databaseName: string) => Promise<{
|
29
|
+
hasDataLoss: boolean;
|
30
|
+
warnings: string[];
|
31
|
+
statementsToExecute: string[];
|
32
|
+
apply: () => Promise<void>;
|
33
|
+
}>;
|