drizzle-kit 0.20.6-88f61dc → 0.20.7-05d4dfb
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +680 -612
- package/package.json +2 -3
- package/serializer/pgSerializer.d.ts +2 -0
- package/serializer/sqliteSerializer.d.ts +2 -0
- 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 +700 -702
- package/utils-studio.mjs +626 -628
- package/utils.js +171 -177
- package/serializer/schemaToDrizzle.d.ts +0 -7
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "drizzle-kit",
|
3
|
-
"version": "0.20.
|
3
|
+
"version": "0.20.7-05d4dfb",
|
4
4
|
"repository": "https://github.com/drizzle-team/drizzle-kit-mirror",
|
5
5
|
"author": "Drizzle Team",
|
6
6
|
"license": "MIT",
|
@@ -56,12 +56,11 @@
|
|
56
56
|
]
|
57
57
|
},
|
58
58
|
"dependencies": {
|
59
|
-
"@drizzle-team/studio": "^0.0.
|
59
|
+
"@drizzle-team/studio": "^0.0.35",
|
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",
|
65
64
|
"esbuild": "^0.19.7",
|
66
65
|
"esbuild-register": "^3.5.0",
|
67
66
|
"glob": "^8.1.0",
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import { AnyPgTable, PgEnum, PgSchema } from "drizzle-orm/pg-core";
|
2
|
+
import { Relations } from "drizzle-orm";
|
2
3
|
import type { IntrospectStage, IntrospectStatus } from "../cli/views";
|
3
4
|
import type { PgSchemaInternal } from "../serializer/pgSchema";
|
4
5
|
import type { DrizzleDbClient } from "../drivers";
|
5
6
|
export declare const indexName: (tableName: string, columns: string[]) => string;
|
6
7
|
export declare const generatePgSnapshot: (tables: AnyPgTable[], enums: PgEnum<any>[], schemas: PgSchema[], schemaFilter?: string[]) => PgSchemaInternal;
|
7
8
|
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>;
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import type { SQLiteSchemaInternal } from "../serializer/sqliteSchema";
|
2
|
+
import { Relations } from "drizzle-orm";
|
2
3
|
import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
|
3
4
|
import type { IntrospectStage, IntrospectStatus } from "src/cli/views";
|
4
5
|
import type { DrizzleDbClient } from "src/drivers";
|
5
6
|
export declare const generateSqliteSnapshot: (tables: AnySQLiteTable[], enums: any[]) => SQLiteSchemaInternal;
|
6
7
|
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,
|
24
|
+
sqliteSchema: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>> | AnySQLiteTable<{}>>;
|
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,
|
56
|
+
schema: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>> | AnySQLiteTable<{}>> | undefined;
|
57
57
|
} | {
|
58
58
|
db: import("drizzle-orm/better-sqlite3").BetterSQLite3Database<Record<string, never>>;
|
59
59
|
type: "sqlite";
|
60
|
-
schema: Record<string,
|
60
|
+
schema: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>> | AnySQLiteTable<{}>> | undefined;
|
61
61
|
} | {
|
62
62
|
db: import("drizzle-orm/libsql").LibSQLDatabase<Record<string, never>>;
|
63
63
|
type: "sqlite";
|
64
|
-
schema: Record<string,
|
64
|
+
schema: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>> | AnySQLiteTable<{}>> | undefined;
|
65
65
|
}>;
|
package/utils-studio.d.mts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
export {
|
2
|
-
export {
|
1
|
+
export { toDrizzle as drizzleSchemaPg } from "./serializer/pgSerializer";
|
2
|
+
export { toDrizzle as drizzleSchemaSQLite } from "./serializer/sqliteSerializer";
|
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 { toDrizzle as drizzleSchemaPg } from "./serializer/pgSerializer";
|
2
|
+
export { toDrizzle as drizzleSchemaSQLite } from "./serializer/sqliteSerializer";
|
3
3
|
export { sqlitePushIntrospect } from "./cli/commands/sqliteIntrospect";
|
4
4
|
export { pgPushIntrospect } from "./cli/commands/pgIntrospect";
|
5
5
|
export { DrizzleORMPgClient, TursoSqlite } from "./drivers";
|