drizzle-seed 0.4.0-08bb2d5 → 0.4.0-0ec754e
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/SeedService.d.cts +1 -0
- package/SeedService.d.mts +1 -0
- package/SeedService.d.ts +1 -0
- package/cockroach-core/index.d.cts +6 -2
- package/cockroach-core/index.d.mts +6 -2
- package/cockroach-core/index.d.ts +6 -2
- package/common.d.cts +23 -0
- package/common.d.mts +23 -0
- package/common.d.ts +23 -0
- package/generators/GeneratorFuncs.d.cts +888 -28
- package/generators/GeneratorFuncs.d.mts +888 -28
- package/generators/GeneratorFuncs.d.ts +888 -28
- package/generators/Generators.d.cts +149 -44
- package/generators/Generators.d.mts +149 -44
- package/generators/Generators.d.ts +149 -44
- package/generators/apiVersion.d.cts +1 -1
- package/generators/apiVersion.d.mts +1 -1
- package/generators/apiVersion.d.ts +1 -1
- package/generators/versioning/v2.d.cts +13 -6
- package/generators/versioning/v2.d.mts +13 -6
- package/generators/versioning/v2.d.ts +13 -6
- package/generators/versioning/v3.d.cts +10 -0
- package/generators/versioning/v3.d.mts +10 -0
- package/generators/versioning/v3.d.ts +10 -0
- package/index.cjs +1122 -1186
- package/index.cjs.map +1 -1
- package/index.d.cts +13 -99
- package/index.d.mts +13 -99
- package/index.d.ts +13 -99
- package/index.mjs +1127 -1191
- 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 +6 -2
- package/mysql-core/index.d.mts +6 -2
- package/mysql-core/index.d.ts +6 -2
- package/package.json +108 -107
- package/pg-core/index.d.cts +6 -2
- package/pg-core/index.d.mts +6 -2
- package/pg-core/index.d.ts +6 -2
- package/singlestore-core/index.d.cts +6 -2
- package/singlestore-core/index.d.mts +6 -2
- package/singlestore-core/index.d.ts +6 -2
- package/sqlite-core/index.d.cts +6 -2
- package/sqlite-core/index.d.mts +6 -2
- package/sqlite-core/index.d.ts +6 -2
- package/types/seedService.d.cts +2 -2
- package/types/seedService.d.mts +2 -2
- package/types/seedService.d.ts +2 -2
- package/types/tables.d.cts +18 -0
- package/types/tables.d.mts +18 -0
- package/types/tables.d.ts +18 -0
- package/utils.d.cts +0 -1
- package/utils.d.mts +0 -1
- package/utils.d.ts +0 -1
package/types/seedService.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type { BaseSQLiteDatabase, SQLiteTable } from 'drizzle-orm/sqlite-core';
|
|
|
7
7
|
import type { AbstractGenerator } from '../generators/Generators.js';
|
|
8
8
|
import type { Prettify } from './tables.js';
|
|
9
9
|
export type GeneratedValueType = number | bigint | string | Buffer | boolean | undefined;
|
|
10
|
-
export type DbType = PgDatabase<any, any> | MySqlDatabase<any, any> | BaseSQLiteDatabase<any, any> | MsSqlDatabase<any, any> | CockroachDatabase<any, any> | SingleStoreDatabase<any, any>;
|
|
10
|
+
export type DbType = PgDatabase<any, any, any> | MySqlDatabase<any, any, any, any> | BaseSQLiteDatabase<any, any, any, any> | MsSqlDatabase<any, any, any, any> | CockroachDatabase<any, any, any> | SingleStoreDatabase<any, any, any, any>;
|
|
11
11
|
export type TableType = PgTable | MySqlTable | SQLiteTable | MsSqlTable | CockroachTable | SingleStoreTable;
|
|
12
12
|
export type TableGeneratorsType = {
|
|
13
13
|
[columnName: string]: Prettify<{
|
|
@@ -47,7 +47,7 @@ export type RefinementsType = Prettify<{
|
|
|
47
47
|
[tableName: string]: {
|
|
48
48
|
count?: number;
|
|
49
49
|
columns: {
|
|
50
|
-
[columnName: string]: AbstractGenerator<{}
|
|
50
|
+
[columnName: string]: AbstractGenerator<{}> | false;
|
|
51
51
|
};
|
|
52
52
|
with?: {
|
|
53
53
|
[tableName: string]: number | {
|
package/types/tables.d.cts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import type { AnyColumn } from 'drizzle-orm';
|
|
2
|
+
import type { CockroachTable, ForeignKey as CockroachFK, UniqueConstraint as CockroachUniCon } from 'drizzle-orm/cockroach-core';
|
|
3
|
+
import type { ForeignKey as MsSqlFK, MsSqlTable, UniqueConstraint as MsSqlUniCon } from 'drizzle-orm/mssql-core';
|
|
4
|
+
import type { ForeignKey as MySqlFK, MySqlTable, UniqueConstraint as MySqlUniCon } from 'drizzle-orm/mysql-core';
|
|
5
|
+
import type { ForeignKey as PgFK, PgTable, UniqueConstraint as PgUniCon } from 'drizzle-orm/pg-core';
|
|
6
|
+
import type { SingleStoreTable, UniqueConstraint as SingleStoreUniCon } from 'drizzle-orm/singlestore-core';
|
|
7
|
+
import type { ForeignKey as SQLiteFK, SQLiteTable, UniqueConstraint as SQLiteUniCon } from 'drizzle-orm/sqlite-core';
|
|
1
8
|
export type Column = {
|
|
2
9
|
name: string;
|
|
3
10
|
dataType: string;
|
|
@@ -23,6 +30,7 @@ export type Column = {
|
|
|
23
30
|
export type Table = {
|
|
24
31
|
name: string;
|
|
25
32
|
columns: Column[];
|
|
33
|
+
uniqueConstraints: string[][];
|
|
26
34
|
primaryKeys: string[];
|
|
27
35
|
};
|
|
28
36
|
export type Relation = {
|
|
@@ -39,3 +47,13 @@ export type RelationWithReferences = Relation & {
|
|
|
39
47
|
export type Prettify<T> = {
|
|
40
48
|
[K in keyof T]: T[K];
|
|
41
49
|
} & {};
|
|
50
|
+
export type DrizzleTable = PgTable | MySqlTable | SQLiteTable | CockroachTable | MsSqlTable | SingleStoreTable;
|
|
51
|
+
export type DrizzleForeignKey = PgFK | MySqlFK | SQLiteFK | CockroachFK | MsSqlFK;
|
|
52
|
+
export type DrizzleUniqueConstraint = PgUniCon | MySqlUniCon | SQLiteUniCon | CockroachUniCon | MsSqlUniCon | SingleStoreUniCon;
|
|
53
|
+
export type TableConfigT = {
|
|
54
|
+
name: string;
|
|
55
|
+
schema?: string;
|
|
56
|
+
columns: AnyColumn[];
|
|
57
|
+
uniqueConstraints: DrizzleUniqueConstraint[];
|
|
58
|
+
foreignKeys?: DrizzleForeignKey[];
|
|
59
|
+
};
|
package/types/tables.d.mts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import type { AnyColumn } from 'drizzle-orm';
|
|
2
|
+
import type { CockroachTable, ForeignKey as CockroachFK, UniqueConstraint as CockroachUniCon } from 'drizzle-orm/cockroach-core';
|
|
3
|
+
import type { ForeignKey as MsSqlFK, MsSqlTable, UniqueConstraint as MsSqlUniCon } from 'drizzle-orm/mssql-core';
|
|
4
|
+
import type { ForeignKey as MySqlFK, MySqlTable, UniqueConstraint as MySqlUniCon } from 'drizzle-orm/mysql-core';
|
|
5
|
+
import type { ForeignKey as PgFK, PgTable, UniqueConstraint as PgUniCon } from 'drizzle-orm/pg-core';
|
|
6
|
+
import type { SingleStoreTable, UniqueConstraint as SingleStoreUniCon } from 'drizzle-orm/singlestore-core';
|
|
7
|
+
import type { ForeignKey as SQLiteFK, SQLiteTable, UniqueConstraint as SQLiteUniCon } from 'drizzle-orm/sqlite-core';
|
|
1
8
|
export type Column = {
|
|
2
9
|
name: string;
|
|
3
10
|
dataType: string;
|
|
@@ -23,6 +30,7 @@ export type Column = {
|
|
|
23
30
|
export type Table = {
|
|
24
31
|
name: string;
|
|
25
32
|
columns: Column[];
|
|
33
|
+
uniqueConstraints: string[][];
|
|
26
34
|
primaryKeys: string[];
|
|
27
35
|
};
|
|
28
36
|
export type Relation = {
|
|
@@ -39,3 +47,13 @@ export type RelationWithReferences = Relation & {
|
|
|
39
47
|
export type Prettify<T> = {
|
|
40
48
|
[K in keyof T]: T[K];
|
|
41
49
|
} & {};
|
|
50
|
+
export type DrizzleTable = PgTable | MySqlTable | SQLiteTable | CockroachTable | MsSqlTable | SingleStoreTable;
|
|
51
|
+
export type DrizzleForeignKey = PgFK | MySqlFK | SQLiteFK | CockroachFK | MsSqlFK;
|
|
52
|
+
export type DrizzleUniqueConstraint = PgUniCon | MySqlUniCon | SQLiteUniCon | CockroachUniCon | MsSqlUniCon | SingleStoreUniCon;
|
|
53
|
+
export type TableConfigT = {
|
|
54
|
+
name: string;
|
|
55
|
+
schema?: string;
|
|
56
|
+
columns: AnyColumn[];
|
|
57
|
+
uniqueConstraints: DrizzleUniqueConstraint[];
|
|
58
|
+
foreignKeys?: DrizzleForeignKey[];
|
|
59
|
+
};
|
package/types/tables.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import type { AnyColumn } from 'drizzle-orm';
|
|
2
|
+
import type { CockroachTable, ForeignKey as CockroachFK, UniqueConstraint as CockroachUniCon } from 'drizzle-orm/cockroach-core';
|
|
3
|
+
import type { ForeignKey as MsSqlFK, MsSqlTable, UniqueConstraint as MsSqlUniCon } from 'drizzle-orm/mssql-core';
|
|
4
|
+
import type { ForeignKey as MySqlFK, MySqlTable, UniqueConstraint as MySqlUniCon } from 'drizzle-orm/mysql-core';
|
|
5
|
+
import type { ForeignKey as PgFK, PgTable, UniqueConstraint as PgUniCon } from 'drizzle-orm/pg-core';
|
|
6
|
+
import type { SingleStoreTable, UniqueConstraint as SingleStoreUniCon } from 'drizzle-orm/singlestore-core';
|
|
7
|
+
import type { ForeignKey as SQLiteFK, SQLiteTable, UniqueConstraint as SQLiteUniCon } from 'drizzle-orm/sqlite-core';
|
|
1
8
|
export type Column = {
|
|
2
9
|
name: string;
|
|
3
10
|
dataType: string;
|
|
@@ -23,6 +30,7 @@ export type Column = {
|
|
|
23
30
|
export type Table = {
|
|
24
31
|
name: string;
|
|
25
32
|
columns: Column[];
|
|
33
|
+
uniqueConstraints: string[][];
|
|
26
34
|
primaryKeys: string[];
|
|
27
35
|
};
|
|
28
36
|
export type Relation = {
|
|
@@ -39,3 +47,13 @@ export type RelationWithReferences = Relation & {
|
|
|
39
47
|
export type Prettify<T> = {
|
|
40
48
|
[K in keyof T]: T[K];
|
|
41
49
|
} & {};
|
|
50
|
+
export type DrizzleTable = PgTable | MySqlTable | SQLiteTable | CockroachTable | MsSqlTable | SingleStoreTable;
|
|
51
|
+
export type DrizzleForeignKey = PgFK | MySqlFK | SQLiteFK | CockroachFK | MsSqlFK;
|
|
52
|
+
export type DrizzleUniqueConstraint = PgUniCon | MySqlUniCon | SQLiteUniCon | CockroachUniCon | MsSqlUniCon | SingleStoreUniCon;
|
|
53
|
+
export type TableConfigT = {
|
|
54
|
+
name: string;
|
|
55
|
+
schema?: string;
|
|
56
|
+
columns: AnyColumn[];
|
|
57
|
+
uniqueConstraints: DrizzleUniqueConstraint[];
|
|
58
|
+
foreignKeys?: DrizzleForeignKey[];
|
|
59
|
+
};
|
package/utils.d.cts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { RelationWithReferences } from './types/tables';
|
|
2
2
|
export declare const isRelationCyclic: (startRel: RelationWithReferences) => boolean;
|
|
3
|
-
export declare const generateHashFromString: (s: string) => number;
|
|
4
3
|
export declare const equalSets: (set1: Set<any>, set2: Set<any>) => boolean;
|
package/utils.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { RelationWithReferences } from './types/tables';
|
|
2
2
|
export declare const isRelationCyclic: (startRel: RelationWithReferences) => boolean;
|
|
3
|
-
export declare const generateHashFromString: (s: string) => number;
|
|
4
3
|
export declare const equalSets: (set1: Set<any>, set2: Set<any>) => boolean;
|
package/utils.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { RelationWithReferences } from './types/tables';
|
|
2
2
|
export declare const isRelationCyclic: (startRel: RelationWithReferences) => boolean;
|
|
3
|
-
export declare const generateHashFromString: (s: string) => number;
|
|
4
3
|
export declare const equalSets: (set1: Set<any>, set2: Set<any>) => boolean;
|