mp-front-cli 2.3.0 → 2.3.2-next-0
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/AuthEngine-CATazTYM.cjs +1 -0
- package/dist/{AuthEngine-Gl4gv5KD.js → AuthEngine-CQfKuww8.js} +175 -172
- package/dist/core/middleware/index.d.ts +1 -1
- package/dist/core/middleware/index.d.ts.map +1 -1
- package/dist/core/services/service-token.d.ts +2 -1
- package/dist/core/services/service-token.d.ts.map +1 -1
- package/dist/core/utils/api-request/fetch-service-parent-be.d.ts +3 -1
- package/dist/core/utils/api-request/fetch-service-parent-be.d.ts.map +1 -1
- package/dist/core/utils/custom-encoder.d.ts.map +1 -1
- package/dist/core/utils/custom-encrypter.d.ts +11 -4
- package/dist/core/utils/custom-encrypter.d.ts.map +1 -1
- package/dist/core/utils/custom-header.d.ts +6 -2
- package/dist/core/utils/custom-header.d.ts.map +1 -1
- package/dist/core/utils/functions/index.d.ts +3 -0
- package/dist/core/utils/functions/index.d.ts.map +1 -0
- package/dist/core/utils/functions/isEmpty.d.ts +2 -0
- package/dist/core/utils/functions/isEmpty.d.ts.map +1 -0
- package/dist/core/utils/functions/isString.d.ts +2 -0
- package/dist/core/utils/functions/isString.d.ts.map +1 -0
- package/dist/mp-front-cli-all.cjs +1 -1
- package/dist/mp-front-cli-all.js +2 -2
- package/dist/mp-front-cli-core.cjs +1 -1
- package/dist/mp-front-cli-core.js +2 -2
- package/dist/mp-front-cli-encoder.cjs +1 -1
- package/dist/mp-front-cli-encoder.js +29 -3
- package/dist/mp-front-cli-encrypter.cjs +1 -1
- package/dist/mp-front-cli-encrypter.js +56 -30
- package/dist/mp-front-cli-header.cjs +1 -1
- package/dist/mp-front-cli-header.js +18 -17
- package/dist/mp-front-cli-services.cjs +1 -1
- package/dist/mp-front-cli-services.js +1 -1
- package/dist/{service-token-DUKgd-pZ.js → service-token-DrUMHiYQ.js} +181 -173
- package/dist/service-token-g-Zt_ctQ.cjs +3 -0
- package/package.json +6 -8
- package/dist/AuthEngine-D65_iNdB.cjs +0 -1
- package/dist/custom-encoder-Cfd7FFMe.js +0 -3705
- package/dist/custom-encoder-d7rw7W8X.cjs +0 -27
- package/dist/service-token-Bv3BAiQd.cjs +0 -3
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
var G = Object.defineProperty;
|
|
2
2
|
var J = (r, t, e) => t in r ? G(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
|
3
|
-
var
|
|
4
|
-
import { switchMap as
|
|
3
|
+
var b = (r, t, e) => J(r, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { switchMap as H, of as g, catchError as V } from "rxjs";
|
|
5
5
|
import { CustomLogger as q } from "./mp-front-cli-logger.js";
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import { CustomEncrypter as N } from "./mp-front-cli-encrypter.js";
|
|
7
|
+
var T = function(r, t) {
|
|
8
|
+
return T = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
|
|
8
9
|
e.__proto__ = n;
|
|
9
10
|
} || function(e, n) {
|
|
10
11
|
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
|
|
11
|
-
},
|
|
12
|
+
}, T(r, t);
|
|
12
13
|
};
|
|
13
|
-
function
|
|
14
|
+
function x(r, t) {
|
|
14
15
|
if (typeof t != "function" && t !== null)
|
|
15
16
|
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
16
|
-
|
|
17
|
+
T(r, t);
|
|
17
18
|
function e() {
|
|
18
19
|
this.constructor = r;
|
|
19
20
|
}
|
|
@@ -28,7 +29,7 @@ var w = function() {
|
|
|
28
29
|
return t;
|
|
29
30
|
}, w.apply(this, arguments);
|
|
30
31
|
};
|
|
31
|
-
function
|
|
32
|
+
function W(r, t) {
|
|
32
33
|
var e = {};
|
|
33
34
|
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && t.indexOf(n) < 0 && (e[n] = r[n]);
|
|
34
35
|
if (r != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -36,21 +37,21 @@ function N(r, t) {
|
|
|
36
37
|
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(r, n[i]) && (e[n[i]] = r[n[i]]);
|
|
37
38
|
return e;
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
+
function Q(r, t, e, n) {
|
|
40
41
|
function i(o) {
|
|
41
42
|
return o instanceof e ? o : new e(function(c) {
|
|
42
43
|
c(o);
|
|
43
44
|
});
|
|
44
45
|
}
|
|
45
46
|
return new (e || (e = Promise))(function(o, c) {
|
|
46
|
-
function
|
|
47
|
+
function a(l) {
|
|
47
48
|
try {
|
|
48
49
|
u(n.next(l));
|
|
49
50
|
} catch (p) {
|
|
50
51
|
c(p);
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
+
function s(l) {
|
|
54
55
|
try {
|
|
55
56
|
u(n.throw(l));
|
|
56
57
|
} catch (p) {
|
|
@@ -58,7 +59,7 @@ function W(r, t, e, n) {
|
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
61
|
function u(l) {
|
|
61
|
-
l.done ? o(l.value) : i(l.value).then(
|
|
62
|
+
l.done ? o(l.value) : i(l.value).then(a, s);
|
|
62
63
|
}
|
|
63
64
|
u((n = n.apply(r, t || [])).next());
|
|
64
65
|
});
|
|
@@ -68,15 +69,15 @@ function K(r, t) {
|
|
|
68
69
|
if (o[0] & 1) throw o[1];
|
|
69
70
|
return o[1];
|
|
70
71
|
}, trys: [], ops: [] }, n, i, o, c = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
71
|
-
return c.next =
|
|
72
|
+
return c.next = a(0), c.throw = a(1), c.return = a(2), typeof Symbol == "function" && (c[Symbol.iterator] = function() {
|
|
72
73
|
return this;
|
|
73
74
|
}), c;
|
|
74
|
-
function
|
|
75
|
+
function a(u) {
|
|
75
76
|
return function(l) {
|
|
76
|
-
return
|
|
77
|
+
return s([u, l]);
|
|
77
78
|
};
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
+
function s(u) {
|
|
80
81
|
if (n) throw new TypeError("Generator is already executing.");
|
|
81
82
|
for (; c && (c = 0, u[0] && (e = 0)), e; ) try {
|
|
82
83
|
if (n = 1, i && (o = u[0] & 2 ? i.return : u[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, u[1])).done) return o;
|
|
@@ -133,14 +134,14 @@ function S(r) {
|
|
|
133
134
|
};
|
|
134
135
|
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
135
136
|
}
|
|
136
|
-
function
|
|
137
|
+
function E(r, t) {
|
|
137
138
|
var e = typeof Symbol == "function" && r[Symbol.iterator];
|
|
138
139
|
if (!e) return r;
|
|
139
140
|
var n = e.call(r), i, o = [], c;
|
|
140
141
|
try {
|
|
141
142
|
for (; (t === void 0 || t-- > 0) && !(i = n.next()).done; ) o.push(i.value);
|
|
142
|
-
} catch (
|
|
143
|
-
c = { error:
|
|
143
|
+
} catch (a) {
|
|
144
|
+
c = { error: a };
|
|
144
145
|
} finally {
|
|
145
146
|
try {
|
|
146
147
|
i && !i.done && (e = n.return) && e.call(n);
|
|
@@ -158,10 +159,10 @@ function P(r, t, e) {
|
|
|
158
159
|
function A(r) {
|
|
159
160
|
return this instanceof A ? (this.v = r, this) : new A(r);
|
|
160
161
|
}
|
|
161
|
-
function
|
|
162
|
+
function X(r, t, e) {
|
|
162
163
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
163
164
|
var n = e.apply(r, t || []), i, o = [];
|
|
164
|
-
return i = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype),
|
|
165
|
+
return i = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), a("next"), a("throw"), a("return", c), i[Symbol.asyncIterator] = function() {
|
|
165
166
|
return this;
|
|
166
167
|
}, i;
|
|
167
168
|
function c(f) {
|
|
@@ -169,14 +170,14 @@ function Q(r, t, e) {
|
|
|
169
170
|
return Promise.resolve(d).then(f, p);
|
|
170
171
|
};
|
|
171
172
|
}
|
|
172
|
-
function
|
|
173
|
+
function a(f, d) {
|
|
173
174
|
n[f] && (i[f] = function(h) {
|
|
174
175
|
return new Promise(function(Y, $) {
|
|
175
|
-
o.push([f, h, Y, $]) > 1 ||
|
|
176
|
+
o.push([f, h, Y, $]) > 1 || s(f, h);
|
|
176
177
|
});
|
|
177
178
|
}, d && (i[f] = d(i[f])));
|
|
178
179
|
}
|
|
179
|
-
function
|
|
180
|
+
function s(f, d) {
|
|
180
181
|
try {
|
|
181
182
|
u(n[f](d));
|
|
182
183
|
} catch (h) {
|
|
@@ -187,16 +188,16 @@ function Q(r, t, e) {
|
|
|
187
188
|
f.value instanceof A ? Promise.resolve(f.value.v).then(l, p) : v(o[0][2], f);
|
|
188
189
|
}
|
|
189
190
|
function l(f) {
|
|
190
|
-
|
|
191
|
+
s("next", f);
|
|
191
192
|
}
|
|
192
193
|
function p(f) {
|
|
193
|
-
|
|
194
|
+
s("throw", f);
|
|
194
195
|
}
|
|
195
196
|
function v(f, d) {
|
|
196
|
-
f(d), o.shift(), o.length &&
|
|
197
|
+
f(d), o.shift(), o.length && s(o[0][0], o[0][1]);
|
|
197
198
|
}
|
|
198
199
|
}
|
|
199
|
-
function
|
|
200
|
+
function Z(r) {
|
|
200
201
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
201
202
|
var t = r[Symbol.asyncIterator], e;
|
|
202
203
|
return t ? t.call(r) : (r = typeof S == "function" ? S(r) : r[Symbol.iterator](), e = {}, n("next"), n("throw"), n("return"), e[Symbol.asyncIterator] = function() {
|
|
@@ -204,27 +205,27 @@ function X(r) {
|
|
|
204
205
|
}, e);
|
|
205
206
|
function n(o) {
|
|
206
207
|
e[o] = r[o] && function(c) {
|
|
207
|
-
return new Promise(function(
|
|
208
|
-
c = r[o](c), i(
|
|
208
|
+
return new Promise(function(a, s) {
|
|
209
|
+
c = r[o](c), i(a, s, c.done, c.value);
|
|
209
210
|
});
|
|
210
211
|
};
|
|
211
212
|
}
|
|
212
|
-
function i(o, c,
|
|
213
|
-
Promise.resolve(
|
|
214
|
-
o({ value: u, done:
|
|
213
|
+
function i(o, c, a, s) {
|
|
214
|
+
Promise.resolve(s).then(function(u) {
|
|
215
|
+
o({ value: u, done: a });
|
|
215
216
|
}, c);
|
|
216
217
|
}
|
|
217
218
|
}
|
|
218
219
|
function y(r) {
|
|
219
220
|
return typeof r == "function";
|
|
220
221
|
}
|
|
221
|
-
function
|
|
222
|
+
function z(r) {
|
|
222
223
|
var t = function(n) {
|
|
223
224
|
Error.call(n), n.stack = new Error().stack;
|
|
224
225
|
}, e = r(t);
|
|
225
226
|
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
|
|
226
227
|
}
|
|
227
|
-
var
|
|
228
|
+
var O = z(function(r) {
|
|
228
229
|
return function(e) {
|
|
229
230
|
r(this), this.message = e ? e.length + ` errors occurred during unsubscription:
|
|
230
231
|
` + e.map(function(n, i) {
|
|
@@ -239,7 +240,7 @@ function j(r, t) {
|
|
|
239
240
|
0 <= e && r.splice(e, 1);
|
|
240
241
|
}
|
|
241
242
|
}
|
|
242
|
-
var
|
|
243
|
+
var U = (function() {
|
|
243
244
|
function r(t) {
|
|
244
245
|
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
245
246
|
}
|
|
@@ -251,15 +252,15 @@ var x = function() {
|
|
|
251
252
|
if (c)
|
|
252
253
|
if (this._parentage = null, Array.isArray(c))
|
|
253
254
|
try {
|
|
254
|
-
for (var
|
|
255
|
-
var u =
|
|
255
|
+
for (var a = S(c), s = a.next(); !s.done; s = a.next()) {
|
|
256
|
+
var u = s.value;
|
|
256
257
|
u.remove(this);
|
|
257
258
|
}
|
|
258
259
|
} catch (h) {
|
|
259
260
|
t = { error: h };
|
|
260
261
|
} finally {
|
|
261
262
|
try {
|
|
262
|
-
|
|
263
|
+
s && !s.done && (e = a.return) && e.call(a);
|
|
263
264
|
} finally {
|
|
264
265
|
if (t) throw t.error;
|
|
265
266
|
}
|
|
@@ -271,7 +272,7 @@ var x = function() {
|
|
|
271
272
|
try {
|
|
272
273
|
l();
|
|
273
274
|
} catch (h) {
|
|
274
|
-
o = h instanceof
|
|
275
|
+
o = h instanceof O ? h.errors : [h];
|
|
275
276
|
}
|
|
276
277
|
var p = this._finalizers;
|
|
277
278
|
if (p) {
|
|
@@ -282,7 +283,7 @@ var x = function() {
|
|
|
282
283
|
try {
|
|
283
284
|
L(d);
|
|
284
285
|
} catch (h) {
|
|
285
|
-
o = o ?? [], h instanceof
|
|
286
|
+
o = o ?? [], h instanceof O ? o = P(P([], E(o)), E(h.errors)) : o.push(h);
|
|
286
287
|
}
|
|
287
288
|
}
|
|
288
289
|
} catch (h) {
|
|
@@ -296,7 +297,7 @@ var x = function() {
|
|
|
296
297
|
}
|
|
297
298
|
}
|
|
298
299
|
if (o)
|
|
299
|
-
throw new
|
|
300
|
+
throw new O(o);
|
|
300
301
|
}
|
|
301
302
|
}, r.prototype.add = function(t) {
|
|
302
303
|
var e;
|
|
@@ -323,25 +324,25 @@ var x = function() {
|
|
|
323
324
|
}, r.prototype.remove = function(t) {
|
|
324
325
|
var e = this._finalizers;
|
|
325
326
|
e && j(e, t), t instanceof r && t._removeParent(this);
|
|
326
|
-
}, r.EMPTY = function() {
|
|
327
|
+
}, r.EMPTY = (function() {
|
|
327
328
|
var t = new r();
|
|
328
329
|
return t.closed = !0, t;
|
|
329
|
-
}(), r;
|
|
330
|
-
}();
|
|
331
|
-
|
|
330
|
+
})(), r;
|
|
331
|
+
})();
|
|
332
|
+
U.EMPTY;
|
|
332
333
|
function D(r) {
|
|
333
|
-
return r instanceof
|
|
334
|
+
return r instanceof U || r && "closed" in r && y(r.remove) && y(r.add) && y(r.unsubscribe);
|
|
334
335
|
}
|
|
335
336
|
function L(r) {
|
|
336
337
|
y(r) ? r() : r.unsubscribe();
|
|
337
338
|
}
|
|
338
|
-
var
|
|
339
|
+
var rr = {
|
|
339
340
|
Promise: void 0
|
|
340
|
-
},
|
|
341
|
+
}, er = {
|
|
341
342
|
setTimeout: function(r, t) {
|
|
342
343
|
for (var e = [], n = 2; n < arguments.length; n++)
|
|
343
344
|
e[n - 2] = arguments[n];
|
|
344
|
-
return setTimeout.apply(void 0, P([r, t],
|
|
345
|
+
return setTimeout.apply(void 0, P([r, t], E(e)));
|
|
345
346
|
},
|
|
346
347
|
clearTimeout: function(r) {
|
|
347
348
|
return clearTimeout(r);
|
|
@@ -349,20 +350,20 @@ var z = {
|
|
|
349
350
|
delegate: void 0
|
|
350
351
|
};
|
|
351
352
|
function F(r) {
|
|
352
|
-
|
|
353
|
+
er.setTimeout(function() {
|
|
353
354
|
throw r;
|
|
354
355
|
});
|
|
355
356
|
}
|
|
356
357
|
function k() {
|
|
357
358
|
}
|
|
358
|
-
function
|
|
359
|
+
function tr(r) {
|
|
359
360
|
r();
|
|
360
361
|
}
|
|
361
|
-
var
|
|
362
|
-
|
|
362
|
+
var R = (function(r) {
|
|
363
|
+
x(t, r);
|
|
363
364
|
function t(e) {
|
|
364
365
|
var n = r.call(this) || this;
|
|
365
|
-
return n.isStopped = !1, e ? (n.destination = e, D(e) && e.add(n)) : n.destination =
|
|
366
|
+
return n.isStopped = !1, e ? (n.destination = e, D(e) && e.add(n)) : n.destination = ir, n;
|
|
366
367
|
}
|
|
367
368
|
return t.create = function(e, n, i) {
|
|
368
369
|
return new I(e, n, i);
|
|
@@ -389,7 +390,7 @@ var U = function(r) {
|
|
|
389
390
|
this.unsubscribe();
|
|
390
391
|
}
|
|
391
392
|
}, t;
|
|
392
|
-
}(
|
|
393
|
+
})(U), nr = (function() {
|
|
393
394
|
function r(t) {
|
|
394
395
|
this.partialObserver = t;
|
|
395
396
|
}
|
|
@@ -420,44 +421,44 @@ var U = function(r) {
|
|
|
420
421
|
_(e);
|
|
421
422
|
}
|
|
422
423
|
}, r;
|
|
423
|
-
}(), I = function(r) {
|
|
424
|
-
|
|
424
|
+
})(), I = (function(r) {
|
|
425
|
+
x(t, r);
|
|
425
426
|
function t(e, n, i) {
|
|
426
427
|
var o = r.call(this) || this, c;
|
|
427
428
|
return y(e) || !e ? c = {
|
|
428
429
|
next: e ?? void 0,
|
|
429
430
|
error: n ?? void 0,
|
|
430
431
|
complete: i ?? void 0
|
|
431
|
-
} : c = e, o.destination = new
|
|
432
|
+
} : c = e, o.destination = new nr(c), o;
|
|
432
433
|
}
|
|
433
434
|
return t;
|
|
434
|
-
}(
|
|
435
|
+
})(R);
|
|
435
436
|
function _(r) {
|
|
436
437
|
F(r);
|
|
437
438
|
}
|
|
438
|
-
function
|
|
439
|
+
function or(r) {
|
|
439
440
|
throw r;
|
|
440
441
|
}
|
|
441
|
-
var
|
|
442
|
+
var ir = {
|
|
442
443
|
closed: !0,
|
|
443
444
|
next: k,
|
|
444
|
-
error:
|
|
445
|
+
error: or,
|
|
445
446
|
complete: k
|
|
446
447
|
};
|
|
447
|
-
function
|
|
448
|
-
return new
|
|
449
|
-
}
|
|
450
|
-
var
|
|
451
|
-
|
|
452
|
-
function t(e, n, i, o, c,
|
|
453
|
-
var
|
|
454
|
-
return
|
|
448
|
+
function cr(r, t, e, n, i) {
|
|
449
|
+
return new ur(r, t, e, n, i);
|
|
450
|
+
}
|
|
451
|
+
var ur = (function(r) {
|
|
452
|
+
x(t, r);
|
|
453
|
+
function t(e, n, i, o, c, a) {
|
|
454
|
+
var s = r.call(this, e) || this;
|
|
455
|
+
return s.onFinalize = c, s.shouldUnsubscribe = a, s._next = n ? function(u) {
|
|
455
456
|
try {
|
|
456
457
|
n(u);
|
|
457
458
|
} catch (l) {
|
|
458
459
|
e.error(l);
|
|
459
460
|
}
|
|
460
|
-
} : r.prototype._next,
|
|
461
|
+
} : r.prototype._next, s._error = o ? function(u) {
|
|
461
462
|
try {
|
|
462
463
|
o(u);
|
|
463
464
|
} catch (l) {
|
|
@@ -465,7 +466,7 @@ var cr = function(r) {
|
|
|
465
466
|
} finally {
|
|
466
467
|
this.unsubscribe();
|
|
467
468
|
}
|
|
468
|
-
} : r.prototype._error,
|
|
469
|
+
} : r.prototype._error, s._complete = i ? function() {
|
|
469
470
|
try {
|
|
470
471
|
i();
|
|
471
472
|
} catch (u) {
|
|
@@ -473,7 +474,7 @@ var cr = function(r) {
|
|
|
473
474
|
} finally {
|
|
474
475
|
this.unsubscribe();
|
|
475
476
|
}
|
|
476
|
-
} : r.prototype._complete,
|
|
477
|
+
} : r.prototype._complete, s;
|
|
477
478
|
}
|
|
478
479
|
return t.prototype.unsubscribe = function() {
|
|
479
480
|
var e;
|
|
@@ -482,20 +483,20 @@ var cr = function(r) {
|
|
|
482
483
|
r.prototype.unsubscribe.call(this), !n && ((e = this.onFinalize) === null || e === void 0 || e.call(this));
|
|
483
484
|
}
|
|
484
485
|
}, t;
|
|
485
|
-
}(
|
|
486
|
+
})(R), B = (function() {
|
|
486
487
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
487
|
-
}();
|
|
488
|
-
function
|
|
488
|
+
})();
|
|
489
|
+
function sr(r) {
|
|
489
490
|
return r;
|
|
490
491
|
}
|
|
491
492
|
function ar(r) {
|
|
492
|
-
return r.length === 0 ?
|
|
493
|
+
return r.length === 0 ? sr : r.length === 1 ? r[0] : function(e) {
|
|
493
494
|
return r.reduce(function(n, i) {
|
|
494
495
|
return i(n);
|
|
495
496
|
}, e);
|
|
496
497
|
};
|
|
497
498
|
}
|
|
498
|
-
var
|
|
499
|
+
var m = (function() {
|
|
499
500
|
function r(t) {
|
|
500
501
|
t && (this._subscribe = t);
|
|
501
502
|
}
|
|
@@ -503,10 +504,10 @@ var b = function() {
|
|
|
503
504
|
var e = new r();
|
|
504
505
|
return e.source = this, e.operator = t, e;
|
|
505
506
|
}, r.prototype.subscribe = function(t, e, n) {
|
|
506
|
-
var i = this, o =
|
|
507
|
-
return
|
|
508
|
-
var c = i,
|
|
509
|
-
o.add(
|
|
507
|
+
var i = this, o = lr(t) ? t : new I(t, e, n);
|
|
508
|
+
return tr(function() {
|
|
509
|
+
var c = i, a = c.operator, s = c.source;
|
|
510
|
+
o.add(a ? a.call(o, s) : s ? i._subscribe(o) : i._trySubscribe(o));
|
|
510
511
|
}), o;
|
|
511
512
|
}, r.prototype._trySubscribe = function(t) {
|
|
512
513
|
try {
|
|
@@ -518,11 +519,11 @@ var b = function() {
|
|
|
518
519
|
var n = this;
|
|
519
520
|
return e = C(e), new e(function(i, o) {
|
|
520
521
|
var c = new I({
|
|
521
|
-
next: function(
|
|
522
|
+
next: function(a) {
|
|
522
523
|
try {
|
|
523
|
-
t(
|
|
524
|
-
} catch (
|
|
525
|
-
o(
|
|
524
|
+
t(a);
|
|
525
|
+
} catch (s) {
|
|
526
|
+
o(s), c.unsubscribe();
|
|
526
527
|
}
|
|
527
528
|
},
|
|
528
529
|
error: o,
|
|
@@ -533,7 +534,7 @@ var b = function() {
|
|
|
533
534
|
}, r.prototype._subscribe = function(t) {
|
|
534
535
|
var e;
|
|
535
536
|
return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(t);
|
|
536
|
-
}, r.prototype[
|
|
537
|
+
}, r.prototype[B] = function() {
|
|
537
538
|
return this;
|
|
538
539
|
}, r.prototype.pipe = function() {
|
|
539
540
|
for (var t = [], e = 0; e < arguments.length; e++)
|
|
@@ -554,41 +555,41 @@ var b = function() {
|
|
|
554
555
|
}, r.create = function(t) {
|
|
555
556
|
return new r(t);
|
|
556
557
|
}, r;
|
|
557
|
-
}();
|
|
558
|
+
})();
|
|
558
559
|
function C(r) {
|
|
559
560
|
var t;
|
|
560
|
-
return (t = r ??
|
|
561
|
+
return (t = r ?? rr.Promise) !== null && t !== void 0 ? t : Promise;
|
|
561
562
|
}
|
|
562
|
-
function
|
|
563
|
+
function fr(r) {
|
|
563
564
|
return r && y(r.next) && y(r.error) && y(r.complete);
|
|
564
565
|
}
|
|
565
|
-
function
|
|
566
|
-
return r && r instanceof
|
|
566
|
+
function lr(r) {
|
|
567
|
+
return r && r instanceof R || fr(r) && D(r);
|
|
567
568
|
}
|
|
568
|
-
var
|
|
569
|
+
var hr = (function(r) {
|
|
569
570
|
return r && typeof r.length == "number" && typeof r != "function";
|
|
570
|
-
};
|
|
571
|
-
function hr(r) {
|
|
572
|
-
return y(r == null ? void 0 : r.then);
|
|
573
|
-
}
|
|
571
|
+
});
|
|
574
572
|
function yr(r) {
|
|
575
|
-
return y(r
|
|
573
|
+
return y(r == null ? void 0 : r.then);
|
|
576
574
|
}
|
|
577
575
|
function pr(r) {
|
|
578
|
-
return
|
|
576
|
+
return y(r[B]);
|
|
579
577
|
}
|
|
580
578
|
function vr(r) {
|
|
579
|
+
return Symbol.asyncIterator && y(r == null ? void 0 : r[Symbol.asyncIterator]);
|
|
580
|
+
}
|
|
581
|
+
function dr(r) {
|
|
581
582
|
return new TypeError("You provided " + (r !== null && typeof r == "object" ? "an invalid object" : "'" + r + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
|
|
582
583
|
}
|
|
583
|
-
function
|
|
584
|
+
function br() {
|
|
584
585
|
return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
|
|
585
586
|
}
|
|
586
|
-
var
|
|
587
|
-
function mr(r) {
|
|
588
|
-
return y(r == null ? void 0 : r[br]);
|
|
589
|
-
}
|
|
587
|
+
var mr = br();
|
|
590
588
|
function Ar(r) {
|
|
591
|
-
return
|
|
589
|
+
return y(r == null ? void 0 : r[mr]);
|
|
590
|
+
}
|
|
591
|
+
function Sr(r) {
|
|
592
|
+
return X(this, arguments, function() {
|
|
592
593
|
var e, n, i, o;
|
|
593
594
|
return K(this, function(c) {
|
|
594
595
|
switch (c.label) {
|
|
@@ -618,45 +619,45 @@ function Ar(r) {
|
|
|
618
619
|
});
|
|
619
620
|
});
|
|
620
621
|
}
|
|
621
|
-
function
|
|
622
|
+
function _r(r) {
|
|
622
623
|
return y(r == null ? void 0 : r.getReader);
|
|
623
624
|
}
|
|
624
|
-
function
|
|
625
|
-
if (r instanceof
|
|
625
|
+
function wr(r) {
|
|
626
|
+
if (r instanceof m)
|
|
626
627
|
return r;
|
|
627
628
|
if (r != null) {
|
|
628
|
-
if (
|
|
629
|
-
return wr(r);
|
|
630
|
-
if (lr(r))
|
|
629
|
+
if (pr(r))
|
|
631
630
|
return gr(r);
|
|
632
631
|
if (hr(r))
|
|
633
632
|
return Or(r);
|
|
634
|
-
if (
|
|
635
|
-
return M(r);
|
|
636
|
-
if (mr(r))
|
|
633
|
+
if (yr(r))
|
|
637
634
|
return Tr(r);
|
|
638
|
-
if (
|
|
635
|
+
if (vr(r))
|
|
636
|
+
return M(r);
|
|
637
|
+
if (Ar(r))
|
|
638
|
+
return Er(r);
|
|
639
|
+
if (_r(r))
|
|
639
640
|
return Pr(r);
|
|
640
641
|
}
|
|
641
|
-
throw
|
|
642
|
+
throw dr(r);
|
|
642
643
|
}
|
|
643
|
-
function
|
|
644
|
-
return new
|
|
645
|
-
var e = r[
|
|
644
|
+
function gr(r) {
|
|
645
|
+
return new m(function(t) {
|
|
646
|
+
var e = r[B]();
|
|
646
647
|
if (y(e.subscribe))
|
|
647
648
|
return e.subscribe(t);
|
|
648
649
|
throw new TypeError("Provided object does not correctly implement Symbol.observable");
|
|
649
650
|
});
|
|
650
651
|
}
|
|
651
|
-
function
|
|
652
|
-
return new
|
|
652
|
+
function Or(r) {
|
|
653
|
+
return new m(function(t) {
|
|
653
654
|
for (var e = 0; e < r.length && !t.closed; e++)
|
|
654
655
|
t.next(r[e]);
|
|
655
656
|
t.complete();
|
|
656
657
|
});
|
|
657
658
|
}
|
|
658
|
-
function
|
|
659
|
-
return new
|
|
659
|
+
function Tr(r) {
|
|
660
|
+
return new m(function(t) {
|
|
660
661
|
r.then(function(e) {
|
|
661
662
|
t.closed || (t.next(e), t.complete());
|
|
662
663
|
}, function(e) {
|
|
@@ -664,8 +665,8 @@ function Or(r) {
|
|
|
664
665
|
}).then(null, F);
|
|
665
666
|
});
|
|
666
667
|
}
|
|
667
|
-
function
|
|
668
|
-
return new
|
|
668
|
+
function Er(r) {
|
|
669
|
+
return new m(function(t) {
|
|
669
670
|
var e, n;
|
|
670
671
|
try {
|
|
671
672
|
for (var i = S(r), o = i.next(); !o.done; o = i.next()) {
|
|
@@ -673,8 +674,8 @@ function Tr(r) {
|
|
|
673
674
|
if (t.next(c), t.closed)
|
|
674
675
|
return;
|
|
675
676
|
}
|
|
676
|
-
} catch (
|
|
677
|
-
e = { error:
|
|
677
|
+
} catch (a) {
|
|
678
|
+
e = { error: a };
|
|
678
679
|
} finally {
|
|
679
680
|
try {
|
|
680
681
|
o && !o.done && (n = i.return) && n.call(i);
|
|
@@ -686,40 +687,40 @@ function Tr(r) {
|
|
|
686
687
|
});
|
|
687
688
|
}
|
|
688
689
|
function M(r) {
|
|
689
|
-
return new
|
|
690
|
+
return new m(function(t) {
|
|
690
691
|
Ir(r, t).catch(function(e) {
|
|
691
692
|
return t.error(e);
|
|
692
693
|
});
|
|
693
694
|
});
|
|
694
695
|
}
|
|
695
696
|
function Pr(r) {
|
|
696
|
-
return M(
|
|
697
|
+
return M(Sr(r));
|
|
697
698
|
}
|
|
698
699
|
function Ir(r, t) {
|
|
699
700
|
var e, n, i, o;
|
|
700
|
-
return
|
|
701
|
-
var c,
|
|
702
|
-
return K(this, function(
|
|
703
|
-
switch (
|
|
701
|
+
return Q(this, void 0, void 0, function() {
|
|
702
|
+
var c, a;
|
|
703
|
+
return K(this, function(s) {
|
|
704
|
+
switch (s.label) {
|
|
704
705
|
case 0:
|
|
705
|
-
|
|
706
|
+
s.trys.push([0, 5, 6, 11]), e = Z(r), s.label = 1;
|
|
706
707
|
case 1:
|
|
707
708
|
return [4, e.next()];
|
|
708
709
|
case 2:
|
|
709
|
-
if (n =
|
|
710
|
+
if (n = s.sent(), !!n.done) return [3, 4];
|
|
710
711
|
if (c = n.value, t.next(c), t.closed)
|
|
711
712
|
return [2];
|
|
712
|
-
|
|
713
|
+
s.label = 3;
|
|
713
714
|
case 3:
|
|
714
715
|
return [3, 1];
|
|
715
716
|
case 4:
|
|
716
717
|
return [3, 11];
|
|
717
718
|
case 5:
|
|
718
|
-
return
|
|
719
|
+
return a = s.sent(), i = { error: a }, [3, 11];
|
|
719
720
|
case 6:
|
|
720
|
-
return
|
|
721
|
+
return s.trys.push([6, , 9, 10]), n && !n.done && (o = e.return) ? [4, o.call(e)] : [3, 8];
|
|
721
722
|
case 7:
|
|
722
|
-
|
|
723
|
+
s.sent(), s.label = 8;
|
|
723
724
|
case 8:
|
|
724
725
|
return [3, 10];
|
|
725
726
|
case 9:
|
|
@@ -733,74 +734,81 @@ function Ir(r, t) {
|
|
|
733
734
|
});
|
|
734
735
|
});
|
|
735
736
|
}
|
|
736
|
-
function
|
|
737
|
+
function xr(r, t) {
|
|
737
738
|
t === void 0 && (t = {});
|
|
738
|
-
var e = t.selector, n =
|
|
739
|
-
return new
|
|
740
|
-
var o = new AbortController(), c = o.signal,
|
|
741
|
-
if (
|
|
742
|
-
if (
|
|
739
|
+
var e = t.selector, n = W(t, ["selector"]);
|
|
740
|
+
return new m(function(i) {
|
|
741
|
+
var o = new AbortController(), c = o.signal, a = !0, s = n.signal;
|
|
742
|
+
if (s)
|
|
743
|
+
if (s.aborted)
|
|
743
744
|
o.abort();
|
|
744
745
|
else {
|
|
745
746
|
var u = function() {
|
|
746
747
|
c.aborted || o.abort();
|
|
747
748
|
};
|
|
748
|
-
|
|
749
|
-
return
|
|
749
|
+
s.addEventListener("abort", u), i.add(function() {
|
|
750
|
+
return s.removeEventListener("abort", u);
|
|
750
751
|
});
|
|
751
752
|
}
|
|
752
753
|
var l = w(w({}, n), { signal: c }), p = function(v) {
|
|
753
|
-
|
|
754
|
+
a = !1, i.error(v);
|
|
754
755
|
};
|
|
755
756
|
return fetch(r, l).then(function(v) {
|
|
756
|
-
e ?
|
|
757
|
-
|
|
758
|
-
}, p)) : (
|
|
757
|
+
e ? wr(e(v)).subscribe(cr(i, void 0, function() {
|
|
758
|
+
a = !1, i.complete();
|
|
759
|
+
}, p)) : (a = !1, i.next(v), i.complete());
|
|
759
760
|
}).catch(p), function() {
|
|
760
|
-
|
|
761
|
+
a && o.abort();
|
|
761
762
|
};
|
|
762
763
|
});
|
|
763
764
|
}
|
|
764
|
-
class
|
|
765
|
+
class jr extends q {
|
|
765
766
|
constructor() {
|
|
766
767
|
super();
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
768
|
+
b(this, "customEncrypter", new N("aes"));
|
|
769
|
+
b(this, "API_AUTH_BACK_URL");
|
|
770
|
+
b(this, "API_AUTH_BACK_USERNAME_AUTH");
|
|
771
|
+
b(this, "API_AUTH_BACK_PASSWORD_AUTH");
|
|
772
|
+
b(this, "headers");
|
|
773
|
+
b(this, "ID", process.env.ID_FRONT ?? "NOT_AVAILABLE");
|
|
772
774
|
this.API_AUTH_BACK_URL = process.env.API_AUTH_BACK_URL, this.API_AUTH_BACK_USERNAME_AUTH = process.env.API_AUTH_BACK_USERNAME_AUTH, this.API_AUTH_BACK_PASSWORD_AUTH = process.env.API_AUTH_BACK_PASSWORD_AUTH, this.headers = {
|
|
773
775
|
Accept: "application/json",
|
|
774
776
|
"Content-Type": "application/vnd.api+json"
|
|
775
777
|
};
|
|
776
778
|
}
|
|
777
|
-
get() {
|
|
778
|
-
|
|
779
|
+
get(e = !1) {
|
|
780
|
+
this.logDebug("get ServiceToken");
|
|
781
|
+
const n = {
|
|
782
|
+
username: this.API_AUTH_BACK_USERNAME_AUTH,
|
|
783
|
+
password: this.API_AUTH_BACK_PASSWORD_AUTH
|
|
784
|
+
};
|
|
785
|
+
return xr(this.API_AUTH_BACK_URL, {
|
|
779
786
|
method: "POST",
|
|
780
787
|
headers: this.headers,
|
|
781
788
|
body: JSON.stringify({
|
|
782
789
|
data: {
|
|
783
790
|
id: this.ID,
|
|
784
791
|
type: "AuthUser",
|
|
785
|
-
attributes: {
|
|
786
|
-
username: this.API_AUTH_BACK_USERNAME_AUTH,
|
|
787
|
-
password: this.API_AUTH_BACK_PASSWORD_AUTH
|
|
788
|
-
}
|
|
792
|
+
attributes: e ? { encrypted: this.customEncrypter.encrypt(n) } : n
|
|
789
793
|
}
|
|
790
794
|
})
|
|
791
795
|
}).pipe(
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
var
|
|
796
|
+
H((i) => i.json()),
|
|
797
|
+
H((i) => {
|
|
798
|
+
var o, c;
|
|
795
799
|
return this.logDebug(
|
|
796
|
-
`ServiceToken <URL>: \x1B[33m ${this.API_AUTH_BACK_URL} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(this.headers)} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
|
|
797
|
-
),
|
|
800
|
+
`ServiceToken <URL>: \x1B[33m ${this.API_AUTH_BACK_URL} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(this.headers)} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(i)} \x1B[37m`
|
|
801
|
+
), e ? g(((o = i == null ? void 0 : i.data.attributes) == null ? void 0 : o.token) || "") : g(
|
|
802
|
+
this.customEncrypter.decrypt(
|
|
803
|
+
((c = i == null ? void 0 : i.data.attributes) == null ? void 0 : c.encrypted) || ""
|
|
804
|
+
)
|
|
805
|
+
);
|
|
798
806
|
}),
|
|
799
|
-
V((
|
|
807
|
+
V((i) => (this.logError(`ServiceToken ${i}`), g("")))
|
|
800
808
|
);
|
|
801
809
|
}
|
|
802
810
|
}
|
|
803
811
|
export {
|
|
804
|
-
|
|
805
|
-
|
|
812
|
+
jr as S,
|
|
813
|
+
xr as f
|
|
806
814
|
};
|