mp-front-cli 0.0.39 → 0.0.40
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/core/middleware/index.d.ts +2 -2
- package/dist/core/utils/custom-encoder.d.ts +2 -2
- package/dist/core/utils/custom-encoder.d.ts.map +1 -1
- package/dist/core/utils/custom-encrypter.d.ts +2 -2
- package/dist/core/utils/custom-encrypter.d.ts.map +1 -1
- package/dist/core/utils/custom-header.d.ts +2 -2
- package/dist/custom-encoder-70a77460.js +3734 -0
- package/dist/custom-header-1fcfa265.js +21025 -0
- package/dist/{custom-validator-3bb58ece.js → custom-validator-8a042f7f.js} +1 -1
- package/dist/mp-front-cli-all.es.js +4 -4
- package/dist/mp-front-cli-core.es.js +29 -29
- package/dist/mp-front-cli-encoder.es.js +2 -3
- package/dist/mp-front-cli-header.es.js +3 -3
- package/dist/mp-front-cli-validator.es.js +3 -4
- package/package.json +1 -1
- package/dist/custom-encoder-04bc877a.js +0 -23877
- package/dist/custom-header-89182d9e.js +0 -881
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { E as m } from "./custom-validator-
|
|
1
|
+
import { E as m } from "./custom-validator-8a042f7f.js";
|
|
2
2
|
import { ApiMiddleware as d, FetchServiceBE as n, FetchServiceFE as x } from "./mp-front-cli-core.es.js";
|
|
3
|
-
import { S as f } from "./custom-header-
|
|
3
|
+
import { S as f } from "./custom-header-1fcfa265.js";
|
|
4
4
|
import { LoadingHandler as l, MessageHandler as s, RxSubjectManager as E } from "./mp-front-cli-utils-rxjs.es.js";
|
|
5
|
-
import "./custom-encoder-
|
|
6
|
-
import "crypto";
|
|
5
|
+
import "./custom-encoder-70a77460.js";
|
|
7
6
|
import "./mp-front-cli-logger.es.js";
|
|
8
7
|
import "./index-df4e0539.js";
|
|
9
8
|
import "rxjs";
|
|
9
|
+
import "crypto";
|
|
10
10
|
export {
|
|
11
11
|
d as ApiMiddleware,
|
|
12
12
|
m as ErrorCatalog,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var u = (d, n, t) => (
|
|
4
|
-
import {
|
|
5
|
-
import { C as O, f } from "./custom-header-
|
|
6
|
-
import { S as
|
|
7
|
-
import { MessageHandler as
|
|
8
|
-
import { RxSubjectManager as
|
|
9
|
-
import { of as a, switchMap as o, catchError as p, EMPTY as
|
|
10
|
-
import
|
|
11
|
-
import "./index-df4e0539.js";
|
|
1
|
+
var x = Object.defineProperty;
|
|
2
|
+
var E = (d, n, t) => n in d ? x(d, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[n] = t;
|
|
3
|
+
var u = (d, n, t) => (E(d, typeof n != "symbol" ? n + "" : n, t), t);
|
|
4
|
+
import { E as l, C as B } from "./custom-validator-8a042f7f.js";
|
|
5
|
+
import { C as y, a as O, f as S, v as g } from "./custom-header-1fcfa265.js";
|
|
6
|
+
import { S as v } from "./custom-header-1fcfa265.js";
|
|
7
|
+
import { MessageHandler as m, LoadingHandler as c } from "./mp-front-cli-utils-rxjs.es.js";
|
|
8
|
+
import { RxSubjectManager as C } from "./mp-front-cli-utils-rxjs.es.js";
|
|
9
|
+
import { of as a, switchMap as o, catchError as p, EMPTY as f, filter as b } from "rxjs";
|
|
10
|
+
import "./custom-encoder-70a77460.js";
|
|
12
11
|
import "./mp-front-cli-logger.es.js";
|
|
12
|
+
import "./index-df4e0539.js";
|
|
13
13
|
import "crypto";
|
|
14
|
-
class
|
|
14
|
+
class J extends y {
|
|
15
15
|
constructor() {
|
|
16
16
|
super(...arguments);
|
|
17
17
|
u(this, "uuid", "");
|
|
@@ -41,7 +41,7 @@ class w extends S {
|
|
|
41
41
|
var h;
|
|
42
42
|
return this.logError(
|
|
43
43
|
`ApiMiddleware <URL>: ${i == null ? void 0 : i.url} <UUID> ${(h = i == null ? void 0 : i.body) == null ? void 0 : h.uuid} <PARAMS> ${JSON.stringify(i == null ? void 0 : i.body)} <ERROR>: ${JSON.stringify(e)}`
|
|
44
|
-
), this.returnError(r, e),
|
|
44
|
+
), this.returnError(r, e), f;
|
|
45
45
|
})
|
|
46
46
|
).subscribe({
|
|
47
47
|
next: (e) => {
|
|
@@ -51,7 +51,7 @@ class w extends S {
|
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
class
|
|
54
|
+
class I extends O {
|
|
55
55
|
constructor(t, i) {
|
|
56
56
|
super();
|
|
57
57
|
u(this, "apiUrl");
|
|
@@ -69,7 +69,7 @@ class J extends O {
|
|
|
69
69
|
(r) => this.getHeaders().pipe(o((s) => a({ params: r, headers: s })))
|
|
70
70
|
),
|
|
71
71
|
o(
|
|
72
|
-
({ params: r, headers: s }) =>
|
|
72
|
+
({ params: r, headers: s }) => S(this.apiUrl, {
|
|
73
73
|
method: this.method,
|
|
74
74
|
headers: s,
|
|
75
75
|
body: this.method === "GET" ? null : JSON.stringify(r),
|
|
@@ -84,11 +84,11 @@ class J extends O {
|
|
|
84
84
|
), a(e)))
|
|
85
85
|
)
|
|
86
86
|
),
|
|
87
|
-
|
|
87
|
+
b((r) => this.errorHandler(r, i))
|
|
88
88
|
);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
class
|
|
91
|
+
class H extends B {
|
|
92
92
|
constructor(t, i = "POST", r = {}) {
|
|
93
93
|
super();
|
|
94
94
|
u(this, "apiUrl");
|
|
@@ -104,11 +104,11 @@ class I extends S {
|
|
|
104
104
|
this.isLoadingEnabled = t;
|
|
105
105
|
}
|
|
106
106
|
errorHandler(t) {
|
|
107
|
-
return t.code && (
|
|
107
|
+
return t.code && (m.getInstance().setSubject(t), c.getInstance().setSubject(!1)), !t.code;
|
|
108
108
|
}
|
|
109
109
|
fetchData(t = {}) {
|
|
110
|
-
const i = (/* @__PURE__ */ new Date()).toISOString(), r =
|
|
111
|
-
return c.getInstance().setSubject(this.isLoadingEnabled),
|
|
110
|
+
const i = (/* @__PURE__ */ new Date()).toISOString(), r = g(i, g.URL), s = this.encode({ ...t }, r);
|
|
111
|
+
return c.getInstance().setSubject(this.isLoadingEnabled), S(this.apiUrl, {
|
|
112
112
|
method: this.method,
|
|
113
113
|
headers: this.headers,
|
|
114
114
|
body: s,
|
|
@@ -118,21 +118,21 @@ class I extends S {
|
|
|
118
118
|
o((e) => (this.logDebug(
|
|
119
119
|
`FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(t)} <BODY> ${s} <RESPONSE>: ${JSON.stringify(e)}`
|
|
120
120
|
), a(e))),
|
|
121
|
-
|
|
121
|
+
b(this.errorHandler),
|
|
122
122
|
o((e) => (c.getInstance().setSubject(!1), a(e))),
|
|
123
|
-
p((e) => (c.getInstance().setSubject(!1),
|
|
123
|
+
p((e) => (c.getInstance().setSubject(!1), m.getInstance().setSubject(
|
|
124
124
|
new l().get(e, r)
|
|
125
|
-
),
|
|
125
|
+
), f))
|
|
126
126
|
);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
export {
|
|
130
|
-
|
|
130
|
+
J as ApiMiddleware,
|
|
131
131
|
l as ErrorCatalog,
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
I as FetchServiceBE,
|
|
133
|
+
H as FetchServiceFE,
|
|
134
134
|
c as LoadingHandler,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
m as MessageHandler,
|
|
136
|
+
C as RxSubjectManager,
|
|
137
|
+
v as ServiceToken
|
|
138
138
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "rxjs";
|
|
2
|
-
import {
|
|
3
|
-
import "./custom-validator-3bb58ece.js";
|
|
2
|
+
import { a as s } from "./custom-header-1fcfa265.js";
|
|
4
3
|
import "./mp-front-cli-logger.es.js";
|
|
5
|
-
import "./custom-encoder-
|
|
4
|
+
import "./custom-encoder-70a77460.js";
|
|
6
5
|
import "crypto";
|
|
6
|
+
import "./custom-validator-8a042f7f.js";
|
|
7
7
|
import "./index-df4e0539.js";
|
|
8
8
|
export {
|
|
9
9
|
s as CustomHeader
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import "./custom-encoder-
|
|
1
|
+
import { C as p } from "./custom-validator-8a042f7f.js";
|
|
2
|
+
import "./custom-encoder-70a77460.js";
|
|
3
3
|
import "./index-df4e0539.js";
|
|
4
4
|
import "./mp-front-cli-logger.es.js";
|
|
5
|
-
import "crypto";
|
|
6
5
|
export {
|
|
7
|
-
|
|
6
|
+
p as CustomValidator
|
|
8
7
|
};
|