@famgia/omnify-laravel 0.0.83 → 0.0.84

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/index.js CHANGED
@@ -24,7 +24,7 @@ import {
24
24
  schemaToBlueprint,
25
25
  toColumnName,
26
26
  toTableName
27
- } from "./chunk-TBXCIKK7.js";
27
+ } from "./chunk-KKNVSIBX.js";
28
28
  export {
29
29
  formatColumnMethod,
30
30
  formatForeignKey,
package/dist/plugin.cjs CHANGED
@@ -3817,14 +3817,22 @@ function laravelPlugin(options) {
3817
3817
  existingContent = null;
3818
3818
  }
3819
3819
  } else if ((0, import_node_fs.existsSync)(configAppPath)) {
3820
- laravelVersion = "laravel10-";
3821
3820
  try {
3822
- existingContent = (0, import_node_fs.readFileSync)(configAppPath, "utf-8");
3821
+ const configContent = (0, import_node_fs.readFileSync)(configAppPath, "utf-8");
3822
+ if (/'providers'\s*=>\s*\[/.test(configContent)) {
3823
+ laravelVersion = "laravel10-";
3824
+ existingContent = configContent;
3825
+ } else {
3826
+ laravelVersion = "laravel11+";
3827
+ existingContent = null;
3828
+ }
3823
3829
  } catch {
3830
+ laravelVersion = "laravel11+";
3824
3831
  existingContent = null;
3825
3832
  }
3826
3833
  } else {
3827
3834
  laravelVersion = "laravel11+";
3835
+ existingContent = null;
3828
3836
  }
3829
3837
  const registration = generateProviderRegistration(existingContent, laravelVersion, laravelRoot);
3830
3838
  if (registration && !registration.alreadyRegistered) {