@famgia/omnify-laravel 0.0.92 → 0.0.93
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-EVW3645L.js → chunk-U2QZI3HY.js} +26 -12
- package/dist/chunk-U2QZI3HY.js.map +1 -0
- package/dist/index.cjs +25 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/plugin.cjs +25 -11
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts +26 -8
- package/dist/plugin.d.ts +26 -8
- package/dist/plugin.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-EVW3645L.js.map +0 -1
package/dist/index.js
CHANGED
package/dist/plugin.cjs
CHANGED
|
@@ -4110,11 +4110,19 @@ function getExistingMigrationTables(migrationsDir) {
|
|
|
4110
4110
|
}
|
|
4111
4111
|
var LARAVEL_CONFIG_SCHEMA = {
|
|
4112
4112
|
fields: [
|
|
4113
|
+
{
|
|
4114
|
+
key: "base",
|
|
4115
|
+
type: "path",
|
|
4116
|
+
label: "Laravel Base Path",
|
|
4117
|
+
description: 'Base directory for Laravel project (e.g., "./backend/" for monorepo). All other paths are relative to this.',
|
|
4118
|
+
default: "",
|
|
4119
|
+
group: "output"
|
|
4120
|
+
},
|
|
4113
4121
|
{
|
|
4114
4122
|
key: "migrationsPath",
|
|
4115
4123
|
type: "path",
|
|
4116
4124
|
label: "Migrations Path",
|
|
4117
|
-
description: "Directory for Laravel migration files (
|
|
4125
|
+
description: "Directory for Laravel migration files (relative to base)",
|
|
4118
4126
|
default: "database/migrations/omnify",
|
|
4119
4127
|
group: "output"
|
|
4120
4128
|
},
|
|
@@ -4122,7 +4130,7 @@ var LARAVEL_CONFIG_SCHEMA = {
|
|
|
4122
4130
|
key: "modelsPath",
|
|
4123
4131
|
type: "path",
|
|
4124
4132
|
label: "Models Path",
|
|
4125
|
-
description: "Directory for user-editable model files",
|
|
4133
|
+
description: "Directory for user-editable model files (relative to base)",
|
|
4126
4134
|
default: "app/Models",
|
|
4127
4135
|
group: "output"
|
|
4128
4136
|
},
|
|
@@ -4224,27 +4232,33 @@ var LARAVEL_CONFIG_SCHEMA = {
|
|
|
4224
4232
|
}
|
|
4225
4233
|
]
|
|
4226
4234
|
};
|
|
4235
|
+
function joinPath(base, relativePath) {
|
|
4236
|
+
if (!base) return relativePath;
|
|
4237
|
+
const normalizedBase = base.replace(/\/+$/, "");
|
|
4238
|
+
return `${normalizedBase}/${relativePath}`;
|
|
4239
|
+
}
|
|
4227
4240
|
function resolveOptions5(options) {
|
|
4241
|
+
const base = options?.base ?? "";
|
|
4228
4242
|
return {
|
|
4229
|
-
migrationsPath: options?.migrationsPath ?? "database/migrations/omnify",
|
|
4230
|
-
modelsPath: options?.modelsPath ?? "app/Models",
|
|
4231
|
-
baseModelsPath: options?.baseModelsPath ?? "app/Models/OmnifyBase",
|
|
4232
|
-
providersPath: options?.providersPath ?? "app/Providers",
|
|
4243
|
+
migrationsPath: options?.migrationsPath ?? joinPath(base, "database/migrations/omnify"),
|
|
4244
|
+
modelsPath: options?.modelsPath ?? joinPath(base, "app/Models"),
|
|
4245
|
+
baseModelsPath: options?.baseModelsPath ?? joinPath(base, "app/Models/OmnifyBase"),
|
|
4246
|
+
providersPath: options?.providersPath ?? joinPath(base, "app/Providers"),
|
|
4233
4247
|
modelNamespace: options?.modelNamespace ?? "App\\Models",
|
|
4234
4248
|
baseModelNamespace: options?.baseModelNamespace ?? "App\\Models\\OmnifyBase",
|
|
4235
4249
|
generateModels: options?.generateModels ?? true,
|
|
4236
|
-
factoriesPath: options?.factoriesPath ?? "database/factories",
|
|
4250
|
+
factoriesPath: options?.factoriesPath ?? joinPath(base, "database/factories"),
|
|
4237
4251
|
generateFactories: options?.generateFactories ?? true,
|
|
4238
4252
|
fakerLocale: options?.fakerLocale ?? "en_US",
|
|
4239
4253
|
connection: options?.connection,
|
|
4240
4254
|
timestamp: options?.timestamp,
|
|
4241
|
-
requestsPath: options?.requestsPath ?? "app/Http/Requests",
|
|
4242
|
-
baseRequestsPath: options?.baseRequestsPath ?? "app/Http/Requests/OmnifyBase",
|
|
4255
|
+
requestsPath: options?.requestsPath ?? joinPath(base, "app/Http/Requests"),
|
|
4256
|
+
baseRequestsPath: options?.baseRequestsPath ?? joinPath(base, "app/Http/Requests/OmnifyBase"),
|
|
4243
4257
|
requestNamespace: options?.requestNamespace ?? "App\\Http\\Requests",
|
|
4244
4258
|
baseRequestNamespace: options?.baseRequestNamespace ?? "App\\Http\\Requests\\OmnifyBase",
|
|
4245
4259
|
generateRequests: options?.generateRequests ?? false,
|
|
4246
|
-
resourcesPath: options?.resourcesPath ?? "app/Http/Resources",
|
|
4247
|
-
baseResourcesPath: options?.baseResourcesPath ?? "app/Http/Resources/OmnifyBase",
|
|
4260
|
+
resourcesPath: options?.resourcesPath ?? joinPath(base, "app/Http/Resources"),
|
|
4261
|
+
baseResourcesPath: options?.baseResourcesPath ?? joinPath(base, "app/Http/Resources/OmnifyBase"),
|
|
4248
4262
|
resourceNamespace: options?.resourceNamespace ?? "App\\Http\\Resources",
|
|
4249
4263
|
baseResourceNamespace: options?.baseResourceNamespace ?? "App\\Http\\Resources\\OmnifyBase",
|
|
4250
4264
|
generateResources: options?.generateResources ?? false
|