@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/{chunk-TBXCIKK7.js → chunk-KKNVSIBX.js} +11 -3
- package/dist/chunk-KKNVSIBX.js.map +1 -0
- package/dist/index.cjs +10 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/plugin.cjs +10 -2
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-TBXCIKK7.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -3892,14 +3892,22 @@ function laravelPlugin(options) {
|
|
|
3892
3892
|
existingContent = null;
|
|
3893
3893
|
}
|
|
3894
3894
|
} else if ((0, import_node_fs.existsSync)(configAppPath)) {
|
|
3895
|
-
laravelVersion = "laravel10-";
|
|
3896
3895
|
try {
|
|
3897
|
-
|
|
3896
|
+
const configContent = (0, import_node_fs.readFileSync)(configAppPath, "utf-8");
|
|
3897
|
+
if (/'providers'\s*=>\s*\[/.test(configContent)) {
|
|
3898
|
+
laravelVersion = "laravel10-";
|
|
3899
|
+
existingContent = configContent;
|
|
3900
|
+
} else {
|
|
3901
|
+
laravelVersion = "laravel11+";
|
|
3902
|
+
existingContent = null;
|
|
3903
|
+
}
|
|
3898
3904
|
} catch {
|
|
3905
|
+
laravelVersion = "laravel11+";
|
|
3899
3906
|
existingContent = null;
|
|
3900
3907
|
}
|
|
3901
3908
|
} else {
|
|
3902
3909
|
laravelVersion = "laravel11+";
|
|
3910
|
+
existingContent = null;
|
|
3903
3911
|
}
|
|
3904
3912
|
const registration = generateProviderRegistration(existingContent, laravelVersion, laravelRoot);
|
|
3905
3913
|
if (registration && !registration.alreadyRegistered) {
|