mp-front-cli 0.0.19 → 0.0.21
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/utils/api-request/fetch-service-fe.d.ts +1 -1
- package/dist/core/utils/api-request/fetch-service-fe.d.ts.map +1 -1
- package/dist/core/utils/custom-encoder.d.ts +3 -1
- package/dist/core/utils/custom-encoder.d.ts.map +1 -1
- package/dist/mp-front-cli.es.js +6 -6
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ export declare class FetchServiceFE<TRes, TData = {}> extends CustomValidator {
|
|
|
6
6
|
private apiUrl;
|
|
7
7
|
private method;
|
|
8
8
|
private headers;
|
|
9
|
-
constructor(apiUrl: string, method?: Method);
|
|
9
|
+
constructor(apiUrl: string, method?: Method, headers?: HeadersInit);
|
|
10
10
|
errorHandler(data: TRes & IMessageErrorBFF): boolean;
|
|
11
11
|
customCatchError(error: Error): Observable<TRes>;
|
|
12
12
|
fetchData(params?: TData): Observable<TRes>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-service-fe.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/api-request/fetch-service-fe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,UAAU,EAAE,MAAM,MAAM,CAAA;AAGpE,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAErD,qBAAa,cAAc,CAAC,IAAI,EAAE,KAAK,GAAG,EAAE,CAAE,SAAQ,eAAe;IACnE,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,OAAO,CAAa;
|
|
1
|
+
{"version":3,"file":"fetch-service-fe.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/api-request/fetch-service-fe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,UAAU,EAAE,MAAM,MAAM,CAAA;AAGpE,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAErD,qBAAa,cAAc,CAAC,IAAI,EAAE,KAAK,GAAG,EAAE,CAAE,SAAQ,eAAe;IACnE,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,OAAO,CAAa;gBAG1B,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,MAAe,EACvB,OAAO,GAAE,WAAgB;IAW3B,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,gBAAgB;IAK1C,gBAAgB,CAAC,KAAK,EAAE,KAAK;IAO7B,SAAS,CAAC,MAAM,GAAE,KAAmB,GAAG,UAAU,CAAC,IAAI,CAAC;CAkBzD"}
|
|
@@ -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 |
|
|
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,
|
|
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"}
|
package/dist/mp-front-cli.es.js
CHANGED
|
@@ -8445,9 +8445,8 @@ class Tw extends Hi {
|
|
|
8445
8445
|
}
|
|
8446
8446
|
decode(r) {
|
|
8447
8447
|
try {
|
|
8448
|
-
|
|
8449
|
-
|
|
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)) {
|
|
@@ -9391,13 +9390,14 @@ class g_ extends l_ {
|
|
|
9391
9390
|
}
|
|
9392
9391
|
}
|
|
9393
9392
|
class m_ extends Za {
|
|
9394
|
-
constructor(t, s) {
|
|
9393
|
+
constructor(t, s = "POST", o = {}) {
|
|
9395
9394
|
super();
|
|
9396
9395
|
we(this, "apiUrl");
|
|
9397
9396
|
we(this, "method");
|
|
9398
9397
|
we(this, "headers");
|
|
9399
|
-
this.apiUrl = t, this.method = s
|
|
9400
|
-
"Content-Type": "application/json"
|
|
9398
|
+
this.apiUrl = t, this.method = s, this.headers = {
|
|
9399
|
+
"Content-Type": "application/json",
|
|
9400
|
+
...o
|
|
9401
9401
|
};
|
|
9402
9402
|
}
|
|
9403
9403
|
errorHandler(t) {
|