@famgia/omnify-cli 0.0.53 → 0.0.55
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/cli.js +8 -0
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/cli.js
CHANGED
|
@@ -465,6 +465,12 @@ function buildLaravelConfig(base, userLaravel) {
|
|
|
465
465
|
if (userLaravel?.modelsPath !== void 0) {
|
|
466
466
|
config.modelsPath = userLaravel.modelsPath;
|
|
467
467
|
}
|
|
468
|
+
if (userLaravel?.baseModelsPath !== void 0) {
|
|
469
|
+
config.baseModelsPath = userLaravel.baseModelsPath;
|
|
470
|
+
}
|
|
471
|
+
if (userLaravel?.providersPath !== void 0) {
|
|
472
|
+
config.providersPath = userLaravel.providersPath;
|
|
473
|
+
}
|
|
468
474
|
if (userLaravel?.modelsNamespace !== void 0) {
|
|
469
475
|
config.modelsNamespace = userLaravel.modelsNamespace;
|
|
470
476
|
}
|
|
@@ -1483,9 +1489,11 @@ function runDirectGeneration(schemas, config, rootDir, options, changes) {
|
|
|
1483
1489
|
if (!existsSync4(baseModelsDir)) {
|
|
1484
1490
|
mkdirSync3(baseModelsDir, { recursive: true });
|
|
1485
1491
|
}
|
|
1492
|
+
const providersPath = config.output.laravel.providersPath ?? "app/Providers";
|
|
1486
1493
|
const models = generateModels(schemas, {
|
|
1487
1494
|
modelPath: modelsPath,
|
|
1488
1495
|
baseModelPath: baseModelsPath,
|
|
1496
|
+
providersPath,
|
|
1489
1497
|
customTypes: customTypesMap
|
|
1490
1498
|
});
|
|
1491
1499
|
for (const model of models) {
|