drizzle-kit 0.20.17-aec19bb → 0.20.17-b08243d
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +50923 -12191
- package/cli/commands/migrate.d.ts +43 -43
- package/cli/commands/mysqlIntrospect.d.ts +9 -14
- package/cli/commands/pgIntrospect.d.ts +8 -8
- package/cli/commands/sqliteIntrospect.d.ts +12 -13
- package/cli/commands/sqlitePushUtils.d.ts +2 -2
- package/cli/commands/utils.d.ts +2 -2
- package/cli/connections.d.ts +13 -0
- package/cli/utils.d.ts +1 -0
- package/cli/validations/cli.d.ts +49 -49
- package/cli/validations/common.d.ts +35 -35
- package/cli/validations/mysql.d.ts +7 -13
- package/cli/validations/outputs.d.ts +2 -2
- package/cli/validations/pg.d.ts +22 -13
- package/cli/validations/sqlite.d.ts +0 -12
- package/index.d.mts +17 -57
- package/index.d.ts +17 -57
- package/package.json +12 -6
- package/payload.js +1659 -20684
- package/payload.mjs +1480 -20505
- package/schemaValidator.d.ts +228 -228
- package/serializer/mysqlSchema.d.ts +910 -1224
- package/serializer/pgSchema.d.ts +745 -745
- package/serializer/sqliteSchema.d.ts +457 -457
- package/serializer/studio.d.ts +51 -0
- package/snapshotsDiffer.d.ts +315 -316
- package/utils-studio.js +887 -3448
- package/utils-studio.mjs +852 -3413
- package/utils.d.ts +6 -0
- package/utils.js +222 -857
- package/utils.mjs +197 -832
@@ -0,0 +1,51 @@
|
|
1
|
+
import { Hono } from "hono";
|
2
|
+
import type { PostgresCredentials } from "../cli/validations/pg";
|
3
|
+
import type { MysqlCredentials } from "../cli/validations/mysql";
|
4
|
+
import type { SqliteCredentials } from "../cli/validations/sqlite";
|
5
|
+
import { AnyPgTable } from "drizzle-orm/pg-core";
|
6
|
+
import { Relations } from "drizzle-orm";
|
7
|
+
import { AnyMySqlTable } from "drizzle-orm/mysql-core";
|
8
|
+
import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
|
9
|
+
type CustomDefault = {
|
10
|
+
schema: string;
|
11
|
+
table: string;
|
12
|
+
column: string;
|
13
|
+
func: () => unknown;
|
14
|
+
};
|
15
|
+
export type Setup = {
|
16
|
+
dialect: "postgresql" | "mysql" | "sqlite";
|
17
|
+
proxy: (params: ProxyParams) => Promise<any[] | any>;
|
18
|
+
customDefaults: CustomDefault[];
|
19
|
+
};
|
20
|
+
export type ProxyParams = {
|
21
|
+
sql: string;
|
22
|
+
params: any[];
|
23
|
+
mode: "array" | "object";
|
24
|
+
method: "values" | "get" | "all" | "run" | "execute";
|
25
|
+
};
|
26
|
+
export declare const preparePgSchema: (path: string | string[]) => Promise<{
|
27
|
+
schema: Record<string, Record<string, AnyPgTable>>;
|
28
|
+
relations: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
|
29
|
+
}>;
|
30
|
+
export declare const prepareMySqlSchema: (path: string | string[]) => Promise<{
|
31
|
+
schema: Record<string, Record<string, AnyMySqlTable>>;
|
32
|
+
relations: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
|
33
|
+
}>;
|
34
|
+
export declare const prepareSQLiteSchema: (path: string | string[]) => Promise<{
|
35
|
+
schema: Record<string, Record<string, AnySQLiteTable>>;
|
36
|
+
relations: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
|
37
|
+
}>;
|
38
|
+
export declare const drizzleForPostgres: (credentials: PostgresCredentials, pgSchema: Record<string, Record<string, AnyPgTable>>, relations: Record<string, Relations>) => Promise<Setup>;
|
39
|
+
export declare const drizzleForMySQL: (credentials: MysqlCredentials, mysqlSchema: Record<string, Record<string, AnyMySqlTable>>, relations: Record<string, Relations>) => Promise<Setup>;
|
40
|
+
export declare const drizzleForSQLite: (credentials: SqliteCredentials, sqliteSchema: Record<string, Record<string, AnySQLiteTable>>, relations: Record<string, Relations>) => Promise<Setup>;
|
41
|
+
export type Server = {
|
42
|
+
start: (params: {
|
43
|
+
host: string;
|
44
|
+
port: number;
|
45
|
+
key?: string;
|
46
|
+
cert?: string;
|
47
|
+
cb: (err: Error | null, address: string) => void;
|
48
|
+
}) => void;
|
49
|
+
};
|
50
|
+
export declare const prepareServer: ({ dialect, proxy, customDefaults }: Setup, app?: Hono) => Promise<Server>;
|
51
|
+
export {};
|