mp-front-cli 0.0.76 → 0.0.77
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/interfaces/index.d.ts +1 -0
- package/dist/core/interfaces/index.d.ts.map +1 -1
- package/dist/core/utils/custom-cache.d.ts +5 -1
- package/dist/core/utils/custom-cache.d.ts.map +1 -1
- package/dist/{index-83f54780.js → index-4b63b0bb.js} +8 -8
- package/dist/lang/common/errors/es_MX/index.d.ts.map +1 -1
- package/dist/mp-front-cli-all.es.js +1 -1
- package/dist/mp-front-cli-cache.es.js +37 -35
- package/dist/mp-front-cli-core.es.js +1 -1
- package/dist/mp-front-cli-locale.es.js +7 -7
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/interfaces/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/interfaces/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACzC,YAAY,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { CustomEncrypter } from "./custom-encrypter";
|
|
2
|
+
export declare enum RefreshState {
|
|
3
|
+
NOT_REFRESH = "NOT_REFRESH",
|
|
4
|
+
REFRESH = "REFRESH"
|
|
5
|
+
}
|
|
2
6
|
interface ISetRedisStateParams<T> {
|
|
3
7
|
/**
|
|
4
8
|
* ``idApi``
|
|
@@ -29,7 +33,7 @@ interface ISetRedisStateParams<T> {
|
|
|
29
33
|
* ``refresh``
|
|
30
34
|
* Define if the data will be refreshed
|
|
31
35
|
*/
|
|
32
|
-
refresh?:
|
|
36
|
+
refresh?: RefreshState;
|
|
33
37
|
}
|
|
34
38
|
export declare class CustomCache<T> extends CustomEncrypter {
|
|
35
39
|
private readonly initClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-cache.d.ts","sourceRoot":"","sources":["../../../src/core/utils/custom-cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"custom-cache.d.ts","sourceRoot":"","sources":["../../../src/core/utils/custom-cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAIpD,oBAAY,YAAY;IACtB,WAAW,gBAAgB;IAC3B,OAAO,YAAY;CACpB;AACD,UAAU,oBAAoB,CAAC,CAAC;IAC9B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,IAAI,EAAE,CAAC,CAAA;IACP;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAA;CACvB;AAED,qBAAa,WAAW,CAAC,CAAC,CAAE,SAAQ,eAAe;IACjD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAc;IAEzC,OAAO,CAAC,WAAW;YAIL,aAAa;IAS3B,OAAO,CAAC,aAAa;IAKR,aAAa,CAAC,CAAC,EAC1B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,CAAC,CAAA;KAAE,CAAC;IAgBvB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAK9C,aAAa,CAAC,EACzB,KAAK,EACL,MAAM,EACN,IAAI,EACJ,MAAM,EACN,SAAiB,EACjB,OAA8B,GAC/B,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;IAc/B,UAAU,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC;IAYjC,SAAS;IAIT,SAAS,CAAC,GAAG,EAAE,MAAM;IAIrB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAI7B,SAAS,CAAC,GAAG,EAAE,MAAM;IAKrB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAKrC,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAG5D"}
|
|
@@ -279,27 +279,27 @@ const e = {
|
|
|
279
279
|
},
|
|
280
280
|
"PERSONALDATA-BAD-REQUEST-01": {
|
|
281
281
|
title: "por favor intenta con otro teléfono",
|
|
282
|
-
message: "El número de teléfono
|
|
282
|
+
message: "El número de teléfono no es un número válido."
|
|
283
283
|
},
|
|
284
284
|
"PERSONALDATA-BAD-REQUEST-02": {
|
|
285
285
|
title: "Por favor intenta con otro teléfono",
|
|
286
|
-
message: "El número de teléfono
|
|
286
|
+
message: "El número de teléfono no es un número válido."
|
|
287
287
|
},
|
|
288
288
|
"PERSONALDATA-BAD-REQUEST-03": {
|
|
289
289
|
title: "Por favor intenta con otro teléfono",
|
|
290
|
-
message: "El número de teléfono
|
|
290
|
+
message: "El número de teléfono no es un número válido."
|
|
291
291
|
},
|
|
292
292
|
"PERSONALDATA-BAD-REQUEST-04": {
|
|
293
293
|
title: "Por favor intenta con otro teléfono",
|
|
294
|
-
message: "El número de teléfono
|
|
294
|
+
message: "El número de teléfono ya está asociado con un proceso iniciado"
|
|
295
295
|
},
|
|
296
296
|
"PERSONALDATA-BAD-REQUEST-05": {
|
|
297
297
|
title: "Por favor intenta con otro teléfono",
|
|
298
|
-
message: "El número de teléfono
|
|
298
|
+
message: "El número de teléfono ya tiene un proceso iniciado"
|
|
299
299
|
},
|
|
300
300
|
"PERSONALDATA-BAD-REQUEST-06": {
|
|
301
301
|
title: "Por favor intenta con otro curp.",
|
|
302
|
-
message: "El curp
|
|
302
|
+
message: "El curp es un curp no válido"
|
|
303
303
|
},
|
|
304
304
|
"PERSONALDATA-BAD-REQUEST-07": {
|
|
305
305
|
title: "Por favor intenta con otro curp.",
|
|
@@ -319,8 +319,8 @@ const e = {
|
|
|
319
319
|
message: "Error en la biometría"
|
|
320
320
|
},
|
|
321
321
|
"PF-BIOMETRIC-002": {
|
|
322
|
-
title: "
|
|
323
|
-
message: "
|
|
322
|
+
title: "No aceptable",
|
|
323
|
+
message: "No aceptable"
|
|
324
324
|
},
|
|
325
325
|
"PF-BIOMETRIC-003": {
|
|
326
326
|
title: "Campo no válido",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lang/common/errors/es_MX/index.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lang/common/errors/es_MX/index.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgKhB,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApiMiddleware as n, ErrorCatalog as x, FetchServiceBE as E, FetchServiceFE as F } from "./mp-front-cli-core.es.js";
|
|
2
2
|
import { LoadingHandler as S, MessageHandler as f, RxSubjectManager as h } from "./mp-front-cli-utils-rxjs.es.js";
|
|
3
3
|
import "i18next";
|
|
4
|
-
import "./index-
|
|
4
|
+
import "./index-4b63b0bb.js";
|
|
5
5
|
import "./mp-front-cli-logger.es.js";
|
|
6
6
|
import "rxjs";
|
|
7
7
|
import "./mp-front-cli-encrypter.es.js";
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { CustomEncrypter as
|
|
5
|
-
import { C as
|
|
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";
|
|
6
6
|
import "node-jose";
|
|
7
7
|
import "crypto";
|
|
8
8
|
import "./mp-front-cli-encoder.es.js";
|
|
9
9
|
import "./mp-front-cli-logger.es.js";
|
|
10
10
|
import "ioredis";
|
|
11
|
-
const
|
|
12
|
-
|
|
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 {
|
|
13
14
|
constructor() {
|
|
14
15
|
super(...arguments);
|
|
15
|
-
|
|
16
|
+
E(this, "initClient", R);
|
|
16
17
|
}
|
|
17
18
|
getRootNode(t) {
|
|
18
19
|
return this.initClient.get(t);
|
|
@@ -24,38 +25,38 @@ class T extends S {
|
|
|
24
25
|
throw new Error("Not found entry point");
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
|
-
setEntryPoint(t,
|
|
28
|
-
const
|
|
29
|
-
this.initClient.set(t,
|
|
28
|
+
setEntryPoint(t, i, e) {
|
|
29
|
+
const s = typeof i == "string" ? i : JSON.stringify(i);
|
|
30
|
+
this.initClient.set(t, s, "EX", 60 * e);
|
|
30
31
|
}
|
|
31
|
-
async getRedisState(t,
|
|
32
|
-
const
|
|
33
|
-
return
|
|
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 };
|
|
34
35
|
}
|
|
35
|
-
async deleteRedisState(t,
|
|
36
|
-
const
|
|
37
|
-
this.initClient.del(
|
|
36
|
+
async deleteRedisState(t, i) {
|
|
37
|
+
const e = `${t}:${this.generateSHA(i)}`;
|
|
38
|
+
this.initClient.del(e);
|
|
38
39
|
}
|
|
39
40
|
async setRedisState({
|
|
40
41
|
idApi: t,
|
|
41
|
-
idData:
|
|
42
|
-
body:
|
|
43
|
-
expire:
|
|
42
|
+
idData: i,
|
|
43
|
+
body: e,
|
|
44
|
+
expire: s,
|
|
44
45
|
encrypted: h = !1,
|
|
45
46
|
refresh: c = "REFRESH"
|
|
46
47
|
/* REFRESH */
|
|
47
48
|
}) {
|
|
48
|
-
const
|
|
49
|
+
const o = `${t}:${this.generateSHA(i)}`, l = { expires_in: c === "REFRESH" ? s : 0, ...e };
|
|
49
50
|
if (h) {
|
|
50
|
-
const
|
|
51
|
-
return this.setEntryPoint(
|
|
51
|
+
const y = await this.encrypt(l);
|
|
52
|
+
return this.setEntryPoint(o, y, s), o;
|
|
52
53
|
}
|
|
53
|
-
return this.setEntryPoint(
|
|
54
|
+
return this.setEntryPoint(o, l, s), o;
|
|
54
55
|
}
|
|
55
56
|
async statusHost() {
|
|
56
|
-
return new Promise((t,
|
|
57
|
-
this.initClient.on("error", (
|
|
58
|
-
this.killRedis(), e
|
|
57
|
+
return new Promise((t, i) => {
|
|
58
|
+
this.initClient.on("error", (e) => {
|
|
59
|
+
this.killRedis(), i(e);
|
|
59
60
|
}), this.initClient.on("connect", () => {
|
|
60
61
|
t("success");
|
|
61
62
|
});
|
|
@@ -67,19 +68,20 @@ class T extends S {
|
|
|
67
68
|
deleteKey(t) {
|
|
68
69
|
this.initClient.del(t);
|
|
69
70
|
}
|
|
70
|
-
ttl(t,
|
|
71
|
-
this.initClient.expire(t,
|
|
71
|
+
ttl(t, i) {
|
|
72
|
+
this.initClient.expire(t, i);
|
|
72
73
|
}
|
|
73
74
|
simpleGet(t) {
|
|
74
|
-
return this.ttl(t,
|
|
75
|
+
return this.ttl(t, a * 60), this.initClient.get(t);
|
|
75
76
|
}
|
|
76
|
-
simpleHGet(t,
|
|
77
|
-
return this.ttl(t,
|
|
77
|
+
simpleHGet(t, i) {
|
|
78
|
+
return this.ttl(t, a * 60), this.initClient.hget(t, i);
|
|
78
79
|
}
|
|
79
|
-
simpleHSet(t,
|
|
80
|
-
return this.initClient.hset(t,
|
|
80
|
+
simpleHSet(t, i, e) {
|
|
81
|
+
return this.initClient.hset(t, i, e);
|
|
81
82
|
}
|
|
82
83
|
}
|
|
83
84
|
export {
|
|
84
|
-
|
|
85
|
+
O as CustomCache,
|
|
86
|
+
d as RefreshState
|
|
85
87
|
};
|
|
@@ -4,7 +4,7 @@ var g = (r, t, e) => (ne(r, typeof t != "symbol" ? t + "" : t, e), e);
|
|
|
4
4
|
import { MessageHandler as J, LoadingHandler as C } from "./mp-front-cli-utils-rxjs.es.js";
|
|
5
5
|
import { RxSubjectManager as Ur } from "./mp-front-cli-utils-rxjs.es.js";
|
|
6
6
|
import ae, { t as y } from "i18next";
|
|
7
|
-
import { t as se } from "./index-
|
|
7
|
+
import { t as se } from "./index-4b63b0bb.js";
|
|
8
8
|
import { CustomLogger as le } from "./mp-front-cli-logger.es.js";
|
|
9
9
|
import { of as d, switchMap as T, forkJoin as Y, catchError as W, EMPTY as Z, filter as X } from "rxjs";
|
|
10
10
|
import { CustomEncrypter as ie } from "./mp-front-cli-encrypter.es.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t } from "./index-
|
|
1
|
+
import { t } from "./index-4b63b0bb.js";
|
|
2
2
|
const e = {
|
|
3
3
|
errors: {}
|
|
4
4
|
}, a = {
|
|
@@ -23,7 +23,7 @@ const e = {
|
|
|
23
23
|
integer: "Debe ser un número entero"
|
|
24
24
|
},
|
|
25
25
|
string: {
|
|
26
|
-
length: "Debe tener exactamente
|
|
26
|
+
length: "Debe tener exactamente {{length}} caracteres",
|
|
27
27
|
min: "Debe tener al menos {{min}} caracteres",
|
|
28
28
|
max: "Debe tener máximo {{max}} caracteres",
|
|
29
29
|
email: "E-mail inválido",
|
|
@@ -32,13 +32,13 @@ const e = {
|
|
|
32
32
|
matches: "Dato no válido"
|
|
33
33
|
},
|
|
34
34
|
date: {
|
|
35
|
-
min: "Debe ser después de
|
|
36
|
-
max: "Debe ser antes de
|
|
35
|
+
min: "Debe ser después de {{min}}",
|
|
36
|
+
max: "Debe ser antes de {{max}}"
|
|
37
37
|
},
|
|
38
38
|
array: {
|
|
39
|
-
min: "Debe tener mínimo
|
|
40
|
-
max: "Debe tener máximo
|
|
41
|
-
length: "Debe tener
|
|
39
|
+
min: "Debe tener mínimo {{min}} items",
|
|
40
|
+
max: "Debe tener máximo {{max}} items",
|
|
41
|
+
length: "Debe tener {{max}} items"
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
};
|