drizzle-seed 0.4.0-08bb2d5 → 0.4.0-4ec2def
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.
- package/cockroach-core/index.d.cts +8 -2
- package/cockroach-core/index.d.mts +8 -2
- package/cockroach-core/index.d.ts +8 -2
- package/common.d.cts +25 -0
- package/common.d.mts +25 -0
- package/common.d.ts +25 -0
- package/generators/Generators.d.cts +2 -2
- package/generators/Generators.d.mts +2 -2
- package/generators/Generators.d.ts +2 -2
- package/generators/versioning/v2.d.cts +2 -2
- package/generators/versioning/v2.d.mts +2 -2
- package/generators/versioning/v2.d.ts +2 -2
- package/index.cjs +503 -1049
- package/index.cjs.map +1 -1
- package/index.d.cts +8 -82
- package/index.d.mts +8 -82
- package/index.d.ts +8 -82
- package/index.mjs +508 -1054
- package/index.mjs.map +1 -1
- package/mssql-core/index.d.cts +2 -2
- package/mssql-core/index.d.mts +2 -2
- package/mssql-core/index.d.ts +2 -2
- package/mysql-core/index.d.cts +8 -2
- package/mysql-core/index.d.mts +8 -2
- package/mysql-core/index.d.ts +8 -2
- package/package.json +3 -3
- package/pg-core/index.d.cts +8 -2
- package/pg-core/index.d.mts +8 -2
- package/pg-core/index.d.ts +8 -2
- package/singlestore-core/index.d.cts +8 -2
- package/singlestore-core/index.d.mts +8 -2
- package/singlestore-core/index.d.ts +8 -2
- package/sqlite-core/index.d.cts +8 -2
- package/sqlite-core/index.d.mts +8 -2
- package/sqlite-core/index.d.ts +8 -2
- package/types/seedService.d.cts +1 -1
- package/types/seedService.d.mts +1 -1
- package/types/seedService.d.ts +1 -1
- package/types/tables.d.cts +15 -0
- package/types/tables.d.mts +15 -0
- package/types/tables.d.ts +15 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Relations } from 'drizzle-orm';
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
2
|
import type { CockroachDatabase, CockroachSchema } from 'drizzle-orm/cockroach-core';
|
|
3
3
|
import { CockroachTable } from 'drizzle-orm/cockroach-core';
|
|
4
4
|
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Table, TableConfigT } from '../types/tables.js';
|
|
5
6
|
export declare const resetCockroach: (db: CockroachDatabase<any, any>, cockroachTables: {
|
|
6
7
|
[key: string]: CockroachTable;
|
|
7
8
|
}) => Promise<void>;
|
|
@@ -9,7 +10,7 @@ export declare const filterCockroachSchema: (schema: {
|
|
|
9
10
|
[key: string]: CockroachTable | CockroachSchema | Relations | any;
|
|
10
11
|
}) => {
|
|
11
12
|
cockroachSchema: {
|
|
12
|
-
[k: string]: CockroachTable<import("drizzle-orm/cockroach-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>;
|
|
13
|
+
[k: string]: CockroachTable<import("drizzle-orm/cockroach-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
13
14
|
};
|
|
14
15
|
cockroachTables: {
|
|
15
16
|
[k: string]: CockroachTable<import("drizzle-orm/cockroach-core").TableConfig>;
|
|
@@ -22,3 +23,8 @@ export declare const seedCockroach: (db: CockroachDatabase<any, any>, schema: {
|
|
|
22
23
|
seed?: number;
|
|
23
24
|
version?: number;
|
|
24
25
|
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapCockroachTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}, dbToTsColumnNamesMap: {
|
|
29
|
+
[key: string]: string;
|
|
30
|
+
}) => Table;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Relations } from 'drizzle-orm';
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
2
|
import type { CockroachDatabase, CockroachSchema } from 'drizzle-orm/cockroach-core';
|
|
3
3
|
import { CockroachTable } from 'drizzle-orm/cockroach-core';
|
|
4
4
|
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Table, TableConfigT } from '../types/tables.js';
|
|
5
6
|
export declare const resetCockroach: (db: CockroachDatabase<any, any>, cockroachTables: {
|
|
6
7
|
[key: string]: CockroachTable;
|
|
7
8
|
}) => Promise<void>;
|
|
@@ -9,7 +10,7 @@ export declare const filterCockroachSchema: (schema: {
|
|
|
9
10
|
[key: string]: CockroachTable | CockroachSchema | Relations | any;
|
|
10
11
|
}) => {
|
|
11
12
|
cockroachSchema: {
|
|
12
|
-
[k: string]: CockroachTable<import("drizzle-orm/cockroach-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>;
|
|
13
|
+
[k: string]: CockroachTable<import("drizzle-orm/cockroach-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
13
14
|
};
|
|
14
15
|
cockroachTables: {
|
|
15
16
|
[k: string]: CockroachTable<import("drizzle-orm/cockroach-core").TableConfig>;
|
|
@@ -22,3 +23,8 @@ export declare const seedCockroach: (db: CockroachDatabase<any, any>, schema: {
|
|
|
22
23
|
seed?: number;
|
|
23
24
|
version?: number;
|
|
24
25
|
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapCockroachTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}, dbToTsColumnNamesMap: {
|
|
29
|
+
[key: string]: string;
|
|
30
|
+
}) => Table;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Relations } from 'drizzle-orm';
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
2
|
import type { CockroachDatabase, CockroachSchema } from 'drizzle-orm/cockroach-core';
|
|
3
3
|
import { CockroachTable } from 'drizzle-orm/cockroach-core';
|
|
4
4
|
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Table, TableConfigT } from '../types/tables.js';
|
|
5
6
|
export declare const resetCockroach: (db: CockroachDatabase<any, any>, cockroachTables: {
|
|
6
7
|
[key: string]: CockroachTable;
|
|
7
8
|
}) => Promise<void>;
|
|
@@ -9,7 +10,7 @@ export declare const filterCockroachSchema: (schema: {
|
|
|
9
10
|
[key: string]: CockroachTable | CockroachSchema | Relations | any;
|
|
10
11
|
}) => {
|
|
11
12
|
cockroachSchema: {
|
|
12
|
-
[k: string]: CockroachTable<import("drizzle-orm/cockroach-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>;
|
|
13
|
+
[k: string]: CockroachTable<import("drizzle-orm/cockroach-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
13
14
|
};
|
|
14
15
|
cockroachTables: {
|
|
15
16
|
[k: string]: CockroachTable<import("drizzle-orm/cockroach-core").TableConfig>;
|
|
@@ -22,3 +23,8 @@ export declare const seedCockroach: (db: CockroachDatabase<any, any>, schema: {
|
|
|
22
23
|
seed?: number;
|
|
23
24
|
version?: number;
|
|
24
25
|
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapCockroachTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}, dbToTsColumnNamesMap: {
|
|
29
|
+
[key: string]: string;
|
|
30
|
+
}) => Table;
|
package/common.d.cts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type Relations } from 'drizzle-orm/_relations';
|
|
2
|
+
import type { DrizzleTable, RelationWithReferences, Table, TableConfigT } from './types/tables.js';
|
|
3
|
+
export declare const getSchemaInfo: (drizzleTablesAndRelations: {
|
|
4
|
+
[key: string]: DrizzleTable | Relations;
|
|
5
|
+
}, drizzleTables: {
|
|
6
|
+
[key: string]: DrizzleTable;
|
|
7
|
+
}, mapTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
|
|
8
|
+
[key: string]: string;
|
|
9
|
+
}, dbToTsColumnNamesMap: {
|
|
10
|
+
[key: string]: string;
|
|
11
|
+
}) => Table) => {
|
|
12
|
+
tables: Table[];
|
|
13
|
+
relations: {
|
|
14
|
+
isCyclic: boolean;
|
|
15
|
+
type?: "one" | "many";
|
|
16
|
+
table: string;
|
|
17
|
+
columns: string[];
|
|
18
|
+
refTable: string;
|
|
19
|
+
refColumns: string[];
|
|
20
|
+
refTableRels: RelationWithReferences[];
|
|
21
|
+
}[];
|
|
22
|
+
tableRelations: {
|
|
23
|
+
[tableName: string]: RelationWithReferences[];
|
|
24
|
+
};
|
|
25
|
+
};
|
package/common.d.mts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type Relations } from 'drizzle-orm/_relations';
|
|
2
|
+
import type { DrizzleTable, RelationWithReferences, Table, TableConfigT } from './types/tables.js';
|
|
3
|
+
export declare const getSchemaInfo: (drizzleTablesAndRelations: {
|
|
4
|
+
[key: string]: DrizzleTable | Relations;
|
|
5
|
+
}, drizzleTables: {
|
|
6
|
+
[key: string]: DrizzleTable;
|
|
7
|
+
}, mapTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
|
|
8
|
+
[key: string]: string;
|
|
9
|
+
}, dbToTsColumnNamesMap: {
|
|
10
|
+
[key: string]: string;
|
|
11
|
+
}) => Table) => {
|
|
12
|
+
tables: Table[];
|
|
13
|
+
relations: {
|
|
14
|
+
isCyclic: boolean;
|
|
15
|
+
type?: "one" | "many";
|
|
16
|
+
table: string;
|
|
17
|
+
columns: string[];
|
|
18
|
+
refTable: string;
|
|
19
|
+
refColumns: string[];
|
|
20
|
+
refTableRels: RelationWithReferences[];
|
|
21
|
+
}[];
|
|
22
|
+
tableRelations: {
|
|
23
|
+
[tableName: string]: RelationWithReferences[];
|
|
24
|
+
};
|
|
25
|
+
};
|
package/common.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type Relations } from 'drizzle-orm/_relations';
|
|
2
|
+
import type { DrizzleTable, RelationWithReferences, Table, TableConfigT } from './types/tables.js';
|
|
3
|
+
export declare const getSchemaInfo: (drizzleTablesAndRelations: {
|
|
4
|
+
[key: string]: DrizzleTable | Relations;
|
|
5
|
+
}, drizzleTables: {
|
|
6
|
+
[key: string]: DrizzleTable;
|
|
7
|
+
}, mapTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
|
|
8
|
+
[key: string]: string;
|
|
9
|
+
}, dbToTsColumnNamesMap: {
|
|
10
|
+
[key: string]: string;
|
|
11
|
+
}) => Table) => {
|
|
12
|
+
tables: Table[];
|
|
13
|
+
relations: {
|
|
14
|
+
isCyclic: boolean;
|
|
15
|
+
type?: "one" | "many";
|
|
16
|
+
table: string;
|
|
17
|
+
columns: string[];
|
|
18
|
+
refTable: string;
|
|
19
|
+
refColumns: string[];
|
|
20
|
+
refTableRels: RelationWithReferences[];
|
|
21
|
+
}[];
|
|
22
|
+
tableRelations: {
|
|
23
|
+
[tableName: string]: RelationWithReferences[];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -344,7 +344,7 @@ export declare class GenerateString extends AbstractGenerator<{
|
|
|
344
344
|
count: number;
|
|
345
345
|
seed: number;
|
|
346
346
|
}): void;
|
|
347
|
-
generate(): string
|
|
347
|
+
generate(): string | Buffer<ArrayBuffer>;
|
|
348
348
|
}
|
|
349
349
|
export declare class GenerateUniqueString extends AbstractGenerator<{
|
|
350
350
|
isUnique?: boolean;
|
|
@@ -357,7 +357,7 @@ export declare class GenerateUniqueString extends AbstractGenerator<{
|
|
|
357
357
|
}): void;
|
|
358
358
|
generate({ i }: {
|
|
359
359
|
i: number;
|
|
360
|
-
}): string
|
|
360
|
+
}): string | Buffer<ArrayBuffer>;
|
|
361
361
|
}
|
|
362
362
|
export declare class GenerateUUID extends AbstractGenerator<{
|
|
363
363
|
arraySize?: number;
|
|
@@ -344,7 +344,7 @@ export declare class GenerateString extends AbstractGenerator<{
|
|
|
344
344
|
count: number;
|
|
345
345
|
seed: number;
|
|
346
346
|
}): void;
|
|
347
|
-
generate(): string
|
|
347
|
+
generate(): string | Buffer<ArrayBuffer>;
|
|
348
348
|
}
|
|
349
349
|
export declare class GenerateUniqueString extends AbstractGenerator<{
|
|
350
350
|
isUnique?: boolean;
|
|
@@ -357,7 +357,7 @@ export declare class GenerateUniqueString extends AbstractGenerator<{
|
|
|
357
357
|
}): void;
|
|
358
358
|
generate({ i }: {
|
|
359
359
|
i: number;
|
|
360
|
-
}): string
|
|
360
|
+
}): string | Buffer<ArrayBuffer>;
|
|
361
361
|
}
|
|
362
362
|
export declare class GenerateUUID extends AbstractGenerator<{
|
|
363
363
|
arraySize?: number;
|
|
@@ -344,7 +344,7 @@ export declare class GenerateString extends AbstractGenerator<{
|
|
|
344
344
|
count: number;
|
|
345
345
|
seed: number;
|
|
346
346
|
}): void;
|
|
347
|
-
generate(): string
|
|
347
|
+
generate(): string | Buffer<ArrayBuffer>;
|
|
348
348
|
}
|
|
349
349
|
export declare class GenerateUniqueString extends AbstractGenerator<{
|
|
350
350
|
isUnique?: boolean;
|
|
@@ -357,7 +357,7 @@ export declare class GenerateUniqueString extends AbstractGenerator<{
|
|
|
357
357
|
}): void;
|
|
358
358
|
generate({ i }: {
|
|
359
359
|
i: number;
|
|
360
|
-
}): string
|
|
360
|
+
}): string | Buffer<ArrayBuffer>;
|
|
361
361
|
}
|
|
362
362
|
export declare class GenerateUUID extends AbstractGenerator<{
|
|
363
363
|
arraySize?: number;
|
|
@@ -26,7 +26,7 @@ export declare class GenerateStringV2 extends AbstractGenerator<{
|
|
|
26
26
|
count: number;
|
|
27
27
|
seed: number;
|
|
28
28
|
}): void;
|
|
29
|
-
generate(): string | Buffer
|
|
29
|
+
generate(): string | Buffer<ArrayBuffer>;
|
|
30
30
|
}
|
|
31
31
|
export declare class GenerateUniqueStringV2 extends AbstractGenerator<{
|
|
32
32
|
isUnique?: boolean;
|
|
@@ -41,5 +41,5 @@ export declare class GenerateUniqueStringV2 extends AbstractGenerator<{
|
|
|
41
41
|
}): void;
|
|
42
42
|
generate({ i }: {
|
|
43
43
|
i: number;
|
|
44
|
-
}): string
|
|
44
|
+
}): string | Buffer<ArrayBuffer>;
|
|
45
45
|
}
|
|
@@ -26,7 +26,7 @@ export declare class GenerateStringV2 extends AbstractGenerator<{
|
|
|
26
26
|
count: number;
|
|
27
27
|
seed: number;
|
|
28
28
|
}): void;
|
|
29
|
-
generate(): string | Buffer
|
|
29
|
+
generate(): string | Buffer<ArrayBuffer>;
|
|
30
30
|
}
|
|
31
31
|
export declare class GenerateUniqueStringV2 extends AbstractGenerator<{
|
|
32
32
|
isUnique?: boolean;
|
|
@@ -41,5 +41,5 @@ export declare class GenerateUniqueStringV2 extends AbstractGenerator<{
|
|
|
41
41
|
}): void;
|
|
42
42
|
generate({ i }: {
|
|
43
43
|
i: number;
|
|
44
|
-
}): string
|
|
44
|
+
}): string | Buffer<ArrayBuffer>;
|
|
45
45
|
}
|
|
@@ -26,7 +26,7 @@ export declare class GenerateStringV2 extends AbstractGenerator<{
|
|
|
26
26
|
count: number;
|
|
27
27
|
seed: number;
|
|
28
28
|
}): void;
|
|
29
|
-
generate(): string | Buffer
|
|
29
|
+
generate(): string | Buffer<ArrayBuffer>;
|
|
30
30
|
}
|
|
31
31
|
export declare class GenerateUniqueStringV2 extends AbstractGenerator<{
|
|
32
32
|
isUnique?: boolean;
|
|
@@ -41,5 +41,5 @@ export declare class GenerateUniqueStringV2 extends AbstractGenerator<{
|
|
|
41
41
|
}): void;
|
|
42
42
|
generate({ i }: {
|
|
43
43
|
i: number;
|
|
44
|
-
}): string
|
|
44
|
+
}): string | Buffer<ArrayBuffer>;
|
|
45
45
|
}
|