drizzle-kit 0.20.3 → 0.20.4-5f82cc8

Sign up to get free protection for your applications and to get access to all the features.
@@ -112,5 +112,10 @@ export declare const pgIntrospect: (config: PgConfigIntrospect, filters: string[
112
112
  values: Record<string, string>;
113
113
  }>;
114
114
  };
115
- ts: string;
115
+ ts: {
116
+ file: string;
117
+ imports: string;
118
+ decalrations: string;
119
+ schemaEntry: string;
120
+ };
116
121
  }>;
@@ -51,7 +51,12 @@ export declare const sqliteIntrospect: (config: SQLiteCliConfig, filters: string
51
51
  };
52
52
  enums: {};
53
53
  };
54
- ts: string;
54
+ ts: {
55
+ file: string;
56
+ imports: string;
57
+ decalrations: string;
58
+ schemaEntry: string;
59
+ };
55
60
  }>;
56
61
  export declare const sqlitePushIntrospect: (client: DrizzleDbClient, filters: string[]) => Promise<{
57
62
  schema: {
@@ -0,0 +1,9 @@
1
+ import "./@types/utils";
2
+ import { ConfigIntrospectCasing } from "./cli/commands/utils";
3
+ import { PgSchemaInternal } from "./serializer/pgSchema";
4
+ export declare const schemaToTypeScript: (schema: PgSchemaInternal, casing: ConfigIntrospectCasing) => {
5
+ file: string;
6
+ imports: string;
7
+ decalrations: string;
8
+ schemaEntry: string;
9
+ };
@@ -0,0 +1,10 @@
1
+ import "./@types/utils";
2
+ import type { ConfigIntrospectCasing } from "./cli/commands/utils";
3
+ import type { SQLiteSchemaInternal } from "./serializer/sqliteSchema";
4
+ export declare const indexName: (tableName: string, columns: string[]) => string;
5
+ export declare const schemaToTypeScript: (schema: SQLiteSchemaInternal, casing: ConfigIntrospectCasing["casing"]) => {
6
+ file: string;
7
+ imports: string;
8
+ decalrations: string;
9
+ schemaEntry: string;
10
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drizzle-kit",
3
- "version": "0.20.3",
3
+ "version": "0.20.4-5f82cc8",
4
4
  "repository": "https://github.com/drizzle-team/drizzle-kit-mirror",
5
5
  "author": "Drizzle Team",
6
6
  "license": "MIT",
@@ -41,7 +41,7 @@
41
41
  "packit": "pnpm build && cp package.json dist/ && cd dist && pnpm pack",
42
42
  "tsc": "tsc -p tsconfig.build.json",
43
43
  "pub": "cp package.json readme.md dist/ && cd dist && npm publish",
44
- "studio": "./dist/index.cjs studio --verbose",
44
+ "studio": "tsx ./src/cli/index.ts studio --verbose --port=3000",
45
45
  "studio:dev": "tsx ./src/cli/index.ts studio --verbose"
46
46
  },
47
47
  "ava": {
@@ -56,7 +56,7 @@
56
56
  ]
57
57
  },
58
58
  "dependencies": {
59
- "@drizzle-team/studio": "^0.0.27",
59
+ "@drizzle-team/studio": "^0.0.32",
60
60
  "@esbuild-kit/esm-loader": "^2.5.5",
61
61
  "camelcase": "^7.0.1",
62
62
  "chalk": "^5.2.0",
@@ -23,9 +23,21 @@ export declare const prepareModels: (path: string | string[]) => Promise<{
23
23
  mysqlSchema: Record<string, AnyMySqlTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
24
24
  sqliteSchema: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>> | AnySQLiteTable<{}>>;
25
25
  }>;
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>;
26
+ export declare const drizzleForPostgres: (connectionConfig: PgConnectionConfig, pgSchema: Record<string, Record<string, AnyPgTable>>, relations: Record<string, Relations>, ts: {
27
+ imports: string;
28
+ declarations: string;
29
+ schemaEntry: string;
30
+ }, verbose: boolean) => Promise<Setup>;
31
+ export declare const drizzleForMySQL: (config: MySQLConnectionConfig, mysqlSchema: Record<string, Record<string, AnyMySqlTable>>, relations: Record<string, Relations>, ts: {
32
+ imports: string;
33
+ declarations: string;
34
+ schemaEntry: string;
35
+ }, verbose: boolean) => Promise<Setup>;
36
+ export declare const drizzleForSQLite: (config: StudioSQLiteConnectionConfig, sqliteSchema: Record<string, Record<string, AnySQLiteTable>>, relations: Record<string, Relations>, ts: {
37
+ imports: string;
38
+ declarations: string;
39
+ schemaEntry: string;
40
+ }, verbose: boolean) => Promise<Setup>;
29
41
  export declare const drizzleDb: (drizzleConfig: StudioConfigConnections, models: {
30
42
  pgSchema?: Record<string, AnyPgTable | Relations>;
31
43
  mysqlSchema?: Record<string, AnyMySqlTable | Relations>;
package/utils-studio.js CHANGED
@@ -1,4 +1,3 @@
1
- #!/usr/bin/env node
2
1
  var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -3340,7 +3339,7 @@ var import_hanji3 = __toESM(require_hanji());
3340
3339
  init_views();
3341
3340
  init_pgSerializer();
3342
3341
 
3343
- // src/introspect.ts
3342
+ // src/introspect-pg.ts
3344
3343
  init_pgSerializer();
3345
3344
 
3346
3345
  // src/cli/commands/pgIntrospect.ts