drizzle-kit 0.20.14-a183d8b → 0.20.14-b6f235e

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. package/bin.cjs +20571 -19934
  2. package/cli/commands/migrate.d.ts +114 -90
  3. package/cli/commands/mysqlIntrospect.d.ts +8 -14
  4. package/cli/commands/pgIntrospect.d.ts +17 -10
  5. package/cli/commands/sqliteIntrospect.d.ts +8 -8
  6. package/cli/commands/utils.d.ts +5 -5
  7. package/cli/{index.d.ts → validations/cli.d.ts} +33 -20
  8. package/cli/validations/common.d.ts +1 -1
  9. package/cli/views.d.ts +6 -4
  10. package/global.d.ts +3 -1
  11. package/index.js +1 -0
  12. package/introspect-pg.d.ts +4 -1
  13. package/jsonDiffer.d.ts +14 -29
  14. package/jsonStatements.d.ts +38 -11
  15. package/package.json +18 -50
  16. package/payload.js +7697 -8205
  17. package/payload.mjs +6841 -7355
  18. package/schemaValidator.d.ts +72 -69
  19. package/serializer/mysqlImports.d.ts +3 -7
  20. package/serializer/mysqlSchema.d.ts +1624 -493
  21. package/serializer/mysqlSerializer.d.ts +2 -2
  22. package/serializer/pgImports.d.ts +2 -2
  23. package/serializer/pgSchema.d.ts +1260 -801
  24. package/serializer/sqliteImports.d.ts +2 -4
  25. package/serializer/sqliteSchema.d.ts +144 -570
  26. package/serializer/sqliteSerializer.d.ts +1 -1
  27. package/snapshotsDiffer.d.ts +1908 -1050
  28. package/utils/words.d.ts +1 -1
  29. package/utils-studio.js +4144 -85
  30. package/utils-studio.mjs +4144 -85
  31. package/utils.d.ts +6 -140
  32. package/utils.js +4112 -7326
  33. package/utils.mjs +4195 -7409
  34. package/cli/commands/check.d.ts +0 -2
  35. package/cli/commands/drop.d.ts +0 -4
  36. package/cli/commands/mysqlUp.d.ts +0 -4
  37. package/cli/commands/pgUp.d.ts +0 -4
  38. package/cli/commands/push.d.ts +0 -6
  39. package/cli/commands/sqliteUp.d.ts +0 -2
  40. package/cli/commands/upFolders.d.ts +0 -27
  41. package/cli/utils.d.ts +0 -12
  42. package/cli/validations/studio.d.ts +0 -593
  43. package/orm-extenstions/d1-driver/driver.d.ts +0 -8
  44. package/orm-extenstions/d1-driver/session.d.ts +0 -51
  45. package/orm-extenstions/d1-driver/wrangler-client.d.ts +0 -3
  46. package/serializer/studioUtils.d.ts +0 -65
  47. package/utils/certs.d.ts +0 -4
