drizzle-kit 0.20.8 → 0.20.9-343f36c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin.cjs +643 -670
- package/package.json +4 -3
- package/serializer/pgSerializer.d.ts +0 -2
- package/serializer/schemaToDrizzle.d.ts +7 -0
- package/serializer/sqliteSerializer.d.ts +0 -2
- package/serializer/studioUtils.d.ts +4 -4
- package/utils-studio.d.mts +2 -2
- package/utils-studio.d.ts +2 -2
- package/utils-studio.js +959 -957
- package/utils-studio.mjs +624 -622
- package/utils.js +173 -167
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "drizzle-kit",
|
3
|
-
"version": "0.20.
|
3
|
+
"version": "0.20.9-343f36c",
|
4
4
|
"repository": "https://github.com/drizzle-team/drizzle-kit-mirror",
|
5
5
|
"author": "Drizzle Team",
|
6
6
|
"license": "MIT",
|
@@ -56,11 +56,12 @@
|
|
56
56
|
]
|
57
57
|
},
|
58
58
|
"dependencies": {
|
59
|
-
"@drizzle-team/studio": "^0.0.
|
59
|
+
"@drizzle-team/studio": "^0.0.38",
|
60
60
|
"@esbuild-kit/esm-loader": "^2.5.5",
|
61
61
|
"camelcase": "^7.0.1",
|
62
62
|
"chalk": "^5.2.0",
|
63
63
|
"commander": "^9.4.1",
|
64
|
+
"env-paths": "^3.0.0",
|
64
65
|
"esbuild": "^0.19.7",
|
65
66
|
"esbuild-register": "^3.5.0",
|
66
67
|
"glob": "^8.1.0",
|
@@ -68,7 +69,6 @@
|
|
68
69
|
"json-diff": "0.9.0",
|
69
70
|
"minimatch": "^7.4.3",
|
70
71
|
"semver": "^7.5.4",
|
71
|
-
"wrangler": "^3.7.0",
|
72
72
|
"zod": "^3.20.2"
|
73
73
|
},
|
74
74
|
"devDependencies": {
|
@@ -100,6 +100,7 @@
|
|
100
100
|
"tsx": "^3.12.1",
|
101
101
|
"typescript": "^4.9.4",
|
102
102
|
"uvu": "^0.5.6",
|
103
|
+
"wrangler": "^3.22.1",
|
103
104
|
"zx": "^7.2.2"
|
104
105
|
},
|
105
106
|
"exports": {
|
@@ -1,9 +1,7 @@
|
|
1
1
|
import { AnyPgTable, PgEnum, PgSchema } from "drizzle-orm/pg-core";
|
2
|
-
import { Relations } from "drizzle-orm";
|
3
2
|
import type { IntrospectStage, IntrospectStatus } from "../cli/views";
|
4
3
|
import type { PgSchemaInternal } from "../serializer/pgSchema";
|
5
4
|
import type { DrizzleDbClient } from "../drivers";
|
6
5
|
export declare const indexName: (tableName: string, columns: string[]) => string;
|
7
6
|
export declare const generatePgSnapshot: (tables: AnyPgTable[], enums: PgEnum<any>[], schemas: PgSchema[], schemaFilter?: string[]) => PgSchemaInternal;
|
8
7
|
export declare const fromDatabase: (db: DrizzleDbClient, tablesFilter: ((table: string) => boolean) | undefined, schemaFilters: string[], progressCallback?: ((stage: IntrospectStage, count: number, status: IntrospectStatus) => void) | undefined) => Promise<PgSchemaInternal>;
|
9
|
-
export declare const toDrizzle: (schema: PgSchemaInternal, schemaName: string) => Record<string, AnyPgTable | Relations>;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Relations } from "drizzle-orm";
|
2
|
+
import { AnyPgTable } from "drizzle-orm/pg-core";
|
3
|
+
import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
|
4
|
+
import type { PgSchemaInternal } from "./pgSchema";
|
5
|
+
import type { SQLiteSchemaInternal } from "./sqliteSchema";
|
6
|
+
export declare const pgSchemaToDrizzle: (schema: PgSchemaInternal, schemaName: string) => Record<string, AnyPgTable | Relations>;
|
7
|
+
export declare const sqliteSchemaToDrizzle: (schema: SQLiteSchemaInternal) => Record<string, AnySQLiteTable | Relations>;
|
@@ -1,8 +1,6 @@
|
|
1
1
|
import type { SQLiteSchemaInternal } from "../serializer/sqliteSchema";
|
2
|
-
import { Relations } from "drizzle-orm";
|
3
2
|
import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
|
4
3
|
import type { IntrospectStage, IntrospectStatus } from "src/cli/views";
|
5
4
|
import type { DrizzleDbClient } from "src/drivers";
|
6
5
|
export declare const generateSqliteSnapshot: (tables: AnySQLiteTable[], enums: any[]) => SQLiteSchemaInternal;
|
7
6
|
export declare const fromDatabase: (db: DrizzleDbClient, tablesFilter?: (table: string) => boolean, progressCallback?: ((stage: IntrospectStage, count: number, status: IntrospectStatus) => void) | undefined) => Promise<SQLiteSchemaInternal>;
|
8
|
-
export declare const toDrizzle: (schema: SQLiteSchemaInternal) => Record<string, AnySQLiteTable | Relations>;
|
@@ -21,7 +21,7 @@ export declare const prepareSQLiteSchema: (path: string | string[]) => Promise<{
|
|
21
21
|
export declare const prepareModels: (path: string | string[]) => Promise<{
|
22
22
|
pgSchema: Record<string, AnyPgTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
|
23
23
|
mysqlSchema: Record<string, AnyMySqlTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
|
24
|
-
sqliteSchema: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string
|
24
|
+
sqliteSchema: Record<string, AnySQLiteTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
|
25
25
|
}>;
|
26
26
|
export declare const drizzleForPostgres: (connectionConfig: PgConnectionConfig, pgSchema: Record<string, Record<string, AnyPgTable>>, relations: Record<string, Relations>, ts: {
|
27
27
|
imports: string;
|
@@ -53,13 +53,13 @@ export declare const drizzleDb: (drizzleConfig: StudioConfigConnections, models:
|
|
53
53
|
} | {
|
54
54
|
db: import("../orm-extenstions/d1-driver/driver").DrizzleD1WranglerDatabase<Record<string, never>>;
|
55
55
|
type: "sqlite";
|
56
|
-
schema: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string
|
56
|
+
schema: Record<string, AnySQLiteTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>> | undefined;
|
57
57
|
} | {
|
58
58
|
db: import("drizzle-orm/better-sqlite3").BetterSQLite3Database<Record<string, never>>;
|
59
59
|
type: "sqlite";
|
60
|
-
schema: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string
|
60
|
+
schema: Record<string, AnySQLiteTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>> | undefined;
|
61
61
|
} | {
|
62
62
|
db: import("drizzle-orm/libsql").LibSQLDatabase<Record<string, never>>;
|
63
63
|
type: "sqlite";
|
64
|
-
schema: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string
|
64
|
+
schema: Record<string, AnySQLiteTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>> | undefined;
|
65
65
|
}>;
|
package/utils-studio.d.mts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
export {
|
2
|
-
export {
|
1
|
+
export { pgSchemaToDrizzle as drizzleSchemaPg } from "./serializer/schemaToDrizzle";
|
2
|
+
export { sqliteSchemaToDrizzle as drizzleSchemaSQLite } from "./serializer/schemaToDrizzle";
|
3
3
|
export { sqlitePushIntrospect } from "./cli/commands/sqliteIntrospect";
|
4
4
|
export { pgPushIntrospect } from "./cli/commands/pgIntrospect";
|
5
5
|
export { DrizzleORMPgClient, TursoSqlite } from "./drivers";
|
package/utils-studio.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
export {
|
2
|
-
export {
|
1
|
+
export { pgSchemaToDrizzle as drizzleSchemaPg } from "./serializer/schemaToDrizzle";
|
2
|
+
export { sqliteSchemaToDrizzle as drizzleSchemaSQLite } from "./serializer/schemaToDrizzle";
|
3
3
|
export { sqlitePushIntrospect } from "./cli/commands/sqliteIntrospect";
|
4
4
|
export { pgPushIntrospect } from "./cli/commands/pgIntrospect";
|
5
5
|
export { DrizzleORMPgClient, TursoSqlite } from "./drivers";
|