drizzle-kit 0.20.5-c7dc2fe → 0.20.5-fd4dd75

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: {
@@ -1,6 +1,6 @@
1
1
  import { TypeOf } from "zod";
2
2
  export declare const safeRegister: () => Promise<{
3
- unregister(): void;
3
+ unregister: () => void;
4
4
  }>;
5
5
  export type GenerateConfig = {
6
6
  schema: string | string[];
package/cli/utils.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export declare const assertExists: (it?: any) => void;
2
+ export declare const assertStudioNodeVersion: () => void;
2
3
  export declare const assertPackages: (...pkgs: string[]) => Promise<void>;
3
4
  export declare const assertEitherPackage: (...pkgs: string[]) => Promise<string[]>;
4
5
  export declare const assertOrmCoreVersion: () => Promise<void>;
@@ -0,0 +1,12 @@
1
+ import { AnyPgTable } from "drizzle-orm/pg-core";
2
+ import { Relation, Relations } from "drizzle-orm/relations";
3
+ import "./@types/utils";
4
+ import { ConfigIntrospectCasing } from "./cli/commands/utils";
5
+ import { PgSchemaInternal } from "./serializer/pgSchema";
6
+ export declare const relationsToTypeScript: (schema: Record<string, Record<string, AnyPgTable<{}>>>, relations: Record<string, Relations<string, Record<string, Relation<string>>>>) => string;
7
+ export declare const schemaToTypeScript: (schema: PgSchemaInternal, casing: ConfigIntrospectCasing) => {
8
+ file: string;
9
+ imports: string;
10
+ decalrations: string;
11
+ schemaEntry: string;
12
+ };
@@ -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.5-c7dc2fe",
3
+ "version": "0.20.5-fd4dd75",
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,18 +56,18 @@
56
56
  ]
57
57
  },
58
58
  "dependencies": {
59
- "@drizzle-team/studio": "^0.0.27",
59
+ "@drizzle-team/studio": "^0.0.34",
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
- "drizzle-kit": "0.19.13",
65
- "esbuild": "^0.18.6",
66
- "esbuild-register": "^3.4.2",
64
+ "esbuild": "^0.19.7",
65
+ "esbuild-register": "^3.5.0",
67
66
  "glob": "^8.1.0",
68
67
  "hanji": "^0.0.5",
69
68
  "json-diff": "0.9.0",
70
69
  "minimatch": "^7.4.3",
70
+ "semver": "^7.5.4",
71
71
  "wrangler": "^3.7.0",
72
72
  "zod": "^3.20.2"
73
73
  },
@@ -80,6 +80,7 @@
80
80
  "@types/minimatch": "^5.1.2",
81
81
  "@types/node": "^18.11.15",
82
82
  "@types/pg": "^8.10.7",
83
+ "@types/semver": "^7.5.5",
83
84
  "@typescript-eslint/eslint-plugin": "^5.46.1",
84
85
  "@typescript-eslint/parser": "^5.46.1",
85
86
  "ava": "^5.1.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>;