@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.
@@ -4134,11 +4134,19 @@ function getExistingMigrationTables(migrationsDir) {
4134
4134
  }
4135
4135
  var LARAVEL_CONFIG_SCHEMA = {
4136
4136
  fields: [
4137
+ {
4138
+ key: "base",
4139
+ type: "path",
4140
+ label: "Laravel Base Path",
4141
+ description: 'Base directory for Laravel project (e.g., "./backend/" for monorepo). All other paths are relative to this.',
4142
+ default: "",
4143
+ group: "output"
4144
+ },
4137
4145
  {
4138
4146
  key: "migrationsPath",
4139
4147
  type: "path",
4140
4148
  label: "Migrations Path",
4141
- description: "Directory for Laravel migration files (loaded via OmnifyServiceProvider)",
4149
+ description: "Directory for Laravel migration files (relative to base)",
4142
4150
  default: "database/migrations/omnify",
4143
4151
  group: "output"
4144
4152
  },
@@ -4146,7 +4154,7 @@ var LARAVEL_CONFIG_SCHEMA = {
4146
4154
  key: "modelsPath",
4147
4155
  type: "path",
4148
4156
  label: "Models Path",
4149
- description: "Directory for user-editable model files",
4157
+ description: "Directory for user-editable model files (relative to base)",
4150
4158
  default: "app/Models",
4151
4159
  group: "output"
4152
4160
  },
@@ -4248,27 +4256,33 @@ var LARAVEL_CONFIG_SCHEMA = {
4248
4256
  }
4249
4257
  ]
4250
4258
  };
4259
+ function joinPath(base, relativePath) {
4260
+ if (!base) return relativePath;
4261
+ const normalizedBase = base.replace(/\/+$/, "");
4262
+ return `${normalizedBase}/${relativePath}`;
4263
+ }
4251
4264
  function resolveOptions5(options) {
4265
+ const base = options?.base ?? "";
4252
4266
  return {
4253
- migrationsPath: options?.migrationsPath ?? "database/migrations/omnify",
4254
- modelsPath: options?.modelsPath ?? "app/Models",
4255
- baseModelsPath: options?.baseModelsPath ?? "app/Models/OmnifyBase",
4256
- providersPath: options?.providersPath ?? "app/Providers",
4267
+ migrationsPath: options?.migrationsPath ?? joinPath(base, "database/migrations/omnify"),
4268
+ modelsPath: options?.modelsPath ?? joinPath(base, "app/Models"),
4269
+ baseModelsPath: options?.baseModelsPath ?? joinPath(base, "app/Models/OmnifyBase"),
4270
+ providersPath: options?.providersPath ?? joinPath(base, "app/Providers"),
4257
4271
  modelNamespace: options?.modelNamespace ?? "App\\Models",
4258
4272
  baseModelNamespace: options?.baseModelNamespace ?? "App\\Models\\OmnifyBase",
4259
4273
  generateModels: options?.generateModels ?? true,
4260
- factoriesPath: options?.factoriesPath ?? "database/factories",
4274
+ factoriesPath: options?.factoriesPath ?? joinPath(base, "database/factories"),
4261
4275
  generateFactories: options?.generateFactories ?? true,
4262
4276
  fakerLocale: options?.fakerLocale ?? "en_US",
4263
4277
  connection: options?.connection,
4264
4278
  timestamp: options?.timestamp,
4265
- requestsPath: options?.requestsPath ?? "app/Http/Requests",
4266
- baseRequestsPath: options?.baseRequestsPath ?? "app/Http/Requests/OmnifyBase",
4279
+ requestsPath: options?.requestsPath ?? joinPath(base, "app/Http/Requests"),
4280
+ baseRequestsPath: options?.baseRequestsPath ?? joinPath(base, "app/Http/Requests/OmnifyBase"),
4267
4281
  requestNamespace: options?.requestNamespace ?? "App\\Http\\Requests",
4268
4282
  baseRequestNamespace: options?.baseRequestNamespace ?? "App\\Http\\Requests\\OmnifyBase",
4269
4283
  generateRequests: options?.generateRequests ?? false,
4270
- resourcesPath: options?.resourcesPath ?? "app/Http/Resources",
4271
- baseResourcesPath: options?.baseResourcesPath ?? "app/Http/Resources/OmnifyBase",
4284
+ resourcesPath: options?.resourcesPath ?? joinPath(base, "app/Http/Resources"),
4285
+ baseResourcesPath: options?.baseResourcesPath ?? joinPath(base, "app/Http/Resources/OmnifyBase"),
4272
4286
  resourceNamespace: options?.resourceNamespace ?? "App\\Http\\Resources",
4273
4287
  baseResourceNamespace: options?.baseResourceNamespace ?? "App\\Http\\Resources\\OmnifyBase",
4274
4288
  generateResources: options?.generateResources ?? false
@@ -4581,4 +4595,4 @@ export {
4581
4595
  shouldGenerateAIGuides,
4582
4596
  laravelPlugin
4583
4597
  };
4584
- //# sourceMappingURL=chunk-EVW3645L.js.map
4598
+ //# sourceMappingURL=chunk-U2QZI3HY.js.map