keycloakify 11.8.45 → 11.8.47-rc.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.
Files changed (98) hide show
  1. package/bin/254.index.js +283 -0
  2. package/bin/30.index.js +25 -0
  3. package/bin/{864.index.js → 309.index.js} +6944 -28439
  4. package/bin/311.index.js +198 -0
  5. package/bin/{313.index.js → 355.index.js} +101 -147
  6. package/bin/{84.index.js → 502.index.js} +147 -101
  7. package/bin/626.index.js +194 -0
  8. package/bin/{698.index.js → 656.index.js} +101 -147
  9. package/bin/675.index.js +177 -0
  10. package/bin/69.index.js +1 -1
  11. package/bin/762.index.js +1475 -0
  12. package/bin/780.index.js +4 -2
  13. package/bin/786.index.js +115 -0
  14. package/bin/895.index.js +21501 -0
  15. package/bin/{618.index.js → 932.index.js} +117 -163
  16. package/bin/949.index.js +1 -1
  17. package/bin/97.index.js +537 -4
  18. package/bin/init/index.d.ts +1 -0
  19. package/bin/init/init.d.ts +3 -0
  20. package/bin/init/setupEslint.d.ts +4 -0
  21. package/bin/init/setupVitePluginIfNeeded.d.ts +4 -0
  22. package/bin/initialize-login-theme.d.ts +4 -0
  23. package/bin/main.js +19 -30
  24. package/bin/shared/customHandler.d.ts +1 -1
  25. package/bin/shared/customHandler.js.map +1 -1
  26. package/package.json +82 -66
  27. package/src/bin/init/index.ts +1 -0
  28. package/src/bin/init/init.ts +354 -0
  29. package/src/bin/init/setupEslint.ts +80 -0
  30. package/src/bin/init/setupVitePluginIfNeeded.ts +143 -0
  31. package/src/bin/initialize-account-theme/initialize-account-theme.ts +4 -0
  32. package/src/bin/initialize-login-theme.ts +323 -0
  33. package/src/bin/main.ts +14 -0
  34. package/src/bin/shared/buildContext.ts +2 -37
  35. package/src/bin/shared/customHandler.ts +3 -1
  36. package/src/bin/sync-extensions/extensionModuleMeta.ts +89 -73
  37. package/src/bin/sync-extensions/managedGitignoreFiles.ts +32 -2
  38. package/vite-plugin/index.js +1 -24
  39. package/bin/433.index.js +0 -140
  40. /package/res/public/keycloakify-dev-resources/account/{account/css → css}/account.css +0 -0
  41. /package/res/public/keycloakify-dev-resources/account/{account/img → img}/icon-sidebar-active.png +0 -0
  42. /package/res/public/keycloakify-dev-resources/account/{account/img → img}/keycloak-logo.png +0 -0
  43. /package/res/public/keycloakify-dev-resources/account/{account/img → img}/logo.png +0 -0
  44. /package/res/public/keycloakify-dev-resources/account/{account/resources-common → resources-common}/img/favicon.ico +0 -0
  45. /package/res/public/keycloakify-dev-resources/account/{account/resources-common → resources-common}/node_modules/patternfly/dist/css/patternfly-additions.min.css +0 -0
  46. /package/res/public/keycloakify-dev-resources/account/{account/resources-common → resources-common}/node_modules/patternfly/dist/css/patternfly.min.css +0 -0
  47. /package/res/public/keycloakify-dev-resources/account/{account/resources-common → resources-common}/node_modules/patternfly/dist/fonts/OpenSans-Bold-webfont.woff2 +0 -0
  48. /package/res/public/keycloakify-dev-resources/account/{account/resources-common → resources-common}/node_modules/patternfly/dist/fonts/OpenSans-Light-webfont.woff2 +0 -0
  49. /package/res/public/keycloakify-dev-resources/account/{account/resources-common → resources-common}/node_modules/patternfly/dist/fonts/OpenSans-Regular-webfont.woff2 +0 -0
  50. /package/res/public/keycloakify-dev-resources/account/{account/resources-common → resources-common}/node_modules/patternfly/dist/fonts/OpenSans-Semibold-webfont.woff2 +0 -0
  51. /package/res/public/keycloakify-dev-resources/account/{account/resources-common → resources-common}/node_modules/patternfly/dist/fonts/PatternFlyIcons-webfont.ttf +0 -0
  52. /package/res/public/keycloakify-dev-resources/account/{account/resources-common → resources-common}/node_modules/patternfly/dist/fonts/PatternFlyIcons-webfont.woff +0 -0
  53. /package/res/public/keycloakify-dev-resources/login/{login/css → css}/login.css +0 -0
  54. /package/res/public/keycloakify-dev-resources/login/{login/img → img}/feedback-error-arrow-down.png +0 -0
  55. /package/res/public/keycloakify-dev-resources/login/{login/img → img}/feedback-error-sign.png +0 -0
  56. /package/res/public/keycloakify-dev-resources/login/{login/img → img}/feedback-success-arrow-down.png +0 -0
  57. /package/res/public/keycloakify-dev-resources/login/{login/img → img}/feedback-success-sign.png +0 -0
  58. /package/res/public/keycloakify-dev-resources/login/{login/img → img}/feedback-warning-arrow-down.png +0 -0
  59. /package/res/public/keycloakify-dev-resources/login/{login/img → img}/feedback-warning-sign.png +0 -0
  60. /package/res/public/keycloakify-dev-resources/login/{login/img → img}/keycloak-bg.png +0 -0
  61. /package/res/public/keycloakify-dev-resources/login/{login/img → img}/keycloak-logo-text.png +0 -0
  62. /package/res/public/keycloakify-dev-resources/login/{login/img → img}/keycloak-logo.png +0 -0
  63. /package/res/public/keycloakify-dev-resources/login/{login/js → js}/authChecker.js +0 -0
  64. /package/res/public/keycloakify-dev-resources/login/{login/js → js}/common.js +0 -0
  65. /package/res/public/keycloakify-dev-resources/login/{login/js → js}/kcMultivalued.js +0 -0
  66. /package/res/public/keycloakify-dev-resources/login/{login/js → js}/kcNumberFormat.js +0 -0
  67. /package/res/public/keycloakify-dev-resources/login/{login/js → js}/kcNumberUnFormat.js +0 -0
  68. /package/res/public/keycloakify-dev-resources/login/{login/js → js}/menu-button-links.js +0 -0
  69. /package/res/public/keycloakify-dev-resources/login/{login/js → js}/passkeysConditionalAuth.js +0 -0
  70. /package/res/public/keycloakify-dev-resources/login/{login/js → js}/passwordVisibility.js +0 -0
  71. /package/res/public/keycloakify-dev-resources/login/{login/js → js}/userProfile.js +0 -0
  72. /package/res/public/keycloakify-dev-resources/login/{login/js → js}/webauthnAuthenticate.js +0 -0
  73. /package/res/public/keycloakify-dev-resources/login/{login/js → js}/webauthnRegister.js +0 -0
  74. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/img/favicon.ico +0 -0
  75. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/lib/pficon/pficon.css +0 -0
  76. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/lib/pficon/pficon.woff2 +0 -0
  77. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/node_modules/@patternfly/patternfly/assets/fonts/RedHatDisplay/RedHatDisplay-Bold.woff +0 -0
  78. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/node_modules/@patternfly/patternfly/assets/fonts/RedHatDisplay/RedHatDisplay-Bold.woff2 +0 -0
  79. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/node_modules/@patternfly/patternfly/assets/fonts/overpass-webfont/overpass-bold.woff +0 -0
  80. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/node_modules/@patternfly/patternfly/assets/fonts/overpass-webfont/overpass-bold.woff2 +0 -0
  81. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/node_modules/@patternfly/patternfly/patternfly.min.css +0 -0
  82. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/node_modules/jquery/dist/jquery.min.js +0 -0
  83. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/node_modules/patternfly/dist/css/patternfly-additions.min.css +0 -0
  84. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/node_modules/patternfly/dist/css/patternfly.min.css +0 -0
  85. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/node_modules/patternfly/dist/fonts/OpenSans-Bold-webfont.ttf +0 -0
  86. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/node_modules/patternfly/dist/fonts/OpenSans-Bold-webfont.woff +0 -0
  87. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/node_modules/patternfly/dist/fonts/OpenSans-Bold-webfont.woff2 +0 -0
  88. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/node_modules/patternfly/dist/fonts/OpenSans-Light-webfont.woff2 +0 -0
  89. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/node_modules/patternfly/dist/fonts/OpenSans-Regular-webfont.woff2 +0 -0
  90. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/node_modules/patternfly/dist/fonts/OpenSans-Semibold-webfont.woff2 +0 -0
  91. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/node_modules/patternfly/dist/fonts/OpenSans-SemiboldItalic-webfont.ttf +0 -0
  92. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/node_modules/patternfly/dist/fonts/OpenSans-SemiboldItalic-webfont.woff +0 -0
  93. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/node_modules/patternfly/dist/fonts/OpenSans-SemiboldItalic-webfont.woff2 +0 -0
  94. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/node_modules/patternfly/dist/fonts/PatternFlyIcons-webfont.ttf +0 -0
  95. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/node_modules/patternfly/dist/fonts/PatternFlyIcons-webfont.woff +0 -0
  96. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/node_modules/patternfly/dist/fonts/fontawesome-webfont.woff2 +0 -0
  97. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/node_modules/patternfly/dist/img/bg-login.jpg +0 -0
  98. /package/res/public/keycloakify-dev-resources/login/{login/resources-common → resources-common}/node_modules/rfc4648/lib/rfc4648.js +0 -0
