mp-front-cli 0.0.90 → 0.0.92

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.
@@ -1 +1 @@
1
- {"version":3,"file":"error-catalog.d.ts","sourceRoot":"","sources":["../../../src/core/errors/error-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAA;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AA0rBrD,qBAAa,YAAa,SAAQ,YAAY;IAC5C,GAAG,CACD,KAAK,GAAE,MAAM,GAAG,KAAK,GAAG,QAAoB,EAC5C,IAAI,GAAE,MAAoB;;;;;;;;;;;CA8B7B"}
1
+ {"version":3,"file":"error-catalog.d.ts","sourceRoot":"","sources":["../../../src/core/errors/error-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAA;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAstBrD,qBAAa,YAAa,SAAQ,YAAY;IAC5C,GAAG,CACD,KAAK,GAAE,MAAM,GAAG,KAAK,GAAG,QAAoB,EAC5C,IAAI,GAAE,MAAoB;;;;;;;;;;;CA8B7B"}
@@ -0,0 +1,2 @@
1
+ export declare const TIMEOUT_SESSION_MINUTES: number;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/core/utils/Terminal/constants/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,QAAsC,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { ITerminal } from "./interfaces";
2
+ import { CustomEncrypter } from "../custom-encrypter";
3
+ declare class Terminal extends CustomEncrypter {
4
+ private readonly redisCacheHandler;
5
+ private getIdApi;
6
+ saveTerminalData(keySeller: string, terminal: ITerminal): Promise<string>;
7
+ getTerminalData(keySeller: string): Promise<ITerminal | null>;
8
+ deleteTerminalData(keySeller: string): Promise<void>;
9
+ }
10
+ export default Terminal;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/Terminal/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAOrD,cAAM,QAAS,SAAQ,eAAe;IACpC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAsC;IAExE,OAAO,CAAC,QAAQ,CAGf;IAEK,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS;IASvD,eAAe,CAAC,SAAS,EAAE,MAAM;IAajC,kBAAkB,CAAC,SAAS,EAAE,MAAM;CAM3C;AAED,eAAe,QAAQ,CAAA"}
@@ -0,0 +1,7 @@
1
+ export interface ITerminal {
2
+ keyStore: string;
3
+ descriptionStore: string;
4
+ sapCenter: string;
5
+ hasMultipleTerminals: boolean;
6
+ }
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/core/utils/Terminal/interfaces/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,gBAAgB,EAAE,MAAM,CAAA;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,oBAAoB,EAAE,OAAO,CAAA;CAC9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"custom-adapter.d.ts","sourceRoot":"","sources":["../../../src/core/utils/custom-adapter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,OAAO,EAIR,MAAM,oBAAoB,CAAA;AAO3B,MAAM,WAAW,qBAAqB;IACpC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,MAAM,EAAE,MAAM,CAAA;CACf;AAED,eAAO,MAAM,cAAc,EAAE,qBAU5B,CAAA;AAgBD,wBAAgB,cAAc,CAC5B,OAAO,GAAE,qBAAgE,GACxE,OAAO,CAmOT"}
1
+ {"version":3,"file":"custom-adapter.d.ts","sourceRoot":"","sources":["../../../src/core/utils/custom-adapter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,OAAO,EAIR,MAAM,oBAAoB,CAAA;AAW3B,MAAM,WAAW,qBAAqB;IACpC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,MAAM,EAAE,MAAM,CAAA;CACf;AAED,eAAO,MAAM,cAAc,EAAE,qBAU5B,CAAA;AAgBD,wBAAgB,cAAc,CAC5B,OAAO,GAAE,qBAAgE,GACxE,OAAO,CAmRT"}
@@ -0,0 +1,89 @@
1
+ var a = Object.defineProperty;
2
+ var p = (n, r, t) => r in n ? a(n, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[r] = t;
3
+ var h = (n, r, t) => (p(n, typeof r != "symbol" ? r + "" : r, t), t);
4
+ import { CustomEncrypter as y } from "./mp-front-cli-encrypter.es.js";
5
+ import d from "ioredis";
6
+ const u = process.env.REDIS_HOST, C = process.env.REDIS_PORT, m = process.env.REDIS_USER, _ = process.env.REDIS_PASS, H = new d({
7
+ host: u,
8
+ port: C,
9
+ username: m,
10
+ password: _,
11
+ tls: {}
12
+ }), R = process.env.TIMEOUT_SESSION_MINUTES;
13
+ var T = /* @__PURE__ */ ((n) => (n.NOT_REFRESH = "NOT_REFRESH", n.REFRESH = "REFRESH", n))(T || {});
14
+ class O extends y {
15
+ constructor() {
16
+ super(...arguments);
17
+ h(this, "initClient", H);
18
+ }
19
+ getRootNode(t) {
20
+ return this.initClient.get(t);
21
+ }
22
+ async getEntryPoint(t) {
23
+ try {
24
+ return await this.getRootNode(t);
25
+ } catch {
26
+ throw new Error("Not found entry point");
27
+ }
28
+ }
29
+ setEntryPoint(t, e, s) {
30
+ const i = typeof e == "string" ? e : JSON.stringify(e);
31
+ this.initClient.set(t, i, "EX", 60 * s);
32
+ }
33
+ async getRedisState(t, e) {
34
+ const s = `${t}:${this.generateSHA(e)}`, i = await this.getEntryPoint(s), c = await this.isEncrypted(i) ? await this.decrypt(i ?? "") : JSON.parse(i), o = Number(c == null ? void 0 : c.expires_in);
35
+ return o > 0 && this.ttl(s, o * 60), { sha: s, data: c };
36
+ }
37
+ async deleteRedisState(t, e) {
38
+ const s = `${t}:${this.generateSHA(e)}`;
39
+ this.initClient.del(s);
40
+ }
41
+ async setRedisState({
42
+ idApi: t,
43
+ idData: e,
44
+ body: s,
45
+ expire: i,
46
+ encrypted: E = !1,
47
+ refresh: c = "REFRESH"
48
+ /* REFRESH */
49
+ }) {
50
+ const o = `${t}:${this.generateSHA(e)}`, S = { expires_in: c === "REFRESH" ? i : 0, ...s };
51
+ if (E) {
52
+ const l = await this.encrypt(S);
53
+ return this.setEntryPoint(o, l, i), o;
54
+ }
55
+ return this.setEntryPoint(o, S, i), o;
56
+ }
57
+ async statusHost() {
58
+ return new Promise((t, e) => {
59
+ this.initClient.on("error", (s) => {
60
+ this.killRedis(), e(s);
61
+ }), this.initClient.on("connect", () => {
62
+ t("success");
63
+ });
64
+ });
65
+ }
66
+ killRedis() {
67
+ this.initClient.disconnect();
68
+ }
69
+ deleteKey(t) {
70
+ this.initClient.del(t);
71
+ }
72
+ ttl(t, e) {
73
+ this.initClient.expire(t, e);
74
+ }
75
+ simpleGet(t) {
76
+ return this.ttl(t, R * 60), this.initClient.get(t);
77
+ }
78
+ simpleHGet(t, e) {
79
+ return this.ttl(t, R * 60), this.initClient.hget(t, e);
80
+ }
81
+ simpleHSet(t, e, s) {
82
+ return this.initClient.hset(t, e, s);
83
+ }
84
+ }
85
+ export {
86
+ O as C,
87
+ T as R,
88
+ H as a
89
+ };
@@ -515,7 +515,7 @@ const e = {
515
515
  },
516
516
  //TERMINOS Y CONDICIONES
517
517
  "COMMUNICATIONS-INVALIDCODEEXCEPTION-001": {
518
- title: "Código incorrecto.",
518
+ title: "Código incorrecto",
519
519
  message: "Código invalido, por favor de generar uno nuevo"
520
520
  },
521
521
  "COMMUNICATIONS-INVALIDEXPIRATIONDATEEXCEPTION-001": {
@@ -526,6 +526,22 @@ const e = {
526
526
  title: "El código ya fue canjeado.",
527
527
  message: "Código invalido, por favor de generar uno nuevo"
528
528
  },
529
+ "COMMUNICATIONS-BLACKLISTEXCEPTION-001": {
530
+ title: "Por favor de intentar con otro número telefónico",
531
+ message: "El número telefónico se encuentra en listas negras"
532
+ },
533
+ "COMMUNICATIONS-INVALIDNUMBEREXCEPTION-003": {
534
+ title: "Número de teléfono inválido",
535
+ message: "Por favor de revisar el número de teléfono"
536
+ },
537
+ "COMMUNICATIONS-INVALIDNUMBEREXCEPTION-004": {
538
+ title: "No se encontró el número de teléfono",
539
+ message: "Por favor de revisar el número de teléfono"
540
+ },
541
+ "COMMUNICATIONS-INVALIDNUMBEREXCEPTION-005": {
542
+ title: "El número ya está registrado",
543
+ message: "Por favor ingresa otro número de teléfono"
544
+ },
529
545
  //ENROLLMENT
530
546
  ...o.enrollment,
531
547
  //Personal References
@@ -292,6 +292,22 @@ declare const translation: {
292
292
  title: string;
293
293
  message: string;
294
294
  };
295
+ "COMMUNICATIONS-BLACKLISTEXCEPTION-001": {
296
+ title: string;
297
+ message: string;
298
+ };
299
+ "COMMUNICATIONS-INVALIDNUMBEREXCEPTION-003": {
300
+ title: string;
301
+ message: string;
302
+ };
303
+ "COMMUNICATIONS-INVALIDNUMBEREXCEPTION-004": {
304
+ title: string;
305
+ message: string;
306
+ };
307
+ "COMMUNICATIONS-INVALIDNUMBEREXCEPTION-005": {
308
+ title: string;
309
+ message: string;
310
+ };
295
311
  calculator: {
296
312
  "SCORE-CLIENTREJECTED-01": {
297
313
  title: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lang/common/errors/es_MX/index.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0NhB,CAAA;AAED,eAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lang/common/errors/es_MX/index.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0OhB,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -1,31 +1,67 @@
1
- import { C as Z } from "./custom-redis-bee66564.js";
2
- import { u as $ } from "./stringify-788d71a0.js";
1
+ var W = Object.defineProperty;
2
+ var Y = (a, s, r) => s in a ? W(a, s, { enumerable: !0, configurable: !0, writable: !0, value: r }) : a[s] = r;
3
+ var A = (a, s, r) => (Y(a, typeof s != "symbol" ? s + "" : s, r), r);
4
+ import { C as R, a as ee } from "./custom-cache-8c806250.js";
5
+ import { CustomEncrypter as te } from "./mp-front-cli-encrypter.es.js";
6
+ import { u as ne, a as se } from "./v5-cbd101aa.js";
3
7
  import "ioredis";
4
- let x;
5
- const v = new Uint8Array(16);
6
- function C() {
7
- if (!x && (x = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !x))
8
+ import "node-jose";
9
+ import "crypto";
10
+ import "./mp-front-cli-encoder.es.js";
11
+ import "./mp-front-cli-logger.es.js";
12
+ let K;
13
+ const re = new Uint8Array(16);
14
+ function ie() {
15
+ if (!K && (K = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !K))
8
16
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
9
- return x(v);
17
+ return K(re);
10
18
  }
11
- const G = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), A = {
12
- randomUUID: G
19
+ const ae = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), B = {
20
+ randomUUID: ae
13
21
  };
14
- function H(c, s, r) {
15
- if (A.randomUUID && !s && !c)
16
- return A.randomUUID();
17
- c = c || {};
18
- const i = c.random || (c.rng || C)();
22
+ function oe(a, s, r) {
23
+ if (B.randomUUID && !s && !a)
24
+ return B.randomUUID();
25
+ a = a || {};
26
+ const i = a.random || (a.rng || ie)();
19
27
  if (i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, s) {
20
28
  r = r || 0;
21
- for (let u = 0; u < 16; ++u)
22
- s[r + u] = i[u];
29
+ for (let y = 0; y < 16; ++y)
30
+ s[r + y] = i[y];
23
31
  return s;
24
32
  }
25
- return $(i);
33
+ return ne(i);
26
34
  }
27
- const L = process.env.PREFIX_LOGIN, B = process.env.TIMEOUT_SESSION_MINUTES, q = {
28
- baseKeyPrefix: `${L}:`,
35
+ const ce = process.env.TIMEOUT_SESSION_MINUTES, ue = "619abad7-0dea-46c5-aa49-fc1ec872a684", de = "PF:TERMINAL:", O = "TERMINAL";
36
+ class ye extends te {
37
+ constructor() {
38
+ super(...arguments);
39
+ A(this, "redisCacheHandler", new R());
40
+ A(this, "getIdApi", (r) => {
41
+ const i = se(r, ue);
42
+ return `${de}${i}`;
43
+ });
44
+ }
45
+ async saveTerminalData(r, i) {
46
+ return this.redisCacheHandler.setRedisState({
47
+ idApi: this.getIdApi(r),
48
+ idData: O,
49
+ body: i,
50
+ expire: ce
51
+ });
52
+ }
53
+ async getTerminalData(r) {
54
+ return this.redisCacheHandler.getRedisState(this.getIdApi(r), O).then(({ data: i }) => (this.logDebug("getTerminal", JSON.stringify(i)), i)).catch((i) => (this.logError("Error getTerminal", JSON.stringify(i)), null));
55
+ }
56
+ async deleteTerminalData(r) {
57
+ return this.redisCacheHandler.deleteRedisState(
58
+ this.getIdApi(r),
59
+ O
60
+ );
61
+ }
62
+ }
63
+ const d = process.env.PREFIX_LOGIN, b = process.env.TIMEOUT_SESSION_MINUTES, c = new R(), le = {
64
+ baseKeyPrefix: `${d}:`,
29
65
  userKeyPrefix: "user:",
30
66
  accountKeyPrefix: "account:",
31
67
  accountByUserIdPrefix: "account:user:",
@@ -33,142 +69,153 @@ const L = process.env.PREFIX_LOGIN, B = process.env.TIMEOUT_SESSION_MINUTES, q =
33
69
  sessionByUserIdPrefix: "session:user:",
34
70
  userByEmailKeyPrefix: "user:email:",
35
71
  verificationKeyPrefix: "verification:",
36
- expire: B * 60
37
- }, z = (c) => {
38
- for (const s in c)
72
+ expire: b * 60
73
+ }, fe = (a) => {
74
+ for (const s in a)
39
75
  return !1;
40
76
  return !0;
41
- }, J = /(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/, Q = (c) => c && J.test(c) && !Number.isNaN(Date.parse(c));
42
- function te(c = { expire: B * 60 }) {
43
- const s = Z, r = {
44
- ...q,
45
- ...c
46
- }, i = r.baseKeyPrefix || "", u = i + r.userKeyPrefix, b = i + r.userByEmailKeyPrefix, k = i + r.accountKeyPrefix, T = i + r.accountByUserIdPrefix, D = i + r.sessionKeyPrefix, V = i + r.sessionByUserIdPrefix, j = i + r.verificationKeyPrefix, U = (e) => b + e, p = (e) => u + e, K = (e) => k + e, f = (e) => T + e, m = (e, t) => `${t}:${e}`, I = (e) => D + e, l = (e) => V + e, g = (e) => j + e, w = async (e, t) => {
47
- const n = Object.entries(t).reduce((o, [S, a]) => (o[S] = a instanceof Date ? a.toISOString() : a, o), {});
77
+ }, we = /(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/, me = (a) => a && we.test(a) && !Number.isNaN(Date.parse(a));
78
+ function he(a = { expire: b * 60 }) {
79
+ const s = ee, r = {
80
+ ...le,
81
+ ...a
82
+ }, i = r.baseKeyPrefix || "", y = i + r.userKeyPrefix, k = i + r.userByEmailKeyPrefix, C = i + r.accountKeyPrefix, M = i + r.accountByUserIdPrefix, V = i + r.sessionKeyPrefix, _ = i + r.sessionByUserIdPrefix, j = i + r.verificationKeyPrefix, U = (e) => k + e, x = (e) => y + e, S = (e) => C + e, I = (e) => M + e, w = (e, t) => `${t}:${e}`, E = (e) => V + e, g = (e) => _ + e, P = (e) => j + e, p = async (e, t) => {
83
+ const n = Object.entries(t).reduce((o, [f, u]) => (o[f] = u instanceof Date ? u.toISOString() : u, o), {});
48
84
  await s.hset(e, n), await s.expire(e, r.expire);
49
- }, y = async (e) => {
85
+ }, m = async (e) => {
50
86
  const t = await s.hgetall(e);
51
- return !t || z(t) ? null : Object.entries(t).reduce((o, [S, a]) => (o[S] = Q(a) ? new Date(a) : a, o), {});
52
- }, E = async (e, t) => (await w(p(e), t), t.email && await s.set(
87
+ return !t || fe(t) ? null : Object.entries(t).reduce((o, [f, u]) => (o[f] = me(u) ? new Date(u) : u, o), {});
88
+ }, D = async (e, t) => (await p(x(e), t), t.email && await s.set(
53
89
  U(t.email),
54
90
  e,
55
91
  "EX",
56
92
  r.expire
57
- ), t), d = async (e) => {
58
- const t = await y(p(e));
93
+ ), t), l = async (e) => {
94
+ const t = await m(x(e));
59
95
  return t ? { ...t } : null;
60
- }, N = async (e, t) => {
61
- const n = K(e);
62
- await w(n, t), await s.set(
63
- f(t.userId),
96
+ }, H = async (e, t) => {
97
+ const n = S(e);
98
+ await p(n, t), await s.set(
99
+ I(t.userId),
64
100
  n,
65
101
  "EX",
66
102
  r.expire
67
103
  );
68
- }, R = async (e) => {
69
- const t = await y(K(e));
104
+ }, T = async (e) => {
105
+ const t = await m(S(e));
70
106
  return t ? { ...t } : null;
71
- }, h = async (e) => {
72
- const t = K(e), n = await y(t);
107
+ }, G = async (e) => {
108
+ const t = S(e), n = await m(t);
73
109
  if (!n)
74
110
  return null;
75
- await s.hdel(t), await s.del(f(n.userId));
76
- }, O = async (e, t) => {
77
- const n = I(e);
78
- return await w(n, t), await s.set(
79
- l(t.userId),
111
+ await s.hdel(t), await s.del(I(n.userId));
112
+ }, N = async (e, t) => {
113
+ const n = E(e);
114
+ return await p(n, t), await s.set(
115
+ g(t.userId),
80
116
  n,
81
117
  "EX",
82
118
  r.expire
83
119
  ), t;
84
- }, P = async (e) => {
85
- const t = await y(I(e));
120
+ }, h = async (e) => {
121
+ const t = await m(E(e));
86
122
  return t ? {
87
123
  id: t.id,
88
124
  ...t
89
125
  } : null;
90
- }, _ = async (e) => {
91
- const t = await P(e);
126
+ }, X = async (e) => {
127
+ const t = await h(e);
92
128
  if (!t)
93
129
  return null;
94
- const n = I(e);
95
- await s.del(n), await s.del(l(t.userId));
96
- }, X = async (e, t) => {
97
- const n = g(e);
98
- return await w(n, t), t;
99
- }, M = async (e) => {
100
- const t = g(e), n = await y(t);
130
+ const n = E(e);
131
+ await s.del(n), await s.del(g(t.userId));
132
+ }, F = async (e, t) => {
133
+ const n = P(e);
134
+ return await p(n, t), t;
135
+ }, L = async (e) => {
136
+ const t = P(e), n = await m(t);
101
137
  return n ? { identifier: n.identifier, ...n } : null;
102
- }, F = async (e) => {
103
- const t = g(e);
138
+ }, Z = async (e) => {
139
+ const t = P(e);
104
140
  await s.del(t);
141
+ }, v = async (e, t) => {
142
+ const n = await T(w(e, t)), o = await c.simpleGet(
143
+ `${d}:account:user:${n == null ? void 0 : n.userId}`
144
+ ) ?? "", f = `${d}:user:${n == null ? void 0 : n.userId}`, u = await c.simpleHGet(f, "email") ?? "", $ = await c.simpleHGet(o, "cveUsuario") ?? "", J = `${d}:account:user:${n == null ? void 0 : n.userId}`, z = `${d}:session:user:${n == null ? void 0 : n.userId}`, q = await c.simpleGet(
145
+ `${d}:session:user:${n == null ? void 0 : n.userId}`
146
+ ) ?? "", Q = `${d}:user:email:${u}`;
147
+ await c.deleteKey(o), await c.deleteKey(J), await c.deleteKey(z), await c.deleteKey(q), await c.deleteKey(Q), await c.deleteKey(f), await c.deleteKey($), await new ye().deleteTerminalData($);
105
148
  };
106
149
  return {
107
150
  async createUser(e) {
108
- const t = H();
109
- return await E(t, { ...e, id: t });
151
+ const t = oe();
152
+ return await D(t, { ...e, id: t });
110
153
  },
111
- getUser: d,
154
+ getUser: l,
112
155
  async getUserByEmail(e) {
113
156
  const t = await s.get(U(e));
114
- return t ? await d(t) : null;
157
+ return t ? await l(t) : null;
115
158
  },
116
159
  async getUserByAccount({ providerAccountId: e, provider: t }) {
117
- const n = await R(
118
- m(e, t)
160
+ const n = await T(
161
+ w(e, t)
119
162
  );
120
- return n ? await d(n.userId) : null;
163
+ console.log("🚀 ~ getUserByAccount ~ account:", n), n && await v(e, t);
164
+ const o = await T(
165
+ w(e, t)
166
+ );
167
+ return console.log("🚀 ~ getUserByAccount ~ account:", o), o ? await l(o.userId) : null;
121
168
  },
122
169
  async updateUser(e) {
123
- const t = e.id, n = await d(t);
124
- return await E(t, { ...n, ...e });
170
+ const t = e.id, n = await l(t);
171
+ return await D(t, { ...n, ...e });
125
172
  },
126
173
  async deleteUser(e) {
127
- const t = await d(e);
174
+ const t = await l(e);
128
175
  if (!t)
129
176
  return null;
130
- const n = await s.get(f(e)), o = await s.get(l(e));
177
+ const n = await s.get(I(e)), o = await s.get(g(e));
131
178
  await s.del(
132
179
  U(t.email),
133
- f(e),
134
- l(e)
135
- ), o && await s.del(o), n && await s.del(n), await s.del(p(e));
180
+ I(e),
181
+ g(e)
182
+ ), o && await s.del(o), n && await s.del(n), await s.del(x(e));
136
183
  },
137
184
  async linkAccount(e) {
138
- const t = m(e.providerAccountId, e.provider);
139
- return await N(t, { ...e, id: t });
185
+ const t = w(e.providerAccountId, e.provider);
186
+ return await H(t, { ...e, id: t });
140
187
  },
141
188
  async unlinkAccount({ providerAccountId: e, provider: t }) {
142
- const n = m(e, t);
143
- await h(n);
189
+ const n = w(e, t);
190
+ await G(n);
144
191
  },
145
192
  async createSession(e) {
146
193
  const t = e.sessionToken;
147
- return await O(t, { ...e, id: t });
194
+ return await N(t, { ...e, id: t });
148
195
  },
149
196
  async getSessionAndUser(e) {
150
- const n = await P(e);
197
+ const n = await h(e);
151
198
  if (!n)
152
199
  return null;
153
- const o = await d(n.userId);
200
+ const o = await l(n.userId);
154
201
  return o ? { session: n, user: o } : null;
155
202
  },
156
203
  async updateSession(e) {
157
- const t = e.sessionToken, n = await P(t);
158
- return n ? await O(t, { ...n, ...e }) : null;
204
+ const t = e.sessionToken, n = await h(t);
205
+ return n ? await N(t, { ...n, ...e }) : null;
159
206
  },
160
- deleteSession: _,
207
+ deleteSession: X,
161
208
  async createVerificationToken(e) {
162
209
  const t = e.identifier;
163
- return await X(t, e), e;
210
+ return await F(t, e), e;
164
211
  },
165
212
  async useVerificationToken(e) {
166
- const t = e.identifier, n = await M(t);
167
- return !n || e.token !== n.token ? null : (await F(t), n);
213
+ const t = e.identifier, n = await L(t);
214
+ return !n || e.token !== n.token ? null : (await Z(t), n);
168
215
  }
169
216
  };
170
217
  }
171
218
  export {
172
- te as IORedisAdapter,
173
- q as defaultOptions
219
+ he as IORedisAdapter,
220
+ le as defaultOptions
174
221
  };
@@ -2,7 +2,7 @@ import { ApiMiddleware as g, ErrorCatalog as l, FetchServiceBE as x, FetchServic
2
2
  import { LoadingHandler as v, MessageHandler as E, RxSubjectManager as F } from "./mp-front-cli-utils-rxjs.es.js";
3
3
  import { S as h } from "./index-def0b487.js";
4
4
  import "i18next";
5
- import "./index-d4f88744.js";
5
+ import "./index-21452318.js";
6
6
  import "./mp-front-cli-logger.es.js";
7
7
  import "rxjs";
8
8
  import "./mp-front-cli-encrypter.es.js";
@@ -10,7 +10,7 @@ import "node-jose";
10
10
  import "crypto";
11
11
  import "./mp-front-cli-encoder.es.js";
12
12
  import "./mp-front-cli-header.es.js";
13
- import "./stringify-788d71a0.js";
13
+ import "./v5-cbd101aa.js";
14
14
  export {
15
15
  g as ApiMiddleware,
16
16
  l as ErrorCatalog,
@@ -1,87 +1,11 @@
1
- var p = Object.defineProperty;
2
- var S = (n, r, t) => r in n ? p(n, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[r] = t;
3
- var E = (n, r, t) => (S(n, typeof r != "symbol" ? r + "" : r, t), t);
4
- import { CustomEncrypter as m } from "./mp-front-cli-encrypter.es.js";
5
- import { C as R } from "./custom-redis-bee66564.js";
1
+ import "./mp-front-cli-encrypter.es.js";
2
+ import { C as s, R as C } from "./custom-cache-8c806250.js";
6
3
  import "node-jose";
7
4
  import "crypto";
8
5
  import "./mp-front-cli-encoder.es.js";
9
6
  import "./mp-front-cli-logger.es.js";
10
7
  import "ioredis";
11
- const a = process.env.TIMEOUT_SESSION_MINUTES;
12
- var d = /* @__PURE__ */ ((n) => (n.NOT_REFRESH = "NOT_REFRESH", n.REFRESH = "REFRESH", n))(d || {});
13
- class O extends m {
14
- constructor() {
15
- super(...arguments);
16
- E(this, "initClient", R);
17
- }
18
- getRootNode(t) {
19
- return this.initClient.get(t);
20
- }
21
- async getEntryPoint(t) {
22
- try {
23
- return await this.getRootNode(t);
24
- } catch {
25
- throw new Error("Not found entry point");
26
- }
27
- }
28
- setEntryPoint(t, i, e) {
29
- const s = typeof i == "string" ? i : JSON.stringify(i);
30
- this.initClient.set(t, s, "EX", 60 * e);
31
- }
32
- async getRedisState(t, i) {
33
- const e = `${t}:${this.generateSHA(i)}`, s = await this.getEntryPoint(e), c = await this.isEncrypted(s) ? await this.decrypt(s ?? "") : JSON.parse(s), o = Number(c == null ? void 0 : c.expires_in);
34
- return o > 0 && this.ttl(e, o * 60), { sha: e, data: c };
35
- }
36
- async deleteRedisState(t, i) {
37
- const e = `${t}:${this.generateSHA(i)}`;
38
- this.initClient.del(e);
39
- }
40
- async setRedisState({
41
- idApi: t,
42
- idData: i,
43
- body: e,
44
- expire: s,
45
- encrypted: h = !1,
46
- refresh: c = "REFRESH"
47
- /* REFRESH */
48
- }) {
49
- const o = `${t}:${this.generateSHA(i)}`, l = { expires_in: c === "REFRESH" ? s : 0, ...e };
50
- if (h) {
51
- const y = await this.encrypt(l);
52
- return this.setEntryPoint(o, y, s), o;
53
- }
54
- return this.setEntryPoint(o, l, s), o;
55
- }
56
- async statusHost() {
57
- return new Promise((t, i) => {
58
- this.initClient.on("error", (e) => {
59
- this.killRedis(), i(e);
60
- }), this.initClient.on("connect", () => {
61
- t("success");
62
- });
63
- });
64
- }
65
- killRedis() {
66
- this.initClient.disconnect();
67
- }
68
- deleteKey(t) {
69
- this.initClient.del(t);
70
- }
71
- ttl(t, i) {
72
- this.initClient.expire(t, i);
73
- }
74
- simpleGet(t) {
75
- return this.ttl(t, a * 60), this.initClient.get(t);
76
- }
77
- simpleHGet(t, i) {
78
- return this.ttl(t, a * 60), this.initClient.hget(t, i);
79
- }
80
- simpleHSet(t, i, e) {
81
- return this.initClient.hset(t, i, e);
82
- }
83
- }
84
8
  export {
85
- O as CustomCache,
86
- d as RefreshState
9
+ s as CustomCache,
10
+ C as RefreshState
87
11
  };
@@ -1,29 +1,29 @@
1
- var f = Object.defineProperty;
2
- var y = (E, t, e) => t in E ? f(E, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : E[t] = e;
3
- var L = (E, t, e) => (y(E, typeof t != "symbol" ? t + "" : t, e), e);
4
- import { LoadingHandler as g, MessageHandler as B } from "./mp-front-cli-utils-rxjs.es.js";
5
- import { RxSubjectManager as ce } from "./mp-front-cli-utils-rxjs.es.js";
6
- import { f as S } from "./index-def0b487.js";
7
- import { S as Ce } from "./index-def0b487.js";
8
- import v, { t as C } from "i18next";
9
- import { t as Q } from "./index-d4f88744.js";
10
- import { CustomLogger as h } from "./mp-front-cli-logger.es.js";
11
- import { of as N, switchMap as O, forkJoin as M, catchError as I, EMPTY as d, filter as w } from "rxjs";
12
- import { CustomEncrypter as V } from "./mp-front-cli-encrypter.es.js";
13
- import { CustomHeader as x } from "./mp-front-cli-header.es.js";
14
- import { CustomEncoder as F } from "./mp-front-cli-encoder.es.js";
15
- import { u as Y } from "./stringify-788d71a0.js";
1
+ var c = Object.defineProperty;
2
+ var n = (N, s, e) => s in N ? c(N, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : N[s] = e;
3
+ var T = (N, s, e) => (n(N, typeof s != "symbol" ? s + "" : s, e), e);
4
+ import { LoadingHandler as i, MessageHandler as g } from "./mp-front-cli-utils-rxjs.es.js";
5
+ import { RxSubjectManager as z } from "./mp-front-cli-utils-rxjs.es.js";
6
+ import { f as U } from "./index-def0b487.js";
7
+ import { S as ee } from "./index-def0b487.js";
8
+ import d, { t as m } from "i18next";
9
+ import { t as P } from "./index-21452318.js";
10
+ import { CustomLogger as B } from "./mp-front-cli-logger.es.js";
11
+ import { of as o, switchMap as R, forkJoin as S, catchError as I, EMPTY as C, filter as M } from "rxjs";
12
+ import { CustomEncrypter as u } from "./mp-front-cli-encrypter.es.js";
13
+ import { CustomHeader as p } from "./mp-front-cli-header.es.js";
14
+ import { CustomEncoder as y } from "./mp-front-cli-encoder.es.js";
15
+ import { a as D } from "./v5-cbd101aa.js";
16
16
  import "node-jose";
17
17
  import "crypto";
18
- const H = {
18
+ const v = {
19
19
  es: {
20
20
  translation: {
21
- ...Q
21
+ ...P
22
22
  }
23
23
  }
24
24
  };
25
- v.init({
26
- resources: H,
25
+ d.init({
26
+ resources: v,
27
27
  lng: "es",
28
28
  // language to use, more information here: https://www.i18next.com/overview/configuration-options#languages-namespaces-resources
29
29
  // you can use the i18n.changeLanguage function to change the language manually: https://www.i18next.com/overview/api#changelanguage
@@ -35,7 +35,7 @@ v.init({
35
35
  },
36
36
  debug: !1
37
37
  });
38
- const G = {
38
+ const Q = {
39
39
  "ENROLLMENT-INVALIDCONFIGURATION-0000": {
40
40
  code: 400,
41
41
  type: "modal",
@@ -260,7 +260,7 @@ const G = {
260
260
  title: "errors.ENROLLMENT-INVALIDTOKENTRUSTONICSUPPLIER-0031.title",
261
261
  level: "error"
262
262
  }
263
- }, m = {
263
+ }, L = {
264
264
  "MP-001": {
265
265
  code: 400,
266
266
  type: "modal",
@@ -354,6 +354,34 @@ const G = {
354
354
  type: "modal",
355
355
  level: "warning"
356
356
  },
357
+ "COMMUNICATIONS-BLACKLISTEXCEPTION-001": {
358
+ title: "errors.COMMUNICATIONS-BLACKLISTEXCEPTION-001.title",
359
+ message: "errors.COMMUNICATIONS-BLACKLISTEXCEPTION-001.message",
360
+ code: 403,
361
+ type: "modal",
362
+ level: "warning"
363
+ },
364
+ "COMMUNICATIONS-INVALIDNUMBEREXCEPTION-003": {
365
+ title: "errors.COMMUNICATIONS-INVALIDNUMBEREXCEPTION-003.title",
366
+ message: "errors.COMMUNICATIONS-INVALIDNUMBEREXCEPTION-003.message",
367
+ code: 400,
368
+ type: "modal",
369
+ level: "warning"
370
+ },
371
+ "COMMUNICATIONS-INVALIDNUMBEREXCEPTION-004": {
372
+ title: "errors.COMMUNICATIONS-INVALIDNUMBEREXCEPTION-004.title",
373
+ message: "errors.COMMUNICATIONS-INVALIDNUMBEREXCEPTION-004.message",
374
+ code: 400,
375
+ type: "modal",
376
+ level: "warning"
377
+ },
378
+ "COMMUNICATIONS-INVALIDNUMBEREXCEPTION-005": {
379
+ title: "errors.COMMUNICATIONS-INVALIDNUMBEREXCEPTION-005.title",
380
+ message: "errors.COMMUNICATIONS-INVALIDNUMBEREXCEPTION-005.message",
381
+ code: 400,
382
+ type: "modal",
383
+ level: "warning"
384
+ },
357
385
  // Calculator
358
386
  "SCORE-CLIENTREJECTED-01": {
359
387
  title: "errors.calculator.SCORE-CLIENTREJECTED-01.title",
@@ -948,273 +976,185 @@ const G = {
948
976
  type: "modal",
949
977
  level: "warning"
950
978
  },
951
- ...G
979
+ ...Q
952
980
  };
953
- class U extends h {
954
- get(t = "default", e = "NOT_FOUND") {
955
- var s, A;
956
- if (t instanceof Error)
957
- return this.logError(t.message), {
958
- ...m.internalError,
959
- title: C(m.internalError.title),
960
- message: C(m.internalError.message),
981
+ class O extends B {
982
+ get(s = "default", e = "NOT_FOUND") {
983
+ var E, l;
984
+ if (s instanceof Error)
985
+ return this.logError(s.message), {
986
+ ...L.internalError,
987
+ title: m(L.internalError.title),
988
+ message: m(L.internalError.message),
961
989
  uuid: e
962
990
  };
963
- const r = typeof t == "string" ? t : t.code ?? t.errorType;
991
+ const r = typeof s == "string" ? s : s.code ?? s.errorType;
964
992
  this.logDebug("statusCode", r);
965
- const l = typeof t == "string" ? {} : { ...t };
993
+ const t = typeof s == "string" ? {} : { ...s };
966
994
  return {
967
- ...m[r] ?? m.default,
968
- title: C(
969
- ((s = m[r]) == null ? void 0 : s.title) ?? m.default.title,
970
- l
995
+ ...L[r] ?? L.default,
996
+ title: m(
997
+ ((E = L[r]) == null ? void 0 : E.title) ?? L.default.title,
998
+ t
971
999
  ),
972
- message: C(
973
- ((A = m[r]) == null ? void 0 : A.message) ?? m.default.message,
974
- l
1000
+ message: m(
1001
+ ((l = L[r]) == null ? void 0 : l.message) ?? L.default.message,
1002
+ t
975
1003
  ),
976
1004
  uuid: e
977
1005
  };
978
1006
  }
979
1007
  }
980
- class Le extends V {
1008
+ class X extends u {
981
1009
  constructor() {
982
1010
  super(...arguments);
983
- L(this, "uuid", "");
984
- L(this, "session", null);
1011
+ T(this, "uuid", "");
1012
+ T(this, "session", null);
985
1013
  }
986
1014
  setSession(e) {
987
1015
  this.session = e;
988
1016
  }
989
1017
  getSession() {
990
1018
  if (!this.session)
991
- throw new U().get("SESSION_NOT_FOUND");
1019
+ throw new O().get("SESSION_NOT_FOUND");
992
1020
  return this.session;
993
1021
  }
994
- returnData(e, r, l) {
995
- const s = this.encode(r, l);
996
- e.status(200).json(s);
1022
+ returnData(e, r, t) {
1023
+ const E = this.encode(r, t);
1024
+ e.status(200).json(E);
997
1025
  }
998
1026
  returnError(e, r) {
999
- return r != null && r.uuid ? e.status(520).json(r) : e.status(520).json(new U().get(r, this.uuid));
1027
+ return r != null && r.uuid ? e.status(520).json(r) : e.status(520).json(new O().get(r, this.uuid));
1000
1028
  }
1001
1029
  get(e) {
1002
- return this.logDebug("get ApiMiddleware"), (r, l) => {
1003
- var s;
1004
- this.logDebug("return ApiMiddleware"), this.uuid = (s = r == null ? void 0 : r.body) == null ? void 0 : s.uuid, N(r).pipe(
1005
- O(
1006
- (A) => M({
1007
- params: N(this.decode(A.body)),
1008
- headers: N(A.headers)
1030
+ return this.logDebug("get ApiMiddleware"), (r, t) => {
1031
+ var E;
1032
+ this.logDebug("return ApiMiddleware"), this.uuid = (E = r == null ? void 0 : r.body) == null ? void 0 : E.uuid, o(r).pipe(
1033
+ R(
1034
+ (l) => S({
1035
+ params: o(this.decode(l.body)),
1036
+ headers: o(l.headers)
1009
1037
  })
1010
1038
  ),
1011
- O(
1012
- ({ params: A, headers: a }) => M({
1013
- response: e(A, this.uuid, a),
1014
- headers: N(a),
1015
- params: N(A)
1039
+ R(
1040
+ ({ params: l, headers: a }) => S({
1041
+ response: e(l, this.uuid, a),
1042
+ headers: o(a),
1043
+ params: o(l)
1016
1044
  })
1017
1045
  ),
1018
- O(({ params: A, response: a, headers: o }) => (this.logDebug(
1019
- `ApiMiddleware \x1B[37m <URL>: \x1B[33m ${r.url} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(o)} \x1B[37m <UUID> \x1B[33m ${r.body.uuid} \x1B[37m <PARAMS> \x1B[33m ${JSON.stringify(A)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(a)}`
1020
- ), N(a))),
1021
- I((A) => {
1046
+ R(({ params: l, response: a, headers: A }) => (this.logDebug(
1047
+ `ApiMiddleware \x1B[37m <URL>: \x1B[33m ${r.url} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(A)} \x1B[37m <UUID> \x1B[33m ${r.body.uuid} \x1B[37m <PARAMS> \x1B[33m ${JSON.stringify(l)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(a)}`
1048
+ ), o(a))),
1049
+ I((l) => {
1022
1050
  var a;
1023
1051
  return this.logError(
1024
- `ApiMiddleware <URL>: ${r == null ? void 0 : r.url} <HEADERS>: ${JSON.stringify(r == null ? void 0 : r.headers)} <UUID> ${(a = r == null ? void 0 : r.body) == null ? void 0 : a.uuid} <PARAMS> ${JSON.stringify(r == null ? void 0 : r.body)} <ERROR>: ${JSON.stringify(A)}`
1025
- ), this.returnError(l, A), d;
1052
+ `ApiMiddleware <URL>: ${r == null ? void 0 : r.url} <HEADERS>: ${JSON.stringify(r == null ? void 0 : r.headers)} <UUID> ${(a = r == null ? void 0 : r.body) == null ? void 0 : a.uuid} <PARAMS> ${JSON.stringify(r == null ? void 0 : r.body)} <ERROR>: ${JSON.stringify(l)}`
1053
+ ), this.returnError(t, l), C;
1026
1054
  })
1027
1055
  ).subscribe({
1028
- next: (A) => {
1029
- this.logDebug("ApiMiddleware subscribe next", JSON.stringify(A)), this.returnData(l, A, this.uuid);
1056
+ next: (l) => {
1057
+ this.logDebug("ApiMiddleware subscribe next", JSON.stringify(l)), this.returnData(t, l, this.uuid);
1030
1058
  }
1031
1059
  });
1032
1060
  };
1033
1061
  }
1034
1062
  }
1035
- const _ = process.env.ID_FRONT ?? "NOT_AVAILABLE";
1036
- class Oe extends x {
1037
- constructor(e, r, l = {}) {
1038
- super(l);
1039
- L(this, "apiUrl");
1040
- L(this, "method");
1063
+ const V = process.env.ID_FRONT ?? "NOT_AVAILABLE";
1064
+ class W extends p {
1065
+ constructor(e, r, t = {}) {
1066
+ super(t);
1067
+ T(this, "apiUrl");
1068
+ T(this, "method");
1041
1069
  this.apiUrl = e, this.method = r ?? "POST";
1042
1070
  }
1043
1071
  errorHandler(e, r) {
1044
1072
  if (e != null && e.errors)
1045
- throw new U().get(e.errors[0], r);
1073
+ throw new O().get(e.errors[0], r);
1046
1074
  return !(e != null && e.errors);
1047
1075
  }
1048
1076
  formatParams(e) {
1049
1077
  return JSON.stringify({
1050
1078
  data: {
1051
- type: _,
1079
+ type: V,
1052
1080
  attributes: e
1053
1081
  }
1054
1082
  });
1055
1083
  }
1056
1084
  fetchData(e = {}, r) {
1057
1085
  return this.getHeaders().pipe(
1058
- O(
1059
- (l) => S(
1086
+ R(
1087
+ (t) => U(
1060
1088
  this.apiUrl,
1061
1089
  {
1062
1090
  method: "POST",
1063
- headers: l,
1091
+ headers: t,
1064
1092
  body: this.formatParams(e),
1065
- selector: (s) => s.json()
1093
+ selector: (E) => E.json()
1066
1094
  }
1067
1095
  ).pipe(
1068
- I((s) => {
1069
- throw this.logError(JSON.stringify(s)), this.logError(
1096
+ I((E) => {
1097
+ throw this.logError(JSON.stringify(E)), this.logError(
1070
1098
  `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
1071
- l
1099
+ t
1072
1100
  )} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
1073
1101
  this.formatParams(e)
1074
- )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(s)} \x1B[33m`
1075
- ), new U().get("default", r);
1102
+ )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(E)} \x1B[33m`
1103
+ ), new O().get("default", r);
1076
1104
  }),
1077
- O((s) => (this.logDebug(
1105
+ R((E) => (this.logDebug(
1078
1106
  `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
1079
- l
1107
+ t
1080
1108
  )} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
1081
1109
  this.formatParams(e)
1082
- )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(s)} \x1B[33m`
1083
- ), N(s)))
1110
+ )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(E)} \x1B[33m`
1111
+ ), o(E)))
1084
1112
  )
1085
1113
  ),
1086
- w((l) => this.errorHandler(l, r))
1114
+ M((t) => this.errorHandler(t, r))
1087
1115
  );
1088
1116
  }
1089
1117
  fetchCustomData(e = {}, r) {
1090
1118
  return this.getHeaders().pipe(
1091
- O(
1092
- (l) => S(this.apiUrl, {
1119
+ R(
1120
+ (t) => U(this.apiUrl, {
1093
1121
  method: this.method,
1094
- headers: l,
1122
+ headers: t,
1095
1123
  body: this.method === "GET" ? null : JSON.stringify(e),
1096
- selector: (s) => s.json()
1124
+ selector: (E) => E.json()
1097
1125
  }).pipe(
1098
- I((s) => {
1099
- throw this.logError(JSON.stringify(s)), this.logError(
1126
+ I((E) => {
1127
+ throw this.logError(JSON.stringify(E)), this.logError(
1100
1128
  `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
1101
- l
1129
+ t
1102
1130
  )} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
1103
1131
  this.formatParams(e)
1104
- )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(s)} \x1B[33m`
1105
- ), new U().get("default", r);
1132
+ )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(E)} \x1B[33m`
1133
+ ), new O().get("default", r);
1106
1134
  }),
1107
- O((s) => (this.logDebug(
1135
+ R((E) => (this.logDebug(
1108
1136
  `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m \x1B[37m <METHOD>: \x1B[33m ${this.method} <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
1109
- l
1137
+ t
1110
1138
  )} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
1111
1139
  e
1112
- )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(s)} \x1B[33m`
1113
- ), N(s)))
1140
+ )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(E)} \x1B[33m`
1141
+ ), o(E)))
1114
1142
  )
1115
1143
  )
1116
1144
  );
1117
1145
  }
1118
1146
  }
1119
- const J = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
1120
- function $(E) {
1121
- return typeof E == "string" && J.test(E);
1122
- }
1123
- function K(E) {
1124
- if (!$(E))
1125
- throw TypeError("Invalid UUID");
1126
- let t;
1127
- const e = new Uint8Array(16);
1128
- return e[0] = (t = parseInt(E.slice(0, 8), 16)) >>> 24, e[1] = t >>> 16 & 255, e[2] = t >>> 8 & 255, e[3] = t & 255, e[4] = (t = parseInt(E.slice(9, 13), 16)) >>> 8, e[5] = t & 255, e[6] = (t = parseInt(E.slice(14, 18), 16)) >>> 8, e[7] = t & 255, e[8] = (t = parseInt(E.slice(19, 23), 16)) >>> 8, e[9] = t & 255, e[10] = (t = parseInt(E.slice(24, 36), 16)) / 1099511627776 & 255, e[11] = t / 4294967296 & 255, e[12] = t >>> 24 & 255, e[13] = t >>> 16 & 255, e[14] = t >>> 8 & 255, e[15] = t & 255, e;
1129
- }
1130
- function b(E) {
1131
- E = unescape(encodeURIComponent(E));
1132
- const t = [];
1133
- for (let e = 0; e < E.length; ++e)
1134
- t.push(E.charCodeAt(e));
1135
- return t;
1136
- }
1137
- const X = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", W = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
1138
- function j(E, t, e) {
1139
- function r(l, s, A, a) {
1140
- var o;
1141
- if (typeof l == "string" && (l = b(l)), typeof s == "string" && (s = K(s)), ((o = s) === null || o === void 0 ? void 0 : o.length) !== 16)
1142
- throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
1143
- let T = new Uint8Array(16 + l.length);
1144
- if (T.set(s), T.set(l, s.length), T = e(T), T[6] = T[6] & 15 | t, T[8] = T[8] & 63 | 128, A) {
1145
- a = a || 0;
1146
- for (let i = 0; i < 16; ++i)
1147
- A[a + i] = T[i];
1148
- return A;
1149
- }
1150
- return Y(T);
1151
- }
1152
- try {
1153
- r.name = E;
1154
- } catch {
1155
- }
1156
- return r.DNS = X, r.URL = W, r;
1157
- }
1158
- function Z(E, t, e, r) {
1159
- switch (E) {
1160
- case 0:
1161
- return t & e ^ ~t & r;
1162
- case 1:
1163
- return t ^ e ^ r;
1164
- case 2:
1165
- return t & e ^ t & r ^ e & r;
1166
- case 3:
1167
- return t ^ e ^ r;
1168
- }
1169
- }
1170
- function n(E, t) {
1171
- return E << t | E >>> 32 - t;
1172
- }
1173
- function k(E) {
1174
- const t = [1518500249, 1859775393, 2400959708, 3395469782], e = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
1175
- if (typeof E == "string") {
1176
- const A = unescape(encodeURIComponent(E));
1177
- E = [];
1178
- for (let a = 0; a < A.length; ++a)
1179
- E.push(A.charCodeAt(a));
1180
- } else
1181
- Array.isArray(E) || (E = Array.prototype.slice.call(E));
1182
- E.push(128);
1183
- const r = E.length / 4 + 2, l = Math.ceil(r / 16), s = new Array(l);
1184
- for (let A = 0; A < l; ++A) {
1185
- const a = new Uint32Array(16);
1186
- for (let o = 0; o < 16; ++o)
1187
- a[o] = E[A * 64 + o * 4] << 24 | E[A * 64 + o * 4 + 1] << 16 | E[A * 64 + o * 4 + 2] << 8 | E[A * 64 + o * 4 + 3];
1188
- s[A] = a;
1189
- }
1190
- s[l - 1][14] = (E.length - 1) * 8 / Math.pow(2, 32), s[l - 1][14] = Math.floor(s[l - 1][14]), s[l - 1][15] = (E.length - 1) * 8 & 4294967295;
1191
- for (let A = 0; A < l; ++A) {
1192
- const a = new Uint32Array(80);
1193
- for (let R = 0; R < 16; ++R)
1194
- a[R] = s[A][R];
1195
- for (let R = 16; R < 80; ++R)
1196
- a[R] = n(a[R - 3] ^ a[R - 8] ^ a[R - 14] ^ a[R - 16], 1);
1197
- let o = e[0], T = e[1], i = e[2], c = e[3], D = e[4];
1198
- for (let R = 0; R < 80; ++R) {
1199
- const P = Math.floor(R / 20), u = n(o, 5) + Z(P, T, i, c) + D + t[P] + a[R] >>> 0;
1200
- D = c, c = i, i = n(T, 30) >>> 0, T = o, o = u;
1201
- }
1202
- e[0] = e[0] + o >>> 0, e[1] = e[1] + T >>> 0, e[2] = e[2] + i >>> 0, e[3] = e[3] + c >>> 0, e[4] = e[4] + D >>> 0;
1203
- }
1204
- return [e[0] >> 24 & 255, e[0] >> 16 & 255, e[0] >> 8 & 255, e[0] & 255, e[1] >> 24 & 255, e[1] >> 16 & 255, e[1] >> 8 & 255, e[1] & 255, e[2] >> 24 & 255, e[2] >> 16 & 255, e[2] >> 8 & 255, e[2] & 255, e[3] >> 24 & 255, e[3] >> 16 & 255, e[3] >> 8 & 255, e[3] & 255, e[4] >> 24 & 255, e[4] >> 16 & 255, e[4] >> 8 & 255, e[4] & 255];
1205
- }
1206
- const z = j("v5", 80, k), p = z;
1207
- class ie extends F {
1208
- constructor(e, r = "POST", l = {}) {
1147
+ class j extends y {
1148
+ constructor(e, r = "POST", t = {}) {
1209
1149
  super();
1210
- L(this, "apiUrl");
1211
- L(this, "method");
1212
- L(this, "headers");
1213
- L(this, "isLoadingEnabled", !0);
1214
- L(this, "errorResponse");
1150
+ T(this, "apiUrl");
1151
+ T(this, "method");
1152
+ T(this, "headers");
1153
+ T(this, "isLoadingEnabled", !0);
1154
+ T(this, "errorResponse");
1215
1155
  this.apiUrl = e, this.method = r, this.headers = {
1216
1156
  "Content-Type": "application/json",
1217
- ...l
1157
+ ...t
1218
1158
  };
1219
1159
  }
1220
1160
  setIsLoadingEnabled(e) {
@@ -1224,37 +1164,37 @@ class ie extends F {
1224
1164
  this.errorResponse = e;
1225
1165
  }
1226
1166
  fetchData(e = {}) {
1227
- const r = (/* @__PURE__ */ new Date()).toISOString(), l = p(r, p.URL), s = this.encode({ ...e }, l);
1228
- g.getInstance().setSubject(this.isLoadingEnabled);
1167
+ const r = (/* @__PURE__ */ new Date()).toISOString(), t = D(r, D.URL), E = this.encode({ ...e }, t);
1168
+ i.getInstance().setSubject(this.isLoadingEnabled);
1229
1169
  const a = new URLSearchParams(window.location.search).get("flow") ?? "N/A";
1230
- return S(this.apiUrl, {
1170
+ return U(this.apiUrl, {
1231
1171
  method: this.method,
1232
1172
  headers: { ...this.headers, flow: a },
1233
- body: s,
1234
- selector: (o) => o.json()
1173
+ body: E,
1174
+ selector: (A) => A.json()
1235
1175
  }).pipe(
1236
- O((o) => N(this.decode(o))),
1237
- O((o) => o.code && (o.type === "modal" || o.type === "message") ? (this.logError(
1238
- `FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${s} <RESPONSE>: ${JSON.stringify(o)}`
1239
- ), g.getInstance().setSubject(!1), B.getInstance().setSubject(o), this.errorResponse ? N(this.errorResponse) : d) : N(o)),
1240
- O((o) => (g.getInstance().setSubject(!1), this.logDebug(
1241
- `FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${s} <RESPONSE>: ${JSON.stringify(o)}`
1242
- ), N(o))),
1243
- I((o) => (this.logError(
1244
- `FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${s} <RESPONSE>: ${JSON.stringify(o)}`
1245
- ), g.getInstance().setSubject(!1), B.getInstance().setSubject(
1246
- new U().get(o, l)
1247
- ), this.errorResponse ? N(this.errorResponse) : d))
1176
+ R((A) => o(this.decode(A))),
1177
+ R((A) => A.code && (A.type === "modal" || A.type === "message") ? (this.logError(
1178
+ `FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${E} <RESPONSE>: ${JSON.stringify(A)}`
1179
+ ), i.getInstance().setSubject(!1), g.getInstance().setSubject(A), this.errorResponse ? o(this.errorResponse) : C) : o(A)),
1180
+ R((A) => (i.getInstance().setSubject(!1), this.logDebug(
1181
+ `FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${E} <RESPONSE>: ${JSON.stringify(A)}`
1182
+ ), o(A))),
1183
+ I((A) => (this.logError(
1184
+ `FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${E} <RESPONSE>: ${JSON.stringify(A)}`
1185
+ ), i.getInstance().setSubject(!1), g.getInstance().setSubject(
1186
+ new O().get(A, t)
1187
+ ), this.errorResponse ? o(this.errorResponse) : C))
1248
1188
  );
1249
1189
  }
1250
1190
  }
1251
1191
  export {
1252
- Le as ApiMiddleware,
1253
- U as ErrorCatalog,
1254
- Oe as FetchServiceBE,
1255
- ie as FetchServiceFE,
1256
- g as LoadingHandler,
1257
- B as MessageHandler,
1258
- ce as RxSubjectManager,
1259
- Ce as ServiceToken
1192
+ X as ApiMiddleware,
1193
+ O as ErrorCatalog,
1194
+ W as FetchServiceBE,
1195
+ j as FetchServiceFE,
1196
+ i as LoadingHandler,
1197
+ g as MessageHandler,
1198
+ z as RxSubjectManager,
1199
+ ee as ServiceToken
1260
1200
  };
@@ -1,4 +1,4 @@
1
- import { t } from "./index-d4f88744.js";
1
+ import { t } from "./index-21452318.js";
2
2
  const e = {
3
3
  errors: {}
4
4
  }, a = {
@@ -0,0 +1,98 @@
1
+ const A = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
2
+ function I(f) {
3
+ return typeof f == "string" && A.test(f);
4
+ }
5
+ const o = [];
6
+ for (let f = 0; f < 256; ++f)
7
+ o.push((f + 256).toString(16).slice(1));
8
+ function w(f, t = 0) {
9
+ return o[f[t + 0]] + o[f[t + 1]] + o[f[t + 2]] + o[f[t + 3]] + "-" + o[f[t + 4]] + o[f[t + 5]] + "-" + o[f[t + 6]] + o[f[t + 7]] + "-" + o[f[t + 8]] + o[f[t + 9]] + "-" + o[f[t + 10]] + o[f[t + 11]] + o[f[t + 12]] + o[f[t + 13]] + o[f[t + 14]] + o[f[t + 15]];
10
+ }
11
+ function v(f) {
12
+ if (!I(f))
13
+ throw TypeError("Invalid UUID");
14
+ let t;
15
+ const n = new Uint8Array(16);
16
+ return n[0] = (t = parseInt(f.slice(0, 8), 16)) >>> 24, n[1] = t >>> 16 & 255, n[2] = t >>> 8 & 255, n[3] = t & 255, n[4] = (t = parseInt(f.slice(9, 13), 16)) >>> 8, n[5] = t & 255, n[6] = (t = parseInt(f.slice(14, 18), 16)) >>> 8, n[7] = t & 255, n[8] = (t = parseInt(f.slice(19, 23), 16)) >>> 8, n[9] = t & 255, n[10] = (t = parseInt(f.slice(24, 36), 16)) / 1099511627776 & 255, n[11] = t / 4294967296 & 255, n[12] = t >>> 24 & 255, n[13] = t >>> 16 & 255, n[14] = t >>> 8 & 255, n[15] = t & 255, n;
17
+ }
18
+ function R(f) {
19
+ f = unescape(encodeURIComponent(f));
20
+ const t = [];
21
+ for (let n = 0; n < f.length; ++n)
22
+ t.push(f.charCodeAt(n));
23
+ return t;
24
+ }
25
+ const T = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", M = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
26
+ function y(f, t, n) {
27
+ function s(l, a, e, r) {
28
+ var i;
29
+ if (typeof l == "string" && (l = R(l)), typeof a == "string" && (a = v(a)), ((i = a) === null || i === void 0 ? void 0 : i.length) !== 16)
30
+ throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
31
+ let x = new Uint8Array(16 + l.length);
32
+ if (x.set(a), x.set(l, a.length), x = n(x), x[6] = x[6] & 15 | t, x[8] = x[8] & 63 | 128, e) {
33
+ r = r || 0;
34
+ for (let h = 0; h < 16; ++h)
35
+ e[r + h] = x[h];
36
+ return e;
37
+ }
38
+ return w(x);
39
+ }
40
+ try {
41
+ s.name = f;
42
+ } catch {
43
+ }
44
+ return s.DNS = T, s.URL = M, s;
45
+ }
46
+ function C(f, t, n, s) {
47
+ switch (f) {
48
+ case 0:
49
+ return t & n ^ ~t & s;
50
+ case 1:
51
+ return t ^ n ^ s;
52
+ case 2:
53
+ return t & n ^ t & s ^ n & s;
54
+ case 3:
55
+ return t ^ n ^ s;
56
+ }
57
+ }
58
+ function g(f, t) {
59
+ return f << t | f >>> 32 - t;
60
+ }
61
+ function D(f) {
62
+ const t = [1518500249, 1859775393, 2400959708, 3395469782], n = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
63
+ if (typeof f == "string") {
64
+ const e = unescape(encodeURIComponent(f));
65
+ f = [];
66
+ for (let r = 0; r < e.length; ++r)
67
+ f.push(e.charCodeAt(r));
68
+ } else
69
+ Array.isArray(f) || (f = Array.prototype.slice.call(f));
70
+ f.push(128);
71
+ const s = f.length / 4 + 2, l = Math.ceil(s / 16), a = new Array(l);
72
+ for (let e = 0; e < l; ++e) {
73
+ const r = new Uint32Array(16);
74
+ for (let i = 0; i < 16; ++i)
75
+ r[i] = f[e * 64 + i * 4] << 24 | f[e * 64 + i * 4 + 1] << 16 | f[e * 64 + i * 4 + 2] << 8 | f[e * 64 + i * 4 + 3];
76
+ a[e] = r;
77
+ }
78
+ a[l - 1][14] = (f.length - 1) * 8 / Math.pow(2, 32), a[l - 1][14] = Math.floor(a[l - 1][14]), a[l - 1][15] = (f.length - 1) * 8 & 4294967295;
79
+ for (let e = 0; e < l; ++e) {
80
+ const r = new Uint32Array(80);
81
+ for (let c = 0; c < 16; ++c)
82
+ r[c] = a[e][c];
83
+ for (let c = 16; c < 80; ++c)
84
+ r[c] = g(r[c - 3] ^ r[c - 8] ^ r[c - 14] ^ r[c - 16], 1);
85
+ let i = n[0], x = n[1], h = n[2], p = n[3], d = n[4];
86
+ for (let c = 0; c < 80; ++c) {
87
+ const u = Math.floor(c / 20), U = g(i, 5) + C(u, x, h, p) + d + t[u] + r[c] >>> 0;
88
+ d = p, p = h, h = g(x, 30) >>> 0, x = i, i = U;
89
+ }
90
+ n[0] = n[0] + i >>> 0, n[1] = n[1] + x >>> 0, n[2] = n[2] + h >>> 0, n[3] = n[3] + p >>> 0, n[4] = n[4] + d >>> 0;
91
+ }
92
+ return [n[0] >> 24 & 255, n[0] >> 16 & 255, n[0] >> 8 & 255, n[0] & 255, n[1] >> 24 & 255, n[1] >> 16 & 255, n[1] >> 8 & 255, n[1] & 255, n[2] >> 24 & 255, n[2] >> 16 & 255, n[2] >> 8 & 255, n[2] & 255, n[3] >> 24 & 255, n[3] >> 16 & 255, n[3] >> 8 & 255, n[3] & 255, n[4] >> 24 & 255, n[4] >> 16 & 255, n[4] >> 8 & 255, n[4] & 255];
93
+ }
94
+ const E = y("v5", 80, D), N = E;
95
+ export {
96
+ N as a,
97
+ w as u
98
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mp-front-cli",
3
- "version": "0.0.90",
3
+ "version": "0.0.92",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1,11 +0,0 @@
1
- import s from "ioredis";
2
- const o = process.env.REDIS_HOST, S = process.env.REDIS_PORT, e = process.env.REDIS_USER, R = process.env.REDIS_PASS, t = new s({
3
- host: o,
4
- port: S,
5
- username: e,
6
- password: R,
7
- tls: {}
8
- });
9
- export {
10
- t as C
11
- };
@@ -1,9 +0,0 @@
1
- const i = [];
2
- for (let n = 0; n < 256; ++n)
3
- i.push((n + 256).toString(16).slice(1));
4
- function c(n, u = 0) {
5
- return i[n[u + 0]] + i[n[u + 1]] + i[n[u + 2]] + i[n[u + 3]] + "-" + i[n[u + 4]] + i[n[u + 5]] + "-" + i[n[u + 6]] + i[n[u + 7]] + "-" + i[n[u + 8]] + i[n[u + 9]] + "-" + i[n[u + 10]] + i[n[u + 11]] + i[n[u + 12]] + i[n[u + 13]] + i[n[u + 14]] + i[n[u + 15]];
6
- }
7
- export {
8
- c as u
9
- };