keycloakify 11.2.2 → 11.2.4
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/bin/193.index.js +3 -3
- package/bin/20.index.js +11 -13
- package/bin/{941.index.js → 238.index.js} +64 -199
- package/bin/31.index.js +48 -48
- package/bin/33.index.js +212 -1
- package/bin/453.index.js +71 -57
- package/bin/526.index.js +13 -13
- package/bin/573.index.js +66 -67
- package/bin/599.index.js +19 -20
- package/bin/743.index.js +2 -3
- package/bin/780.index.js +27 -28
- package/bin/{860.index.js → 783.index.js} +18 -20
- package/bin/786.index.js +21 -22
- package/bin/903.index.js +19 -1
- package/bin/97.index.js +46 -32
- package/bin/main.js +220 -222
- package/package.json +4 -4
- package/src/bin/keycloakify/generateFtl/kcContextDeclarationTemplate.ftl +1 -1
- package/vite-plugin/index.js +335 -312
package/bin/31.index.js
CHANGED
@@ -22,25 +22,25 @@ var getAbsoluteAndInOsFormatPath = __webpack_require__(84794);
|
|
22
22
|
var lib = __webpack_require__(52300);
|
23
23
|
// EXTERNAL MODULE: external "fs"
|
24
24
|
var external_fs_ = __webpack_require__(57147);
|
25
|
-
// EXTERNAL MODULE: ./node_modules/tsafe/assert.
|
26
|
-
var assert = __webpack_require__(
|
25
|
+
// EXTERNAL MODULE: ./node_modules/tsafe/esm/assert.mjs + 1 modules
|
26
|
+
var assert = __webpack_require__(29041);
|
27
27
|
// EXTERNAL MODULE: external "child_process"
|
28
28
|
var external_child_process_ = __webpack_require__(32081);
|
29
29
|
// EXTERNAL MODULE: ./dist/bin/shared/constants.js
|
30
30
|
var constants = __webpack_require__(173);
|
31
|
-
// EXTERNAL MODULE: ./node_modules/tsafe/index.
|
32
|
-
var
|
31
|
+
// EXTERNAL MODULE: ./node_modules/tsafe/esm/index.mjs + 1 modules
|
32
|
+
var esm = __webpack_require__(66911);
|
33
33
|
// EXTERNAL MODULE: ./dist/bin/tools/crawl.js
|
34
34
|
var crawl = __webpack_require__(73036);
|
35
|
-
// EXTERNAL MODULE: ./node_modules/tsafe/objectEntries.
|
36
|
-
var objectEntries = __webpack_require__(
|
37
|
-
// EXTERNAL MODULE: ./node_modules/tsafe/id.
|
38
|
-
var id = __webpack_require__(
|
35
|
+
// EXTERNAL MODULE: ./node_modules/tsafe/esm/objectEntries.mjs
|
36
|
+
var objectEntries = __webpack_require__(91040);
|
37
|
+
// EXTERNAL MODULE: ./node_modules/tsafe/esm/id.mjs
|
38
|
+
var id = __webpack_require__(38469);
|
39
39
|
// EXTERNAL MODULE: ./node_modules/chalk/source/index.js
|
40
40
|
var source = __webpack_require__(78818);
|
41
41
|
var source_default = /*#__PURE__*/__webpack_require__.n(source);
|
42
|
-
// EXTERNAL MODULE: ./node_modules/tsafe/exclude.
|
43
|
-
var exclude = __webpack_require__(
|
42
|
+
// EXTERNAL MODULE: ./node_modules/tsafe/esm/exclude.mjs
|
43
|
+
var exclude = __webpack_require__(83101);
|
44
44
|
;// CONCATENATED MODULE: ./dist/bin/tools/fetchProxyOptions.js
|
45
45
|
|
46
46
|
|
@@ -67,7 +67,7 @@ function getProxyFetchOptions(params) {
|
|
67
67
|
}
|
68
68
|
return [key.trim(), value.trim()];
|
69
69
|
})
|
70
|
-
.filter((0,exclude
|
70
|
+
.filter((0,exclude/* exclude */.D)(undefined))
|
71
71
|
.filter(([key]) => key !== "")
|
72
72
|
.map(([key, value]) => {
|
73
73
|
if (value.startsWith('"') && value.endsWith('"')) {
|
@@ -78,7 +78,7 @@ function getProxyFetchOptions(params) {
|
|
78
78
|
}
|
79
79
|
return undefined;
|
80
80
|
})
|
81
|
-
.filter((0,exclude
|
81
|
+
.filter((0,exclude/* exclude */.D)(undefined))
|
82
82
|
.reduce((cfg, [key, value]) => key in cfg
|
83
83
|
? Object.assign(Object.assign({}, cfg), { [key]: [...ensureArray(cfg[key]), value] }) : Object.assign(Object.assign({}, cfg), { [key]: value }), {});
|
84
84
|
})();
|
@@ -140,7 +140,7 @@ function ensureSingleOrNone(arg0) {
|
|
140
140
|
|
141
141
|
|
142
142
|
|
143
|
-
(0,assert
|
143
|
+
(0,assert/* assert */.h)();
|
144
144
|
function getBuildContext(params) {
|
145
145
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
146
146
|
const { cliCommandOptions } = params;
|
@@ -165,7 +165,7 @@ function getBuildContext(params) {
|
|
165
165
|
}
|
166
166
|
return undefined;
|
167
167
|
})
|
168
|
-
.filter((0,
|
168
|
+
.filter((0,esm/* exclude */.De)(undefined))[0];
|
169
169
|
if (themeSrcDirPath !== undefined) {
|
170
170
|
return { themeSrcDirPath };
|
171
171
|
}
|
@@ -193,7 +193,7 @@ function getBuildContext(params) {
|
|
193
193
|
env: Object.assign(Object.assign({}, process.env), { [constants/* VITE_PLUGIN_SUB_SCRIPTS_ENV_NAMES.RESOLVE_VITE_CONFIG */.TE.RESOLVE_VITE_CONFIG]: "true" })
|
194
194
|
})
|
195
195
|
.toString("utf8");
|
196
|
-
(0,assert
|
196
|
+
(0,assert/* assert */.h)(output.includes(constants/* VITE_PLUGIN_SUB_SCRIPTS_ENV_NAMES.RESOLVE_VITE_CONFIG */.TE.RESOLVE_VITE_CONFIG), "Seems like the Keycloakify's Vite plugin is not installed.");
|
197
197
|
const resolvedViteConfigStr = output
|
198
198
|
.split(constants/* VITE_PLUGIN_SUB_SCRIPTS_ENV_NAMES.RESOLVE_VITE_CONFIG */.TE.RESOLVE_VITE_CONFIG)
|
199
199
|
.reverse()[0];
|
@@ -203,7 +203,7 @@ function getBuildContext(params) {
|
|
203
203
|
const packageJsonFilePath = (function getPackageJSonDirPath(upCount) {
|
204
204
|
var _a, _b;
|
205
205
|
const dirPath = (0,external_path_.resolve)((0,external_path_.join)(...[projectDirPath, ...Array(upCount).fill("..")]));
|
206
|
-
(0,assert
|
206
|
+
(0,assert/* assert */.h)(dirPath !== external_path_.sep, "Root package.json not found");
|
207
207
|
success: {
|
208
208
|
const packageJsonFilePath = (0,external_path_.join)(dirPath, "package.json");
|
209
209
|
if (!external_fs_.existsSync(packageJsonFilePath)) {
|
@@ -235,7 +235,7 @@ function getBuildContext(params) {
|
|
235
235
|
})
|
236
236
|
.optional()
|
237
237
|
});
|
238
|
-
(0,assert
|
238
|
+
(0,assert/* assert */.h)();
|
239
239
|
return (0,id.id)(zTargetType);
|
240
240
|
})();
|
241
241
|
const zSinglePageApp = (() => {
|
@@ -250,12 +250,12 @@ function getBuildContext(params) {
|
|
250
250
|
})
|
251
251
|
.optional()
|
252
252
|
});
|
253
|
-
(0,assert
|
253
|
+
(0,assert/* assert */.h)();
|
254
254
|
return (0,id.id)(zTargetType);
|
255
255
|
})();
|
256
256
|
const zAccountThemeImplAndKeycloakVersionTargets = (() => {
|
257
257
|
const zTargetType = lib.z.union([zMultiPageApp, zSinglePageApp]);
|
258
|
-
(0,assert
|
258
|
+
(0,assert/* assert */.h)();
|
259
259
|
return (0,id.id)(zTargetType);
|
260
260
|
})();
|
261
261
|
const zStartKeycloakOptions = (() => {
|
@@ -267,7 +267,7 @@ function getBuildContext(params) {
|
|
267
267
|
keycloakExtraArgs: lib.z.array(lib.z.string()).optional(),
|
268
268
|
port: lib.z.number().optional()
|
269
269
|
});
|
270
|
-
(0,assert
|
270
|
+
(0,assert/* assert */.h)();
|
271
271
|
return (0,id.id)(zTargetType);
|
272
272
|
})();
|
273
273
|
const zBuildOptions = (() => {
|
@@ -286,7 +286,7 @@ function getBuildContext(params) {
|
|
286
286
|
kcContextExclusionsFtl: lib.z.string().optional(),
|
287
287
|
startKeycloakOptions: zStartKeycloakOptions.optional()
|
288
288
|
}), zAccountThemeImplAndKeycloakVersionTargets);
|
289
|
-
(0,assert
|
289
|
+
(0,assert/* assert */.h)();
|
290
290
|
return (0,id.id)(zTargetType);
|
291
291
|
})();
|
292
292
|
const zBuildOptions_packageJson = (() => {
|
@@ -295,7 +295,7 @@ function getBuildContext(params) {
|
|
295
295
|
staticDirPathInProjectBuildDirPath: lib.z.string().optional(),
|
296
296
|
publicDirPath: lib.z.string().optional()
|
297
297
|
}));
|
298
|
-
(0,assert
|
298
|
+
(0,assert/* assert */.h)();
|
299
299
|
return (0,id.id)(zTargetType);
|
300
300
|
})();
|
301
301
|
const zParsedPackageJson = (() => {
|
@@ -305,7 +305,7 @@ function getBuildContext(params) {
|
|
305
305
|
homepage: lib.z.string().optional(),
|
306
306
|
keycloakify: zBuildOptions_packageJson.optional()
|
307
307
|
});
|
308
|
-
(0,assert
|
308
|
+
(0,assert/* assert */.h)();
|
309
309
|
return (0,id.id)(zTargetType);
|
310
310
|
})();
|
311
311
|
const configurationPackageJsonFilePath = (() => {
|
@@ -324,13 +324,13 @@ function getBuildContext(params) {
|
|
324
324
|
const buildOptions = (() => {
|
325
325
|
switch (bundler) {
|
326
326
|
case "vite":
|
327
|
-
(0,assert
|
327
|
+
(0,assert/* assert */.h)(resolvedViteConfig !== undefined);
|
328
328
|
return resolvedViteConfig.buildOptions;
|
329
329
|
case "webpack":
|
330
|
-
(0,assert
|
330
|
+
(0,assert/* assert */.h)(parsedPackageJson.keycloakify !== undefined);
|
331
331
|
return parsedPackageJson.keycloakify;
|
332
332
|
}
|
333
|
-
(0,assert
|
333
|
+
(0,assert/* assert */.h)(false);
|
334
334
|
})();
|
335
335
|
const implementedThemeTypes = {
|
336
336
|
login: {
|
@@ -374,7 +374,7 @@ function getBuildContext(params) {
|
|
374
374
|
return [buildOptions.themeName];
|
375
375
|
}
|
376
376
|
const [mainThemeName, ...themeVariantNames] = buildOptions.themeName;
|
377
|
-
(0,assert
|
377
|
+
(0,assert/* assert */.h)(mainThemeName !== undefined);
|
378
378
|
return [mainThemeName, ...themeVariantNames];
|
379
379
|
})();
|
380
380
|
for (const themeName of themeNames) {
|
@@ -393,7 +393,7 @@ function getBuildContext(params) {
|
|
393
393
|
if (bundler !== "webpack") {
|
394
394
|
break webpack;
|
395
395
|
}
|
396
|
-
(0,assert
|
396
|
+
(0,assert/* assert */.h)(parsedPackageJson.keycloakify !== undefined);
|
397
397
|
if (parsedPackageJson.keycloakify.projectBuildDirPath !== undefined) {
|
398
398
|
return (0,getAbsoluteAndInOsFormatPath/* getAbsoluteAndInOsFormatPath */.c)({
|
399
399
|
pathIsh: parsedPackageJson.keycloakify.projectBuildDirPath,
|
@@ -402,8 +402,8 @@ function getBuildContext(params) {
|
|
402
402
|
}
|
403
403
|
return (0,external_path_.join)(projectDirPath, "build");
|
404
404
|
}
|
405
|
-
(0,assert
|
406
|
-
(0,assert
|
405
|
+
(0,assert/* assert */.h)(bundler === "vite");
|
406
|
+
(0,assert/* assert */.h)(resolvedViteConfig !== undefined);
|
407
407
|
return (0,external_path_.join)(projectDirPath, resolvedViteConfig.buildDir);
|
408
408
|
})();
|
409
409
|
return {
|
@@ -445,7 +445,7 @@ function getBuildContext(params) {
|
|
445
445
|
if (bundler !== "webpack") {
|
446
446
|
break webpack;
|
447
447
|
}
|
448
|
-
(0,assert
|
448
|
+
(0,assert/* assert */.h)(parsedPackageJson.keycloakify !== undefined);
|
449
449
|
if (parsedPackageJson.keycloakify.publicDirPath !== undefined) {
|
450
450
|
return (0,getAbsoluteAndInOsFormatPath/* getAbsoluteAndInOsFormatPath */.c)({
|
451
451
|
pathIsh: parsedPackageJson.keycloakify.publicDirPath,
|
@@ -454,8 +454,8 @@ function getBuildContext(params) {
|
|
454
454
|
}
|
455
455
|
return (0,external_path_.join)(projectDirPath, "public");
|
456
456
|
}
|
457
|
-
(0,assert
|
458
|
-
(0,assert
|
457
|
+
(0,assert/* assert */.h)(bundler === "vite");
|
458
|
+
(0,assert/* assert */.h)(resolvedViteConfig !== undefined);
|
459
459
|
return (0,external_path_.join)(projectDirPath, resolvedViteConfig.publicDir);
|
460
460
|
})(),
|
461
461
|
cacheDirPath: (0,external_path_.join)((() => {
|
@@ -483,8 +483,8 @@ function getBuildContext(params) {
|
|
483
483
|
const out = url.pathname.replace(/([^/])$/, "$1/");
|
484
484
|
return out === "/" ? undefined : out;
|
485
485
|
}
|
486
|
-
(0,assert
|
487
|
-
(0,assert
|
486
|
+
(0,assert/* assert */.h)(bundler === "vite");
|
487
|
+
(0,assert/* assert */.h)(resolvedViteConfig !== undefined);
|
488
488
|
return resolvedViteConfig.urlPathname;
|
489
489
|
})(),
|
490
490
|
assetsDirPath: (() => {
|
@@ -492,7 +492,7 @@ function getBuildContext(params) {
|
|
492
492
|
if (bundler !== "webpack") {
|
493
493
|
break webpack;
|
494
494
|
}
|
495
|
-
(0,assert
|
495
|
+
(0,assert/* assert */.h)(parsedPackageJson.keycloakify !== undefined);
|
496
496
|
if (parsedPackageJson.keycloakify.staticDirPathInProjectBuildDirPath !==
|
497
497
|
undefined) {
|
498
498
|
(0,getAbsoluteAndInOsFormatPath/* getAbsoluteAndInOsFormatPath */.c)({
|
@@ -503,8 +503,8 @@ function getBuildContext(params) {
|
|
503
503
|
}
|
504
504
|
return (0,external_path_.join)(projectBuildDirPath, "static");
|
505
505
|
}
|
506
|
-
(0,assert
|
507
|
-
(0,assert
|
506
|
+
(0,assert/* assert */.h)(bundler === "vite");
|
507
|
+
(0,assert/* assert */.h)(resolvedViteConfig !== undefined);
|
508
508
|
return (0,external_path_.join)(projectBuildDirPath, resolvedViteConfig.assetsDir);
|
509
509
|
})(),
|
510
510
|
kcContextExclusionsFtlCode: (() => {
|
@@ -526,7 +526,7 @@ function getBuildContext(params) {
|
|
526
526
|
fetchOptions: getProxyFetchOptions({
|
527
527
|
npmConfigGetCwd: (function callee(upCount) {
|
528
528
|
const dirPath = (0,external_path_.resolve)((0,external_path_.join)(...[projectDirPath, ...Array(upCount).fill("..")]));
|
529
|
-
(0,assert
|
529
|
+
(0,assert/* assert */.h)(dirPath !== external_path_.sep, "Couldn't find a place to run 'npm config get'");
|
530
530
|
try {
|
531
531
|
external_child_process_.execSync("npm config get", {
|
532
532
|
cwd: dirPath,
|
@@ -551,7 +551,7 @@ function getBuildContext(params) {
|
|
551
551
|
return undefined;
|
552
552
|
}
|
553
553
|
const major = parseInt(envValue);
|
554
|
-
(0,assert
|
554
|
+
(0,assert/* assert */.h)(!isNaN(major));
|
555
555
|
return major;
|
556
556
|
})();
|
557
557
|
if (buildForKeycloakMajorVersionNumber === undefined) {
|
@@ -564,7 +564,7 @@ function getBuildContext(params) {
|
|
564
564
|
if (buildForKeycloakMajorVersionNumber <= 21) {
|
565
565
|
return "21-and-below";
|
566
566
|
}
|
567
|
-
(0,assert
|
567
|
+
(0,assert/* assert */.h)(buildForKeycloakMajorVersionNumber !== 22);
|
568
568
|
if (buildForKeycloakMajorVersionNumber === 23) {
|
569
569
|
return "23";
|
570
570
|
}
|
@@ -573,7 +573,7 @@ function getBuildContext(params) {
|
|
573
573
|
}
|
574
574
|
return "25-and-above";
|
575
575
|
})();
|
576
|
-
(0,assert
|
576
|
+
(0,assert/* assert */.h)();
|
577
577
|
return keycloakVersionRange;
|
578
578
|
}
|
579
579
|
else {
|
@@ -583,7 +583,7 @@ function getBuildContext(params) {
|
|
583
583
|
}
|
584
584
|
return "22-and-above";
|
585
585
|
})();
|
586
|
-
(0,assert
|
586
|
+
(0,assert/* assert */.h)();
|
587
587
|
return keycloakVersionRange;
|
588
588
|
}
|
589
589
|
})();
|
@@ -593,7 +593,7 @@ function getBuildContext(params) {
|
|
593
593
|
if (keycloakVersionTargets === undefined) {
|
594
594
|
break use_custom_jar_basename;
|
595
595
|
}
|
596
|
-
const entry = (0,objectEntries
|
596
|
+
const entry = (0,objectEntries/* objectEntries */.q)(keycloakVersionTargets).find(([keycloakVersionRange_entry]) => keycloakVersionRange_entry === keycloakVersionRange);
|
597
597
|
if (entry === undefined) {
|
598
598
|
break use_custom_jar_basename;
|
599
599
|
}
|
@@ -622,7 +622,7 @@ function getBuildContext(params) {
|
|
622
622
|
"24",
|
623
623
|
"25-and-above"
|
624
624
|
]) {
|
625
|
-
(0,assert
|
625
|
+
(0,assert/* assert */.h)(true);
|
626
626
|
jarTargets.push({
|
627
627
|
keycloakVersionRange,
|
628
628
|
jarFileBasename: getDefaultJarFileBasename(keycloakVersionRange)
|
@@ -634,7 +634,7 @@ function getBuildContext(params) {
|
|
634
634
|
"21-and-below",
|
635
635
|
"22-and-above"
|
636
636
|
]) {
|
637
|
-
(0,assert
|
637
|
+
(0,assert/* assert */.h)(true);
|
638
638
|
jarTargets.push({
|
639
639
|
keycloakVersionRange,
|
640
640
|
jarFileBasename: getDefaultJarFileBasename(keycloakVersionRange)
|
@@ -647,7 +647,7 @@ function getBuildContext(params) {
|
|
647
647
|
return jarTargets_default;
|
648
648
|
}
|
649
649
|
const jarTargets = [];
|
650
|
-
for (const [keycloakVersionRange, jarNameOrBoolean] of (0,objectEntries
|
650
|
+
for (const [keycloakVersionRange, jarNameOrBoolean] of (0,objectEntries/* objectEntries */.q)(buildOptions.keycloakVersionTargets)) {
|
651
651
|
if (jarNameOrBoolean === false) {
|
652
652
|
continue;
|
653
653
|
}
|
@@ -689,7 +689,7 @@ function getBuildContext(params) {
|
|
689
689
|
return undefined;
|
690
690
|
}
|
691
691
|
const [reference, tag, ...rest] = buildOptions.startKeycloakOptions.dockerImage.split(":");
|
692
|
-
(0,assert
|
692
|
+
(0,assert/* assert */.h)(reference !== undefined && tag !== undefined && rest.length === 0, `Invalid docker image: ${buildOptions.startKeycloakOptions.dockerImage}`);
|
693
693
|
return { reference, tag };
|
694
694
|
})(),
|
695
695
|
dockerExtraArgs: (_g = (_f = buildOptions.startKeycloakOptions) === null || _f === void 0 ? void 0 : _f.dockerExtraArgs) !== null && _g !== void 0 ? _g : [],
|
package/bin/33.index.js
CHANGED
@@ -695,6 +695,217 @@ exports.withObjectValues = withObjectValues;
|
|
695
695
|
|
696
696
|
/***/ }),
|
697
697
|
|
698
|
+
/***/ 87857:
|
699
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
700
|
+
|
701
|
+
"use strict";
|
702
|
+
|
703
|
+
var __extends = (this && this.__extends) || (function () {
|
704
|
+
var extendStatics = function (d, b) {
|
705
|
+
extendStatics = Object.setPrototypeOf ||
|
706
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
707
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
708
|
+
return extendStatics(d, b);
|
709
|
+
};
|
710
|
+
return function (d, b) {
|
711
|
+
if (typeof b !== "function" && b !== null)
|
712
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
713
|
+
extendStatics(d, b);
|
714
|
+
function __() { this.constructor = d; }
|
715
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
716
|
+
};
|
717
|
+
})();
|
718
|
+
var __read = (this && this.__read) || function (o, n) {
|
719
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
720
|
+
if (!m) return o;
|
721
|
+
var i = m.call(o), r, ar = [], e;
|
722
|
+
try {
|
723
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
724
|
+
}
|
725
|
+
catch (error) { e = { error: error }; }
|
726
|
+
finally {
|
727
|
+
try {
|
728
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
729
|
+
}
|
730
|
+
finally { if (e) throw e.error; }
|
731
|
+
}
|
732
|
+
return ar;
|
733
|
+
};
|
734
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
735
|
+
exports.assert = exports.AssertionError = void 0;
|
736
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
737
|
+
var overwriteReadonlyProp_1 = __webpack_require__(81591);
|
738
|
+
var assertIsRefWrapper_1 = __webpack_require__(84760);
|
739
|
+
/** @see <https://docs.tsafe.dev/assert#error-thrown> */
|
740
|
+
var AssertionError = /** @class */ (function (_super) {
|
741
|
+
__extends(AssertionError, _super);
|
742
|
+
function AssertionError(msg) {
|
743
|
+
var _newTarget = this.constructor;
|
744
|
+
var _this = _super.call(this, "Wrong assertion encountered" + (!msg ? "" : ": \"".concat(msg, "\""))) || this;
|
745
|
+
Object.setPrototypeOf(_this, _newTarget.prototype);
|
746
|
+
if (!_this.stack) {
|
747
|
+
return _this;
|
748
|
+
}
|
749
|
+
try {
|
750
|
+
(0, overwriteReadonlyProp_1.overwriteReadonlyProp)(_this, "stack", _this.stack
|
751
|
+
.split("\n")
|
752
|
+
.filter(function () {
|
753
|
+
var _a = [];
|
754
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
755
|
+
_a[_i] = arguments[_i];
|
756
|
+
}
|
757
|
+
var _b = __read(_a, 2), i = _b[1];
|
758
|
+
return i !== 1 && i !== 2;
|
759
|
+
})
|
760
|
+
.join("\n"));
|
761
|
+
// eslint-disable-next-line no-empty
|
762
|
+
}
|
763
|
+
catch (_a) { }
|
764
|
+
return _this;
|
765
|
+
}
|
766
|
+
return AssertionError;
|
767
|
+
}(Error));
|
768
|
+
exports.AssertionError = AssertionError;
|
769
|
+
/** https://docs.tsafe.dev/assert */
|
770
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
771
|
+
function assert(condition, msg) {
|
772
|
+
if (arguments.length === 0) {
|
773
|
+
condition = true;
|
774
|
+
}
|
775
|
+
if (assertIsRefWrapper_1.assertIsRefWrapper.ref !== undefined) {
|
776
|
+
assertIsRefWrapper_1.assertIsRefWrapper.ref = undefined;
|
777
|
+
return;
|
778
|
+
}
|
779
|
+
if (!condition) {
|
780
|
+
throw new AssertionError(msg);
|
781
|
+
}
|
782
|
+
}
|
783
|
+
exports.assert = assert;
|
784
|
+
//# sourceMappingURL=assert.js.map
|
785
|
+
|
786
|
+
/***/ }),
|
787
|
+
|
788
|
+
/***/ 46149:
|
789
|
+
/***/ ((__unused_webpack_module, exports) => {
|
790
|
+
|
791
|
+
"use strict";
|
792
|
+
|
793
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
794
|
+
exports.id = void 0;
|
795
|
+
/** https://docs.tsafe.dev/id */
|
796
|
+
var id = function (x) { return x; };
|
797
|
+
exports.id = id;
|
798
|
+
//# sourceMappingURL=id.js.map
|
799
|
+
|
800
|
+
/***/ }),
|
801
|
+
|
802
|
+
/***/ 80845:
|
803
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
804
|
+
|
805
|
+
"use strict";
|
806
|
+
|
807
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
808
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
809
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
810
|
+
exports.is = void 0;
|
811
|
+
var assertIsRefWrapper_1 = __webpack_require__(84760);
|
812
|
+
var errorMessage = [
|
813
|
+
"Wrong usage of the ".concat(is.name, " function refer to"),
|
814
|
+
"https://docs.tsafe.dev/".concat(is.name.toLowerCase()),
|
815
|
+
].join(" ");
|
816
|
+
function is(_value) {
|
817
|
+
var ref = {};
|
818
|
+
if (assertIsRefWrapper_1.assertIsRefWrapper.ref !== undefined) {
|
819
|
+
assertIsRefWrapper_1.assertIsRefWrapper.ref = undefined;
|
820
|
+
throw new Error(errorMessage);
|
821
|
+
}
|
822
|
+
assertIsRefWrapper_1.assertIsRefWrapper.ref = ref;
|
823
|
+
Promise.resolve().then(function () {
|
824
|
+
if (assertIsRefWrapper_1.assertIsRefWrapper.ref === ref) {
|
825
|
+
throw new Error(errorMessage);
|
826
|
+
}
|
827
|
+
});
|
828
|
+
return null;
|
829
|
+
}
|
830
|
+
exports.is = is;
|
831
|
+
//# sourceMappingURL=is.js.map
|
832
|
+
|
833
|
+
/***/ }),
|
834
|
+
|
835
|
+
/***/ 81591:
|
836
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
837
|
+
|
838
|
+
"use strict";
|
839
|
+
|
840
|
+
var __assign = (this && this.__assign) || function () {
|
841
|
+
__assign = Object.assign || function(t) {
|
842
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
843
|
+
s = arguments[i];
|
844
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
845
|
+
t[p] = s[p];
|
846
|
+
}
|
847
|
+
return t;
|
848
|
+
};
|
849
|
+
return __assign.apply(this, arguments);
|
850
|
+
};
|
851
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
852
|
+
exports.overwriteReadonlyProp = void 0;
|
853
|
+
/* eslint-disable no-empty */
|
854
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
855
|
+
var assert_1 = __webpack_require__(87857);
|
856
|
+
var is_1 = __webpack_require__(80845);
|
857
|
+
/**
|
858
|
+
* Assign a value to a property even if the object is freezed or if the property is not writable
|
859
|
+
* Throw if the assignation fail ( for example if the property is non configurable write: false )
|
860
|
+
* */
|
861
|
+
var overwriteReadonlyProp = function (obj, propertyName, value) {
|
862
|
+
try {
|
863
|
+
obj[propertyName] = value;
|
864
|
+
}
|
865
|
+
catch (_a) { }
|
866
|
+
if (obj[propertyName] === value) {
|
867
|
+
return value;
|
868
|
+
}
|
869
|
+
var errorDefineProperty = undefined;
|
870
|
+
var propertyDescriptor = Object.getOwnPropertyDescriptor(obj, propertyName) || {
|
871
|
+
"enumerable": true,
|
872
|
+
"configurable": true,
|
873
|
+
};
|
874
|
+
if (!!propertyDescriptor.get) {
|
875
|
+
throw new Error("Probably a wrong ides to overwrite ".concat(String(propertyName), " getter"));
|
876
|
+
}
|
877
|
+
try {
|
878
|
+
Object.defineProperty(obj, propertyName, __assign(__assign({}, propertyDescriptor), { value: value }));
|
879
|
+
}
|
880
|
+
catch (error) {
|
881
|
+
(0, assert_1.assert)((0, is_1.is)(error));
|
882
|
+
errorDefineProperty = error;
|
883
|
+
}
|
884
|
+
if (obj[propertyName] !== value) {
|
885
|
+
throw errorDefineProperty || new Error("Can't assign");
|
886
|
+
}
|
887
|
+
return value;
|
888
|
+
};
|
889
|
+
exports.overwriteReadonlyProp = overwriteReadonlyProp;
|
890
|
+
//# sourceMappingURL=overwriteReadonlyProp.js.map
|
891
|
+
|
892
|
+
/***/ }),
|
893
|
+
|
894
|
+
/***/ 84760:
|
895
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
896
|
+
|
897
|
+
"use strict";
|
898
|
+
|
899
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
900
|
+
exports.assertIsRefWrapper = void 0;
|
901
|
+
var id_1 = __webpack_require__(46149);
|
902
|
+
exports.assertIsRefWrapper = {
|
903
|
+
"ref": (0, id_1.id)(undefined),
|
904
|
+
};
|
905
|
+
//# sourceMappingURL=assertIsRefWrapper.js.map
|
906
|
+
|
907
|
+
/***/ }),
|
908
|
+
|
698
909
|
/***/ 50689:
|
699
910
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
700
911
|
|
@@ -717,7 +928,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
717
928
|
})();
|
718
929
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
719
930
|
exports.VoidDeferred = exports.Deferred = void 0;
|
720
|
-
var overwriteReadonlyProp_1 = __webpack_require__(
|
931
|
+
var overwriteReadonlyProp_1 = __webpack_require__(81591);
|
721
932
|
var Deferred = /** @class */ (function () {
|
722
933
|
function Deferred() {
|
723
934
|
var _this_1 = this;
|