mp-front-cli 0.0.32 → 0.0.34

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.
@@ -4689,7 +4689,7 @@ class Is extends Zr {
4689
4689
  this.logDebug("entra validate Token Front");
4690
4690
  const r = await rr.getToken({ req: e });
4691
4691
  if (this.logDebug("Token Front", JSON.stringify(r)), !r)
4692
- throw new tr("UNAUTHORIZED").get();
4692
+ throw new tr("UNAUTHORIZED");
4693
4693
  return e;
4694
4694
  }
4695
4695
  }
@@ -1,20 +1,21 @@
1
- import { E as p, M as m } from "./custom-validator-185d0ac8.js";
2
- import { ApiMiddleware as c, FetchServiceBE as x, FetchServiceFE as M } from "./mp-front-cli-core.es.js";
3
- import { S as f } from "./custom-header-f5d2d6e4.js";
4
- import { M as n, R as E } from "./message-handler-d90f2bb6.js";
5
- import { LoadingHandler as S } from "./mp-front-cli-utils-rxjs.es.js";
1
+ import { E as m, M as s } from "./custom-validator-d4c8885a.js";
2
+ import { ApiMiddleware as x, FetchServiceBE as M, FetchServiceFE as d } from "./mp-front-cli-core.es.js";
3
+ import { S as g } from "./custom-header-bb082c8e.js";
4
+ import { M as E, R as F } from "./message-handler-d90f2bb6.js";
5
+ import { LoadingHandler as l } from "./mp-front-cli-utils-rxjs.es.js";
6
6
  import "./custom-encoder-b2078b5c.js";
7
7
  import "./mp-front-cli-logger.es.js";
8
8
  import "./index-6f6eb615.js";
9
9
  import "rxjs";
10
+ import "./mp-front-cli-catch-error.es.js";
10
11
  export {
11
- c as ApiMiddleware,
12
- p as ErrorCatalog,
13
- x as FetchServiceBE,
14
- M as FetchServiceFE,
15
- S as LoadingHandler,
16
- m as MessageErrorBFF,
17
- n as MessageHandler,
18
- E as RxSubjectManager,
19
- f as ServiceToken
12
+ x as ApiMiddleware,
13
+ m as ErrorCatalog,
14
+ M as FetchServiceBE,
15
+ d as FetchServiceFE,
16
+ l as LoadingHandler,
17
+ s as MessageErrorBFF,
18
+ E as MessageHandler,
19
+ F as RxSubjectManager,
20
+ g as ServiceToken
20
21
  };
