mp-front-cli 0.0.124 → 0.0.125
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":"fetch-service-be.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/api-request/fetch-service-be.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAA0B,MAAM,MAAM,CAAA;AAEpE,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EAClB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"fetch-service-be.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/api-request/fetch-service-be.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAA0B,MAAM,MAAM,CAAA;AAEpE,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EAClB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAM/C,qBAAa,cAAc,CACzB,IAAI,EACJ,KAAK,GAAG,EAAE,EACV,gBAAgB,SAAS,iBAAiB,GAAG,QAAQ,EACrD,aAAa,GAAG,EAAE,CAClB,SAAQ,YAAY;IACpB,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,MAAM,CAAQ;gBAEV,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB;IAMtE,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,YAAY;IASpB,SAAS,CACP,MAAM,GAAE,KAAmB,EAC3B,IAAI,CAAC,EAAE,MAAM,GACZ,UAAU,CAAC,WAAW,CAAC,IAAI,EAAE,gBAAgB,EAAE,aAAa,CAAC,CAAC;IA2CjE,eAAe,CACb,MAAM,GAAE,KAAmB,EAC3B,IAAI,CAAC,EAAE,MAAM,GACZ,UAAU,CAAC,IAAI,CAAC;CA8CpB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ApiMiddleware as
|
|
2
|
-
import { LoadingHandler as
|
|
3
|
-
import { S as
|
|
1
|
+
import { ApiMiddleware as l, ErrorCatalog as x, FetchServiceBE as f, FetchServiceFE as s } from "./mp-front-cli-core.es.js";
|
|
2
|
+
import { LoadingHandler as E, MessageHandler as F, RxSubjectManager as M } from "./mp-front-cli-utils-rxjs.es.js";
|
|
3
|
+
import { S as H } from "./index-def0b487.js";
|
|
4
4
|
import "i18next";
|
|
5
5
|
import "./index-0cc7a8bb.js";
|
|
6
6
|
import "./mp-front-cli-logger.es.js";
|
|
@@ -10,14 +10,15 @@ import "node-jose";
|
|
|
10
10
|
import "crypto";
|
|
11
11
|
import "./mp-front-cli-encoder.es.js";
|
|
12
12
|
import "./mp-front-cli-header.es.js";
|
|
13
|
+
import "querystring";
|
|
13
14
|
import "./stringify-788d71a0.js";
|
|
14
15
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
l as ApiMiddleware,
|
|
17
|
+
x as ErrorCatalog,
|
|
18
|
+
f as FetchServiceBE,
|
|
19
|
+
s as FetchServiceFE,
|
|
20
|
+
E as LoadingHandler,
|
|
21
|
+
F as MessageHandler,
|
|
22
|
+
M as RxSubjectManager,
|
|
23
|
+
H as ServiceToken
|
|
23
24
|
};
|
|
@@ -2,17 +2,18 @@ var u = Object.defineProperty;
|
|
|
2
2
|
var f = (t, E, e) => E in t ? u(t, E, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[E] = e;
|
|
3
3
|
var O = (t, E, e) => (f(t, typeof E != "symbol" ? E + "" : E, e), e);
|
|
4
4
|
import { LoadingHandler as g, MessageHandler as M } from "./mp-front-cli-utils-rxjs.es.js";
|
|
5
|
-
import { RxSubjectManager as
|
|
5
|
+
import { RxSubjectManager as De } from "./mp-front-cli-utils-rxjs.es.js";
|
|
6
6
|
import { f as c } from "./index-def0b487.js";
|
|
7
|
-
import { S as
|
|
7
|
+
import { S as Pe } from "./index-def0b487.js";
|
|
8
8
|
import F, { t as U } from "i18next";
|
|
9
9
|
import { t as v } from "./index-0cc7a8bb.js";
|
|
10
10
|
import { CustomLogger as w } from "./mp-front-cli-logger.es.js";
|
|
11
|
-
import { of as T, switchMap as L, forkJoin as B, catchError as
|
|
12
|
-
import { CustomEncrypter as
|
|
11
|
+
import { of as T, switchMap as L, forkJoin as B, catchError as n, EMPTY as P, filter as h } from "rxjs";
|
|
12
|
+
import { CustomEncrypter as V } from "./mp-front-cli-encrypter.es.js";
|
|
13
13
|
import { CustomHeader as Q } from "./mp-front-cli-header.es.js";
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
14
|
+
import x from "querystring";
|
|
15
|
+
import { CustomEncoder as G } from "./mp-front-cli-encoder.es.js";
|
|
16
|
+
import { u as H } from "./stringify-788d71a0.js";
|
|
16
17
|
import "node-jose";
|
|
17
18
|
import "crypto";
|
|
18
19
|
const Y = {
|
|
@@ -35,7 +36,7 @@ F.init({
|
|
|
35
36
|
},
|
|
36
37
|
debug: !1
|
|
37
38
|
});
|
|
38
|
-
const
|
|
39
|
+
const K = {
|
|
39
40
|
"ENROLLMENT-INVALIDCONFIGURATION-0000": {
|
|
40
41
|
code: 400,
|
|
41
42
|
type: "modal",
|
|
@@ -302,7 +303,7 @@ const H = {
|
|
|
302
303
|
title: "errors.ENROLLMENT-IMEIFOUNDINACTIVEAPPLICATION-0041.title",
|
|
303
304
|
level: "warning"
|
|
304
305
|
}
|
|
305
|
-
},
|
|
306
|
+
}, J = {
|
|
306
307
|
"SKIPFINGERPRINT-WITHOUT-PERMISSIONS-01": {
|
|
307
308
|
code: 400,
|
|
308
309
|
type: "modal",
|
|
@@ -359,7 +360,7 @@ const H = {
|
|
|
359
360
|
title: "errors.helpdesk.UNEXCEPTED-ERROR.title",
|
|
360
361
|
level: "error"
|
|
361
362
|
}
|
|
362
|
-
},
|
|
363
|
+
}, _ = {
|
|
363
364
|
"PF-CANCEL-APPLICATION-GENERIC-ERROR-001": {
|
|
364
365
|
code: 400,
|
|
365
366
|
type: "modal",
|
|
@@ -367,10 +368,10 @@ const H = {
|
|
|
367
368
|
title: "errors.PF-CANCEL-APPLICATION-GENERIC-ERROR-001.title",
|
|
368
369
|
level: "error"
|
|
369
370
|
}
|
|
370
|
-
},
|
|
371
|
-
...
|
|
372
|
-
...
|
|
373
|
-
},
|
|
371
|
+
}, X = {
|
|
372
|
+
..._,
|
|
373
|
+
...J
|
|
374
|
+
}, I = {
|
|
374
375
|
"MP-001": {
|
|
375
376
|
code: 400,
|
|
376
377
|
type: "modal",
|
|
@@ -1186,37 +1187,37 @@ const H = {
|
|
|
1186
1187
|
type: "modal",
|
|
1187
1188
|
level: "warning"
|
|
1188
1189
|
},
|
|
1189
|
-
...
|
|
1190
|
-
...
|
|
1190
|
+
...K,
|
|
1191
|
+
...X
|
|
1191
1192
|
};
|
|
1192
1193
|
class C extends w {
|
|
1193
1194
|
get(E = "default", e = "NOT_FOUND") {
|
|
1194
|
-
var
|
|
1195
|
+
var N, l;
|
|
1195
1196
|
if (E instanceof Error)
|
|
1196
1197
|
return this.logError(E.message), {
|
|
1197
|
-
...
|
|
1198
|
-
title: U(
|
|
1199
|
-
message: U(
|
|
1198
|
+
...I.internalError,
|
|
1199
|
+
title: U(I.internalError.title),
|
|
1200
|
+
message: U(I.internalError.message),
|
|
1200
1201
|
uuid: e
|
|
1201
1202
|
};
|
|
1202
1203
|
const r = typeof E == "string" ? E : E.code ?? E.errorType;
|
|
1203
1204
|
this.logDebug("statusCode", r);
|
|
1204
|
-
const
|
|
1205
|
+
const A = typeof E == "string" ? {} : { ...E };
|
|
1205
1206
|
return {
|
|
1206
|
-
...
|
|
1207
|
+
...I[r] ?? I.default,
|
|
1207
1208
|
title: U(
|
|
1208
|
-
((
|
|
1209
|
-
|
|
1209
|
+
((N = I[r]) == null ? void 0 : N.title) ?? I.default.title,
|
|
1210
|
+
A
|
|
1210
1211
|
),
|
|
1211
1212
|
message: U(
|
|
1212
|
-
((
|
|
1213
|
-
|
|
1213
|
+
((l = I[r]) == null ? void 0 : l.message) ?? I.default.message,
|
|
1214
|
+
A
|
|
1214
1215
|
),
|
|
1215
1216
|
uuid: e
|
|
1216
1217
|
};
|
|
1217
1218
|
}
|
|
1218
1219
|
}
|
|
1219
|
-
class
|
|
1220
|
+
class me extends V {
|
|
1220
1221
|
constructor() {
|
|
1221
1222
|
super(...arguments);
|
|
1222
1223
|
O(this, "uuid", "");
|
|
@@ -1230,51 +1231,51 @@ class ie extends h {
|
|
|
1230
1231
|
throw new C().get("SESSION_NOT_FOUND");
|
|
1231
1232
|
return this.session;
|
|
1232
1233
|
}
|
|
1233
|
-
returnData(e, r,
|
|
1234
|
-
const
|
|
1235
|
-
e.status(200).json(
|
|
1234
|
+
returnData(e, r, A) {
|
|
1235
|
+
const N = this.encode(r, A);
|
|
1236
|
+
e.status(200).json(N);
|
|
1236
1237
|
}
|
|
1237
1238
|
returnError(e, r) {
|
|
1238
1239
|
return r != null && r.uuid ? e.status(520).json(r) : e.status(520).json(new C().get(r, this.uuid));
|
|
1239
1240
|
}
|
|
1240
1241
|
get(e) {
|
|
1241
|
-
return this.logDebug("get ApiMiddleware"), (r,
|
|
1242
|
-
var
|
|
1243
|
-
this.logDebug("return ApiMiddleware"), this.uuid = (
|
|
1242
|
+
return this.logDebug("get ApiMiddleware"), (r, A) => {
|
|
1243
|
+
var N;
|
|
1244
|
+
this.logDebug("return ApiMiddleware"), this.uuid = (N = r == null ? void 0 : r.body) == null ? void 0 : N.uuid, T(r).pipe(
|
|
1244
1245
|
L(
|
|
1245
|
-
(
|
|
1246
|
-
params: T(this.decode(
|
|
1247
|
-
headers: T(
|
|
1246
|
+
(l) => B({
|
|
1247
|
+
params: T(this.decode(l.body)),
|
|
1248
|
+
headers: T(l.headers)
|
|
1248
1249
|
})
|
|
1249
1250
|
),
|
|
1250
1251
|
L(
|
|
1251
|
-
({ params:
|
|
1252
|
-
response: e(
|
|
1252
|
+
({ params: l, headers: R }) => B({
|
|
1253
|
+
response: e(l, this.uuid, R),
|
|
1253
1254
|
headers: T(R),
|
|
1254
|
-
params: T(
|
|
1255
|
+
params: T(l)
|
|
1255
1256
|
})
|
|
1256
1257
|
),
|
|
1257
|
-
L(({ params:
|
|
1258
|
-
`ApiMiddleware \x1B[37m <URL>: \x1B[33m ${r.url} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
|
|
1258
|
+
L(({ params: l, response: R, headers: s }) => (this.logDebug(
|
|
1259
|
+
`ApiMiddleware \x1B[37m <URL>: \x1B[33m ${r.url} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(s)} \x1B[37m <UUID> \x1B[33m ${r.body.uuid} \x1B[37m <PARAMS> \x1B[33m ${JSON.stringify(l)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(R)}`
|
|
1259
1260
|
), T(R))),
|
|
1260
|
-
|
|
1261
|
+
n((l) => {
|
|
1261
1262
|
var R;
|
|
1262
1263
|
return this.logError(
|
|
1263
|
-
`ApiMiddleware <URL>: ${r == null ? void 0 : r.url} <HEADERS>: ${JSON.stringify(r == null ? void 0 : r.headers)} <UUID> ${(R = r == null ? void 0 : r.body) == null ? void 0 : R.uuid} <PARAMS> ${JSON.stringify(r == null ? void 0 : r.body)} <ERROR>: ${JSON.stringify(
|
|
1264
|
-
), this.returnError(
|
|
1264
|
+
`ApiMiddleware <URL>: ${r == null ? void 0 : r.url} <HEADERS>: ${JSON.stringify(r == null ? void 0 : r.headers)} <UUID> ${(R = r == null ? void 0 : r.body) == null ? void 0 : R.uuid} <PARAMS> ${JSON.stringify(r == null ? void 0 : r.body)} <ERROR>: ${JSON.stringify(l)}`
|
|
1265
|
+
), this.returnError(A, l), P;
|
|
1265
1266
|
})
|
|
1266
1267
|
).subscribe({
|
|
1267
|
-
next: (
|
|
1268
|
-
this.logDebug("ApiMiddleware subscribe next", JSON.stringify(
|
|
1268
|
+
next: (l) => {
|
|
1269
|
+
this.logDebug("ApiMiddleware subscribe next", JSON.stringify(l)), this.returnData(A, l, this.uuid);
|
|
1269
1270
|
}
|
|
1270
1271
|
});
|
|
1271
1272
|
};
|
|
1272
1273
|
}
|
|
1273
1274
|
}
|
|
1274
|
-
const
|
|
1275
|
-
class
|
|
1276
|
-
constructor(e, r,
|
|
1277
|
-
super(
|
|
1275
|
+
const $ = process.env.ID_FRONT ?? "NOT_AVAILABLE";
|
|
1276
|
+
class ge extends Q {
|
|
1277
|
+
constructor(e, r, A = {}) {
|
|
1278
|
+
super(A);
|
|
1278
1279
|
O(this, "apiUrl");
|
|
1279
1280
|
O(this, "method");
|
|
1280
1281
|
this.apiUrl = e, this.method = r ?? "POST";
|
|
@@ -1287,7 +1288,7 @@ class Ce extends Q {
|
|
|
1287
1288
|
formatParams(e) {
|
|
1288
1289
|
return JSON.stringify({
|
|
1289
1290
|
data: {
|
|
1290
|
-
type:
|
|
1291
|
+
type: $,
|
|
1291
1292
|
attributes: e
|
|
1292
1293
|
}
|
|
1293
1294
|
});
|
|
@@ -1295,106 +1296,111 @@ class Ce extends Q {
|
|
|
1295
1296
|
fetchData(e = {}, r) {
|
|
1296
1297
|
return this.getHeaders().pipe(
|
|
1297
1298
|
L(
|
|
1298
|
-
(
|
|
1299
|
+
(A) => c(
|
|
1299
1300
|
this.apiUrl,
|
|
1300
1301
|
{
|
|
1301
1302
|
method: "POST",
|
|
1302
|
-
headers:
|
|
1303
|
+
headers: A,
|
|
1303
1304
|
body: this.formatParams(e),
|
|
1304
|
-
selector: (
|
|
1305
|
+
selector: (N) => N.json()
|
|
1305
1306
|
}
|
|
1306
1307
|
).pipe(
|
|
1307
|
-
|
|
1308
|
-
throw this.logError(JSON.stringify(
|
|
1308
|
+
n((N) => {
|
|
1309
|
+
throw this.logError(JSON.stringify(N)), this.logError(
|
|
1309
1310
|
`FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
|
|
1310
|
-
|
|
1311
|
+
A
|
|
1311
1312
|
)} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
|
|
1312
1313
|
this.formatParams(e)
|
|
1313
|
-
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(
|
|
1314
|
+
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(N)} \x1B[33m`
|
|
1314
1315
|
), new C().get("default", r);
|
|
1315
1316
|
}),
|
|
1316
|
-
L((
|
|
1317
|
+
L((N) => (this.logDebug(
|
|
1317
1318
|
`FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
|
|
1318
|
-
|
|
1319
|
+
A
|
|
1319
1320
|
)} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
|
|
1320
1321
|
this.formatParams(e)
|
|
1321
|
-
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(
|
|
1322
|
-
), T(
|
|
1322
|
+
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(N)} \x1B[33m`
|
|
1323
|
+
), T(N)))
|
|
1323
1324
|
)
|
|
1324
1325
|
),
|
|
1325
|
-
|
|
1326
|
+
h((A) => this.errorHandler(A, r))
|
|
1326
1327
|
);
|
|
1327
1328
|
}
|
|
1328
1329
|
fetchCustomData(e = {}, r) {
|
|
1329
|
-
|
|
1330
|
+
const A = {
|
|
1331
|
+
"Content-Type": "application/json"
|
|
1332
|
+
}, N = x.stringify(
|
|
1333
|
+
e
|
|
1334
|
+
), l = `${this.apiUrl}?${N}`, R = this.method === "GET" ? l : this.apiUrl;
|
|
1335
|
+
return this.getHeaders(A).pipe(
|
|
1330
1336
|
L(
|
|
1331
|
-
(
|
|
1337
|
+
(s) => c(R, {
|
|
1332
1338
|
method: this.method,
|
|
1333
|
-
headers:
|
|
1339
|
+
headers: s,
|
|
1334
1340
|
body: this.method === "GET" ? null : JSON.stringify(e),
|
|
1335
|
-
selector: (
|
|
1341
|
+
selector: (a) => a.json()
|
|
1336
1342
|
}).pipe(
|
|
1337
|
-
|
|
1338
|
-
throw this.logError(JSON.stringify(
|
|
1339
|
-
`FetchServiceBE \x1B[37m <URL>: \x1B[33m ${
|
|
1340
|
-
|
|
1343
|
+
n((a) => {
|
|
1344
|
+
throw this.logError(JSON.stringify(a)), this.logError(
|
|
1345
|
+
`FetchServiceBE \x1B[37m <URL>: \x1B[33m ${R} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
|
|
1346
|
+
s
|
|
1341
1347
|
)} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
|
|
1342
1348
|
this.formatParams(e)
|
|
1343
|
-
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(
|
|
1349
|
+
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(a)} \x1B[33m`
|
|
1344
1350
|
), new C().get("default", r);
|
|
1345
1351
|
}),
|
|
1346
|
-
L((
|
|
1347
|
-
`FetchServiceBE \x1B[37m <URL>: \x1B[33m ${
|
|
1348
|
-
|
|
1352
|
+
L((a) => (this.logDebug(
|
|
1353
|
+
`FetchServiceBE \x1B[37m <URL>: \x1B[33m ${R} \x1B[37m \x1B[37m <METHOD>: \x1B[33m ${this.method} <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
|
|
1354
|
+
s
|
|
1349
1355
|
)} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
|
|
1350
1356
|
e
|
|
1351
|
-
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(
|
|
1352
|
-
), T(
|
|
1357
|
+
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(a)} \x1B[33m`
|
|
1358
|
+
), T(a)))
|
|
1353
1359
|
)
|
|
1354
1360
|
)
|
|
1355
1361
|
);
|
|
1356
1362
|
}
|
|
1357
1363
|
}
|
|
1358
|
-
const
|
|
1359
|
-
function b(t) {
|
|
1360
|
-
return typeof t == "string" && $.test(t);
|
|
1361
|
-
}
|
|
1364
|
+
const b = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
1362
1365
|
function W(t) {
|
|
1363
|
-
|
|
1366
|
+
return typeof t == "string" && b.test(t);
|
|
1367
|
+
}
|
|
1368
|
+
function k(t) {
|
|
1369
|
+
if (!W(t))
|
|
1364
1370
|
throw TypeError("Invalid UUID");
|
|
1365
1371
|
let E;
|
|
1366
1372
|
const e = new Uint8Array(16);
|
|
1367
1373
|
return e[0] = (E = parseInt(t.slice(0, 8), 16)) >>> 24, e[1] = E >>> 16 & 255, e[2] = E >>> 8 & 255, e[3] = E & 255, e[4] = (E = parseInt(t.slice(9, 13), 16)) >>> 8, e[5] = E & 255, e[6] = (E = parseInt(t.slice(14, 18), 16)) >>> 8, e[7] = E & 255, e[8] = (E = parseInt(t.slice(19, 23), 16)) >>> 8, e[9] = E & 255, e[10] = (E = parseInt(t.slice(24, 36), 16)) / 1099511627776 & 255, e[11] = E / 4294967296 & 255, e[12] = E >>> 24 & 255, e[13] = E >>> 16 & 255, e[14] = E >>> 8 & 255, e[15] = E & 255, e;
|
|
1368
1374
|
}
|
|
1369
|
-
function
|
|
1375
|
+
function j(t) {
|
|
1370
1376
|
t = unescape(encodeURIComponent(t));
|
|
1371
1377
|
const E = [];
|
|
1372
1378
|
for (let e = 0; e < t.length; ++e)
|
|
1373
1379
|
E.push(t.charCodeAt(e));
|
|
1374
1380
|
return E;
|
|
1375
1381
|
}
|
|
1376
|
-
const
|
|
1377
|
-
function
|
|
1378
|
-
function r(
|
|
1379
|
-
var
|
|
1380
|
-
if (typeof
|
|
1382
|
+
const Z = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", z = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
|
|
1383
|
+
function q(t, E, e) {
|
|
1384
|
+
function r(A, N, l, R) {
|
|
1385
|
+
var s;
|
|
1386
|
+
if (typeof A == "string" && (A = j(A)), typeof N == "string" && (N = k(N)), ((s = N) === null || s === void 0 ? void 0 : s.length) !== 16)
|
|
1381
1387
|
throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
|
|
1382
|
-
let
|
|
1383
|
-
if (
|
|
1388
|
+
let a = new Uint8Array(16 + A.length);
|
|
1389
|
+
if (a.set(N), a.set(A, N.length), a = e(a), a[6] = a[6] & 15 | E, a[8] = a[8] & 63 | 128, l) {
|
|
1384
1390
|
R = R || 0;
|
|
1385
|
-
for (let
|
|
1386
|
-
|
|
1387
|
-
return
|
|
1391
|
+
for (let i = 0; i < 16; ++i)
|
|
1392
|
+
l[R + i] = a[i];
|
|
1393
|
+
return l;
|
|
1388
1394
|
}
|
|
1389
|
-
return
|
|
1395
|
+
return H(a);
|
|
1390
1396
|
}
|
|
1391
1397
|
try {
|
|
1392
1398
|
r.name = t;
|
|
1393
1399
|
} catch {
|
|
1394
1400
|
}
|
|
1395
|
-
return r.DNS =
|
|
1401
|
+
return r.DNS = Z, r.URL = z, r;
|
|
1396
1402
|
}
|
|
1397
|
-
function
|
|
1403
|
+
function ee(t, E, e, r) {
|
|
1398
1404
|
switch (t) {
|
|
1399
1405
|
case 0:
|
|
1400
1406
|
return E & e ^ ~E & r;
|
|
@@ -1409,42 +1415,42 @@ function q(t, E, e, r) {
|
|
|
1409
1415
|
function D(t, E) {
|
|
1410
1416
|
return t << E | t >>> 32 - E;
|
|
1411
1417
|
}
|
|
1412
|
-
function
|
|
1418
|
+
function re(t) {
|
|
1413
1419
|
const E = [1518500249, 1859775393, 2400959708, 3395469782], e = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
|
|
1414
1420
|
if (typeof t == "string") {
|
|
1415
|
-
const
|
|
1421
|
+
const l = unescape(encodeURIComponent(t));
|
|
1416
1422
|
t = [];
|
|
1417
|
-
for (let R = 0; R <
|
|
1418
|
-
t.push(
|
|
1423
|
+
for (let R = 0; R < l.length; ++R)
|
|
1424
|
+
t.push(l.charCodeAt(R));
|
|
1419
1425
|
} else
|
|
1420
1426
|
Array.isArray(t) || (t = Array.prototype.slice.call(t));
|
|
1421
1427
|
t.push(128);
|
|
1422
|
-
const r = t.length / 4 + 2,
|
|
1423
|
-
for (let
|
|
1428
|
+
const r = t.length / 4 + 2, A = Math.ceil(r / 16), N = new Array(A);
|
|
1429
|
+
for (let l = 0; l < A; ++l) {
|
|
1424
1430
|
const R = new Uint32Array(16);
|
|
1425
|
-
for (let
|
|
1426
|
-
R[
|
|
1427
|
-
|
|
1431
|
+
for (let s = 0; s < 16; ++s)
|
|
1432
|
+
R[s] = t[l * 64 + s * 4] << 24 | t[l * 64 + s * 4 + 1] << 16 | t[l * 64 + s * 4 + 2] << 8 | t[l * 64 + s * 4 + 3];
|
|
1433
|
+
N[l] = R;
|
|
1428
1434
|
}
|
|
1429
|
-
|
|
1430
|
-
for (let
|
|
1435
|
+
N[A - 1][14] = (t.length - 1) * 8 / Math.pow(2, 32), N[A - 1][14] = Math.floor(N[A - 1][14]), N[A - 1][15] = (t.length - 1) * 8 & 4294967295;
|
|
1436
|
+
for (let l = 0; l < A; ++l) {
|
|
1431
1437
|
const R = new Uint32Array(80);
|
|
1432
|
-
for (let
|
|
1433
|
-
R[
|
|
1434
|
-
for (let
|
|
1435
|
-
R[
|
|
1436
|
-
let
|
|
1437
|
-
for (let
|
|
1438
|
-
const d = Math.floor(
|
|
1439
|
-
|
|
1438
|
+
for (let o = 0; o < 16; ++o)
|
|
1439
|
+
R[o] = N[l][o];
|
|
1440
|
+
for (let o = 16; o < 80; ++o)
|
|
1441
|
+
R[o] = D(R[o - 3] ^ R[o - 8] ^ R[o - 14] ^ R[o - 16], 1);
|
|
1442
|
+
let s = e[0], a = e[1], i = e[2], m = e[3], S = e[4];
|
|
1443
|
+
for (let o = 0; o < 80; ++o) {
|
|
1444
|
+
const d = Math.floor(o / 20), y = D(s, 5) + ee(d, a, i, m) + S + E[d] + R[o] >>> 0;
|
|
1445
|
+
S = m, m = i, i = D(a, 30) >>> 0, a = s, s = y;
|
|
1440
1446
|
}
|
|
1441
|
-
e[0] = e[0] +
|
|
1447
|
+
e[0] = e[0] + s >>> 0, e[1] = e[1] + a >>> 0, e[2] = e[2] + i >>> 0, e[3] = e[3] + m >>> 0, e[4] = e[4] + S >>> 0;
|
|
1442
1448
|
}
|
|
1443
1449
|
return [e[0] >> 24 & 255, e[0] >> 16 & 255, e[0] >> 8 & 255, e[0] & 255, e[1] >> 24 & 255, e[1] >> 16 & 255, e[1] >> 8 & 255, e[1] & 255, e[2] >> 24 & 255, e[2] >> 16 & 255, e[2] >> 8 & 255, e[2] & 255, e[3] >> 24 & 255, e[3] >> 16 & 255, e[3] >> 8 & 255, e[3] & 255, e[4] >> 24 & 255, e[4] >> 16 & 255, e[4] >> 8 & 255, e[4] & 255];
|
|
1444
1450
|
}
|
|
1445
|
-
const
|
|
1446
|
-
class
|
|
1447
|
-
constructor(e, r = "POST",
|
|
1451
|
+
const Ee = q("v5", 80, re), p = Ee;
|
|
1452
|
+
class Ue extends G {
|
|
1453
|
+
constructor(e, r = "POST", A = {}) {
|
|
1448
1454
|
super();
|
|
1449
1455
|
O(this, "apiUrl");
|
|
1450
1456
|
O(this, "method");
|
|
@@ -1453,7 +1459,7 @@ class me extends x {
|
|
|
1453
1459
|
O(this, "errorResponse");
|
|
1454
1460
|
this.apiUrl = e, this.method = r, this.headers = {
|
|
1455
1461
|
"Content-Type": "application/json",
|
|
1456
|
-
...
|
|
1462
|
+
...A
|
|
1457
1463
|
};
|
|
1458
1464
|
}
|
|
1459
1465
|
setIsLoadingEnabled(e) {
|
|
@@ -1463,37 +1469,37 @@ class me extends x {
|
|
|
1463
1469
|
this.errorResponse = e;
|
|
1464
1470
|
}
|
|
1465
1471
|
fetchData(e = {}) {
|
|
1466
|
-
const r = (/* @__PURE__ */ new Date()).toISOString(),
|
|
1472
|
+
const r = (/* @__PURE__ */ new Date()).toISOString(), A = p(r, p.URL), N = this.encode({ ...e }, A);
|
|
1467
1473
|
g.getInstance().setSubject(this.isLoadingEnabled);
|
|
1468
1474
|
const R = new URLSearchParams(window.location.search).get("flow") ?? "N/A";
|
|
1469
1475
|
return c(this.apiUrl, {
|
|
1470
1476
|
method: this.method,
|
|
1471
1477
|
headers: { ...this.headers, flow: R },
|
|
1472
|
-
body:
|
|
1473
|
-
selector: (
|
|
1478
|
+
body: N,
|
|
1479
|
+
selector: (s) => s.json()
|
|
1474
1480
|
}).pipe(
|
|
1475
|
-
L((
|
|
1476
|
-
L((
|
|
1477
|
-
`FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${
|
|
1478
|
-
), g.getInstance().setSubject(!1), M.getInstance().setSubject(
|
|
1479
|
-
L((
|
|
1480
|
-
`FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${
|
|
1481
|
-
), T(
|
|
1482
|
-
|
|
1483
|
-
`FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${
|
|
1481
|
+
L((s) => T(this.decode(s))),
|
|
1482
|
+
L((s) => s.code && (s.type === "modal" || s.type === "message") ? (this.logError(
|
|
1483
|
+
`FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${N} <RESPONSE>: ${JSON.stringify(s)}`
|
|
1484
|
+
), g.getInstance().setSubject(!1), M.getInstance().setSubject(s), this.errorResponse ? T(this.errorResponse) : P) : T(s)),
|
|
1485
|
+
L((s) => (g.getInstance().setSubject(!1), this.logDebug(
|
|
1486
|
+
`FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${N} <RESPONSE>: ${JSON.stringify(s)}`
|
|
1487
|
+
), T(s))),
|
|
1488
|
+
n((s) => (this.logError(
|
|
1489
|
+
`FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${N} <RESPONSE>: ${JSON.stringify(s)}`
|
|
1484
1490
|
), g.getInstance().setSubject(!1), M.getInstance().setSubject(
|
|
1485
|
-
new C().get(
|
|
1491
|
+
new C().get(s, A)
|
|
1486
1492
|
), this.errorResponse ? T(this.errorResponse) : P))
|
|
1487
1493
|
);
|
|
1488
1494
|
}
|
|
1489
1495
|
}
|
|
1490
1496
|
export {
|
|
1491
|
-
|
|
1497
|
+
me as ApiMiddleware,
|
|
1492
1498
|
C as ErrorCatalog,
|
|
1493
|
-
|
|
1494
|
-
|
|
1499
|
+
ge as FetchServiceBE,
|
|
1500
|
+
Ue as FetchServiceFE,
|
|
1495
1501
|
g as LoadingHandler,
|
|
1496
1502
|
M as MessageHandler,
|
|
1497
|
-
|
|
1498
|
-
|
|
1503
|
+
De as RxSubjectManager,
|
|
1504
|
+
Pe as ServiceToken
|
|
1499
1505
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mp-front-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.125",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -74,6 +74,7 @@
|
|
|
74
74
|
"@types/uuid": "9.0.8",
|
|
75
75
|
"husky": "^9.0.11",
|
|
76
76
|
"lodash": "4.17.21",
|
|
77
|
+
"mp-front-cli": "file:",
|
|
77
78
|
"uuid": "9.0.1"
|
|
78
79
|
},
|
|
79
80
|
"devDependencies": {
|