@h3ravel/arquebus 0.6.7 → 0.6.8
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/bin/index.cjs +5772 -0
- package/bin/index.d.cts +1 -0
- package/bin/index.d.mts +1 -0
- package/bin/index.mjs +5746 -0
- package/bin/seeders-C0schOjT.mjs +3 -0
- package/bin/seeders-D-v59HCz.cjs +3 -0
- package/dist/browser/index.cjs +1263 -0
- package/dist/browser/index.d.cts +4932 -0
- package/dist/browser/index.d.mts +4932 -0
- package/dist/browser/index.mjs +1211 -0
- package/dist/index.cjs +5675 -0
- package/dist/index.d.cts +5129 -0
- package/dist/index.d.mts +5129 -0
- package/dist/index.mjs +5611 -0
- package/dist/inspector/index.cjs +4877 -0
- package/dist/inspector/index.d.cts +83 -0
- package/dist/inspector/index.d.mts +83 -0
- package/dist/inspector/index.mjs +4853 -0
- package/dist/migrations/chunk-BD38OWEx.mjs +15 -0
- package/dist/migrations/index.cjs +5433 -0
- package/dist/migrations/index.d.cts +4965 -0
- package/dist/migrations/index.d.mts +4962 -0
- package/dist/migrations/index.mjs +5387 -0
- package/dist/migrations/stubs/migration-js.stub +21 -0
- package/dist/migrations/stubs/migration-ts.stub +18 -0
- package/dist/migrations/stubs/migration.create-js.stub +24 -0
- package/dist/migrations/stubs/migration.create-ts.stub +21 -0
- package/dist/migrations/stubs/migration.update-js.stub +25 -0
- package/dist/migrations/stubs/migration.update-ts.stub +22 -0
- package/dist/seeders/index.cjs +137 -0
- package/dist/seeders/index.d.cts +4766 -0
- package/dist/seeders/index.d.mts +4766 -0
- package/dist/seeders/index.mjs +117 -0
- package/dist/seeders/index.ts +3 -0
- package/dist/seeders/runner.ts +101 -0
- package/dist/seeders/seeder-creator.ts +42 -0
- package/dist/seeders/seeder.ts +10 -0
- package/dist/stubs/arquebus.config-js.stub +25 -0
- package/dist/stubs/arquebus.config-ts.stub +24 -0
- package/dist/stubs/model-js.stub +5 -0
- package/dist/stubs/model-ts.stub +5 -0
- package/dist/stubs/seeder-js.stub +13 -0
- package/dist/stubs/seeder-ts.stub +14 -0
- package/package.json +2 -2
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Knex } from "knex";
|
|
2
|
+
|
|
3
|
+
//#region src/inspector/types/column.d.ts
|
|
4
|
+
interface Column {
|
|
5
|
+
name: string;
|
|
6
|
+
table: string;
|
|
7
|
+
data_type: string;
|
|
8
|
+
default_value: string | null;
|
|
9
|
+
max_length: number | null;
|
|
10
|
+
numeric_precision: number | null;
|
|
11
|
+
numeric_scale: number | null;
|
|
12
|
+
is_nullable: boolean;
|
|
13
|
+
is_unique: boolean;
|
|
14
|
+
is_primary_key: boolean;
|
|
15
|
+
is_generated: boolean;
|
|
16
|
+
generation_expression?: string | null;
|
|
17
|
+
has_auto_increment: boolean;
|
|
18
|
+
foreign_key_table: string | null;
|
|
19
|
+
foreign_key_column: string | null;
|
|
20
|
+
comment?: string | null;
|
|
21
|
+
schema?: string;
|
|
22
|
+
foreign_key_schema?: string | null;
|
|
23
|
+
collation?: string | null;
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/inspector/types/foreign-key.d.ts
|
|
27
|
+
type ForeignKey = {
|
|
28
|
+
table: string;
|
|
29
|
+
column: string;
|
|
30
|
+
foreign_key_table: string;
|
|
31
|
+
foreign_key_column: string;
|
|
32
|
+
foreign_key_schema?: string;
|
|
33
|
+
constraint_name: null | string;
|
|
34
|
+
on_update: null | 'NO ACTION' | 'RESTRICT' | 'CASCADE' | 'SET NULL' | 'SET DEFAULT';
|
|
35
|
+
on_delete: null | 'NO ACTION' | 'RESTRICT' | 'CASCADE' | 'SET NULL' | 'SET DEFAULT';
|
|
36
|
+
};
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/inspector/types/table.d.ts
|
|
39
|
+
interface Table {
|
|
40
|
+
name: string;
|
|
41
|
+
comment?: string | null;
|
|
42
|
+
schema?: string;
|
|
43
|
+
collation?: string;
|
|
44
|
+
engine?: string;
|
|
45
|
+
owner?: string;
|
|
46
|
+
sql?: string;
|
|
47
|
+
catalog?: string;
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/inspector/types/unique-constraint.d.ts
|
|
51
|
+
type UniqueConstraint = {
|
|
52
|
+
table: string;
|
|
53
|
+
constraint_name: null | string;
|
|
54
|
+
columns: string[];
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/inspector/types/schema-inspector.d.ts
|
|
58
|
+
interface SchemaInspector$1 {
|
|
59
|
+
knex: Knex;
|
|
60
|
+
tables(): Promise<string[]>;
|
|
61
|
+
tableInfo(): Promise<Table[]>;
|
|
62
|
+
tableInfo(table: string): Promise<Table>;
|
|
63
|
+
hasTable(table: string): Promise<boolean>;
|
|
64
|
+
columns(table?: string): Promise<{
|
|
65
|
+
table: string;
|
|
66
|
+
column: string;
|
|
67
|
+
}[]>;
|
|
68
|
+
columnInfo(): Promise<Column[]>;
|
|
69
|
+
columnInfo(table?: string): Promise<Column[]>;
|
|
70
|
+
columnInfo(table: string, column: string): Promise<Column>;
|
|
71
|
+
hasColumn(table: string, column: string): Promise<boolean>;
|
|
72
|
+
primary(table: string): Promise<string[] | string | null>;
|
|
73
|
+
foreignKeys(table?: string): Promise<ForeignKey[]>;
|
|
74
|
+
uniqueConstraints?(table?: string): Promise<UniqueConstraint[]>;
|
|
75
|
+
withSchema?(schema: string): void;
|
|
76
|
+
}
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/inspector/index.d.ts
|
|
79
|
+
declare class SchemaInspector {
|
|
80
|
+
static inspect(knex: Knex): SchemaInspector$1;
|
|
81
|
+
}
|
|
82
|
+
//#endregion
|
|
83
|
+
export { SchemaInspector };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Knex } from "knex";
|
|
2
|
+
|
|
3
|
+
//#region src/inspector/types/column.d.ts
|
|
4
|
+
interface Column {
|
|
5
|
+
name: string;
|
|
6
|
+
table: string;
|
|
7
|
+
data_type: string;
|
|
8
|
+
default_value: string | null;
|
|
9
|
+
max_length: number | null;
|
|
10
|
+
numeric_precision: number | null;
|
|
11
|
+
numeric_scale: number | null;
|
|
12
|
+
is_nullable: boolean;
|
|
13
|
+
is_unique: boolean;
|
|
14
|
+
is_primary_key: boolean;
|
|
15
|
+
is_generated: boolean;
|
|
16
|
+
generation_expression?: string | null;
|
|
17
|
+
has_auto_increment: boolean;
|
|
18
|
+
foreign_key_table: string | null;
|
|
19
|
+
foreign_key_column: string | null;
|
|
20
|
+
comment?: string | null;
|
|
21
|
+
schema?: string;
|
|
22
|
+
foreign_key_schema?: string | null;
|
|
23
|
+
collation?: string | null;
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/inspector/types/foreign-key.d.ts
|
|
27
|
+
type ForeignKey = {
|
|
28
|
+
table: string;
|
|
29
|
+
column: string;
|
|
30
|
+
foreign_key_table: string;
|
|
31
|
+
foreign_key_column: string;
|
|
32
|
+
foreign_key_schema?: string;
|
|
33
|
+
constraint_name: null | string;
|
|
34
|
+
on_update: null | 'NO ACTION' | 'RESTRICT' | 'CASCADE' | 'SET NULL' | 'SET DEFAULT';
|
|
35
|
+
on_delete: null | 'NO ACTION' | 'RESTRICT' | 'CASCADE' | 'SET NULL' | 'SET DEFAULT';
|
|
36
|
+
};
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/inspector/types/table.d.ts
|
|
39
|
+
interface Table {
|
|
40
|
+
name: string;
|
|
41
|
+
comment?: string | null;
|
|
42
|
+
schema?: string;
|
|
43
|
+
collation?: string;
|
|
44
|
+
engine?: string;
|
|
45
|
+
owner?: string;
|
|
46
|
+
sql?: string;
|
|
47
|
+
catalog?: string;
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/inspector/types/unique-constraint.d.ts
|
|
51
|
+
type UniqueConstraint = {
|
|
52
|
+
table: string;
|
|
53
|
+
constraint_name: null | string;
|
|
54
|
+
columns: string[];
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/inspector/types/schema-inspector.d.ts
|
|
58
|
+
interface SchemaInspector$1 {
|
|
59
|
+
knex: Knex;
|
|
60
|
+
tables(): Promise<string[]>;
|
|
61
|
+
tableInfo(): Promise<Table[]>;
|
|
62
|
+
tableInfo(table: string): Promise<Table>;
|
|
63
|
+
hasTable(table: string): Promise<boolean>;
|
|
64
|
+
columns(table?: string): Promise<{
|
|
65
|
+
table: string;
|
|
66
|
+
column: string;
|
|
67
|
+
}[]>;
|
|
68
|
+
columnInfo(): Promise<Column[]>;
|
|
69
|
+
columnInfo(table?: string): Promise<Column[]>;
|
|
70
|
+
columnInfo(table: string, column: string): Promise<Column>;
|
|
71
|
+
hasColumn(table: string, column: string): Promise<boolean>;
|
|
72
|
+
primary(table: string): Promise<string[] | string | null>;
|
|
73
|
+
foreignKeys(table?: string): Promise<ForeignKey[]>;
|
|
74
|
+
uniqueConstraints?(table?: string): Promise<UniqueConstraint[]>;
|
|
75
|
+
withSchema?(schema: string): void;
|
|
76
|
+
}
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/inspector/index.d.ts
|
|
79
|
+
declare class SchemaInspector {
|
|
80
|
+
static inspect(knex: Knex): SchemaInspector$1;
|
|
81
|
+
}
|
|
82
|
+
//#endregion
|
|
83
|
+
export { SchemaInspector };
|