@@ -0,0 +1,14 @@
1
+ import { EMPTY as t } from "rxjs";
2
+ import { C as o, M as e } from "./custom-validator-d4c8885a.js";
3
+ import { M as s } from "./message-handler-d90f2bb6.js";
4
+ import "./custom-encoder-b2078b5c.js";
5
+ import "./mp-front-cli-logger.es.js";
6
+ import "./index-6f6eb615.js";
7
+ class u extends o {
8
+ catch(r) {
9
+ return s.getInstance().setSubject(new e(r)), t;
10
+ }
11
+ }
12
+ export {
13
+ u as CustomCatchError
14
+ };
@@ -1,18 +1,19 @@
1
- var S = Object.defineProperty;
2
- var f = (o, s, t) => s in o ? S(o, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[s] = t;
3
- var n = (o, s, t) => (f(o, typeof s != "symbol" ? s + "" : s, t), t);
4
- import { M as p } from "./custom-validator-185d0ac8.js";
5
- import { E as $ } from "./custom-validator-185d0ac8.js";
6
- import { C as g, a as b, f as l } from "./custom-header-f5d2d6e4.js";
7
- import { S as v } from "./custom-header-f5d2d6e4.js";
1
+ var f = Object.defineProperty;
2
+ var p = (o, s, t) => s in o ? f(o, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[s] = t;
3
+ var n = (o, s, t) => (p(o, typeof s != "symbol" ? s + "" : s, t), t);
4
+ import { M as S } from "./custom-validator-d4c8885a.js";
5
+ import { E as R } from "./custom-validator-d4c8885a.js";
6
+ import { C as b, f as m } from "./custom-header-bb082c8e.js";
7
+ import { S as w } from "./custom-header-bb082c8e.js";
8
8
  import { M as c } from "./message-handler-d90f2bb6.js";
9
- import { R as A } from "./message-handler-d90f2bb6.js";
9
+ import { R as C } from "./message-handler-d90f2bb6.js";
10
10
  import { LoadingHandler as u } from "./mp-front-cli-utils-rxjs.es.js";
11
- import { of as a, switchMap as i, catchError as d, filter as m } from "rxjs";
11
+ import { of as a, switchMap as i, catchError as d, filter as g } from "rxjs";
12
+ import { CustomCatchError as l } from "./mp-front-cli-catch-error.es.js";
12
13
  import "./custom-encoder-b2078b5c.js";
13
14
  import "./mp-front-cli-logger.es.js";
14
15
  import "./index-6f6eb615.js";
15
- class F extends g {
16
+ class U extends l {
16
17
  returnData(s, t) {
17
18
  c.getInstance().unsubscribeSubject();
18
19
  const e = this.encode(t);
@@ -37,7 +38,7 @@ class F extends g {
37
38
  };
38
39
  }
39
40
  }
40
- class U extends b {
41
+ class I extends b {
41
42
  constructor(t, e) {
42
43
  super();
43
44
  n(this, "apiUrl");
@@ -46,7 +47,7 @@ class U extends b {
46
47
  }
47
48
  errorHandler(t) {
48
49
  return t != null && t.errors && c.getInstance().setSubject(
49
- new p(t.errors[0])
50
+ new S(t.errors[0])
50
51
  ), !(t != null && t.errors);
51
52
  }
52
53
  fetchData(t = {}) {
@@ -56,7 +57,7 @@ class U extends b {
56
57
  (e) => this.getHeaders().pipe(i((r) => a({ params: e, headers: r })))
57
58
  ),
58
59
  i(
59
- ({ params: e, headers: r }) => l(this.apiUrl, {
60
+ ({ params: e, headers: r }) => m(this.apiUrl, {
60
61
  method: this.method,
61
62
  headers: r,
62
63
  body: this.method === "GET" ? null : JSON.stringify(e)
@@ -71,11 +72,11 @@ class U extends b {
71
72
  ), a(h)))
72
73
  )
73
74
  ),
74
- m(this.errorHandler)
75
+ g(this.errorHandler)
75
76
  );
76
77
  }
77
78
  }
78
- class I extends g {
79
+ class N extends l {
79
80
  constructor(t, e = "POST", r = {}) {
80
81
  super();
81
82
  n(this, "apiUrl");
@@ -93,7 +94,7 @@ class I extends g {
93
94
  return u.getInstance().setSubject(!0), a(t).pipe(
94
95
  d((e) => (u.getInstance().setSubject(!1), this.catch(e))),
95
96
  i((e) => this.encode(e)),
96
- i((e) => l(this.apiUrl, {
97
+ i((e) => m(this.apiUrl, {
97
98
  method: this.method,
98
99
  headers: this.headers,
99
100
  body: e
@@ -102,20 +103,20 @@ class I extends g {
102
103
  i((e) => (this.logDebug(
103
104
  `FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <BODY>: ${JSON.stringify(e)}`
104
105
  ), a(e))),
105
- m(this.errorHandler),
106
+ g(this.errorHandler),
106
107
  i((e) => a(this.decode(e))),
107
108
  i((e) => (u.getInstance().setSubject(!1), a(e)))
108
109
  );
109
110
  }
110
111
  }
111
112
  export {
112
- F as ApiMiddleware,
113
- $ as ErrorCatalog,
114
- U as FetchServiceBE,
115
- I as FetchServiceFE,
113
+ U as ApiMiddleware,
114
+ R as ErrorCatalog,
115
+ I as FetchServiceBE,
116
+ N as FetchServiceFE,
116
117
  u as LoadingHandler,
117
- p as MessageErrorBFF,
118
+ S as MessageErrorBFF,
118
119
  c as MessageHandler,
119
- A as RxSubjectManager,
120
- v as ServiceToken
120
+ C as RxSubjectManager,
121
+ w as ServiceToken
121
122
  };
@@ -1,10 +1,11 @@
1
1
  import "rxjs";
2
- import { a as s } from "./custom-header-f5d2d6e4.js";
2
+ import { C } from "./custom-header-bb082c8e.js";
3
+ import "./mp-front-cli-catch-error.es.js";
3
4
  import "./mp-front-cli-logger.es.js";
4
- import "./custom-validator-185d0ac8.js";
5
+ import "./custom-validator-d4c8885a.js";
5
6
  import "./custom-encoder-b2078b5c.js";
6
7
  import "./index-6f6eb615.js";
7
8
  import "./message-handler-d90f2bb6.js";
8
9
  export {
9
- s as CustomHeader
10
+ C as CustomHeader
10
11
  };
@@ -1,4 +1,4 @@
1
- import { C as p } from "./custom-validator-185d0ac8.js";
1
+ import { C as p } from "./custom-validator-d4c8885a.js";
2
2
  import "./custom-encoder-b2078b5c.js";
3
3
  import "./index-6f6eb615.js";
4
4
  import "./mp-front-cli-logger.es.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mp-front-cli",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -38,6 +38,10 @@
38
38
  "types": "./dist/core/utils/custom-logger.d.ts",
39
39
  "import": "./dist/mp-front-cli-logger.es.js"
40
40
  },
41
+ "./core/catch-error": {
42
+ "types": "./dist/core/utils/custom-catch-error.d.ts",
43
+ "import": "./dist/mp-front-cli-catch-error.es.js"
44
+ },
41
45
  "./core/validator": {
42
46
  "types": "./dist/core/utils/custom-validator.d.ts",
43
47
  "import": "./dist/mp-front-cli-validator.es.js"