@famgia/omnify-laravel 0.0.58 → 0.0.60
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/dist/{chunk-TIMQTRAC.js → chunk-VDTFK4UL.js} +7 -2
- package/dist/{chunk-TIMQTRAC.js.map → chunk-VDTFK4UL.js.map} +1 -1
- package/dist/index.cjs +10 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +42 -1
- package/dist/index.d.ts +42 -1
- package/dist/index.js +5 -1
- package/dist/plugin.cjs +4 -1
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.js +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -27,6 +27,7 @@ __export(index_exports, {
|
|
|
27
27
|
generateAlterMigration: () => generateAlterMigration,
|
|
28
28
|
generateDropMigrationForTable: () => generateDropMigrationForTable,
|
|
29
29
|
generateDropTableMigration: () => generateDropTableMigration,
|
|
30
|
+
generateFactories: () => generateFactories,
|
|
30
31
|
generateForeignKey: () => generateForeignKey,
|
|
31
32
|
generateMigrationFromSchema: () => generateMigrationFromSchema,
|
|
32
33
|
generateMigrations: () => generateMigrations,
|
|
@@ -36,6 +37,7 @@ __export(index_exports, {
|
|
|
36
37
|
generateProviderRegistration: () => generateProviderRegistration,
|
|
37
38
|
generateSoftDeleteColumn: () => generateSoftDeleteColumn,
|
|
38
39
|
generateTimestampColumns: () => generateTimestampColumns,
|
|
40
|
+
getFactoryPath: () => getFactoryPath,
|
|
39
41
|
getMigrationPath: () => getMigrationPath,
|
|
40
42
|
getModelPath: () => getModelPath,
|
|
41
43
|
laravelPlugin: () => laravelPlugin,
|
|
@@ -2146,7 +2148,7 @@ class {{CLASS_NAME}}Locales
|
|
|
2146
2148
|
return stubs[stubName] ?? "";
|
|
2147
2149
|
}
|
|
2148
2150
|
function generateServiceProvider(schemas, options, stubContent) {
|
|
2149
|
-
const morphMap = Object.values(schemas).filter((s) => s.kind !== "enum").map((s) => {
|
|
2151
|
+
const morphMap = Object.values(schemas).filter((s) => s.kind !== "enum" && s.options?.hidden !== true).map((s) => {
|
|
2150
2152
|
const className = toPascalCase(s.name);
|
|
2151
2153
|
return ` '${s.name}' => \\${options.modelNamespace}\\${className}::class,`;
|
|
2152
2154
|
}).join("\n");
|
|
@@ -2195,6 +2197,9 @@ function generateModels(schemas, options) {
|
|
|
2195
2197
|
if (schema.kind === "enum") {
|
|
2196
2198
|
continue;
|
|
2197
2199
|
}
|
|
2200
|
+
if (schema.options?.hidden === true) {
|
|
2201
|
+
continue;
|
|
2202
|
+
}
|
|
2198
2203
|
models.push(generateLocalesClass(schema, resolved, getStubContent("locales")));
|
|
2199
2204
|
models.push(generateEntityBaseModel(
|
|
2200
2205
|
schema,
|
|
@@ -2298,10 +2303,6 @@ ${providerLine}
|
|
|
2298
2303
|
}
|
|
2299
2304
|
}
|
|
2300
2305
|
|
|
2301
|
-
// src/plugin.ts
|
|
2302
|
-
var import_node_fs = require("fs");
|
|
2303
|
-
var import_node_path = require("path");
|
|
2304
|
-
|
|
2305
2306
|
// src/factory/generator.ts
|
|
2306
2307
|
function resolveOptions2(options) {
|
|
2307
2308
|
return {
|
|
@@ -2565,6 +2566,8 @@ function getFactoryPath(factory) {
|
|
|
2565
2566
|
}
|
|
2566
2567
|
|
|
2567
2568
|
// src/plugin.ts
|
|
2569
|
+
var import_node_fs = require("fs");
|
|
2570
|
+
var import_node_path = require("path");
|
|
2568
2571
|
function getExistingMigrationTables(migrationsDir) {
|
|
2569
2572
|
const existingTables = /* @__PURE__ */ new Set();
|
|
2570
2573
|
if (!(0, import_node_fs.existsSync)(migrationsDir)) {
|
|
@@ -2863,6 +2866,7 @@ function laravelPlugin(options) {
|
|
|
2863
2866
|
generateAlterMigration,
|
|
2864
2867
|
generateDropMigrationForTable,
|
|
2865
2868
|
generateDropTableMigration,
|
|
2869
|
+
generateFactories,
|
|
2866
2870
|
generateForeignKey,
|
|
2867
2871
|
generateMigrationFromSchema,
|
|
2868
2872
|
generateMigrations,
|
|
@@ -2872,6 +2876,7 @@ function laravelPlugin(options) {
|
|
|
2872
2876
|
generateProviderRegistration,
|
|
2873
2877
|
generateSoftDeleteColumn,
|
|
2874
2878
|
generateTimestampColumns,
|
|
2879
|
+
getFactoryPath,
|
|
2875
2880
|
getMigrationPath,
|
|
2876
2881
|
getModelPath,
|
|
2877
2882
|
laravelPlugin,
|