mp-front-cli 0.0.140 → 2.0.0-canary.0
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/errors/enrollment/error-catalog-enrollment.d.ts +1 -1
- package/dist/core/errors/error-catalog.d.ts +9 -9
- package/dist/core/errors/helpdesk/cancelPr.d.ts +1 -1
- package/dist/core/errors/helpdesk/index.d.ts +1 -1
- package/dist/core/errors/helpdesk/skipFingerprint.d.ts +1 -1
- package/dist/core/errors/index.d.ts +1 -1
- package/dist/core/errors/message-error.d.ts +3 -3
- package/dist/core/index.d.ts +5 -5
- package/dist/core/interfaces/api-response.d.ts +0 -1
- package/dist/core/interfaces/api-response.d.ts.map +1 -1
- package/dist/core/interfaces/index.d.ts +3 -3
- package/dist/core/middleware/index.d.ts +5 -5
- package/dist/core/services/index.d.ts +1 -1
- package/dist/core/services/service-token.d.ts +2 -2
- package/dist/core/utils/Terminal/constants/index.d.ts +1 -1
- package/dist/core/utils/Terminal/index.d.ts +3 -3
- package/dist/core/utils/api-request/fetch-service-be.d.ts +4 -4
- package/dist/core/utils/api-request/fetch-service-fe.d.ts +3 -3
- package/dist/core/utils/api-request/index.d.ts +2 -2
- package/dist/core/utils/custom-adapter.d.ts +1 -1
- package/dist/core/utils/custom-adapter.d.ts.map +1 -1
- package/dist/core/utils/custom-cache.d.ts +3 -3
- package/dist/core/utils/custom-encoder.d.ts +1 -1
- package/dist/core/utils/custom-encrypter.d.ts +1 -1
- package/dist/core/utils/custom-header.d.ts +2 -2
- package/dist/core/utils/custom-redis.d.ts +1 -1
- package/dist/core/utils/func/index.d.ts +1 -1
- package/dist/core/utils/index.d.ts +2 -2
- package/dist/core/utils/rxjs/index.d.ts +3 -3
- package/dist/core/utils/rxjs/loading-handler.d.ts +1 -1
- package/dist/core/utils/rxjs/message-handler.d.ts +2 -2
- package/dist/core/utils/rxjs/rx-subject-manager.d.ts +1 -1
- package/dist/fetch-service-fe-Bn43l_lH.js +1574 -0
- package/dist/index.d.ts +1 -1
- package/dist/lang/common/errors/calculator/index.d.ts +2 -2
- package/dist/lang/common/errors/enrollment/index.d.ts +2 -2
- package/dist/lang/common/errors/helpdesk/index.d.ts +2 -2
- package/dist/lang/common/errors/index.d.ts +2 -2
- package/dist/lang/common/index.d.ts +1 -1
- package/dist/lang/i18n.d.ts +1 -1
- package/dist/lang/index.d.ts +4 -4
- package/dist/lang/validator/index.d.ts +2 -2
- package/dist/loading-handler-Br21zGTA.js +46 -0
- package/dist/mp-front-cli-adapter.es.js +73 -84
- package/dist/mp-front-cli-all.es.js +11 -22
- package/dist/mp-front-cli-cache.es.js +33 -38
- package/dist/mp-front-cli-core.es.js +11 -1582
- package/dist/mp-front-cli-encoder.es.js +3535 -3537
- package/dist/mp-front-cli-encrypter.es.js +11 -14
- package/dist/mp-front-cli-header.es.js +13 -17
- package/dist/mp-front-cli-locale.es.js +1 -1
- package/dist/mp-front-cli-logger.es.js +1 -1
- package/dist/mp-front-cli-services.es.js +2 -4
- package/dist/mp-front-cli-utils-rxjs.es.js +3 -43
- package/dist/service-token-D8bum6H0.js +811 -0
- package/package.json +11 -11
- package/dist/index-def0b487.js +0 -844
- /package/dist/{custom-redis-bee66564.js → custom-redis-BMPP_XZi.js} +0 -0
- /package/dist/{i18n-3dcfe704.js → i18n-CniHhItS.js} +0 -0
- /package/dist/{stringify-788d71a0.js → stringify-93tp0umt.js} +0 -0
|
@@ -1,38 +1,35 @@
|
|
|
1
1
|
var o = Object.defineProperty;
|
|
2
2
|
var c = (r, e, t) => e in r ? o(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
-
var
|
|
4
|
-
import
|
|
3
|
+
var i = (r, e, t) => c(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import a from "node-jose";
|
|
5
5
|
import { createHash as E } from "crypto";
|
|
6
6
|
import { CustomEncoder as y } from "./mp-front-cli-encoder.es.js";
|
|
7
|
-
import "./mp-front-cli-logger.es.js";
|
|
8
7
|
const p = (r) => r.replace(/[\u00A0-\uffff]/gu, (e) => "\\u" + ("000" + e.charCodeAt(0).toString(16)).slice(-4));
|
|
9
|
-
class
|
|
8
|
+
class S extends y {
|
|
10
9
|
constructor() {
|
|
11
10
|
super(...arguments);
|
|
12
|
-
|
|
11
|
+
i(this, "signatureKey");
|
|
13
12
|
}
|
|
14
13
|
async generateKey() {
|
|
15
14
|
const t = process.env.SECRET_SIGNATURE;
|
|
16
15
|
if (!t)
|
|
17
16
|
throw new Error("Define a SECRET_SIGNATURE from `.env`");
|
|
18
|
-
this.signatureKey = await
|
|
17
|
+
this.signatureKey = await a.JWK.asKey({
|
|
19
18
|
kty: "oct",
|
|
20
|
-
k:
|
|
19
|
+
k: a.util.base64url.encode(t)
|
|
21
20
|
});
|
|
22
21
|
}
|
|
23
22
|
async encrypt(t) {
|
|
24
|
-
if (await this.generateKey(), !this.signatureKey)
|
|
25
|
-
throw new Error("PLEASE CREATE A KEY TO ENCRYPT 🙂");
|
|
23
|
+
if (await this.generateKey(), !this.signatureKey) throw new Error("PLEASE CREATE A KEY TO ENCRYPT 🙂");
|
|
26
24
|
const n = JSON.stringify(t), s = p(n);
|
|
27
|
-
return await
|
|
25
|
+
return await a.JWE.createEncrypt(
|
|
28
26
|
{ format: "compact" },
|
|
29
27
|
this.signatureKey
|
|
30
28
|
).update(s).final();
|
|
31
29
|
}
|
|
32
30
|
async decrypt(t) {
|
|
33
|
-
if (await this.generateKey(), !this.signatureKey)
|
|
34
|
-
|
|
35
|
-
const { payload: n } = await i.JWE.createDecrypt(
|
|
31
|
+
if (await this.generateKey(), !this.signatureKey) throw new Error("PLEASE CREATE A KEY TO DECRYPT 🙂");
|
|
32
|
+
const { payload: n } = await a.JWE.createDecrypt(
|
|
36
33
|
this.signatureKey
|
|
37
34
|
).decrypt(t);
|
|
38
35
|
return JSON.parse(n.toString());
|
|
@@ -51,5 +48,5 @@ class l extends y {
|
|
|
51
48
|
}
|
|
52
49
|
}
|
|
53
50
|
export {
|
|
54
|
-
|
|
51
|
+
S as CustomEncrypter
|
|
55
52
|
};
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var d = (r, t, e) => t in r ?
|
|
3
|
-
var
|
|
4
|
-
import { switchMap as
|
|
5
|
-
import { CustomEncrypter as
|
|
6
|
-
import { S as
|
|
7
|
-
|
|
8
|
-
import "crypto";
|
|
9
|
-
import "./mp-front-cli-encoder.es.js";
|
|
10
|
-
import "./mp-front-cli-logger.es.js";
|
|
11
|
-
class T extends m {
|
|
1
|
+
var p = Object.defineProperty;
|
|
2
|
+
var d = (r, t, e) => t in r ? p(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
|
3
|
+
var n = (r, t, e) => d(r, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { switchMap as a, of as o } from "rxjs";
|
|
5
|
+
import { CustomEncrypter as c } from "./mp-front-cli-encrypter.es.js";
|
|
6
|
+
import { S as u } from "./service-token-D8bum6H0.js";
|
|
7
|
+
class f extends c {
|
|
12
8
|
constructor(e = {}) {
|
|
13
9
|
super();
|
|
14
|
-
|
|
10
|
+
n(this, "headers");
|
|
15
11
|
this.headers = {
|
|
16
12
|
Accept: "application/json",
|
|
17
13
|
"Content-Type": "application/vnd.api+json",
|
|
@@ -19,18 +15,18 @@ class T extends m {
|
|
|
19
15
|
};
|
|
20
16
|
}
|
|
21
17
|
addTokenBackend(e) {
|
|
22
|
-
return this.logDebug("addTokenBackend CustomHeader", JSON.stringify(e)), new
|
|
23
|
-
|
|
18
|
+
return this.logDebug("addTokenBackend CustomHeader", JSON.stringify(e)), new u().get().pipe(
|
|
19
|
+
a((i) => o({ ...e, Authorization: `Bearer ${i}` }))
|
|
24
20
|
);
|
|
25
21
|
}
|
|
26
22
|
getHeaders(e = {}, i = !0) {
|
|
27
23
|
return this.logDebug("getHeaders CustomHeader"), i ? this.addTokenBackend(e).pipe(
|
|
28
|
-
|
|
24
|
+
a((s) => o({ ...s, ...this.headers }))
|
|
29
25
|
) : o(e).pipe(
|
|
30
|
-
|
|
26
|
+
a((s) => o({ ...s, ...this.headers }))
|
|
31
27
|
);
|
|
32
28
|
}
|
|
33
29
|
}
|
|
34
30
|
export {
|
|
35
|
-
|
|
31
|
+
f as CustomHeader
|
|
36
32
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var n = Object.defineProperty;
|
|
2
2
|
var l = (r, o, t) => o in r ? n(r, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[o] = t;
|
|
3
|
-
var s = (r, o, t) =>
|
|
3
|
+
var s = (r, o, t) => l(r, typeof o != "symbol" ? o + "" : o, t);
|
|
4
4
|
var g = /* @__PURE__ */ ((r) => (r[r.error = 0] = "error", r[r.warn = 1] = "warn", r[r.info = 2] = "info", r[r.http = 3] = "http", r[r.verbose = 4] = "verbose", r[r.debug = 5] = "debug", r[r.silly = 6] = "silly", r))(g || {});
|
|
5
5
|
const a = {
|
|
6
6
|
error: "\x1B[31m",
|
|
@@ -1,46 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
var o = (n, s, t) => s in n ? j(n, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[s] = t;
|
|
3
|
-
var u = (n, s, t) => (o(n, typeof s != "symbol" ? s + "" : s, t), t);
|
|
4
|
-
import { Observable as p, Subject as i } from "rxjs";
|
|
5
|
-
class a extends p {
|
|
6
|
-
constructor() {
|
|
7
|
-
super((t) => {
|
|
8
|
-
this.subject$.subscribe(t);
|
|
9
|
-
});
|
|
10
|
-
u(this, "subject$", new i());
|
|
11
|
-
}
|
|
12
|
-
setSubject(t) {
|
|
13
|
-
this.subject$.next(t);
|
|
14
|
-
}
|
|
15
|
-
completeSubject() {
|
|
16
|
-
this.subject$.complete();
|
|
17
|
-
}
|
|
18
|
-
unsubscribeSubject() {
|
|
19
|
-
return this.subject$.unsubscribe(), this.subject$ = new i(), this.subject$;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
const e = class e extends a {
|
|
23
|
-
constructor() {
|
|
24
|
-
super();
|
|
25
|
-
}
|
|
26
|
-
static getInstance() {
|
|
27
|
-
return e.instance || (e.instance = new e()), e.instance;
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
u(e, "instance");
|
|
31
|
-
let b = e;
|
|
32
|
-
const c = class c extends a {
|
|
33
|
-
constructor() {
|
|
34
|
-
super();
|
|
35
|
-
}
|
|
36
|
-
static getInstance() {
|
|
37
|
-
return c.instance || (c.instance = new c()), c.instance;
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
u(c, "instance");
|
|
41
|
-
let r = c;
|
|
1
|
+
import { L as r, M as s, R as n } from "./loading-handler-Br21zGTA.js";
|
|
42
2
|
export {
|
|
43
3
|
r as LoadingHandler,
|
|
44
|
-
|
|
45
|
-
|
|
4
|
+
s as MessageHandler,
|
|
5
|
+
n as RxSubjectManager
|
|
46
6
|
};
|