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.
@@ -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-validator-3bb58ece.js";
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,4 +1,4 @@
1
- import { g as ft, C as zr } from "./custom-encoder-04bc877a.js";
1
+ import { g as ft, C as zr } from "./custom-encoder-70a77460.js";
2
2
  import { t as qr } from "./index-df4e0539.js";
3
3
  import { CustomLogger as Xr } from "./mp-front-cli-logger.es.js";
4
4
  const Yr = {
@@ -1,19 +1,20 @@
1
- import { E as m } from "./custom-validator-3bb58ece.js";
2
- import { ApiMiddleware as d, FetchServiceBE as n, FetchServiceFE as x } from "./mp-front-cli-core.es.js";
3
- import { S as f } from "./custom-header-89182d9e.js";
4
- import { LoadingHandler as l, MessageHandler as s, RxSubjectManager as E } from "./mp-front-cli-utils-rxjs.es.js";
5
- import "./custom-encoder-04bc877a.js";
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
- d as ApiMiddleware,
12
- m as ErrorCatalog,
13
- n as FetchServiceBE,
14
- x as FetchServiceFE,
15
- l as LoadingHandler,
16
- s as MessageHandler,
17
- E as RxSubjectManager,
18
- f as ServiceToken
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 E = Object.defineProperty;
2
- var B = (d, n, t) => n in d ? E(d, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[n] = t;
3
- var u = (d, n, t) => (B(d, typeof n != "symbol" ? n + "" : n, t), t);
4
- import { C as S, E as l } from "./custom-validator-3bb58ece.js";
5
- import { C as O, f } from "./custom-header-89182d9e.js";
6
- import { S as P } from "./custom-header-89182d9e.js";
7
- import { MessageHandler as g, LoadingHandler as c } from "./mp-front-cli-utils-rxjs.es.js";
8
- import { RxSubjectManager as F } from "./mp-front-cli-utils-rxjs.es.js";
9
- import { of as a, switchMap as o, catchError as p, EMPTY as b, filter as x } from "rxjs";
10
- import { v as m } from "./custom-encoder-04bc877a.js";
11
- import "./index-df4e0539.js";
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 w extends S {
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 l().get(i, this.uuid));
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), b;
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 J extends O {
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 l().get(t.errors[0], i);
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 }) => f(this.apiUrl, {
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
- x((r) => this.errorHandler(r, i))
88
+ b((r) => this.errorHandler(r, i))
88
89
  );
89
90
  }
90
91
  }
91
- class I extends S {
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 && (g.getInstance().setSubject(t), c.getInstance().setSubject(!1)), !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 = m(i, m.URL), s = this.encode({ ...t }, r);
111
- return c.getInstance().setSubject(this.isLoadingEnabled), f(this.apiUrl, {
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
- x(this.errorHandler),
122
+ b(this.errorHandler),
122
123
  o((e) => (c.getInstance().setSubject(!1), a(e))),
123
- p((e) => (c.getInstance().setSubject(!1), g.getInstance().setSubject(
124
- new l().get(e, r)
125
- ), b))
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
- w as ApiMiddleware,
131
- l as ErrorCatalog,
132
- J as FetchServiceBE,
133
- I as FetchServiceFE,
131
+ I as ApiMiddleware,
132
+ m as ErrorCatalog,
133
+ H as FetchServiceBE,
134
+ L as FetchServiceFE,
134
135
  c as LoadingHandler,
135
- g as MessageHandler,
136
- F as RxSubjectManager,
137
- P as ServiceToken
136
+ l as MessageHandler,
137
+ T as RxSubjectManager,
138
+ C as ServiceToken
138
139
  };
@@ -1,6 +1,5 @@
1
- import { C as p } from "./custom-encoder-04bc877a.js";
2
- import "crypto";
1
+ import { C as t } from "./custom-encoder-70a77460.js";
3
2
  import "./mp-front-cli-logger.es.js";
4
3
  export {
5
- p as CustomEncoder
4
+ t as CustomEncoder
6
5
  };
@@ -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 as s } from "./custom-header-89182d9e.js";
3
- import "./custom-validator-3bb58ece.js";
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-04bc877a.js";
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
- s as CustomHeader
10
+ C as CustomHeader
10
11
  };
@@ -1,8 +1,7 @@
1
- import { C as a } from "./custom-validator-3bb58ece.js";
2
- import "./custom-encoder-04bc877a.js";
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
- a as CustomValidator
6
+ p as CustomValidator
8
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mp-front-cli",
3
- "version": "0.0.39",
3
+ "version": "0.0.41",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {