drizzle-kit 0.20.0-13160ca → 0.20.0-3d76318
Sign up to get free protection for your applications and to get access to all the features.
- package/cli/utils.d.ts +1 -1
- package/cli/validations/mysql.d.ts +77 -126
- package/cli/validations/studio.d.ts +118 -73
- package/global.d.ts +1 -0
- package/index.cjs +862 -602
- package/orm-extenstions/d1-driver/session.d.ts +2 -3
- package/package.json +7 -6
- package/serializer/studioUtils.d.ts +18 -4
- package/utils.js +618 -517
@@ -2,10 +2,9 @@ import { entityKind } from "drizzle-orm";
|
|
2
2
|
import type { Logger } from "drizzle-orm";
|
3
3
|
import { type RelationalSchemaConfig, type TablesRelationalConfig } from "drizzle-orm";
|
4
4
|
import { type Query } from "drizzle-orm";
|
5
|
-
import
|
5
|
+
import { SQLiteAsyncDialect, SQLiteExecuteMethod, SQLitePreparedQuery, SQLiteSession } from "drizzle-orm/sqlite-core";
|
6
6
|
import type { SelectedFieldsOrdered } from "drizzle-orm/sqlite-core";
|
7
7
|
import { type PreparedQueryConfig as PreparedQueryConfigBase, type SQLiteTransactionConfig } from "drizzle-orm/sqlite-core";
|
8
|
-
import { PreparedQuery as PreparedQueryBase, SQLiteSession } from "drizzle-orm/sqlite-core";
|
9
8
|
export interface SQLiteD1SessionOptions {
|
10
9
|
logger?: Logger;
|
11
10
|
}
|
@@ -25,7 +24,7 @@ export declare class SQLiteWranglerD1Session<TFullSchema extends Record<string,
|
|
25
24
|
prepareQuery(query: Query, fields: SelectedFieldsOrdered | undefined, executeMethod: SQLiteExecuteMethod, customResultMapper?: (rows: unknown[][]) => unknown): PreparedQuery;
|
26
25
|
transaction<T>(transaction: (tx: any) => T | Promise<T>, config?: SQLiteTransactionConfig): Promise<T>;
|
27
26
|
}
|
28
|
-
export declare class PreparedQuery<T extends PreparedQueryConfig = PreparedQueryConfig> extends
|
27
|
+
export declare class PreparedQuery<T extends PreparedQueryConfig = PreparedQueryConfig> extends SQLitePreparedQuery<{
|
29
28
|
type: "async";
|
30
29
|
run: D1WranglerResults;
|
31
30
|
all: T["all"];
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "drizzle-kit",
|
3
|
-
"version": "0.20.0-
|
3
|
+
"version": "0.20.0-3d76318",
|
4
4
|
"repository": "https://github.com/drizzle-team/drizzle-kit-mirror",
|
5
5
|
"author": "Drizzle Team",
|
6
6
|
"license": "MIT",
|
@@ -40,7 +40,8 @@
|
|
40
40
|
"packit": "pnpm build && cp package.json dist/ && cd dist && pnpm pack",
|
41
41
|
"tsc": "tsc -p tsconfig.build.json",
|
42
42
|
"pub": "cp package.json readme.md dist/ && cd dist && npm publish",
|
43
|
-
"studio": "./dist/index.cjs studio --verbose"
|
43
|
+
"studio": "./dist/index.cjs studio --verbose",
|
44
|
+
"studio:dev": "tsx ./src/cli/index.ts studio --verbose"
|
44
45
|
},
|
45
46
|
"ava": {
|
46
47
|
"files": [
|
@@ -54,7 +55,7 @@
|
|
54
55
|
]
|
55
56
|
},
|
56
57
|
"dependencies": {
|
57
|
-
"@drizzle-team/studio": "^0.0.
|
58
|
+
"@drizzle-team/studio": "^0.0.27",
|
58
59
|
"@esbuild-kit/esm-loader": "^2.5.5",
|
59
60
|
"camelcase": "^7.0.1",
|
60
61
|
"chalk": "^5.2.0",
|
@@ -76,20 +77,20 @@
|
|
76
77
|
"@types/glob": "^8.1.0",
|
77
78
|
"@types/minimatch": "^5.1.2",
|
78
79
|
"@types/node": "^18.11.15",
|
79
|
-
"@types/pg": "^8.
|
80
|
+
"@types/pg": "^8.10.7",
|
80
81
|
"@typescript-eslint/eslint-plugin": "^5.46.1",
|
81
82
|
"@typescript-eslint/parser": "^5.46.1",
|
82
83
|
"ava": "^5.1.0",
|
83
84
|
"better-sqlite3": "^8.4.0",
|
84
85
|
"dockerode": "^3.3.4",
|
85
86
|
"dotenv": "^16.0.3",
|
86
|
-
"drizzle-orm": "0.
|
87
|
+
"drizzle-orm": "0.29.0-d3b1c58",
|
87
88
|
"eslint": "^8.29.0",
|
88
89
|
"eslint-config-prettier": "^8.5.0",
|
89
90
|
"eslint-plugin-prettier": "^4.2.1",
|
90
91
|
"get-port": "^6.1.2",
|
91
92
|
"mysql2": "2.3.3",
|
92
|
-
"pg": "^8.
|
93
|
+
"pg": "^8.11.3",
|
93
94
|
"postgres": "^3.3.5",
|
94
95
|
"prettier": "^2.8.1",
|
95
96
|
"tsx": "^3.12.1",
|
@@ -3,20 +3,34 @@ import { Relations } from "drizzle-orm";
|
|
3
3
|
import { AnyMySqlTable } from "drizzle-orm/mysql-core";
|
4
4
|
import { AnyPgTable } from "drizzle-orm/pg-core";
|
5
5
|
import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
|
6
|
-
import
|
6
|
+
import { MySQLConnectionConfig } from "src/cli/validations/mysql";
|
7
7
|
import { PgConnectionConfig } from "src/cli/validations/pg";
|
8
|
-
import { StudioConfigConnections } from "src/cli/validations/studio";
|
8
|
+
import { StudioConfigConnections, StudioSqliteConnectionConfig as StudioSQLiteConnectionConfig } from "src/cli/validations/studio";
|
9
|
+
export declare const preparePgSchema: (path: string | string[]) => Promise<{
|
10
|
+
schema: Record<string, Record<string, AnyPgTable<{}>>>;
|
11
|
+
relations: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
|
12
|
+
}>;
|
13
|
+
export declare const prepareMySqlSchema: (path: string | string[]) => Promise<{
|
14
|
+
schema: Record<string, Record<string, AnyMySqlTable<{}>>>;
|
15
|
+
relations: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
|
16
|
+
}>;
|
17
|
+
export declare const prepareSQLiteSchema: (path: string | string[]) => Promise<{
|
18
|
+
schema: Record<string, Record<string, AnySQLiteTable<{}>>>;
|
19
|
+
relations: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
|
20
|
+
}>;
|
9
21
|
export declare const prepareModels: (path: string | string[]) => Promise<{
|
10
22
|
pgSchema: Record<string, AnyPgTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
|
11
23
|
mysqlSchema: Record<string, AnyMySqlTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
|
12
24
|
sqliteSchema: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>> | AnySQLiteTable<{}>>;
|
13
25
|
}>;
|
14
|
-
export declare const drizzleForPostgres: (connectionConfig: PgConnectionConfig, pgSchema: Record<string, AnyPgTable
|
26
|
+
export declare const drizzleForPostgres: (connectionConfig: PgConnectionConfig, pgSchema: Record<string, Record<string, AnyPgTable>>, relations: Record<string, Relations>, verbose: boolean) => Promise<Setup>;
|
27
|
+
export declare const drizzleForMySQL: (config: MySQLConnectionConfig, mysqlSchema: Record<string, Record<string, AnyMySqlTable>>, relations: Record<string, Relations>, verbose: boolean) => Promise<Setup>;
|
28
|
+
export declare const drizzleForSQLite: (config: StudioSQLiteConnectionConfig, sqliteSchema: Record<string, Record<string, AnySQLiteTable>>, relations: Record<string, Relations>, verbose: boolean) => Promise<Setup>;
|
15
29
|
export declare const drizzleDb: (drizzleConfig: StudioConfigConnections, models: {
|
16
30
|
pgSchema?: Record<string, AnyPgTable | Relations>;
|
17
31
|
mysqlSchema?: Record<string, AnyMySqlTable | Relations>;
|
18
32
|
sqliteSchema?: Record<string, AnySQLiteTable | Relations>;
|
19
|
-
}, logger: boolean
|
33
|
+
}, logger: boolean) => Promise<{
|
20
34
|
db: import("drizzle-orm/node-postgres").NodePgDatabase<Record<string, never>>;
|
21
35
|
type: "pg";
|
22
36
|
schema: Record<string, AnyPgTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>> | undefined;
|