drizzle-kit 0.20.17-cab52ad → 0.20.17-d71f2ee

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. package/@types/utils.d.ts +13 -0
  2. package/bin.cjs +372 -7335
  3. package/cli/commands/migrate.d.ts +287 -0
  4. package/cli/commands/mysqlIntrospect.d.ts +50 -0
  5. package/cli/commands/mysqlPushUtils.d.ts +14 -0
  6. package/cli/commands/pgIntrospect.d.ts +59 -0
  7. package/cli/commands/pgPushUtils.d.ts +11 -0
  8. package/cli/commands/sqliteIntrospect.d.ts +103 -0
  9. package/cli/commands/sqlitePushUtils.d.ts +15 -0
  10. package/cli/commands/utils.d.ts +180 -0
  11. package/cli/connections.d.ts +18 -0
  12. package/cli/selector-ui.d.ts +13 -0
  13. package/cli/utils.d.ts +13 -0
  14. package/cli/validations/cli.d.ts +169 -0
  15. package/cli/validations/common.d.ts +214 -0
  16. package/cli/validations/mysql.d.ts +29 -0
  17. package/cli/validations/outputs.d.ts +41 -0
  18. package/cli/validations/pg.d.ts +46 -0
  19. package/cli/validations/sqlite.d.ts +22 -0
  20. package/cli/validations/studio.d.ts +92 -0
  21. package/cli/views.d.ts +70 -0
  22. package/global.d.ts +6 -0
  23. package/index.d.mts +6 -14
  24. package/index.d.ts +6 -14
  25. package/introspect-sqlite.d.ts +10 -0
  26. package/jsonDiffer.d.ts +61 -0
  27. package/jsonStatements.d.ts +376 -0
  28. package/migrationPreparator.d.ts +35 -0
  29. package/package.json +16 -5
  30. package/payload.d.mts +18 -987
  31. package/payload.d.ts +18 -987
  32. package/payload.js +16831 -19058
  33. package/payload.mjs +16827 -19079
  34. package/schemaValidator.d.ts +1316 -0
  35. package/serializer/index.d.ts +9 -0
  36. package/serializer/mysqlImports.d.ts +7 -0
  37. package/serializer/mysqlSchema.d.ts +4650 -0
  38. package/serializer/mysqlSerializer.d.ts +7 -0
  39. package/serializer/pgImports.d.ts +11 -0
  40. package/serializer/pgSchema.d.ts +4792 -0
  41. package/serializer/pgSerializer.d.ts +7 -0
  42. package/serializer/schemaToDrizzle.d.ts +7 -0
  43. package/serializer/sqliteImports.d.ts +7 -0
  44. package/serializer/sqliteSchema.d.ts +2801 -0
  45. package/serializer/sqliteSerializer.d.ts +6 -0
  46. package/serializer/studio.d.ts +53 -0
  47. package/snapshotsDiffer.d.ts +3936 -0
  48. package/sqlgenerator.d.ts +33 -0
  49. package/utils/words.d.ts +7 -0
  50. package/utils-studio.d.mts +4 -0
  51. package/utils-studio.d.ts +4 -0
  52. package/utils.d.ts +78 -0
@@ -0,0 +1,6 @@
1
+ import type { SQLiteSchemaInternal } from "../serializer/sqliteSchema";
2
+ import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
3
+ import type { IntrospectStage, IntrospectStatus } from "../cli/views";
4
+ import type { SQLiteDB } from "../utils";
5
+ export declare const generateSqliteSnapshot: (tables: AnySQLiteTable[]) => SQLiteSchemaInternal;
6
+ export declare const fromDatabase: (db: SQLiteDB, tablesFilter?: (table: string) => boolean, progressCallback?: (stage: IntrospectStage, count: number, status: IntrospectStatus) => void) => Promise<SQLiteSchemaInternal>;
@@ -0,0 +1,53 @@
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
+ driver?: "aws-data-api";
18
+ proxy: (params: ProxyParams) => Promise<any[] | any>;
19
+ customDefaults: CustomDefault[];
20
+ };
21
+ export type ProxyParams = {
22
+ sql: string;
23
+ params: any[];
24
+ typings?: any[];
25
+ mode: "array" | "object";
26
+ method: "values" | "get" | "all" | "run" | "execute";
27
+ };
28
+ export declare const preparePgSchema: (path: string | string[]) => Promise<{
29
+ schema: Record<string, Record<string, AnyPgTable>>;
30
+ relations: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
31
+ }>;
32
+ export declare const prepareMySqlSchema: (path: string | string[]) => Promise<{
33
+ schema: Record<string, Record<string, AnyMySqlTable>>;
34
+ relations: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
35
+ }>;
36
+ export declare const prepareSQLiteSchema: (path: string | string[]) => Promise<{
37
+ schema: Record<string, Record<string, AnySQLiteTable>>;
38
+ relations: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
39
+ }>;
40
+ export declare const drizzleForPostgres: (credentials: PostgresCredentials, pgSchema: Record<string, Record<string, AnyPgTable>>, relations: Record<string, Relations>) => Promise<Setup>;
41
+ export declare const drizzleForMySQL: (credentials: MysqlCredentials, mysqlSchema: Record<string, Record<string, AnyMySqlTable>>, relations: Record<string, Relations>) => Promise<Setup>;
42
+ export declare const drizzleForSQLite: (credentials: SqliteCredentials, sqliteSchema: Record<string, Record<string, AnySQLiteTable>>, relations: Record<string, Relations>) => Promise<Setup>;
43
+ export type Server = {
44
+ start: (params: {
45
+ host: string;
46
+ port: number;
47
+ key?: string;
48
+ cert?: string;
49
+ cb: (err: Error | null, address: string) => void;
50
+ }) => void;
51
+ };
52
+ export declare const prepareServer: ({ dialect, driver, proxy, customDefaults }: Setup, app?: Hono) => Promise<Server>;
53
+ export {};