mp-front-cli 0.0.39 → 0.0.41
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-encrypter-fa4e497d.js +20326 -0
- package/dist/{custom-header-89182d9e.js → custom-header-9277c393.js} +1 -1
- package/dist/{custom-validator-3bb58ece.js → custom-validator-8a042f7f.js} +1 -1
- package/dist/mp-front-cli-all.es.js +15 -14
- package/dist/mp-front-cli-core.es.js +34 -33
- package/dist/mp-front-cli-encoder.es.js +2 -3
- package/dist/mp-front-cli-encrypter.es.js +9 -0
- package/dist/mp-front-cli-header.es.js +5 -4
- package/dist/mp-front-cli-validator.es.js +3 -4
- package/package.json +1 -1
- package/dist/custom-encoder-04bc877a.js +0 -23877
|
@@ -3,7 +3,7 @@ var J = (r, t, e) => t in r ? W(r, t, { enumerable: !0, configurable: !0, writab
|
|
|
3
3
|
var v = (r, t, e) => (J(r, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
4
|
import { switchMap as _, of as S, catchError as N } from "rxjs";
|
|
5
5
|
import { CustomLogger as V } from "./mp-front-cli-logger.es.js";
|
|
6
|
-
import { C as q } from "./custom-
|
|
6
|
+
import { C as q } from "./custom-encrypter-fa4e497d.js";
|
|
7
7
|
var I = function(r, t) {
|
|
8
8
|
return I = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
|
|
9
9
|
e.__proto__ = n;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { E as
|
|
2
|
-
import { ApiMiddleware as
|
|
3
|
-
import { S as
|
|
4
|
-
import { LoadingHandler as
|
|
5
|
-
import "./custom-encoder-
|
|
6
|
-
import "crypto";
|
|
1
|
+
import { E as c } from "./custom-validator-8a042f7f.js";
|
|
2
|
+
import { ApiMiddleware as n, FetchServiceBE as x, FetchServiceFE as S } from "./mp-front-cli-core.es.js";
|
|
3
|
+
import { S as g } from "./custom-header-9277c393.js";
|
|
4
|
+
import { LoadingHandler as s, MessageHandler as E, RxSubjectManager as v } from "./mp-front-cli-utils-rxjs.es.js";
|
|
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 "./custom-encrypter-fa4e497d.js";
|
|
10
|
+
import "crypto";
|
|
10
11
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
n as ApiMiddleware,
|
|
13
|
+
c as ErrorCatalog,
|
|
14
|
+
x as FetchServiceBE,
|
|
15
|
+
S as FetchServiceFE,
|
|
16
|
+
s as LoadingHandler,
|
|
17
|
+
E as MessageHandler,
|
|
18
|
+
v as RxSubjectManager,
|
|
19
|
+
g as ServiceToken
|
|
19
20
|
};
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var u = (d, n, t) => (
|
|
4
|
-
import {
|
|
5
|
-
import { C as
|
|
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 "./
|
|
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 m, C as B } from "./custom-validator-8a042f7f.js";
|
|
5
|
+
import { C as y, f as S } from "./custom-header-9277c393.js";
|
|
6
|
+
import { S as C } from "./custom-header-9277c393.js";
|
|
7
|
+
import { MessageHandler as l, LoadingHandler as c } from "./mp-front-cli-utils-rxjs.es.js";
|
|
8
|
+
import { RxSubjectManager as T } 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 { C as O, c as g } from "./custom-encrypter-fa4e497d.js";
|
|
11
|
+
import "./custom-encoder-70a77460.js";
|
|
12
12
|
import "./mp-front-cli-logger.es.js";
|
|
13
|
+
import "./index-df4e0539.js";
|
|
13
14
|
import "crypto";
|
|
14
|
-
class
|
|
15
|
+
class I extends O {
|
|
15
16
|
constructor() {
|
|
16
17
|
super(...arguments);
|
|
17
18
|
u(this, "uuid", "");
|
|
@@ -21,7 +22,7 @@ class w extends S {
|
|
|
21
22
|
t.status(200).json(s);
|
|
22
23
|
}
|
|
23
24
|
returnError(t, i) {
|
|
24
|
-
return i != null && i.uuid ? t.status(520).json(i) : t.status(520).json(new
|
|
25
|
+
return i != null && i.uuid ? t.status(520).json(i) : t.status(520).json(new m().get(i, this.uuid));
|
|
25
26
|
}
|
|
26
27
|
get(t) {
|
|
27
28
|
return this.logDebug("get ApiMiddleware"), (i, r) => {
|
|
@@ -41,7 +42,7 @@ class w extends S {
|
|
|
41
42
|
var h;
|
|
42
43
|
return this.logError(
|
|
43
44
|
`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),
|
|
45
|
+
), this.returnError(r, e), f;
|
|
45
46
|
})
|
|
46
47
|
).subscribe({
|
|
47
48
|
next: (e) => {
|
|
@@ -51,7 +52,7 @@ class w extends S {
|
|
|
51
52
|
};
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
|
-
class
|
|
55
|
+
class H extends y {
|
|
55
56
|
constructor(t, i) {
|
|
56
57
|
super();
|
|
57
58
|
u(this, "apiUrl");
|
|
@@ -60,7 +61,7 @@ class J extends O {
|
|
|
60
61
|
}
|
|
61
62
|
errorHandler(t, i) {
|
|
62
63
|
if (t != null && t.errors)
|
|
63
|
-
throw new
|
|
64
|
+
throw new m().get(t.errors[0], i);
|
|
64
65
|
return !(t != null && t.errors);
|
|
65
66
|
}
|
|
66
67
|
fetchData(t = {}, i) {
|
|
@@ -69,7 +70,7 @@ class J extends O {
|
|
|
69
70
|
(r) => this.getHeaders().pipe(o((s) => a({ params: r, headers: s })))
|
|
70
71
|
),
|
|
71
72
|
o(
|
|
72
|
-
({ params: r, headers: s }) =>
|
|
73
|
+
({ params: r, headers: s }) => S(this.apiUrl, {
|
|
73
74
|
method: this.method,
|
|
74
75
|
headers: s,
|
|
75
76
|
body: this.method === "GET" ? null : JSON.stringify(r),
|
|
@@ -84,11 +85,11 @@ class J extends O {
|
|
|
84
85
|
), a(e)))
|
|
85
86
|
)
|
|
86
87
|
),
|
|
87
|
-
|
|
88
|
+
b((r) => this.errorHandler(r, i))
|
|
88
89
|
);
|
|
89
90
|
}
|
|
90
91
|
}
|
|
91
|
-
class
|
|
92
|
+
class L extends B {
|
|
92
93
|
constructor(t, i = "POST", r = {}) {
|
|
93
94
|
super();
|
|
94
95
|
u(this, "apiUrl");
|
|
@@ -104,11 +105,11 @@ class I extends S {
|
|
|
104
105
|
this.isLoadingEnabled = t;
|
|
105
106
|
}
|
|
106
107
|
errorHandler(t) {
|
|
107
|
-
return t.code && (
|
|
108
|
+
return t.code && (l.getInstance().setSubject(t), c.getInstance().setSubject(!1)), !t.code;
|
|
108
109
|
}
|
|
109
110
|
fetchData(t = {}) {
|
|
110
|
-
const i = (/* @__PURE__ */ new Date()).toISOString(), r =
|
|
111
|
-
return c.getInstance().setSubject(this.isLoadingEnabled),
|
|
111
|
+
const i = (/* @__PURE__ */ new Date()).toISOString(), r = g.v5(i, g.v5.URL), s = this.encode({ ...t }, r);
|
|
112
|
+
return c.getInstance().setSubject(this.isLoadingEnabled), S(this.apiUrl, {
|
|
112
113
|
method: this.method,
|
|
113
114
|
headers: this.headers,
|
|
114
115
|
body: s,
|
|
@@ -118,21 +119,21 @@ class I extends S {
|
|
|
118
119
|
o((e) => (this.logDebug(
|
|
119
120
|
`FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(t)} <BODY> ${s} <RESPONSE>: ${JSON.stringify(e)}`
|
|
120
121
|
), a(e))),
|
|
121
|
-
|
|
122
|
+
b(this.errorHandler),
|
|
122
123
|
o((e) => (c.getInstance().setSubject(!1), a(e))),
|
|
123
|
-
p((e) => (c.getInstance().setSubject(!1),
|
|
124
|
-
new
|
|
125
|
-
),
|
|
124
|
+
p((e) => (c.getInstance().setSubject(!1), l.getInstance().setSubject(
|
|
125
|
+
new m().get(e, r)
|
|
126
|
+
), f))
|
|
126
127
|
);
|
|
127
128
|
}
|
|
128
129
|
}
|
|
129
130
|
export {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
I as ApiMiddleware,
|
|
132
|
+
m as ErrorCatalog,
|
|
133
|
+
H as FetchServiceBE,
|
|
134
|
+
L as FetchServiceFE,
|
|
134
135
|
c as LoadingHandler,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
l as MessageHandler,
|
|
137
|
+
T as RxSubjectManager,
|
|
138
|
+
C as ServiceToken
|
|
138
139
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { C as s } from "./custom-encrypter-fa4e497d.js";
|
|
2
|
+
import "crypto";
|
|
3
|
+
import "./custom-validator-8a042f7f.js";
|
|
4
|
+
import "./custom-encoder-70a77460.js";
|
|
5
|
+
import "./mp-front-cli-logger.es.js";
|
|
6
|
+
import "./index-df4e0539.js";
|
|
7
|
+
export {
|
|
8
|
+
s as CustomEncrypter
|
|
9
|
+
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import "rxjs";
|
|
2
|
-
import { C
|
|
3
|
-
import "./custom-
|
|
2
|
+
import { C } from "./custom-header-9277c393.js";
|
|
3
|
+
import "./custom-encrypter-fa4e497d.js";
|
|
4
4
|
import "./mp-front-cli-logger.es.js";
|
|
5
|
-
import "./custom-encoder-
|
|
5
|
+
import "./custom-encoder-70a77460.js";
|
|
6
6
|
import "crypto";
|
|
7
|
+
import "./custom-validator-8a042f7f.js";
|
|
7
8
|
import "./index-df4e0539.js";
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
+
C as CustomHeader
|
|
10
11
|
};
|
|
@@ -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
|
};
|