keycloakify 11.4.0-rc.0 → 11.4.1
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/README.md +2 -0
- package/account/i18n/noJsx/getI18n.js +5 -7
- package/account/i18n/noJsx/getI18n.js.map +1 -1
- package/account/i18n/withJsx/useI18n.js +15 -4
- package/account/i18n/withJsx/useI18n.js.map +1 -1
- package/bin/20.index.js +0 -85
- package/bin/33.index.js +55 -212
- package/bin/356.index.js +106 -45
- package/bin/36.index.js +1 -2922
- package/bin/{526.index.js → 392.index.js} +107 -3
- package/bin/40.index.js +1 -86
- package/bin/453.index.js +85 -22
- package/bin/573.index.js +5 -86
- package/bin/653.index.js +752 -0
- package/bin/658.index.js +197 -0
- package/bin/735.index.js +343 -116
- package/bin/786.index.js +78 -14
- package/bin/805.index.js +15 -18
- package/bin/921.index.js +79 -18
- package/bin/97.index.js +64 -13
- package/bin/main.js +165 -86
- package/bin/shared/constants.d.ts +2 -0
- package/bin/shared/constants.js +3 -1
- package/bin/shared/constants.js.map +1 -1
- package/bin/start-keycloak/startViteDevServer.d.ts +8 -0
- package/bin/tools/crawlAsync.d.ts +1 -1
- package/bin/tools/isTrackedByGit.d.ts +3 -0
- package/bin/tools/runPrettier.d.ts +5 -5
- package/bin/tools/untrackFromGit.d.ts +3 -0
- package/lib/getKcClsx.js +1 -2
- package/lib/getKcClsx.js.map +1 -1
- package/login/KcContext/KcContext.d.ts +2 -2
- package/login/KcContext/kcContextMocks.d.ts +1 -1
- package/login/TemplateProps.d.ts +0 -1
- package/login/i18n/noJsx/getI18n.js +5 -7
- package/login/i18n/noJsx/getI18n.js.map +1 -1
- package/login/i18n/withJsx/useI18n.js +15 -4
- package/login/i18n/withJsx/useI18n.js.map +1 -1
- package/login/pages/LoginConfigTotp.js +1 -1
- package/login/pages/LoginConfigTotp.js.map +1 -1
- package/login/pages/LoginPasskeysConditionalAuthenticate.js +16 -18
- package/login/pages/LoginPasskeysConditionalAuthenticate.js.map +1 -1
- package/package.json +17 -7
- package/src/account/i18n/noJsx/getI18n.tsx +5 -7
- package/src/account/i18n/withJsx/useI18n.tsx +18 -4
- package/src/bin/eject-page.ts +28 -10
- package/src/bin/initialize-account-theme/initializeAccountTheme_singlePage.ts +3 -18
- package/src/bin/initialize-account-theme/updateAccountThemeImplementationInConfig.ts +1 -2
- package/src/bin/keycloakify/generateFtl/generateFtl.ts +6 -1
- package/src/bin/keycloakify/generateFtl/kcContextDeclarationTemplate.ftl +39 -0
- package/src/bin/keycloakify/generateResources/generateResources.ts +6 -2
- package/src/bin/main.ts +51 -4
- package/src/bin/postinstall/getUiModuleFileSourceCodeReadyToBeCopied.ts +30 -19
- package/src/bin/postinstall/installUiModulesPeerDependencies.ts +3 -3
- package/src/bin/postinstall/managedGitignoreFile.ts +4 -3
- package/src/bin/postinstall/postinstall.ts +24 -2
- package/src/bin/postinstall/uiModuleMeta.ts +14 -9
- package/src/bin/shared/buildContext.ts +1 -2
- package/src/bin/shared/constants.ts +4 -1
- package/src/bin/start-keycloak/myrealm-realm-25.json +21 -34
- package/src/bin/start-keycloak/myrealm-realm-26.json +32 -35
- package/src/bin/start-keycloak/start-keycloak.ts +94 -1
- package/src/bin/start-keycloak/startViteDevServer.ts +66 -0
- package/src/bin/tools/crawlAsync.ts +6 -6
- package/src/bin/tools/isTrackedByGit.ts +29 -0
- package/src/bin/tools/listInstalledModules.ts +1 -2
- package/src/bin/tools/npmInstall.ts +396 -1
- package/src/bin/tools/runPrettier.ts +63 -14
- package/src/bin/tools/untrackFromGit.ts +24 -0
- package/src/bin/tsconfig.json +1 -1
- package/src/bin/update-kc-gen.ts +17 -2
- package/src/lib/getKcClsx.ts +1 -2
- package/src/login/KcContext/KcContext.ts +2 -2
- package/src/login/KcContext/kcContextMocks.ts +1 -1
- package/src/login/TemplateProps.ts +0 -1
- package/src/login/i18n/noJsx/getI18n.tsx +5 -7
- package/src/login/i18n/withJsx/useI18n.tsx +18 -4
- package/src/login/pages/LoginConfigTotp.tsx +18 -20
- package/src/login/pages/LoginPasskeysConditionalAuthenticate.tsx +51 -52
- package/src/tools/StatefulObservable/StatefulObservable.ts +1 -2
- package/src/tools/deepAssign.ts +1 -2
- package/src/tools/extractLastParenthesisContent.ts +43 -0
- package/src/vite-plugin/vite-plugin.ts +67 -0
- package/stories/login/pages/Info.stories.tsx +3 -39
- package/tools/StatefulObservable/StatefulObservable.js +1 -2
- package/tools/StatefulObservable/StatefulObservable.js.map +1 -1
- package/tools/deepAssign.js +1 -2
- package/tools/deepAssign.js.map +1 -1
- package/tools/extractLastParenthesisContent.d.ts +6 -0
- package/tools/extractLastParenthesisContent.js +36 -0
- package/tools/extractLastParenthesisContent.js.map +1 -0
- package/vite-plugin/index.js +326 -186
- package/bin/124.index.js +0 -348
- package/stories/login/pages/LoginDeviceVerifyUserCode.stories.tsx +0 -18
package/vite-plugin/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/******/ (() => { // webpackBootstrap
|
2
2
|
/******/ var __webpack_modules__ = ({
|
3
3
|
|
4
|
-
/***/
|
4
|
+
/***/ 713:
|
5
5
|
/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
|
6
6
|
|
7
7
|
"use strict";
|
@@ -19,44 +19,10 @@ var customHandler_delegate = __nccwpck_require__(138);
|
|
19
19
|
var external_path_ = __nccwpck_require__(17);
|
20
20
|
// EXTERNAL MODULE: ./dist/bin/shared/constants.js
|
21
21
|
var constants = __nccwpck_require__(173);
|
22
|
+
// EXTERNAL MODULE: ./dist/bin/tools/readThisNpmPackageVersion.js
|
23
|
+
var readThisNpmPackageVersion = __nccwpck_require__(795);
|
22
24
|
// EXTERNAL MODULE: external "fs"
|
23
25
|
var external_fs_ = __nccwpck_require__(147);
|
24
|
-
;// CONCATENATED MODULE: ./dist/bin/tools/getThisCodebaseRootDirPath.js
|
25
|
-
|
26
|
-
|
27
|
-
function getThisCodebaseRootDirPath_rec(dirPath) {
|
28
|
-
if (external_fs_.existsSync(external_path_.join(dirPath, "package.json"))) {
|
29
|
-
return dirPath;
|
30
|
-
}
|
31
|
-
return getThisCodebaseRootDirPath_rec(external_path_.join(dirPath, ".."));
|
32
|
-
}
|
33
|
-
let result = undefined;
|
34
|
-
function getThisCodebaseRootDirPath() {
|
35
|
-
if (result !== undefined) {
|
36
|
-
return result;
|
37
|
-
}
|
38
|
-
return (result = getThisCodebaseRootDirPath_rec(__dirname));
|
39
|
-
}
|
40
|
-
//# sourceMappingURL=getThisCodebaseRootDirPath.js.map
|
41
|
-
// EXTERNAL MODULE: ./node_modules/tsafe/esm/assert.mjs + 1 modules
|
42
|
-
var assert = __nccwpck_require__(41);
|
43
|
-
;// CONCATENATED MODULE: ./dist/bin/tools/readThisNpmPackageVersion.js
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
let cache = undefined;
|
49
|
-
function readThisNpmPackageVersion() {
|
50
|
-
if (cache !== undefined) {
|
51
|
-
return cache;
|
52
|
-
}
|
53
|
-
const version = JSON.parse(external_fs_.readFileSync((0,external_path_.join)(getThisCodebaseRootDirPath(), "package.json"))
|
54
|
-
.toString("utf8"))["version"];
|
55
|
-
(0,assert/* assert */.h)(typeof version === "string");
|
56
|
-
cache = version;
|
57
|
-
return version;
|
58
|
-
}
|
59
|
-
//# sourceMappingURL=readThisNpmPackageVersion.js.map
|
60
26
|
// EXTERNAL MODULE: ./dist/bin/tools/SemVer.js
|
61
27
|
var SemVer = __nccwpck_require__(171);
|
62
28
|
;// CONCATENATED MODULE: ./dist/bin/tools/fs.rmSync.js
|
@@ -145,6 +111,8 @@ function transformCodebase(params) {
|
|
145
111
|
}
|
146
112
|
}
|
147
113
|
//# sourceMappingURL=transformCodebase.js.map
|
114
|
+
// EXTERNAL MODULE: ./dist/bin/tools/getThisCodebaseRootDirPath.js
|
115
|
+
var getThisCodebaseRootDirPath = __nccwpck_require__(822);
|
148
116
|
;// CONCATENATED MODULE: ./dist/bin/copy-keycloak-resources-to-public.js
|
149
117
|
|
150
118
|
|
@@ -166,7 +134,7 @@ async function command(params) {
|
|
166
134
|
const destDirPath = (0,external_path_.join)(buildContext.publicDirPath, constants.WELL_KNOWN_DIRECTORY_BASE_NAME.KEYCLOAKIFY_DEV_RESOURCES);
|
167
135
|
const keycloakifyBuildinfoFilePath = (0,external_path_.join)(destDirPath, "keycloakify.buildinfo");
|
168
136
|
const keycloakifyBuildinfoRaw = JSON.stringify({
|
169
|
-
keycloakifyVersion: readThisNpmPackageVersion()
|
137
|
+
keycloakifyVersion: (0,readThisNpmPackageVersion/* readThisNpmPackageVersion */.K)()
|
170
138
|
}, null, 2);
|
171
139
|
skip_if_already_done: {
|
172
140
|
if (!external_fs_.existsSync(keycloakifyBuildinfoFilePath)) {
|
@@ -192,7 +160,7 @@ async function command(params) {
|
|
192
160
|
external_fs_.mkdirSync(destDirPath, { recursive: true });
|
193
161
|
external_fs_.writeFileSync((0,external_path_.join)(destDirPath, ".gitignore"), Buffer.from("*", "utf8"));
|
194
162
|
transformCodebase({
|
195
|
-
srcDirPath: (0,external_path_.join)(getThisCodebaseRootDirPath(), "res", "public", constants.WELL_KNOWN_DIRECTORY_BASE_NAME.KEYCLOAKIFY_DEV_RESOURCES),
|
163
|
+
srcDirPath: (0,external_path_.join)((0,getThisCodebaseRootDirPath/* getThisCodebaseRootDirPath */.e)(), "res", "public", constants.WELL_KNOWN_DIRECTORY_BASE_NAME.KEYCLOAKIFY_DEV_RESOURCES),
|
196
164
|
destDirPath
|
197
165
|
});
|
198
166
|
external_fs_.writeFileSync((0,external_path_.join)(destDirPath, "README.txt"), Buffer.from(
|
@@ -208,7 +176,7 @@ async function command(params) {
|
|
208
176
|
|
209
177
|
/***/ }),
|
210
178
|
|
211
|
-
/***/
|
179
|
+
/***/ 224:
|
212
180
|
/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
|
213
181
|
|
214
182
|
"use strict";
|
@@ -4208,8 +4176,10 @@ var external_child_process_ = __nccwpck_require__(81);
|
|
4208
4176
|
// EXTERNAL MODULE: ./dist/bin/shared/constants.js
|
4209
4177
|
var constants = __nccwpck_require__(173);
|
4210
4178
|
;// CONCATENATED MODULE: ./node_modules/tsafe/esm/exclude.mjs
|
4211
|
-
|
4212
|
-
|
4179
|
+
/**
|
4180
|
+
* https://docs.tsafe.dev/exclude
|
4181
|
+
*
|
4182
|
+
* Return a function to use as Array.prototype.filter argument
|
4213
4183
|
* to exclude one or many primitive value element from the array.
|
4214
4184
|
* Ex: ([ "a", "b", "c" ] as const).filter(exclude("a")) return ("b" | "c")[]
|
4215
4185
|
* Ex: ([ "a", "b", "c", "d"] as const).filter(exclude(["a", "b"]) gives ("c" | "d")[]
|
@@ -4218,43 +4188,14 @@ function exclude(target) {
|
|
4218
4188
|
const test = target instanceof Object
|
4219
4189
|
? element => target.indexOf(element) < 0
|
4220
4190
|
: element => element !== target;
|
4221
|
-
return function (
|
4222
|
-
return test(
|
4191
|
+
return function (element) {
|
4192
|
+
return test(element);
|
4223
4193
|
};
|
4224
4194
|
}
|
4225
4195
|
|
4226
4196
|
|
4227
4197
|
//# sourceMappingURL=exclude.mjs.map
|
4228
4198
|
|
4229
|
-
// EXTERNAL MODULE: ./node_modules/tsafe/esm/zz_internal/assertIsRefWrapper.mjs
|
4230
|
-
var assertIsRefWrapper = __nccwpck_require__(770);
|
4231
|
-
;// CONCATENATED MODULE: ./node_modules/tsafe/esm/is.mjs
|
4232
|
-
|
4233
|
-
|
4234
|
-
/* eslint-disable @typescript-eslint/no-namespace */
|
4235
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
4236
|
-
const errorMessage = [
|
4237
|
-
`Wrong usage of the ${is.name} function refer to`,
|
4238
|
-
`https://docs.tsafe.dev/${is.name.toLowerCase()}`,
|
4239
|
-
].join(" ");
|
4240
|
-
function is(_value) {
|
4241
|
-
const ref = {};
|
4242
|
-
if (assertIsRefWrapper/* assertIsRefWrapper.ref */.j.ref !== undefined) {
|
4243
|
-
assertIsRefWrapper/* assertIsRefWrapper.ref */.j.ref = undefined;
|
4244
|
-
throw new Error(errorMessage);
|
4245
|
-
}
|
4246
|
-
assertIsRefWrapper/* assertIsRefWrapper.ref */.j.ref = ref;
|
4247
|
-
Promise.resolve().then(() => {
|
4248
|
-
if (assertIsRefWrapper/* assertIsRefWrapper.ref */.j.ref === ref) {
|
4249
|
-
throw new Error(errorMessage);
|
4250
|
-
}
|
4251
|
-
});
|
4252
|
-
return null;
|
4253
|
-
}
|
4254
|
-
|
4255
|
-
|
4256
|
-
//# sourceMappingURL=is.mjs.map
|
4257
|
-
|
4258
4199
|
;// CONCATENATED MODULE: ./node_modules/tsafe/esm/index.mjs
|
4259
4200
|
|
4260
4201
|
|
@@ -4276,7 +4217,6 @@ function is(_value) {
|
|
4276
4217
|
// EXTERNAL MODULE: ./dist/bin/tools/crawl.js
|
4277
4218
|
var crawl = __nccwpck_require__(36);
|
4278
4219
|
;// CONCATENATED MODULE: ./node_modules/tsafe/esm/objectEntries.mjs
|
4279
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
4280
4220
|
/** https://docs.tsafe.dev/objectentries */
|
4281
4221
|
function objectEntries(o) {
|
4282
4222
|
return Object.entries(o);
|
@@ -4389,7 +4329,6 @@ function ensureSingleOrNone(arg0) {
|
|
4389
4329
|
|
4390
4330
|
|
4391
4331
|
|
4392
|
-
|
4393
4332
|
(0,assert/* assert */.h)();
|
4394
4333
|
function getBuildContext(params) {
|
4395
4334
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
@@ -4858,7 +4797,7 @@ function getBuildContext(params) {
|
|
4858
4797
|
const jarFileBasename = (() => {
|
4859
4798
|
use_custom_jar_basename: {
|
4860
4799
|
const { keycloakVersionTargets } = buildOptions;
|
4861
|
-
(0,assert/* assert */.h)(is(keycloakVersionTargets));
|
4800
|
+
(0,assert/* assert */.h)((0,assert.is)(keycloakVersionTargets));
|
4862
4801
|
if (keycloakVersionTargets === undefined) {
|
4863
4802
|
break use_custom_jar_basename;
|
4864
4803
|
}
|
@@ -4919,7 +4858,7 @@ function getBuildContext(params) {
|
|
4919
4858
|
const jarTargets = [];
|
4920
4859
|
for (const [keycloakVersionRange, jarNameOrBoolean] of objectEntries((() => {
|
4921
4860
|
const { keycloakVersionTargets } = buildOptions;
|
4922
|
-
(0,assert/* assert */.h)(is(keycloakVersionTargets));
|
4861
|
+
(0,assert/* assert */.h)((0,assert.is)(keycloakVersionTargets));
|
4923
4862
|
return keycloakVersionTargets;
|
4924
4863
|
})())) {
|
4925
4864
|
if (jarNameOrBoolean === false) {
|
@@ -5005,6 +4944,7 @@ __nccwpck_require__.r(__webpack_exports__);
|
|
5005
4944
|
/* harmony export */ "CONTAINER_NAME": () => (/* binding */ CONTAINER_NAME),
|
5006
4945
|
/* harmony export */ "CUSTOM_HANDLER_ENV_NAMES": () => (/* binding */ CUSTOM_HANDLER_ENV_NAMES),
|
5007
4946
|
/* harmony export */ "FALLBACK_LANGUAGE_TAG": () => (/* binding */ FALLBACK_LANGUAGE_TAG),
|
4947
|
+
/* harmony export */ "KEYCLOAKIFY_SPA_DEV_SERVER_PORT": () => (/* binding */ KEYCLOAKIFY_SPA_DEV_SERVER_PORT),
|
5008
4948
|
/* harmony export */ "KEYCLOAK_THEME": () => (/* binding */ KEYCLOAK_THEME),
|
5009
4949
|
/* harmony export */ "LOGIN_THEME_PAGE_IDS": () => (/* binding */ LOGIN_THEME_PAGE_IDS),
|
5010
4950
|
/* harmony export */ "THEME_TYPES": () => (/* binding */ THEME_TYPES),
|
@@ -5019,7 +4959,8 @@ const WELL_KNOWN_DIRECTORY_BASE_NAME = {
|
|
5019
4959
|
const THEME_TYPES = ["login", "account", "admin"];
|
5020
4960
|
const VITE_PLUGIN_SUB_SCRIPTS_ENV_NAMES = {
|
5021
4961
|
RUN_POST_BUILD_SCRIPT: "KEYCLOAKIFY_RUN_POST_BUILD_SCRIPT",
|
5022
|
-
RESOLVE_VITE_CONFIG: "KEYCLOAKIFY_RESOLVE_VITE_CONFIG"
|
4962
|
+
RESOLVE_VITE_CONFIG: "KEYCLOAKIFY_RESOLVE_VITE_CONFIG",
|
4963
|
+
READ_KC_CONTEXT_FROM_URL: "KEYCLOAKIFY_READ_KC_CONTEXT_FROM_URL"
|
5023
4964
|
};
|
5024
4965
|
const BUILD_FOR_KEYCLOAK_MAJOR_VERSION_ENV_NAME = "KEYCLOAKIFY_BUILD_FOR_KEYCLOAK_MAJOR_VERSION";
|
5025
4966
|
const LOGIN_THEME_PAGE_IDS = [
|
@@ -5076,6 +5017,7 @@ const CUSTOM_HANDLER_ENV_NAMES = {
|
|
5076
5017
|
BUILD_CONTEXT: "KEYCLOAKIFY_BUILD_CONTEXT"
|
5077
5018
|
};
|
5078
5019
|
const KEYCLOAK_THEME = "keycloak-theme";
|
5020
|
+
const KEYCLOAKIFY_SPA_DEV_SERVER_PORT = "KEYCLOAKIFY_SPA_DEV_SERVER_PORT";
|
5079
5021
|
//# sourceMappingURL=constants.js.map
|
5080
5022
|
|
5081
5023
|
/***/ }),
|
@@ -5367,6 +5309,36 @@ async function checkDirExists(dirPath) {
|
|
5367
5309
|
|
5368
5310
|
/***/ }),
|
5369
5311
|
|
5312
|
+
/***/ 822:
|
5313
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
|
5314
|
+
|
5315
|
+
"use strict";
|
5316
|
+
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
5317
|
+
/* harmony export */ "e": () => (/* binding */ getThisCodebaseRootDirPath)
|
5318
|
+
/* harmony export */ });
|
5319
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(147);
|
5320
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nccwpck_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__);
|
5321
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(17);
|
5322
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nccwpck_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
|
5323
|
+
|
5324
|
+
|
5325
|
+
function getThisCodebaseRootDirPath_rec(dirPath) {
|
5326
|
+
if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(path__WEBPACK_IMPORTED_MODULE_1__.join(dirPath, "package.json"))) {
|
5327
|
+
return dirPath;
|
5328
|
+
}
|
5329
|
+
return getThisCodebaseRootDirPath_rec(path__WEBPACK_IMPORTED_MODULE_1__.join(dirPath, ".."));
|
5330
|
+
}
|
5331
|
+
let result = undefined;
|
5332
|
+
function getThisCodebaseRootDirPath() {
|
5333
|
+
if (result !== undefined) {
|
5334
|
+
return result;
|
5335
|
+
}
|
5336
|
+
return (result = getThisCodebaseRootDirPath_rec(__dirname));
|
5337
|
+
}
|
5338
|
+
//# sourceMappingURL=getThisCodebaseRootDirPath.js.map
|
5339
|
+
|
5340
|
+
/***/ }),
|
5341
|
+
|
5370
5342
|
/***/ 776:
|
5371
5343
|
/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
|
5372
5344
|
|
@@ -5406,97 +5378,176 @@ function getNodeModulesBinDirPath() {
|
|
5406
5378
|
|
5407
5379
|
/***/ }),
|
5408
5380
|
|
5409
|
-
/***/
|
5381
|
+
/***/ 795:
|
5410
5382
|
/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
|
5411
5383
|
|
5412
5384
|
"use strict";
|
5413
|
-
|
5414
|
-
|
5385
|
+
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
5386
|
+
/* harmony export */ "K": () => (/* binding */ readThisNpmPackageVersion)
|
5387
|
+
/* harmony export */ });
|
5388
|
+
/* harmony import */ var _getThisCodebaseRootDirPath__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(822);
|
5389
|
+
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(41);
|
5390
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(147);
|
5391
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__nccwpck_require__.n(fs__WEBPACK_IMPORTED_MODULE_2__);
|
5392
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(17);
|
5393
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__nccwpck_require__.n(path__WEBPACK_IMPORTED_MODULE_3__);
|
5415
5394
|
|
5416
|
-
// EXPORTS
|
5417
|
-
__nccwpck_require__.d(__webpack_exports__, {
|
5418
|
-
"command": () => (/* binding */ command)
|
5419
|
-
});
|
5420
5395
|
|
5421
|
-
// EXTERNAL MODULE: external "fs/promises"
|
5422
|
-
var promises_ = __nccwpck_require__(292);
|
5423
|
-
// EXTERNAL MODULE: external "path"
|
5424
|
-
var external_path_ = __nccwpck_require__(17);
|
5425
|
-
;// CONCATENATED MODULE: ./dist/bin/tools/fs.existsAsync.js
|
5426
5396
|
|
5427
|
-
|
5428
|
-
|
5429
|
-
|
5430
|
-
|
5431
|
-
|
5432
|
-
catch (error) {
|
5433
|
-
if (error.code === "ENOENT")
|
5434
|
-
return false;
|
5435
|
-
throw error;
|
5397
|
+
|
5398
|
+
let cache = undefined;
|
5399
|
+
function readThisNpmPackageVersion() {
|
5400
|
+
if (cache !== undefined) {
|
5401
|
+
return cache;
|
5436
5402
|
}
|
5403
|
+
const version = JSON.parse(fs__WEBPACK_IMPORTED_MODULE_2__.readFileSync((0,path__WEBPACK_IMPORTED_MODULE_3__.join)((0,_getThisCodebaseRootDirPath__WEBPACK_IMPORTED_MODULE_0__/* .getThisCodebaseRootDirPath */ .e)(), "package.json"))
|
5404
|
+
.toString("utf8"))["version"];
|
5405
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_1__/* .assert */ .h)(typeof version === "string");
|
5406
|
+
cache = version;
|
5407
|
+
return version;
|
5437
5408
|
}
|
5438
|
-
//# sourceMappingURL=
|
5439
|
-
// EXTERNAL MODULE: ./dist/bin/shared/customHandler_delegate.js + 1 modules
|
5440
|
-
var customHandler_delegate = __nccwpck_require__(138);
|
5441
|
-
;// CONCATENATED MODULE: external "crypto"
|
5442
|
-
const external_crypto_namespaceObject = require("crypto");
|
5443
|
-
// EXTERNAL MODULE: ./dist/bin/tools/nodeModulesBinDirPath.js
|
5444
|
-
var tools_nodeModulesBinDirPath = __nccwpck_require__(776);
|
5445
|
-
// EXTERNAL MODULE: ./node_modules/tsafe/esm/id.mjs
|
5446
|
-
var id = __nccwpck_require__(469);
|
5447
|
-
// EXTERNAL MODULE: ./node_modules/tsafe/esm/assert.mjs + 1 modules
|
5448
|
-
var assert = __nccwpck_require__(41);
|
5449
|
-
// EXTERNAL MODULE: ./node_modules/chalk/source/index.js
|
5450
|
-
var source = __nccwpck_require__(818);
|
5451
|
-
var source_default = /*#__PURE__*/__nccwpck_require__.n(source);
|
5452
|
-
;// CONCATENATED MODULE: ./dist/bin/tools/runPrettier.js
|
5409
|
+
//# sourceMappingURL=readThisNpmPackageVersion.js.map
|
5453
5410
|
|
5411
|
+
/***/ }),
|
5412
|
+
|
5413
|
+
/***/ 433:
|
5414
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
|
5415
|
+
|
5416
|
+
"use strict";
|
5417
|
+
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
5418
|
+
/* harmony export */ "MT": () => (/* binding */ getIsPrettierAvailable),
|
5419
|
+
/* harmony export */ "eY": () => (/* binding */ runPrettier)
|
5420
|
+
/* harmony export */ });
|
5421
|
+
/* unused harmony export getPrettier */
|
5422
|
+
/* harmony import */ var _nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(776);
|
5423
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(17);
|
5424
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nccwpck_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
|
5425
|
+
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(292);
|
5426
|
+
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__nccwpck_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_2__);
|
5427
|
+
/* harmony import */ var tsafe_id__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(469);
|
5428
|
+
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(41);
|
5429
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(818);
|
5430
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__nccwpck_require__.n(chalk__WEBPACK_IMPORTED_MODULE_4__);
|
5431
|
+
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(113);
|
5432
|
+
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__nccwpck_require__.n(crypto__WEBPACK_IMPORTED_MODULE_5__);
|
5433
|
+
/* harmony import */ var tsafe_symToStr__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(30);
|
5434
|
+
/* harmony import */ var _readThisNpmPackageVersion__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(795);
|
5454
5435
|
|
5455
5436
|
|
5456
5437
|
|
5457
5438
|
|
5458
5439
|
|
5459
|
-
|
5440
|
+
|
5441
|
+
|
5442
|
+
|
5443
|
+
|
5444
|
+
getIsPrettierAvailable.cache = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_7__.id)(undefined);
|
5460
5445
|
async function getIsPrettierAvailable() {
|
5461
5446
|
var _a;
|
5462
5447
|
if (getIsPrettierAvailable.cache !== undefined) {
|
5463
5448
|
return getIsPrettierAvailable.cache;
|
5464
5449
|
}
|
5465
|
-
const nodeModulesBinDirPath = (0,
|
5466
|
-
const prettierBinPath = (0,
|
5467
|
-
const stats = await
|
5450
|
+
const nodeModulesBinDirPath = (0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_0__/* .getNodeModulesBinDirPath */ .K)();
|
5451
|
+
const prettierBinPath = (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(nodeModulesBinDirPath, "prettier");
|
5452
|
+
const stats = await fs_promises__WEBPACK_IMPORTED_MODULE_2__.stat(prettierBinPath).catch(() => undefined);
|
5468
5453
|
const isPrettierAvailable = (_a = stats === null || stats === void 0 ? void 0 : stats.isFile()) !== null && _a !== void 0 ? _a : false;
|
5469
5454
|
getIsPrettierAvailable.cache = isPrettierAvailable;
|
5470
5455
|
return isPrettierAvailable;
|
5471
5456
|
}
|
5472
|
-
|
5473
|
-
async function
|
5474
|
-
(0,
|
5475
|
-
if (
|
5476
|
-
return
|
5477
|
-
}
|
5478
|
-
|
5457
|
+
getPrettier.cache = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_7__.id)(undefined);
|
5458
|
+
async function getPrettier() {
|
5459
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_3__/* .assert */ .h)(getIsPrettierAvailable());
|
5460
|
+
if (getPrettier.cache !== undefined) {
|
5461
|
+
return getPrettier.cache;
|
5462
|
+
}
|
5463
|
+
let prettier = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_7__.id)(undefined);
|
5464
|
+
import_prettier: {
|
5465
|
+
// NOTE: When module is linked we want to make sure we import the correct version
|
5466
|
+
// of prettier, that is the one of the project, not the one of this repo.
|
5467
|
+
// So we do a sketchy eval to bypass ncc.
|
5468
|
+
// We make sure to only do that when linking, otherwise we import properly.
|
5469
|
+
if ((0,_readThisNpmPackageVersion__WEBPACK_IMPORTED_MODULE_6__/* .readThisNpmPackageVersion */ .K)().startsWith("0.0.0")) {
|
5470
|
+
eval(`${(0,tsafe_symToStr__WEBPACK_IMPORTED_MODULE_8__/* .symToStr */ .r)({ prettier })} = require("${(0,path__WEBPACK_IMPORTED_MODULE_1__.resolve)((0,path__WEBPACK_IMPORTED_MODULE_1__.join)((0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_0__/* .getNodeModulesBinDirPath */ .K)(), "..", "prettier"))}")`);
|
5471
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_3__/* .assert */ .h)(!(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_3__.is)(prettier));
|
5472
|
+
break import_prettier;
|
5473
|
+
}
|
5474
|
+
prettier = await Promise.resolve(/* import() */).then(__nccwpck_require__.t.bind(__nccwpck_require__, 421, 23));
|
5475
|
+
}
|
5476
|
+
const configHash = await (async () => {
|
5477
|
+
const configFilePath = await prettier.resolveConfigFile((0,path__WEBPACK_IMPORTED_MODULE_1__.join)((0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_0__/* .getNodeModulesBinDirPath */ .K)(), ".."));
|
5478
|
+
if (configFilePath === null) {
|
5479
|
+
return "";
|
5480
|
+
}
|
5481
|
+
const data = await fs_promises__WEBPACK_IMPORTED_MODULE_2__.readFile(configFilePath);
|
5482
|
+
return crypto__WEBPACK_IMPORTED_MODULE_5__.createHash("sha256").update(data).digest("hex");
|
5483
|
+
})();
|
5479
5484
|
const prettierAndConfig = {
|
5480
5485
|
prettier,
|
5481
|
-
|
5486
|
+
configHash
|
5482
5487
|
};
|
5483
|
-
|
5488
|
+
getPrettier.cache = prettierAndConfig;
|
5484
5489
|
return prettierAndConfig;
|
5485
5490
|
}
|
5486
5491
|
async function runPrettier(params) {
|
5487
5492
|
const { sourceCode, filePath } = params;
|
5488
5493
|
let formattedSourceCode;
|
5489
5494
|
try {
|
5490
|
-
const { prettier
|
5491
|
-
|
5495
|
+
const { prettier } = await getPrettier();
|
5496
|
+
const { ignored, inferredParser } = await prettier.getFileInfo(filePath, {
|
5497
|
+
resolveConfig: true
|
5498
|
+
});
|
5499
|
+
if (ignored) {
|
5500
|
+
return sourceCode;
|
5501
|
+
}
|
5502
|
+
const config = await prettier.resolveConfig(filePath);
|
5503
|
+
formattedSourceCode = await prettier.format(sourceCode, Object.assign(Object.assign({}, config), { filePath, parser: inferredParser !== null && inferredParser !== void 0 ? inferredParser : undefined }));
|
5492
5504
|
}
|
5493
5505
|
catch (error) {
|
5494
|
-
console.log(
|
5506
|
+
console.log(chalk__WEBPACK_IMPORTED_MODULE_4___default().red(`You probably need to upgrade the version of prettier in your project`));
|
5495
5507
|
throw error;
|
5496
5508
|
}
|
5497
5509
|
return formattedSourceCode;
|
5498
5510
|
}
|
5499
5511
|
//# sourceMappingURL=runPrettier.js.map
|
5512
|
+
|
5513
|
+
/***/ }),
|
5514
|
+
|
5515
|
+
/***/ 810:
|
5516
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
|
5517
|
+
|
5518
|
+
"use strict";
|
5519
|
+
// ESM COMPAT FLAG
|
5520
|
+
__nccwpck_require__.r(__webpack_exports__);
|
5521
|
+
|
5522
|
+
// EXPORTS
|
5523
|
+
__nccwpck_require__.d(__webpack_exports__, {
|
5524
|
+
"command": () => (/* binding */ command)
|
5525
|
+
});
|
5526
|
+
|
5527
|
+
// EXTERNAL MODULE: external "fs/promises"
|
5528
|
+
var promises_ = __nccwpck_require__(292);
|
5529
|
+
// EXTERNAL MODULE: external "path"
|
5530
|
+
var external_path_ = __nccwpck_require__(17);
|
5531
|
+
;// CONCATENATED MODULE: ./dist/bin/tools/fs.existsAsync.js
|
5532
|
+
|
5533
|
+
async function existsAsync(path) {
|
5534
|
+
try {
|
5535
|
+
await promises_.stat(path);
|
5536
|
+
return true;
|
5537
|
+
}
|
5538
|
+
catch (error) {
|
5539
|
+
if (error.code === "ENOENT")
|
5540
|
+
return false;
|
5541
|
+
throw error;
|
5542
|
+
}
|
5543
|
+
}
|
5544
|
+
//# sourceMappingURL=fs.existsAsync.js.map
|
5545
|
+
// EXTERNAL MODULE: ./dist/bin/shared/customHandler_delegate.js + 1 modules
|
5546
|
+
var customHandler_delegate = __nccwpck_require__(138);
|
5547
|
+
// EXTERNAL MODULE: external "crypto"
|
5548
|
+
var external_crypto_ = __nccwpck_require__(113);
|
5549
|
+
// EXTERNAL MODULE: ./dist/bin/tools/runPrettier.js
|
5550
|
+
var runPrettier = __nccwpck_require__(433);
|
5500
5551
|
;// CONCATENATED MODULE: ./dist/bin/update-kc-gen.js
|
5501
5552
|
|
5502
5553
|
|
@@ -5506,6 +5557,13 @@ async function runPrettier(params) {
|
|
5506
5557
|
|
5507
5558
|
async function command(params) {
|
5508
5559
|
const { buildContext } = params;
|
5560
|
+
run_copy_assets_to_public: {
|
5561
|
+
if (buildContext.bundler !== "webpack") {
|
5562
|
+
break run_copy_assets_to_public;
|
5563
|
+
}
|
5564
|
+
const { command } = await Promise.resolve(/* import() */).then(__nccwpck_require__.bind(__nccwpck_require__, 713));
|
5565
|
+
await command({ buildContext });
|
5566
|
+
}
|
5509
5567
|
const { hasBeenHandled } = (0,customHandler_delegate/* maybeDelegateCommandToCustomHandler */.q)({
|
5510
5568
|
commandName: "update-kc-gen",
|
5511
5569
|
buildContext
|
@@ -5513,7 +5571,7 @@ async function command(params) {
|
|
5513
5571
|
if (hasBeenHandled) {
|
5514
5572
|
return;
|
5515
5573
|
}
|
5516
|
-
const filePath = (0,external_path_.join)(buildContext.themeSrcDirPath, "kc
|
5574
|
+
const filePath = (0,external_path_.join)(buildContext.themeSrcDirPath, "kc.gen.tsx");
|
5517
5575
|
const hasLoginTheme = buildContext.implementedThemeTypes.login.isImplemented;
|
5518
5576
|
const hasAccountTheme = buildContext.implementedThemeTypes.account.isImplemented;
|
5519
5577
|
const hasAdminTheme = buildContext.implementedThemeTypes.admin.isImplemented;
|
@@ -5537,7 +5595,12 @@ async function command(params) {
|
|
5537
5595
|
``,
|
5538
5596
|
`export const kcEnvDefaults: Record<KcEnvName, string> = ${JSON.stringify(Object.fromEntries(buildContext.environmentVariables.map(({ name, default: defaultValue }) => [name, defaultValue])), null, 2)};`,
|
5539
5597
|
``,
|
5540
|
-
|
5598
|
+
`/**`,
|
5599
|
+
` * NOTE: Do not import this type except maybe in your entrypoint. `,
|
5600
|
+
` * If you need to import the KcContext import it either from src/login/KcContext.ts or src/account/KcContext.ts.`,
|
5601
|
+
` * Depending on the theme type you are working on.`,
|
5602
|
+
` */`,
|
5603
|
+
`export type KcContext =`,
|
5541
5604
|
hasLoginTheme && ` | import("./login/KcContext").KcContext`,
|
5542
5605
|
hasAccountTheme && ` | import("./account/KcContext").KcContext`,
|
5543
5606
|
hasAdminTheme && ` | import("./admin/KcContext").KcContext`,
|
@@ -5582,7 +5645,7 @@ async function command(params) {
|
|
5582
5645
|
]
|
5583
5646
|
.filter(item => typeof item === "string")
|
5584
5647
|
.join("\n");
|
5585
|
-
const hash =
|
5648
|
+
const hash = external_crypto_.createHash("sha256").update(newContent).digest("hex");
|
5586
5649
|
skip_if_no_changes: {
|
5587
5650
|
if (!(await existsAsync(filePath))) {
|
5588
5651
|
break skip_if_no_changes;
|
@@ -5600,10 +5663,10 @@ async function command(params) {
|
|
5600
5663
|
newContent
|
5601
5664
|
].join("\n");
|
5602
5665
|
format: {
|
5603
|
-
if (!(await getIsPrettierAvailable())) {
|
5666
|
+
if (!(await (0,runPrettier/* getIsPrettierAvailable */.MT)())) {
|
5604
5667
|
break format;
|
5605
5668
|
}
|
5606
|
-
newContent = await runPrettier({
|
5669
|
+
newContent = await (0,runPrettier/* runPrettier */.eY)({
|
5607
5670
|
filePath,
|
5608
5671
|
sourceCode: newContent
|
5609
5672
|
});
|
@@ -5660,11 +5723,11 @@ const path_1 = __nccwpck_require__(17);
|
|
5660
5723
|
const constants_1 = __nccwpck_require__(173);
|
5661
5724
|
const id_1 = __nccwpck_require__(47);
|
5662
5725
|
const fs_rm_1 = __nccwpck_require__(699);
|
5663
|
-
const copy_keycloak_resources_to_public_1 = __nccwpck_require__(
|
5726
|
+
const copy_keycloak_resources_to_public_1 = __nccwpck_require__(713);
|
5664
5727
|
const assert_1 = __nccwpck_require__(78);
|
5665
|
-
const buildContext_1 = __nccwpck_require__(
|
5728
|
+
const buildContext_1 = __nccwpck_require__(224);
|
5666
5729
|
const magic_string_1 = __importDefault(__nccwpck_require__(734));
|
5667
|
-
const update_kc_gen_1 = __nccwpck_require__(
|
5730
|
+
const update_kc_gen_1 = __nccwpck_require__(810);
|
5668
5731
|
const String_prototype_replaceAll_1 = __nccwpck_require__(62);
|
5669
5732
|
function keycloakify(params) {
|
5670
5733
|
const { postBuild, ...buildOptions } = params;
|
@@ -5788,6 +5851,67 @@ function keycloakify(params) {
|
|
5788
5851
|
recursive: true,
|
5789
5852
|
force: true
|
5790
5853
|
});
|
5854
|
+
},
|
5855
|
+
transformIndexHtml: html => {
|
5856
|
+
const doReadKcContextFromUrl = process.env.NODE_ENV === "development" &&
|
5857
|
+
process.env[constants_1.VITE_PLUGIN_SUB_SCRIPTS_ENV_NAMES.READ_KC_CONTEXT_FROM_URL] === "true";
|
5858
|
+
if (!doReadKcContextFromUrl) {
|
5859
|
+
return html;
|
5860
|
+
}
|
5861
|
+
const scriptContent = `
|
5862
|
+
(()=>{
|
5863
|
+
|
5864
|
+
const kcContext = (()=>{
|
5865
|
+
|
5866
|
+
const paramName= "kcContext";
|
5867
|
+
|
5868
|
+
read_from_url_case: {
|
5869
|
+
|
5870
|
+
const url = new URL(window.location.href);
|
5871
|
+
|
5872
|
+
const paramValue = url.searchParams.get(paramName);
|
5873
|
+
|
5874
|
+
if( paramValue === null ){
|
5875
|
+
break read_from_url_case;
|
5876
|
+
}
|
5877
|
+
|
5878
|
+
url.searchParams.delete(paramName);
|
5879
|
+
|
5880
|
+
window.history.replaceState({}, "", url);
|
5881
|
+
|
5882
|
+
const kcContext = JSON.parse(decodeURIComponent(paramValue));
|
5883
|
+
|
5884
|
+
sessionStorage.setItem(paramName, JSON.stringify(kcContext));
|
5885
|
+
|
5886
|
+
return kcContext;
|
5887
|
+
|
5888
|
+
}
|
5889
|
+
|
5890
|
+
read_from_session_storage_case: {
|
5891
|
+
|
5892
|
+
const paramValue = sessionStorage.getItem(paramName);
|
5893
|
+
|
5894
|
+
if( paramValue === null ){
|
5895
|
+
break read_from_session_storage_case;
|
5896
|
+
}
|
5897
|
+
|
5898
|
+
return JSON.parse(paramValue);
|
5899
|
+
|
5900
|
+
}
|
5901
|
+
|
5902
|
+
return undefined;
|
5903
|
+
|
5904
|
+
})();
|
5905
|
+
|
5906
|
+
if( kcContext === undefined ){
|
5907
|
+
return;
|
5908
|
+
}
|
5909
|
+
|
5910
|
+
window.kcContext = kcContext;
|
5911
|
+
|
5912
|
+
})();
|
5913
|
+
`;
|
5914
|
+
return html.replace(/<head>/, `<head><script>${scriptContent}</script>`);
|
5791
5915
|
}
|
5792
5916
|
};
|
5793
5917
|
return plugin;
|
@@ -9338,7 +9462,7 @@ module.exports = MagicString;
|
|
9338
9462
|
"use strict";
|
9339
9463
|
|
9340
9464
|
const os = __nccwpck_require__(37);
|
9341
|
-
const tty = __nccwpck_require__(
|
9465
|
+
const tty = __nccwpck_require__(325);
|
9342
9466
|
const hasFlag = __nccwpck_require__(621);
|
9343
9467
|
|
9344
9468
|
const {env} = process;
|
@@ -9512,16 +9636,17 @@ var __read = (this && this.__read) || function (o, n) {
|
|
9512
9636
|
return ar;
|
9513
9637
|
};
|
9514
9638
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
9515
|
-
exports.
|
9516
|
-
|
9639
|
+
exports.AssertionError = void 0;
|
9640
|
+
exports.assert = assert;
|
9641
|
+
exports.is = is;
|
9517
9642
|
var overwriteReadonlyProp_1 = __nccwpck_require__(803);
|
9518
|
-
|
9519
|
-
/** @see <https://docs.tsafe.dev/assert#error-thrown> */
|
9643
|
+
/** https://docs.tsafe.dev/assert#error-thrown */
|
9520
9644
|
var AssertionError = /** @class */ (function (_super) {
|
9521
9645
|
__extends(AssertionError, _super);
|
9522
9646
|
function AssertionError(msg) {
|
9523
9647
|
var _newTarget = this.constructor;
|
9524
9648
|
var _this = _super.call(this, "Wrong assertion encountered" + (!msg ? "" : ": \"".concat(msg, "\""))) || this;
|
9649
|
+
_this.originalMessage = msg;
|
9525
9650
|
Object.setPrototypeOf(_this, _newTarget.prototype);
|
9526
9651
|
if (!_this.stack) {
|
9527
9652
|
return _this;
|
@@ -9538,7 +9663,6 @@ var AssertionError = /** @class */ (function (_super) {
|
|
9538
9663
|
return i !== 1 && i !== 2;
|
9539
9664
|
})
|
9540
9665
|
.join("\n"));
|
9541
|
-
// eslint-disable-next-line no-empty
|
9542
9666
|
}
|
9543
9667
|
catch (_a) { }
|
9544
9668
|
return _this;
|
@@ -9546,21 +9670,36 @@ var AssertionError = /** @class */ (function (_super) {
|
|
9546
9670
|
return AssertionError;
|
9547
9671
|
}(Error));
|
9548
9672
|
exports.AssertionError = AssertionError;
|
9673
|
+
var refOfIs = undefined;
|
9549
9674
|
/** https://docs.tsafe.dev/assert */
|
9550
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
9551
9675
|
function assert(condition, msg) {
|
9552
9676
|
if (arguments.length === 0) {
|
9553
9677
|
condition = true;
|
9554
9678
|
}
|
9555
|
-
if (
|
9556
|
-
|
9679
|
+
if (refOfIs !== undefined) {
|
9680
|
+
refOfIs = undefined;
|
9557
9681
|
return;
|
9558
9682
|
}
|
9559
9683
|
if (!condition) {
|
9560
|
-
throw new AssertionError(msg);
|
9684
|
+
throw new AssertionError(typeof msg === "function" ? msg() : msg);
|
9561
9685
|
}
|
9562
9686
|
}
|
9563
|
-
|
9687
|
+
var errorMessage = "Wrong usage of the `is` function refer to https://docs.tsafe.dev/is";
|
9688
|
+
/** https://docs.tsafe.dev/is */
|
9689
|
+
function is(value) {
|
9690
|
+
var ref = {};
|
9691
|
+
if (refOfIs !== undefined) {
|
9692
|
+
refOfIs = undefined;
|
9693
|
+
throw new Error(errorMessage);
|
9694
|
+
}
|
9695
|
+
refOfIs = ref;
|
9696
|
+
Promise.resolve().then(function () {
|
9697
|
+
if (refOfIs === ref) {
|
9698
|
+
throw new Error(errorMessage);
|
9699
|
+
}
|
9700
|
+
});
|
9701
|
+
return null;
|
9702
|
+
}
|
9564
9703
|
//# sourceMappingURL=assert.js.map
|
9565
9704
|
|
9566
9705
|
/***/ }),
|
@@ -9584,8 +9723,6 @@ exports.id = id;
|
|
9584
9723
|
|
9585
9724
|
"use strict";
|
9586
9725
|
|
9587
|
-
/* eslint-disable no-empty */
|
9588
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
9589
9726
|
var __assign = (this && this.__assign) || function () {
|
9590
9727
|
__assign = Object.assign || function(t) {
|
9591
9728
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
@@ -9635,26 +9772,19 @@ exports.overwriteReadonlyProp = overwriteReadonlyProp;
|
|
9635
9772
|
|
9636
9773
|
/***/ }),
|
9637
9774
|
|
9638
|
-
/***/
|
9639
|
-
/***/ ((
|
9775
|
+
/***/ 81:
|
9776
|
+
/***/ ((module) => {
|
9640
9777
|
|
9641
9778
|
"use strict";
|
9642
|
-
|
9643
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
9644
|
-
exports.assertIsRefWrapper = void 0;
|
9645
|
-
var id_1 = __nccwpck_require__(47);
|
9646
|
-
exports.assertIsRefWrapper = {
|
9647
|
-
"ref": (0, id_1.id)(undefined),
|
9648
|
-
};
|
9649
|
-
//# sourceMappingURL=assertIsRefWrapper.js.map
|
9779
|
+
module.exports = require("child_process");
|
9650
9780
|
|
9651
9781
|
/***/ }),
|
9652
9782
|
|
9653
|
-
/***/
|
9783
|
+
/***/ 113:
|
9654
9784
|
/***/ ((module) => {
|
9655
9785
|
|
9656
9786
|
"use strict";
|
9657
|
-
module.exports = require("
|
9787
|
+
module.exports = require("crypto");
|
9658
9788
|
|
9659
9789
|
/***/ }),
|
9660
9790
|
|
@@ -9698,7 +9828,7 @@ module.exports = require("prettier");
|
|
9698
9828
|
|
9699
9829
|
/***/ }),
|
9700
9830
|
|
9701
|
-
/***/
|
9831
|
+
/***/ 325:
|
9702
9832
|
/***/ ((module) => {
|
9703
9833
|
|
9704
9834
|
"use strict";
|
@@ -9713,14 +9843,13 @@ module.exports = require("tty");
|
|
9713
9843
|
|
9714
9844
|
// EXPORTS
|
9715
9845
|
__nccwpck_require__.d(__webpack_exports__, {
|
9716
|
-
"h": () => (/* binding */ assert)
|
9846
|
+
"h": () => (/* binding */ assert),
|
9847
|
+
"is": () => (/* binding */ is)
|
9717
9848
|
});
|
9718
9849
|
|
9719
9850
|
// UNUSED EXPORTS: AssertionError
|
9720
9851
|
|
9721
9852
|
;// CONCATENATED MODULE: ./node_modules/tsafe/esm/lab/overwriteReadonlyProp.mjs
|
9722
|
-
/* eslint-disable no-empty */
|
9723
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
9724
9853
|
/**
|
9725
9854
|
* Assign a value to a property even if the object is freezed or if the property is not writable
|
9726
9855
|
* Throw if the assignation fail ( for example if the property is non configurable write: false )
|
@@ -9759,17 +9888,14 @@ const overwriteReadonlyProp = (obj, propertyName, value) => {
|
|
9759
9888
|
|
9760
9889
|
//# sourceMappingURL=overwriteReadonlyProp.mjs.map
|
9761
9890
|
|
9762
|
-
// EXTERNAL MODULE: ./node_modules/tsafe/esm/zz_internal/assertIsRefWrapper.mjs
|
9763
|
-
var assertIsRefWrapper = __nccwpck_require__(770);
|
9764
9891
|
;// CONCATENATED MODULE: ./node_modules/tsafe/esm/assert.mjs
|
9765
9892
|
|
9766
9893
|
|
9767
|
-
|
9768
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
9769
|
-
/** @see <https://docs.tsafe.dev/assert#error-thrown> */
|
9894
|
+
/** https://docs.tsafe.dev/assert#error-thrown */
|
9770
9895
|
class AssertionError extends Error {
|
9771
9896
|
constructor(msg) {
|
9772
9897
|
super(`Wrong assertion encountered` + (!msg ? "" : `: "${msg}"`));
|
9898
|
+
this.originalMessage = msg;
|
9773
9899
|
Object.setPrototypeOf(this, new.target.prototype);
|
9774
9900
|
if (!this.stack) {
|
9775
9901
|
return;
|
@@ -9779,25 +9905,40 @@ class AssertionError extends Error {
|
|
9779
9905
|
.split("\n")
|
9780
9906
|
.filter((...[, i]) => i !== 1 && i !== 2)
|
9781
9907
|
.join("\n"));
|
9782
|
-
// eslint-disable-next-line no-empty
|
9783
9908
|
}
|
9784
9909
|
catch { }
|
9785
9910
|
}
|
9786
9911
|
}
|
9912
|
+
let refOfIs = undefined;
|
9787
9913
|
/** https://docs.tsafe.dev/assert */
|
9788
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
9789
9914
|
function assert(condition, msg) {
|
9790
9915
|
if (arguments.length === 0) {
|
9791
9916
|
condition = true;
|
9792
9917
|
}
|
9793
|
-
if (
|
9794
|
-
|
9918
|
+
if (refOfIs !== undefined) {
|
9919
|
+
refOfIs = undefined;
|
9795
9920
|
return;
|
9796
9921
|
}
|
9797
9922
|
if (!condition) {
|
9798
|
-
throw new AssertionError(msg);
|
9923
|
+
throw new AssertionError(typeof msg === "function" ? msg() : msg);
|
9799
9924
|
}
|
9800
9925
|
}
|
9926
|
+
const errorMessage = "Wrong usage of the `is` function refer to https://docs.tsafe.dev/is";
|
9927
|
+
/** https://docs.tsafe.dev/is */
|
9928
|
+
function is(value) {
|
9929
|
+
const ref = {};
|
9930
|
+
if (refOfIs !== undefined) {
|
9931
|
+
refOfIs = undefined;
|
9932
|
+
throw new Error(errorMessage);
|
9933
|
+
}
|
9934
|
+
refOfIs = ref;
|
9935
|
+
Promise.resolve().then(() => {
|
9936
|
+
if (refOfIs === ref) {
|
9937
|
+
throw new Error(errorMessage);
|
9938
|
+
}
|
9939
|
+
});
|
9940
|
+
return null;
|
9941
|
+
}
|
9801
9942
|
|
9802
9943
|
|
9803
9944
|
//# sourceMappingURL=assert.mjs.map
|
@@ -9821,22 +9962,21 @@ const id = (x) => x;
|
|
9821
9962
|
|
9822
9963
|
/***/ }),
|
9823
9964
|
|
9824
|
-
/***/
|
9965
|
+
/***/ 30:
|
9825
9966
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
9826
9967
|
|
9827
9968
|
"use strict";
|
9828
9969
|
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
9829
|
-
/* harmony export */ "
|
9970
|
+
/* harmony export */ "r": () => (/* binding */ symToStr)
|
9830
9971
|
/* harmony export */ });
|
9831
|
-
|
9832
|
-
|
9833
|
-
|
9834
|
-
|
9835
|
-
|
9836
|
-
};
|
9972
|
+
/** @see <https://docs.tsafe.dev/main/symtostr> */
|
9973
|
+
function symToStr(wrap) {
|
9974
|
+
// @ts-expect-error: We know better
|
9975
|
+
return Object.keys(wrap)[0];
|
9976
|
+
}
|
9837
9977
|
|
9838
9978
|
|
9839
|
-
//# sourceMappingURL=
|
9979
|
+
//# sourceMappingURL=symToStr.mjs.map
|
9840
9980
|
|
9841
9981
|
|
9842
9982
|
/***/ })
|