@famgia/omnify-laravel 0.0.54 → 0.0.56
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-U7ZCSAYW.js → chunk-TIMQTRAC.js} +14 -2
- package/dist/chunk-TIMQTRAC.js.map +1 -0
- package/dist/index.cjs +13 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1 -1
- package/dist/plugin.cjs +13 -1
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts +5 -0
- package/dist/plugin.d.ts +5 -0
- package/dist/plugin.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-U7ZCSAYW.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -281,6 +281,11 @@ interface ModelGeneratorOptions {
|
|
|
281
281
|
* @default 'app/Models'
|
|
282
282
|
*/
|
|
283
283
|
modelPath?: string;
|
|
284
|
+
/**
|
|
285
|
+
* Output path for service provider files.
|
|
286
|
+
* @default 'app/Providers'
|
|
287
|
+
*/
|
|
288
|
+
providersPath?: string;
|
|
284
289
|
/**
|
|
285
290
|
* Custom types registered by plugins.
|
|
286
291
|
* Used to expand compound types in fillable array.
|
package/dist/index.d.ts
CHANGED
|
@@ -281,6 +281,11 @@ interface ModelGeneratorOptions {
|
|
|
281
281
|
* @default 'app/Models'
|
|
282
282
|
*/
|
|
283
283
|
modelPath?: string;
|
|
284
|
+
/**
|
|
285
|
+
* Output path for service provider files.
|
|
286
|
+
* @default 'app/Providers'
|
|
287
|
+
*/
|
|
288
|
+
providersPath?: string;
|
|
284
289
|
/**
|
|
285
290
|
* Custom types registered by plugins.
|
|
286
291
|
* Used to expand compound types in fillable array.
|
package/dist/index.js
CHANGED
package/dist/plugin.cjs
CHANGED
|
@@ -1199,6 +1199,7 @@ var DEFAULT_OPTIONS = {
|
|
|
1199
1199
|
baseModelClassName: "BaseModel",
|
|
1200
1200
|
baseModelPath: "app/Models/OmnifyBase",
|
|
1201
1201
|
modelPath: "app/Models",
|
|
1202
|
+
providersPath: "app/Providers",
|
|
1202
1203
|
customTypes: /* @__PURE__ */ new Map()
|
|
1203
1204
|
};
|
|
1204
1205
|
function generateLocalizedDisplayNames(displayName, indent = " ") {
|
|
@@ -1247,6 +1248,7 @@ function resolveOptions(options) {
|
|
|
1247
1248
|
baseModelClassName: options?.baseModelClassName ?? DEFAULT_OPTIONS.baseModelClassName,
|
|
1248
1249
|
baseModelPath: options?.baseModelPath ?? DEFAULT_OPTIONS.baseModelPath,
|
|
1249
1250
|
modelPath: options?.modelPath ?? DEFAULT_OPTIONS.modelPath,
|
|
1251
|
+
providersPath: options?.providersPath ?? DEFAULT_OPTIONS.providersPath,
|
|
1250
1252
|
customTypes: options?.customTypes ?? /* @__PURE__ */ new Map()
|
|
1251
1253
|
};
|
|
1252
1254
|
}
|
|
@@ -2081,7 +2083,7 @@ function generateServiceProvider(schemas, options, stubContent) {
|
|
|
2081
2083
|
}).join("\n");
|
|
2082
2084
|
const content = stubContent.replace(/\{\{MORPH_MAP\}\}/g, morphMap);
|
|
2083
2085
|
return {
|
|
2084
|
-
path:
|
|
2086
|
+
path: `${options.providersPath}/OmnifyServiceProvider.php`,
|
|
2085
2087
|
content,
|
|
2086
2088
|
type: "service-provider",
|
|
2087
2089
|
overwrite: true,
|
|
@@ -2534,6 +2536,14 @@ var LARAVEL_CONFIG_SCHEMA = {
|
|
|
2534
2536
|
default: "app/Models/OmnifyBase",
|
|
2535
2537
|
group: "output"
|
|
2536
2538
|
},
|
|
2539
|
+
{
|
|
2540
|
+
key: "providersPath",
|
|
2541
|
+
type: "path",
|
|
2542
|
+
label: "Providers Path",
|
|
2543
|
+
description: "Directory for Laravel service provider files",
|
|
2544
|
+
default: "app/Providers",
|
|
2545
|
+
group: "output"
|
|
2546
|
+
},
|
|
2537
2547
|
{
|
|
2538
2548
|
key: "generateModels",
|
|
2539
2549
|
type: "boolean",
|
|
@@ -2573,6 +2583,7 @@ function resolveOptions3(options) {
|
|
|
2573
2583
|
migrationsPath: options?.migrationsPath ?? "database/migrations/omnify",
|
|
2574
2584
|
modelsPath: options?.modelsPath ?? "app/Models",
|
|
2575
2585
|
baseModelsPath: options?.baseModelsPath ?? "app/Models/OmnifyBase",
|
|
2586
|
+
providersPath: options?.providersPath ?? "app/Providers",
|
|
2576
2587
|
modelNamespace: options?.modelNamespace ?? "App\\Models",
|
|
2577
2588
|
baseModelNamespace: options?.baseModelNamespace ?? "App\\Models\\OmnifyBase",
|
|
2578
2589
|
generateModels: options?.generateModels ?? true,
|
|
@@ -2677,6 +2688,7 @@ function laravelPlugin(options) {
|
|
|
2677
2688
|
baseModelNamespace: resolved.baseModelNamespace,
|
|
2678
2689
|
modelPath: resolved.modelsPath,
|
|
2679
2690
|
baseModelPath: resolved.baseModelsPath,
|
|
2691
|
+
providersPath: resolved.providersPath,
|
|
2680
2692
|
customTypes: ctx.customTypes
|
|
2681
2693
|
};
|
|
2682
2694
|
const models = generateModels(ctx.schemas, modelOptions);
|