@h3ravel/core 1.21.5 → 1.21.6
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.cjs +25 -4
- package/dist/index.js +25 -4
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -702,11 +702,32 @@ const h3ravel = async (providers = [], basePath = process.cwd(), config = {
|
|
|
702
702
|
} catch {
|
|
703
703
|
if (!h3App && config.h3) h3App = config.h3;
|
|
704
704
|
}
|
|
705
|
-
const originalFire = app.fire
|
|
706
|
-
|
|
707
|
-
|
|
705
|
+
const originalFire = app.fire;
|
|
706
|
+
const proxyThis = (function makeProxy(appRef, orig) {
|
|
707
|
+
return new Proxy(appRef, {
|
|
708
|
+
get(target, prop, receiver) {
|
|
709
|
+
if (prop === "fire") return orig;
|
|
710
|
+
return Reflect.get(target, prop, receiver);
|
|
711
|
+
},
|
|
712
|
+
has(target, prop) {
|
|
713
|
+
if (prop === "fire") return true;
|
|
714
|
+
return Reflect.has(target, prop);
|
|
715
|
+
},
|
|
716
|
+
getOwnPropertyDescriptor(target, prop) {
|
|
717
|
+
if (prop === "fire") return {
|
|
718
|
+
configurable: true,
|
|
719
|
+
enumerable: false,
|
|
720
|
+
writable: true,
|
|
721
|
+
value: orig
|
|
722
|
+
};
|
|
723
|
+
return Reflect.getOwnPropertyDescriptor(target, prop);
|
|
724
|
+
}
|
|
725
|
+
});
|
|
726
|
+
})(app, originalFire);
|
|
727
|
+
if (config.initialize && h3App) return await Reflect.apply(originalFire, app, [h3App]);
|
|
728
|
+
app.fire = async function() {
|
|
708
729
|
if (!h3App) throw new ConfigException("Provide a H3 app instance in the config or install @h3ravel/http");
|
|
709
|
-
return originalFire
|
|
730
|
+
return await Reflect.apply(originalFire, proxyThis, [h3App]);
|
|
710
731
|
};
|
|
711
732
|
return app;
|
|
712
733
|
};
|
package/dist/index.js
CHANGED
|
@@ -674,11 +674,32 @@ const h3ravel = async (providers = [], basePath = process.cwd(), config = {
|
|
|
674
674
|
} catch {
|
|
675
675
|
if (!h3App && config.h3) h3App = config.h3;
|
|
676
676
|
}
|
|
677
|
-
const originalFire = app.fire
|
|
678
|
-
|
|
679
|
-
|
|
677
|
+
const originalFire = app.fire;
|
|
678
|
+
const proxyThis = (function makeProxy(appRef, orig) {
|
|
679
|
+
return new Proxy(appRef, {
|
|
680
|
+
get(target, prop, receiver) {
|
|
681
|
+
if (prop === "fire") return orig;
|
|
682
|
+
return Reflect.get(target, prop, receiver);
|
|
683
|
+
},
|
|
684
|
+
has(target, prop) {
|
|
685
|
+
if (prop === "fire") return true;
|
|
686
|
+
return Reflect.has(target, prop);
|
|
687
|
+
},
|
|
688
|
+
getOwnPropertyDescriptor(target, prop) {
|
|
689
|
+
if (prop === "fire") return {
|
|
690
|
+
configurable: true,
|
|
691
|
+
enumerable: false,
|
|
692
|
+
writable: true,
|
|
693
|
+
value: orig
|
|
694
|
+
};
|
|
695
|
+
return Reflect.getOwnPropertyDescriptor(target, prop);
|
|
696
|
+
}
|
|
697
|
+
});
|
|
698
|
+
})(app, originalFire);
|
|
699
|
+
if (config.initialize && h3App) return await Reflect.apply(originalFire, app, [h3App]);
|
|
700
|
+
app.fire = async function() {
|
|
680
701
|
if (!h3App) throw new ConfigException("Provide a H3 app instance in the config or install @h3ravel/http");
|
|
681
|
-
return originalFire
|
|
702
|
+
return await Reflect.apply(originalFire, proxyThis, [h3App]);
|
|
682
703
|
};
|
|
683
704
|
return app;
|
|
684
705
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h3ravel/core",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.6",
|
|
4
4
|
"description": "Core application container, lifecycle management and service providers for H3ravel.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"semver": "^7.7.2",
|
|
55
55
|
"srvx": "^0.8.7",
|
|
56
56
|
"tslib": "^2.8.1",
|
|
57
|
-
"@h3ravel/support": "^0.15.
|
|
58
|
-
"@h3ravel/shared": "^0.27.
|
|
57
|
+
"@h3ravel/support": "^0.15.6",
|
|
58
|
+
"@h3ravel/shared": "^0.27.7"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/semver": "^7.7.1",
|