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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drizzle-kit",
3
- "version": "0.20.6-88f61dc",
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.37",
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, AnySQLiteTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<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, AnySQLiteTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>> | undefined;
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, AnySQLiteTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>> | undefined;
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, AnySQLiteTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>> | undefined;
64
+ schema: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>> | AnySQLiteTable<{}>> | undefined;
65
65
  }>;
@@ -1,5 +1,5 @@
1
- export { pgSchemaToDrizzle as drizzleSchemaPg } from "./serializer/schemaToDrizzle";
2
- export { sqliteSchemaToDrizzle as drizzleSchemaSQLite } from "./serializer/schemaToDrizzle";
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 { pgSchemaToDrizzle as drizzleSchemaPg } from "./serializer/schemaToDrizzle";
2
- export { sqliteSchemaToDrizzle as drizzleSchemaSQLite } from "./serializer/schemaToDrizzle";
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";