@moostjs/event-http 0.2.10 → 0.2.11
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 +23 -24
- package/dist/index.mjs +23 -24
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -469,7 +469,6 @@ function Query(name) {
|
|
|
469
469
|
if (name) {
|
|
470
470
|
const p = urlSearchParams();
|
|
471
471
|
const value = p.get(name);
|
|
472
|
-
console.log(name + ' = ', value);
|
|
473
472
|
return value === '' && p.has(name) || value;
|
|
474
473
|
}
|
|
475
474
|
const json = jsonSearchParams();
|
|
@@ -741,6 +740,29 @@ function getMoostMate() {
|
|
|
741
740
|
return moostMate;
|
|
742
741
|
}
|
|
743
742
|
|
|
743
|
+
getMoostMate().decorate((meta) => {
|
|
744
|
+
if (!meta.injectable)
|
|
745
|
+
meta.injectable = true;
|
|
746
|
+
return meta;
|
|
747
|
+
});
|
|
748
|
+
|
|
749
|
+
var TInterceptorPriority;
|
|
750
|
+
(function (TInterceptorPriority) {
|
|
751
|
+
TInterceptorPriority[TInterceptorPriority["BEFORE_ALL"] = 0] = "BEFORE_ALL";
|
|
752
|
+
TInterceptorPriority[TInterceptorPriority["BEFORE_GUARD"] = 1] = "BEFORE_GUARD";
|
|
753
|
+
TInterceptorPriority[TInterceptorPriority["GUARD"] = 2] = "GUARD";
|
|
754
|
+
TInterceptorPriority[TInterceptorPriority["AFTER_GUARD"] = 3] = "AFTER_GUARD";
|
|
755
|
+
TInterceptorPriority[TInterceptorPriority["INTERCEPTOR"] = 4] = "INTERCEPTOR";
|
|
756
|
+
TInterceptorPriority[TInterceptorPriority["CATCH_ERROR"] = 5] = "CATCH_ERROR";
|
|
757
|
+
TInterceptorPriority[TInterceptorPriority["AFTER_ALL"] = 6] = "AFTER_ALL";
|
|
758
|
+
})(TInterceptorPriority || (TInterceptorPriority = {}));
|
|
759
|
+
function Intercept(handler, priority) {
|
|
760
|
+
return getMoostMate().decorate('interceptors', {
|
|
761
|
+
handler,
|
|
762
|
+
priority: priority || handler.priority || TInterceptorPriority.INTERCEPTOR,
|
|
763
|
+
}, true);
|
|
764
|
+
}
|
|
765
|
+
|
|
744
766
|
var TPipePriority;
|
|
745
767
|
(function (TPipePriority) {
|
|
746
768
|
TPipePriority[TPipePriority["BEFORE_RESOLVE"] = 0] = "BEFORE_RESOLVE";
|
|
@@ -783,29 +805,6 @@ resolvePipe.priority = TPipePriority.RESOLVE;
|
|
|
783
805
|
},
|
|
784
806
|
];
|
|
785
807
|
|
|
786
|
-
getMoostMate().decorate((meta) => {
|
|
787
|
-
if (!meta.injectable)
|
|
788
|
-
meta.injectable = true;
|
|
789
|
-
return meta;
|
|
790
|
-
});
|
|
791
|
-
|
|
792
|
-
var TInterceptorPriority;
|
|
793
|
-
(function (TInterceptorPriority) {
|
|
794
|
-
TInterceptorPriority[TInterceptorPriority["BEFORE_ALL"] = 0] = "BEFORE_ALL";
|
|
795
|
-
TInterceptorPriority[TInterceptorPriority["BEFORE_GUARD"] = 1] = "BEFORE_GUARD";
|
|
796
|
-
TInterceptorPriority[TInterceptorPriority["GUARD"] = 2] = "GUARD";
|
|
797
|
-
TInterceptorPriority[TInterceptorPriority["AFTER_GUARD"] = 3] = "AFTER_GUARD";
|
|
798
|
-
TInterceptorPriority[TInterceptorPriority["INTERCEPTOR"] = 4] = "INTERCEPTOR";
|
|
799
|
-
TInterceptorPriority[TInterceptorPriority["CATCH_ERROR"] = 5] = "CATCH_ERROR";
|
|
800
|
-
TInterceptorPriority[TInterceptorPriority["AFTER_ALL"] = 6] = "AFTER_ALL";
|
|
801
|
-
})(TInterceptorPriority || (TInterceptorPriority = {}));
|
|
802
|
-
function Intercept(handler, priority) {
|
|
803
|
-
return getMoostMate().decorate('interceptors', {
|
|
804
|
-
handler,
|
|
805
|
-
priority: priority || handler.priority || TInterceptorPriority.INTERCEPTOR,
|
|
806
|
-
}, true);
|
|
807
|
-
}
|
|
808
|
-
|
|
809
808
|
const setHeaderInterceptor = (name, value, opts) => {
|
|
810
809
|
const fn = (before, after, onError) => {
|
|
811
810
|
const h = eventHttp.useSetHeader(name);
|
package/dist/index.mjs
CHANGED
|
@@ -467,7 +467,6 @@ function Query(name) {
|
|
|
467
467
|
if (name) {
|
|
468
468
|
const p = urlSearchParams();
|
|
469
469
|
const value = p.get(name);
|
|
470
|
-
console.log(name + ' = ', value);
|
|
471
470
|
return value === '' && p.has(name) || value;
|
|
472
471
|
}
|
|
473
472
|
const json = jsonSearchParams();
|
|
@@ -739,6 +738,29 @@ function getMoostMate() {
|
|
|
739
738
|
return moostMate;
|
|
740
739
|
}
|
|
741
740
|
|
|
741
|
+
getMoostMate().decorate((meta) => {
|
|
742
|
+
if (!meta.injectable)
|
|
743
|
+
meta.injectable = true;
|
|
744
|
+
return meta;
|
|
745
|
+
});
|
|
746
|
+
|
|
747
|
+
var TInterceptorPriority;
|
|
748
|
+
(function (TInterceptorPriority) {
|
|
749
|
+
TInterceptorPriority[TInterceptorPriority["BEFORE_ALL"] = 0] = "BEFORE_ALL";
|
|
750
|
+
TInterceptorPriority[TInterceptorPriority["BEFORE_GUARD"] = 1] = "BEFORE_GUARD";
|
|
751
|
+
TInterceptorPriority[TInterceptorPriority["GUARD"] = 2] = "GUARD";
|
|
752
|
+
TInterceptorPriority[TInterceptorPriority["AFTER_GUARD"] = 3] = "AFTER_GUARD";
|
|
753
|
+
TInterceptorPriority[TInterceptorPriority["INTERCEPTOR"] = 4] = "INTERCEPTOR";
|
|
754
|
+
TInterceptorPriority[TInterceptorPriority["CATCH_ERROR"] = 5] = "CATCH_ERROR";
|
|
755
|
+
TInterceptorPriority[TInterceptorPriority["AFTER_ALL"] = 6] = "AFTER_ALL";
|
|
756
|
+
})(TInterceptorPriority || (TInterceptorPriority = {}));
|
|
757
|
+
function Intercept(handler, priority) {
|
|
758
|
+
return getMoostMate().decorate('interceptors', {
|
|
759
|
+
handler,
|
|
760
|
+
priority: priority || handler.priority || TInterceptorPriority.INTERCEPTOR,
|
|
761
|
+
}, true);
|
|
762
|
+
}
|
|
763
|
+
|
|
742
764
|
var TPipePriority;
|
|
743
765
|
(function (TPipePriority) {
|
|
744
766
|
TPipePriority[TPipePriority["BEFORE_RESOLVE"] = 0] = "BEFORE_RESOLVE";
|
|
@@ -781,29 +803,6 @@ resolvePipe.priority = TPipePriority.RESOLVE;
|
|
|
781
803
|
},
|
|
782
804
|
];
|
|
783
805
|
|
|
784
|
-
getMoostMate().decorate((meta) => {
|
|
785
|
-
if (!meta.injectable)
|
|
786
|
-
meta.injectable = true;
|
|
787
|
-
return meta;
|
|
788
|
-
});
|
|
789
|
-
|
|
790
|
-
var TInterceptorPriority;
|
|
791
|
-
(function (TInterceptorPriority) {
|
|
792
|
-
TInterceptorPriority[TInterceptorPriority["BEFORE_ALL"] = 0] = "BEFORE_ALL";
|
|
793
|
-
TInterceptorPriority[TInterceptorPriority["BEFORE_GUARD"] = 1] = "BEFORE_GUARD";
|
|
794
|
-
TInterceptorPriority[TInterceptorPriority["GUARD"] = 2] = "GUARD";
|
|
795
|
-
TInterceptorPriority[TInterceptorPriority["AFTER_GUARD"] = 3] = "AFTER_GUARD";
|
|
796
|
-
TInterceptorPriority[TInterceptorPriority["INTERCEPTOR"] = 4] = "INTERCEPTOR";
|
|
797
|
-
TInterceptorPriority[TInterceptorPriority["CATCH_ERROR"] = 5] = "CATCH_ERROR";
|
|
798
|
-
TInterceptorPriority[TInterceptorPriority["AFTER_ALL"] = 6] = "AFTER_ALL";
|
|
799
|
-
})(TInterceptorPriority || (TInterceptorPriority = {}));
|
|
800
|
-
function Intercept(handler, priority) {
|
|
801
|
-
return getMoostMate().decorate('interceptors', {
|
|
802
|
-
handler,
|
|
803
|
-
priority: priority || handler.priority || TInterceptorPriority.INTERCEPTOR,
|
|
804
|
-
}, true);
|
|
805
|
-
}
|
|
806
|
-
|
|
807
806
|
const setHeaderInterceptor = (name, value, opts) => {
|
|
808
807
|
const fn = (before, after, onError) => {
|
|
809
808
|
const h = useSetHeader(name);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moostjs/event-http",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11",
|
|
4
4
|
"description": "@moostjs/event-http",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/moostjs/moostjs/tree/main/packages/event-http#readme",
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"moost": "0.2.
|
|
31
|
+
"moost": "0.2.11",
|
|
32
32
|
"wooks": "^0.2.6",
|
|
33
33
|
"@wooksjs/event-core": "^0.2.6"
|
|
34
34
|
},
|