@@ -1,51 +0,0 @@
1
- import { entityKind } from "drizzle-orm";
2
- import type { Logger } from "drizzle-orm";
3
- import { type RelationalSchemaConfig, type TablesRelationalConfig } from "drizzle-orm";
4
- import { type Query } from "drizzle-orm";
5
- import { SQLiteAsyncDialect, SQLiteExecuteMethod, SQLitePreparedQuery, SQLiteSession } from "drizzle-orm/sqlite-core";
6
- import type { SelectedFieldsOrdered } from "drizzle-orm/sqlite-core";
7
- import { type PreparedQueryConfig as PreparedQueryConfigBase, type SQLiteTransactionConfig } from "drizzle-orm/sqlite-core";
8
- export interface SQLiteD1SessionOptions {
9
- logger?: Logger;
10
- }
11
- type PreparedQueryConfig = Omit<PreparedQueryConfigBase, "statement" | "run">;
12
- export type D1WranglerResults<T = unknown> = {
13
- results?: T[];
14
- };
15
- export declare class SQLiteWranglerD1Session<TFullSchema extends Record<string, unknown>, TSchema extends TablesRelationalConfig> extends SQLiteSession<"async", D1WranglerResults, TFullSchema, TSchema> {
16
- private client;
17
- private configPath;
18
- private dbName;
19
- private schema;
20
- private options;
21
- static readonly [entityKind]: string;
22
- private logger;
23
- constructor(client: (query: string, configPath: string, dbName: string) => Promise<any>, configPath: string, dbName: string, dialect: SQLiteAsyncDialect, schema: RelationalSchemaConfig<TSchema> | undefined, options?: SQLiteD1SessionOptions);
24
- prepareQuery(query: Query, fields: SelectedFieldsOrdered | undefined, executeMethod: SQLiteExecuteMethod, customResultMapper?: (rows: unknown[][]) => unknown): PreparedQuery;
25
- transaction<T>(transaction: (tx: any) => T | Promise<T>, config?: SQLiteTransactionConfig): Promise<T>;
26
- }
27
- export declare class PreparedQuery<T extends PreparedQueryConfig = PreparedQueryConfig> extends SQLitePreparedQuery<{
28
- type: "async";
29
- run: D1WranglerResults;
30
- all: T["all"];
31
- get: T["get"];
32
- values: T["values"];
33
- execute: T["execute"];
34
- }> {
35
- private stmt;
36
- private configPath;
37
- private dbName;
38
- private queryString;
39
- private params;
40
- private logger;
41
- private fields;
42
- private customResultMapper?;
43
- static readonly [entityKind]: string;
44
- constructor(stmt: (query: string, configPath: string, dbName: string) => Promise<any>, configPath: string, dbName: string, queryString: string, params: unknown[], logger: Logger, fields: SelectedFieldsOrdered | undefined, executeMethod: SQLiteExecuteMethod, customResultMapper?: ((rows: unknown[][]) => unknown) | undefined);
45
- run(placeholderValues?: Record<string, unknown>): Promise<D1WranglerResults>;
46
- all(placeholderValues?: Record<string, unknown>): Promise<T["all"]>;
47
- get(placeholderValues?: Record<string, unknown>): Promise<T["get"]>;
48
- private d1ToRawMapping;
49
- values(placeholderValues?: Record<string, unknown>): Promise<unknown[][]>;
50
- }
51
- export {};
@@ -1,3 +0,0 @@
1
- export declare function execute(query: string, configPath: string, dbName: string): Promise<{
2
- results: any;
3
- }>;
@@ -1,65 +0,0 @@
1
- import type { Setup } from "@drizzle-team/studio";
2
- import { Relations } from "drizzle-orm";
3
- import { AnyMySqlTable } from "drizzle-orm/mysql-core";
4
- import { AnyPgTable } from "drizzle-orm/pg-core";
5
- import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
6
- import { MySQLConnectionConfig } from "../cli/validations/mysql";
7
- import { PgConnectionConfig } from "../cli/validations/pg";
8
- import { StudioConfigConnections, StudioSqliteConnectionConfig as StudioSQLiteConnectionConfig } from "../cli/validations/studio";
9
- export declare const preparePgSchema: (path: string | string[]) => Promise<{
10
- schema: Record<string, Record<string, AnyPgTable<{}>>>;
11
- relations: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
12
- }>;
13
- export declare const prepareMySqlSchema: (path: string | string[]) => Promise<{
14
- schema: Record<string, Record<string, AnyMySqlTable<{}>>>;
15
- relations: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
16
- }>;
17
- export declare const prepareSQLiteSchema: (path: string | string[]) => Promise<{
18
- schema: Record<string, Record<string, AnySQLiteTable<{}>>>;
19
- relations: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
20
- }>;
21
- export declare const prepareModels: (path: string | string[]) => Promise<{
22
- pgSchema: Record<string, AnyPgTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
23
- mysqlSchema: Record<string, AnyMySqlTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
24
- sqliteSchema: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>> | AnySQLiteTable<{}>>;
25
- }>;
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>;
41
- export declare const drizzleDb: (drizzleConfig: StudioConfigConnections, models: {
42
- pgSchema?: Record<string, AnyPgTable | Relations>;
43
- mysqlSchema?: Record<string, AnyMySqlTable | Relations>;
44
- sqliteSchema?: Record<string, AnySQLiteTable | Relations>;
45
- }, logger: boolean) => Promise<{
46
- db: import("drizzle-orm/node-postgres").NodePgDatabase<Record<string, never>>;
47
- type: "pg";
48
- schema: Record<string, AnyPgTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>> | undefined;
49
- } | {
50
- db: import("drizzle-orm/mysql2").MySql2Database<Record<string, never>>;
51
- type: "mysql";
52
- schema: Record<string, AnyMySqlTable<{}> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>> | undefined;
53
- } | {
54
- db: import("../orm-extenstions/d1-driver/driver").DrizzleD1WranglerDatabase<Record<string, never>>;
55
- type: "sqlite";
56
- schema: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>> | AnySQLiteTable<{}>> | undefined;
57
- } | {
58
- db: import("drizzle-orm/better-sqlite3").BetterSQLite3Database<Record<string, never>>;
59
- type: "sqlite";
60
- schema: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>> | AnySQLiteTable<{}>> | undefined;
61
- } | {
62
- db: import("drizzle-orm/libsql").LibSQLDatabase<Record<string, never>>;
63
- type: "sqlite";
64
- schema: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>> | AnySQLiteTable<{}>> | undefined;
65
- }>;
package/utils/certs.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export declare const certs: () => Promise<{
2
- key: string;
3
- cert: string;
4
- } | null>;