drizzle-kit 0.19.14-039355d → 0.20.0-5198fb7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. package/@types/utils.d.ts +12 -0
  2. package/cli/commands/migrate.d.ts +260 -0
  3. package/cli/commands/mysqlUp.d.ts +4 -0
  4. package/cli/commands/pgIntrospect.d.ts +118 -0
  5. package/cli/commands/pgPushUtils.d.ts +14 -0
  6. package/cli/commands/pgUp.d.ts +4 -0
  7. package/cli/commands/sqliteIntrospect.d.ts +102 -0
  8. package/cli/commands/sqliteUtils.d.ts +162 -0
  9. package/cli/commands/upFolders.d.ts +27 -0
  10. package/cli/commands/utils.d.ts +265 -0
  11. package/cli/selector-ui.d.ts +13 -0
  12. package/cli/validations/common.d.ts +13 -0
  13. package/cli/validations/mysql.d.ts +414 -0
  14. package/cli/validations/outputs.d.ts +40 -0
  15. package/cli/validations/pg.d.ts +438 -0
  16. package/cli/validations/sqlite.d.ts +220 -0
  17. package/cli/validations/studio.d.ts +548 -0
  18. package/cli/views.d.ts +61 -0
  19. package/drivers/index.d.ts +25 -0
  20. package/global.d.ts +2 -0
  21. package/index.cjs +28813 -37075
  22. package/index.d.ts +47 -0
  23. package/introspect.d.ts +4 -0
  24. package/jsonDiffer.d.ts +76 -0
  25. package/jsonStatements.d.ts +349 -0
  26. package/migrationPreparator.d.ts +35 -0
  27. package/orm-extenstions/d1-driver/driver.d.ts +8 -0
  28. package/orm-extenstions/d1-driver/session.d.ts +52 -0
  29. package/orm-extenstions/d1-driver/wrangler-client.d.ts +3 -0
  30. package/package.json +4 -3
  31. package/schemaValidator.d.ts +1306 -0
  32. package/serializer/index.d.ts +9 -0
  33. package/serializer/mysqlImports.d.ts +6 -0
  34. package/serializer/mysqlSchema.d.ts +3833 -0
  35. package/serializer/mysqlSerializer.d.ts +7 -0
  36. package/serializer/pgImports.d.ts +11 -0
  37. package/serializer/pgSchema.d.ts +4244 -0
  38. package/serializer/pgSerializer.d.ts +7 -0
  39. package/serializer/sqliteImports.d.ts +5 -0
  40. package/serializer/sqliteSchema.d.ts +3227 -0
  41. package/serializer/sqliteSerializer.d.ts +8 -0
  42. package/serializer/studioUtils.d.ts +35 -0
  43. package/snapshotsDiffer.d.ts +2660 -0
  44. package/sqlgenerator.d.ts +33 -0
  45. package/sqlite-introspect.d.ts +5 -0
  46. package/utils/words.d.ts +7 -0
  47. package/utils.d.ts +33 -0
  48. package/utils.js +51597 -11732
  49. package/utilsR.d.ts +232 -0
@@ -0,0 +1,8 @@
1
+ import { SQLiteSchemaInternal } from "src/serializer/sqliteSchema";
2
+ import { Relations } from "drizzle-orm";
3
+ import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
4
+ import { IntrospectStage, IntrospectStatus } from "src/cli/views";
5
+ import { DrizzleDbClient } from "src/drivers";
6
+ export declare const generateSqliteSnapshot: (tables: AnySQLiteTable[], enums: any[]) => SQLiteSchemaInternal;
7
+ export declare const fromDatabase: (db: DrizzleDbClient, tablesFilter?: (table: string) => boolean, progressCallback?: ((stage: IntrospectStage, count: number, status: IntrospectStatus) => void) | undefined) => Promise<SQLiteSchemaInternal>;
8
+ export declare const toDrizzle: (schema: SQLiteSchemaInternal) => Record<string, AnySQLiteTable | Relations>;
@@ -0,0 +1,35 @@
1
+ import { Relations } from "drizzle-orm";
2
+ import { AnyMySqlTable } from "drizzle-orm/mysql-core";
3
+ import { AnyPgTable } from "drizzle-orm/pg-core";
4
+ import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
5
+ import { StudioConfigConnections } from "src/cli/validations/studio";
6
+ export declare const prepareModels: (path: string | string[]) => Promise<{
7
+ pgSchema: Record<string, AnyPgTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
8
+ mysqlSchema: Record<string, AnyMySqlTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
9
+ sqliteSchema: Record<string, AnySQLiteTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
10
+ }>;
11
+ export declare const drizzleDb: (drizzleConfig: StudioConfigConnections, models: {
12
+ pgSchema?: Record<string, AnyPgTable | Relations>;
13
+ mysqlSchema?: Record<string, AnyMySqlTable | Relations>;
14
+ sqliteSchema?: Record<string, AnySQLiteTable | Relations>;
15
+ }, logger: boolean) => Promise<{
16
+ db: import("drizzle-orm/node-postgres").NodePgDatabase<Record<string, never>>;
17
+ type: "pg";
18
+ schema: Record<string, AnyPgTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>> | undefined;
19
+ } | {
20
+ db: import("drizzle-orm/mysql2").MySql2Database<Record<string, never>>;
21
+ type: "mysql";
22
+ schema: Record<string, AnyMySqlTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>> | undefined;
23
+ } | {
24
+ db: import("../orm-extenstions/d1-driver/driver").DrizzleD1WranglerDatabase<Record<string, never>>;
25
+ type: "sqlite";
26
+ schema: Record<string, AnySQLiteTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>> | undefined;
27
+ } | {
28
+ db: import("drizzle-orm/better-sqlite3").BetterSQLite3Database<Record<string, never>>;
29
+ type: "sqlite";
30
+ schema: Record<string, AnySQLiteTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>> | undefined;
31
+ } | {
32
+ db: import("drizzle-orm/libsql").LibSQLDatabase<Record<string, never>>;
33
+ type: "sqlite";
34
+ schema: Record<string, AnySQLiteTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>> | undefined;
35
+ }>;