@famgia/omnify-laravel 0.0.17 → 0.0.19
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/README.md +130 -0
- package/dist/{chunk-52JAFQBQ.js → chunk-ILSNN7UV.js} +403 -14
- package/dist/chunk-ILSNN7UV.js.map +1 -0
- package/dist/index.cjs +401 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +1 -1
- package/dist/plugin.cjs +682 -12
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-52JAFQBQ.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropertyDefinition, SchemaCollection, LoadedSchema } from '@famgia/omnify-types';
|
|
1
|
+
import { CustomTypeDefinition, PropertyDefinition, SchemaCollection, LoadedSchema } from '@famgia/omnify-types';
|
|
2
2
|
import { SchemaChange } from '@famgia/omnify-atlas';
|
|
3
3
|
export { LaravelPluginOptions, laravelPlugin } from './plugin.cjs';
|
|
4
4
|
|
|
@@ -7,6 +7,7 @@ export { LaravelPluginOptions, laravelPlugin } from './plugin.cjs';
|
|
|
7
7
|
*
|
|
8
8
|
* Types for Laravel migration generation.
|
|
9
9
|
*/
|
|
10
|
+
|
|
10
11
|
/**
|
|
11
12
|
* Laravel migration file structure.
|
|
12
13
|
*/
|
|
@@ -34,6 +35,8 @@ interface MigrationOptions {
|
|
|
34
35
|
readonly generateDown?: boolean | undefined;
|
|
35
36
|
/** Database connection name */
|
|
36
37
|
readonly connection?: string | undefined;
|
|
38
|
+
/** Custom types from plugins (for compound type expansion) */
|
|
39
|
+
readonly customTypes?: ReadonlyMap<string, CustomTypeDefinition> | undefined;
|
|
37
40
|
}
|
|
38
41
|
/**
|
|
39
42
|
* Schema Builder column method.
|
|
@@ -161,10 +164,17 @@ declare function generateForeignKey(propertyName: string, property: PropertyDefi
|
|
|
161
164
|
foreignKey: ForeignKeyDefinition;
|
|
162
165
|
index: IndexDefinition;
|
|
163
166
|
} | null;
|
|
167
|
+
/**
|
|
168
|
+
* Options for schema to blueprint conversion.
|
|
169
|
+
*/
|
|
170
|
+
interface SchemaToBlueprintOptions {
|
|
171
|
+
/** Custom types from plugins (for compound type expansion) */
|
|
172
|
+
customTypes?: ReadonlyMap<string, CustomTypeDefinition>;
|
|
173
|
+
}
|
|
164
174
|
/**
|
|
165
175
|
* Generates table blueprint from schema.
|
|
166
176
|
*/
|
|
167
|
-
declare function schemaToBlueprint(schema: LoadedSchema, allSchemas: SchemaCollection): TableBlueprint;
|
|
177
|
+
declare function schemaToBlueprint(schema: LoadedSchema, allSchemas: SchemaCollection, options?: SchemaToBlueprintOptions): TableBlueprint;
|
|
168
178
|
/**
|
|
169
179
|
* Formats a column method to PHP code.
|
|
170
180
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropertyDefinition, SchemaCollection, LoadedSchema } from '@famgia/omnify-types';
|
|
1
|
+
import { CustomTypeDefinition, PropertyDefinition, SchemaCollection, LoadedSchema } from '@famgia/omnify-types';
|
|
2
2
|
import { SchemaChange } from '@famgia/omnify-atlas';
|
|
3
3
|
export { LaravelPluginOptions, laravelPlugin } from './plugin.js';
|
|
4
4
|
|
|
@@ -7,6 +7,7 @@ export { LaravelPluginOptions, laravelPlugin } from './plugin.js';
|
|
|
7
7
|
*
|
|
8
8
|
* Types for Laravel migration generation.
|
|
9
9
|
*/
|
|
10
|
+
|
|
10
11
|
/**
|
|
11
12
|
* Laravel migration file structure.
|
|
12
13
|
*/
|
|
@@ -34,6 +35,8 @@ interface MigrationOptions {
|
|
|
34
35
|
readonly generateDown?: boolean | undefined;
|
|
35
36
|
/** Database connection name */
|
|
36
37
|
readonly connection?: string | undefined;
|
|
38
|
+
/** Custom types from plugins (for compound type expansion) */
|
|
39
|
+
readonly customTypes?: ReadonlyMap<string, CustomTypeDefinition> | undefined;
|
|
37
40
|
}
|
|
38
41
|
/**
|
|
39
42
|
* Schema Builder column method.
|
|
@@ -161,10 +164,17 @@ declare function generateForeignKey(propertyName: string, property: PropertyDefi
|
|
|
161
164
|
foreignKey: ForeignKeyDefinition;
|
|
162
165
|
index: IndexDefinition;
|
|
163
166
|
} | null;
|
|
167
|
+
/**
|
|
168
|
+
* Options for schema to blueprint conversion.
|
|
169
|
+
*/
|
|
170
|
+
interface SchemaToBlueprintOptions {
|
|
171
|
+
/** Custom types from plugins (for compound type expansion) */
|
|
172
|
+
customTypes?: ReadonlyMap<string, CustomTypeDefinition>;
|
|
173
|
+
}
|
|
164
174
|
/**
|
|
165
175
|
* Generates table blueprint from schema.
|
|
166
176
|
*/
|
|
167
|
-
declare function schemaToBlueprint(schema: LoadedSchema, allSchemas: SchemaCollection): TableBlueprint;
|
|
177
|
+
declare function schemaToBlueprint(schema: LoadedSchema, allSchemas: SchemaCollection, options?: SchemaToBlueprintOptions): TableBlueprint;
|
|
168
178
|
/**
|
|
169
179
|
* Formats a column method to PHP code.
|
|
170
180
|
*/
|