@@ -408,30 +408,7 @@ function getBuildContext(params) {
408
408
  if (themeSrcDirPath !== undefined) {
409
409
  return { themeSrcDirPath };
410
410
  }
411
- {
412
- const basenames = external_fs_.readdirSync(srcDirPath);
413
- for (const basename of basenames) {
414
- const path = (0,external_path_.join)(srcDirPath, basename);
415
- if (!external_fs_.statSync(path).isFile()) {
416
- continue;
417
- }
418
- if (external_fs_.readFileSync(path).toString("utf8").includes("./kc.gen")) {
419
- return { themeSrcDirPath: srcDirPath };
420
- }
421
- }
422
- }
423
- for (const themeType of [...constants.THEME_TYPES, "email"]) {
424
- if (!external_fs_.existsSync((0,external_path_.join)(srcDirPath, themeType))) {
425
- continue;
426
- }
427
- return { themeSrcDirPath: srcDirPath };
428
- }
429
- console.log(source_default().red([
430
- `Can't locate your Keycloak theme source directory in .${external_path_.sep}${(0,external_path_.relative)(process.cwd(), srcDirPath)}`,
431
- `Make sure to either use the Keycloakify CLI in the root of your Keycloakify project or use the --project CLI option`,
432
- `If you are collocating your Keycloak theme with your app you must have a directory named '${constants.KEYCLOAK_THEME}' or '${constants.KEYCLOAK_THEME.replace(/-/g, "_")}' in your 'src' directory`
433
- ].join("\n")));
434
- process.exit(1);
411
+ return { themeSrcDirPath: srcDirPath };
435
412
  })();
