mp-front-cli 0.0.20 → 0.0.22

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":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AA2CrD,qBAAa,YAAa,SAAQ,YAAY;IAC5C,GAAG,CAAC,KAAK,GAAE,MAAM,GAAG,KAAK,GAAG,QAAoB;;;;;;;;;CA0BjD"}
1
+ {"version":3,"file":"error-catalog.d.ts","sourceRoot":"","sources":["../../../src/core/errors/error-catalog.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AA2CrD,qBAAa,YAAa,SAAQ,YAAY;IAC5C,GAAG,CAAC,KAAK,GAAE,MAAM,GAAG,KAAK,GAAG,QAAoB;;;;;;;;;CA2BjD"}
@@ -26,6 +26,7 @@ export interface ApiError {
26
26
  title: string;
27
27
  detail: string;
28
28
  suggestedActions: string;
29
+ [key: string]: string | Source;
29
30
  }
30
31
  export interface Source {
31
32
  pointer: string;
@@ -1 +1 @@
1
- {"version":3,"file":"api-response.d.ts","sourceRoot":"","sources":["../../../src/core/interfaces/api-response.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAA;IACf,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAA;CACpB;AAED,MAAM,WAAW,IAAI,CAAC,CAAC;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,E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KAAK,EAAE,MAAM,CAAC,CAAA;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,IAAI,CAAA;CACX;AAED,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,QAAQ,CAAA;CACf;AAED,MAAM,WAAW,QAAQ;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;CAChD;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,gBAAgB,EAAE,MAAM,CAAA;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;CAC/B;AAED,MAAM,WAAW,MAAM;IACrB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb"}
@@ -1,6 +1,8 @@
1
1
  import { CustomLogger } from "./custom-logger";
2
2
  export declare class CustomEncoder extends CustomLogger {
3
3
  encode<T>(data: T): string;
4
- decode<T>(data: string | T | Record<string, unknown>): T;
4
+ decode<T>(data: string | T | {
5
+ info: string;
6
+ }): T;
5
7
  }
6
8
  //# sourceMappingURL=custom-encoder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"custom-encoder.d.ts","sourceRoot":"","sources":["../../../src/core/utils/custom-encoder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C,qBAAa,aAAc,SAAQ,YAAY;IAC7C,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;IAajB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAkBrD"}
1
+ {"version":3,"file":"custom-encoder.d.ts","sourceRoot":"","sources":["../../../src/core/utils/custom-encoder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C,qBAAa,aAAc,SAAQ,YAAY;IAC7C,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;IAajB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;CAkB9C"}
@@ -1642,7 +1642,7 @@ class b1 extends Hi {
1642
1642
  title: ui(Ft.internalError.title),
1643
1643
  message: ui(Ft.internalError.message)
1644
1644
  };
1645
- const t = typeof r == "string" ? r : r.code, s = typeof r == "string" ? {} : { ...r };
1645
+ const t = typeof r == "string" ? r : r.code ?? r.errorType, s = typeof r == "string" ? {} : { ...r };
1646
1646
  return {
1647
1647
  ...Ft[t] ?? Ft.default,
1648
1648
  title: ui(
@@ -8445,9 +8445,8 @@ class Tw extends Hi {
8445
8445
  }
8446
8446
  decode(r) {
8447
8447
  try {
8448
- if (!af.isString(r))
8449
- return r;
8450
- const { info: t } = JSON.parse(r);
8448
+ af.isString(r) && (r = JSON.parse(r));
8449
+ const { info: t } = r;
8451
8450
  this.logDebug("decode CustomEncoder", JSON.stringify(t));
8452
8451
  const s = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
8453
8452
  if (af.isString(t) && s.test(t)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mp-front-cli",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {