drizzle-kit 0.20.17-e0821c1 → 0.20.17-e38e63d

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/bin.cjs +7536 -765
  2. package/index.d.mts +25 -13
  3. package/index.d.ts +25 -13
  4. package/package.json +5 -16
  5. package/payload.d.mts +987 -18
  6. package/payload.d.ts +987 -18
  7. package/payload.js +19058 -16831
  8. package/payload.mjs +19094 -16842
  9. package/utils-studio.js +2 -2
  10. package/utils-studio.mjs +2 -2
  11. package/utils.js +1 -1
  12. package/utils.mjs +1 -1
  13. package/@types/utils.d.ts +0 -13
  14. package/cli/commands/migrate.d.ts +0 -287
  15. package/cli/commands/mysqlIntrospect.d.ts +0 -50
  16. package/cli/commands/mysqlPushUtils.d.ts +0 -14
  17. package/cli/commands/pgIntrospect.d.ts +0 -59
  18. package/cli/commands/pgPushUtils.d.ts +0 -11
  19. package/cli/commands/sqliteIntrospect.d.ts +0 -103
  20. package/cli/commands/sqlitePushUtils.d.ts +0 -15
  21. package/cli/commands/utils.d.ts +0 -180
  22. package/cli/connections.d.ts +0 -18
  23. package/cli/selector-ui.d.ts +0 -13
  24. package/cli/utils.d.ts +0 -13
  25. package/cli/validations/cli.d.ts +0 -169
  26. package/cli/validations/common.d.ts +0 -214
  27. package/cli/validations/mysql.d.ts +0 -29
  28. package/cli/validations/outputs.d.ts +0 -41
  29. package/cli/validations/pg.d.ts +0 -46
  30. package/cli/validations/sqlite.d.ts +0 -22
  31. package/cli/validations/studio.d.ts +0 -92
  32. package/cli/views.d.ts +0 -70
  33. package/global.d.ts +0 -6
  34. package/introspect-sqlite.d.ts +0 -10
  35. package/jsonDiffer.d.ts +0 -61
  36. package/jsonStatements.d.ts +0 -376
  37. package/migrationPreparator.d.ts +0 -35
  38. package/schemaValidator.d.ts +0 -1316
  39. package/serializer/index.d.ts +0 -9
  40. package/serializer/mysqlImports.d.ts +0 -7
  41. package/serializer/mysqlSchema.d.ts +0 -4650
  42. package/serializer/mysqlSerializer.d.ts +0 -7
  43. package/serializer/pgImports.d.ts +0 -11
  44. package/serializer/pgSchema.d.ts +0 -4792
  45. package/serializer/pgSerializer.d.ts +0 -7
  46. package/serializer/schemaToDrizzle.d.ts +0 -7
  47. package/serializer/sqliteImports.d.ts +0 -7
  48. package/serializer/sqliteSchema.d.ts +0 -2801
  49. package/serializer/sqliteSerializer.d.ts +0 -6
  50. package/serializer/studio.d.ts +0 -68
  51. package/snapshotsDiffer.d.ts +0 -3936
  52. package/sqlgenerator.d.ts +0 -33
  53. package/utils/words.d.ts +0 -7
  54. package/utils-studio.d.mts +0 -4
  55. package/utils-studio.d.ts +0 -4
  56. package/utils.d.ts +0 -78
@@ -1,6 +0,0 @@
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>;
@@ -1,68 +0,0 @@
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 { AnyTable, Relations, TablesRelationalConfig } 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
- schema: Record<string, Record<string, AnyTable<any>>>;
21
- relations: Record<string, Relations>;
22
- };
23
- export type ProxyParams = {
24
- sql: string;
25
- params: any[];
26
- typings?: any[];
27
- mode: "array" | "object";
28
- method: "values" | "get" | "all" | "run" | "execute";
29
- };
30
- export declare const preparePgSchema: (path: string | string[]) => Promise<{
31
- schema: Record<string, Record<string, AnyPgTable>>;
32
- relations: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
33
- }>;
34
- export declare const prepareMySqlSchema: (path: string | string[]) => Promise<{
35
- schema: Record<string, Record<string, AnyMySqlTable>>;
36
- relations: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
37
- }>;
38
- export declare const prepareSQLiteSchema: (path: string | string[]) => Promise<{
39
- schema: Record<string, Record<string, AnySQLiteTable>>;
40
- relations: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
41
- }>;
42
- export declare const drizzleForPostgres: (credentials: PostgresCredentials, pgSchema: Record<string, Record<string, AnyPgTable>>, relations: Record<string, Relations>) => Promise<Setup>;
43
- export declare const drizzleForMySQL: (credentials: MysqlCredentials, mysqlSchema: Record<string, Record<string, AnyMySqlTable>>, relations: Record<string, Relations>) => Promise<Setup>;
44
- export declare const drizzleForSQLite: (credentials: SqliteCredentials, sqliteSchema: Record<string, Record<string, AnySQLiteTable>>, relations: Record<string, Relations>) => Promise<Setup>;
45
- export declare const extractRelations: (tablesConfig: {
46
- tables: TablesRelationalConfig;
47
- tableNamesMap: Record<string, string>;
48
- }) => {
49
- name: string;
50
- type: "many" | "one";
51
- table: string;
52
- schema: string;
53
- columns: string[];
54
- refTable: string;
55
- refSchema: string;
56
- refColumns: string[];
57
- }[];
58
- export type Server = {
59
- start: (params: {
60
- host: string;
61
- port: number;
62
- key?: string;
63
- cert?: string;
64
- cb: (err: Error | null, address: string) => void;
65
- }) => void;
66
- };
67
- export declare const prepareServer: ({ dialect, driver, proxy, customDefaults, schema: drizzleSchema, relations }: Setup, app?: Hono) => Promise<Server>;
68
- export {};