436
413
  const { resolvedViteConfig } = (() => {
437
414
  if (external_fs_.readdirSync(projectDirPath)
package/bin/433.index.js DELETED
@@ -1,140 +0,0 @@
1
- "use strict";
2
- exports.id = 433;
3
- exports.ids = [433];
4
- exports.modules = {
5
-
6
- /***/ 48433:
7
- /***/ ((module, __webpack_exports__, __webpack_require__) => {
8
-
9
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10
- /* harmony export */ "LG": () => (/* binding */ getPrettier),
11
- /* harmony export */ "MT": () => (/* binding */ getIsPrettierAvailable),
12
- /* harmony export */ "eY": () => (/* binding */ runPrettier)
13
- /* harmony export */ });
14
- /* harmony import */ var _nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73776);
15
- /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71017);
16
- /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
17
- /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(73292);
18
- /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_2__);
19
- /* harmony import */ var tsafe_id__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(38469);
20
- /* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29041);
21
- /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(78818);
22
- /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_4__);
23
- /* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6113);
24
- /* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_5__);
25
- /* harmony import */ var tsafe_symToStr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(76030);
26
- /* harmony import */ var _readThisNpmPackageVersion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(64795);
27
- /* module decorator */ module = __webpack_require__.hmd(module);
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
-
37
- getIsPrettierAvailable.cache = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_7__.id)(undefined);
38
- async function getIsPrettierAvailable() {
39
- var _a;
40
- if (getIsPrettierAvailable.cache !== undefined) {
41
- return getIsPrettierAvailable.cache;
42
- }
43
- const nodeModulesBinDirPath = (0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_0__/* .getNodeModulesBinDirPath */ .K)({
44
- packageJsonFilePath: undefined
45
- });
46
- const prettierBinPath = (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(nodeModulesBinDirPath, "prettier");
47
- const stats = await fs_promises__WEBPACK_IMPORTED_MODULE_2__.stat(prettierBinPath).catch(() => undefined);
48
- const isPrettierAvailable = (_a = stats === null || stats === void 0 ? void 0 : stats.isFile()) !== null && _a !== void 0 ? _a : false;
49
- getIsPrettierAvailable.cache = isPrettierAvailable;
50
- return isPrettierAvailable;
51
- }
52
- getPrettier.cache = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_7__.id)(undefined);
53
- async function getPrettier() {
54
- (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_3__/* .assert */ .h)(getIsPrettierAvailable());
55
- if (getPrettier.cache !== undefined) {
56
- return getPrettier.cache;
57
- }
58
- let prettier = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_7__.id)(undefined);
59
- import_prettier: {
60
- // NOTE: When module is linked we want to make sure we import the correct version
61
- // of prettier, that is the one of the project, not the one of this repo.
62
- // So we do a sketchy eval to bypass ncc.
63
- // We make sure to only do that when linking, otherwise we import properly.
64
- if ((0,_readThisNpmPackageVersion__WEBPACK_IMPORTED_MODULE_6__/* .readThisNpmPackageVersion */ .K)().startsWith("0.0.0")) {
65
- const prettierDirPath = (0,path__WEBPACK_IMPORTED_MODULE_1__.resolve)((0,path__WEBPACK_IMPORTED_MODULE_1__.join)((0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_0__/* .getNodeModulesBinDirPath */ .K)({ packageJsonFilePath: undefined }), "..", "prettier"));
66
- const isCJS = true && module.exports;
67
- if (isCJS) {
68
- eval(`${(0,tsafe_symToStr__WEBPACK_IMPORTED_MODULE_8__/* .symToStr */ .r)({ prettier })} = require("${prettierDirPath}")`);
69
- }
70
- else {
71
- prettier = await new Promise(_resolve => {
72
- eval(`import("file:///${(0,path__WEBPACK_IMPORTED_MODULE_1__.join)(prettierDirPath, "index.mjs").replace(/\\/g, "/")}").then(prettier => _resolve(prettier))`);
73
- });
74
- }
75
- (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_3__/* .assert */ .h)(!(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_3__.is)(prettier));
76
- break import_prettier;
77
- }
78
- prettier = await Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 79421, 23));
79
- }
80
- const configHash = await (async () => {
81
- const configFilePath = await prettier.resolveConfigFile((0,path__WEBPACK_IMPORTED_MODULE_1__.join)((0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_0__/* .getNodeModulesBinDirPath */ .K)({ packageJsonFilePath: undefined }), "..", ".."));
82
- if (configFilePath === null) {
83
- return "";
84
- }
85
- const data = await fs_promises__WEBPACK_IMPORTED_MODULE_2__.readFile(configFilePath);
86
- return crypto__WEBPACK_IMPORTED_MODULE_5__.createHash("sha256").update(data).digest("hex");
87
- })();
88
- const prettierAndConfig = {
89
- prettier,
90
- configHash
91
- };
92
- getPrettier.cache = prettierAndConfig;
93
- return prettierAndConfig;
94
- }
95
- async function runPrettier(params) {
96
- const { sourceCode, filePath } = params;
97
- let formattedSourceCode;
98
- try {
99
- const { prettier } = await getPrettier();
100
- const { ignored, inferredParser } = await prettier.getFileInfo(filePath, {
101
- resolveConfig: true
102
- });
103
- if (ignored || inferredParser === null) {
104
- return sourceCode;
105
- }
106
- const config = await prettier.resolveConfig(filePath);
107
- formattedSourceCode = await prettier.format(typeof sourceCode === "string" ? sourceCode : sourceCode.toString("utf8"), Object.assign(Object.assign({}, config), { filePath, parser: inferredParser }));
108
- }
109
- catch (error) {
110
- console.log(chalk__WEBPACK_IMPORTED_MODULE_4___default().red(`You probably need to upgrade the version of prettier in your project`));
111
- throw error;
112
- }
113
- return typeof sourceCode === "string"
114
- ? formattedSourceCode
115
- : Buffer.from(formattedSourceCode, "utf8");
116
- }
117
- //# sourceMappingURL=runPrettier.js.map
118
-
119
- /***/ }),
120
-
121
- /***/ 76030:
122
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
123
-
124
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
125
- /* harmony export */ "r": () => (/* binding */ symToStr)
126
- /* harmony export */ });
127
- /** @see <https://docs.tsafe.dev/main/symtostr> */
128
- function symToStr(wrap) {
129
- // @ts-expect-error: We know better
130
- return Object.keys(wrap)[0];
131
- }
132
-
133
-
134
- //# sourceMappingURL=symToStr.mjs.map
135
-
136
-
137
- /***/ })
138
-
139
- };
140
- ;