@keycloakify/angular 21.0.0-rc.2 → 21.0.0-rc.3

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 (130) hide show
  1. package/bin/187.index.js +64 -70
  2. package/bin/476.index.js +62 -68
  3. package/bin/{343.index.js → 644.index.js} +2287 -1200
  4. package/bin/671.index.js +62 -68
  5. package/bin/942.index.js +62 -68
  6. package/bin/index.js +12 -9
  7. package/fesm2022/keycloakify-angular-account-directives-kc-class.mjs +3 -3
  8. package/fesm2022/keycloakify-angular-account-pages-account.mjs +3 -3
  9. package/fesm2022/keycloakify-angular-account-pages-applications.mjs +3 -3
  10. package/fesm2022/keycloakify-angular-account-pages-federatedIdentity.mjs +3 -3
  11. package/fesm2022/keycloakify-angular-account-pages-log.mjs +3 -3
  12. package/fesm2022/keycloakify-angular-account-pages-password.mjs +10 -10
  13. package/fesm2022/keycloakify-angular-account-pages-password.mjs.map +1 -1
  14. package/fesm2022/keycloakify-angular-account-pages-sessions.mjs +3 -3
  15. package/fesm2022/keycloakify-angular-account-pages-totp.mjs +3 -3
  16. package/fesm2022/keycloakify-angular-account-services-account-resource-injector.mjs +3 -3
  17. package/fesm2022/keycloakify-angular-account-services-i18n.mjs +3 -3
  18. package/fesm2022/keycloakify-angular-account-template.mjs +4 -4
  19. package/fesm2022/keycloakify-angular-account-template.mjs.map +1 -1
  20. package/fesm2022/keycloakify-angular-lib-directives-attributes.mjs +4 -4
  21. package/fesm2022/keycloakify-angular-lib-directives-attributes.mjs.map +1 -1
  22. package/fesm2022/keycloakify-angular-lib-pipes-input-type.mjs +3 -3
  23. package/fesm2022/keycloakify-angular-lib-pipes-is-array-with-empty-object.mjs +3 -3
  24. package/fesm2022/keycloakify-angular-lib-pipes-kc-sanitize.mjs +3 -3
  25. package/fesm2022/keycloakify-angular-lib-pipes-to-array.mjs +3 -3
  26. package/fesm2022/keycloakify-angular-lib-pipes-to-number.mjs +3 -3
  27. package/fesm2022/keycloakify-angular-lib-services-resource-injector.mjs +3 -3
  28. package/fesm2022/keycloakify-angular-login-components-add-remove-buttons-multi-valued-attribute.mjs +8 -8
  29. package/fesm2022/keycloakify-angular-login-components-add-remove-buttons-multi-valued-attribute.mjs.map +1 -1
  30. package/fesm2022/keycloakify-angular-login-components-field-errors.mjs +6 -6
  31. package/fesm2022/keycloakify-angular-login-components-field-errors.mjs.map +1 -1
  32. package/fesm2022/keycloakify-angular-login-components-group-label.mjs +6 -6
  33. package/fesm2022/keycloakify-angular-login-components-group-label.mjs.map +1 -1
  34. package/fesm2022/keycloakify-angular-login-components-input-field-by-type.mjs +7 -7
  35. package/fesm2022/keycloakify-angular-login-components-input-field-by-type.mjs.map +1 -1
  36. package/fesm2022/keycloakify-angular-login-components-input-tag-selects.mjs +8 -8
  37. package/fesm2022/keycloakify-angular-login-components-input-tag-selects.mjs.map +1 -1
  38. package/fesm2022/keycloakify-angular-login-components-input-tag.mjs +9 -9
  39. package/fesm2022/keycloakify-angular-login-components-input-tag.mjs.map +1 -1
  40. package/fesm2022/keycloakify-angular-login-components-logout-other-sessions.mjs +3 -3
  41. package/fesm2022/keycloakify-angular-login-components-password-wrapper.mjs +5 -5
  42. package/fesm2022/keycloakify-angular-login-components-password-wrapper.mjs.map +1 -1
  43. package/fesm2022/keycloakify-angular-login-components-select-tag.mjs +8 -8
  44. package/fesm2022/keycloakify-angular-login-components-select-tag.mjs.map +1 -1
  45. package/fesm2022/keycloakify-angular-login-components-textarea-tag.mjs +6 -6
  46. package/fesm2022/keycloakify-angular-login-components-textarea-tag.mjs.map +1 -1
  47. package/fesm2022/keycloakify-angular-login-components-user-profile-form-fields.mjs +3 -3
  48. package/fesm2022/keycloakify-angular-login-directives-kc-class.mjs +3 -3
  49. package/fesm2022/keycloakify-angular-login-pages-code.mjs +6 -6
  50. package/fesm2022/keycloakify-angular-login-pages-code.mjs.map +1 -1
  51. package/fesm2022/keycloakify-angular-login-pages-delete-account-confirm.mjs +6 -6
  52. package/fesm2022/keycloakify-angular-login-pages-delete-account-confirm.mjs.map +1 -1
  53. package/fesm2022/keycloakify-angular-login-pages-delete-credential.mjs +6 -6
  54. package/fesm2022/keycloakify-angular-login-pages-delete-credential.mjs.map +1 -1
  55. package/fesm2022/keycloakify-angular-login-pages-error.mjs +6 -6
  56. package/fesm2022/keycloakify-angular-login-pages-error.mjs.map +1 -1
  57. package/fesm2022/keycloakify-angular-login-pages-frontchannel-logout.mjs +7 -7
  58. package/fesm2022/keycloakify-angular-login-pages-frontchannel-logout.mjs.map +1 -1
  59. package/fesm2022/keycloakify-angular-login-pages-idp-review-user-profile.mjs +7 -7
  60. package/fesm2022/keycloakify-angular-login-pages-idp-review-user-profile.mjs.map +1 -1
  61. package/fesm2022/keycloakify-angular-login-pages-info.mjs +6 -6
  62. package/fesm2022/keycloakify-angular-login-pages-info.mjs.map +1 -1
  63. package/fesm2022/keycloakify-angular-login-pages-login-config-totp.mjs +6 -6
  64. package/fesm2022/keycloakify-angular-login-pages-login-config-totp.mjs.map +1 -1
  65. package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm-override.mjs +6 -6
  66. package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm-override.mjs.map +1 -1
  67. package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm.mjs +6 -6
  68. package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm.mjs.map +1 -1
  69. package/fesm2022/keycloakify-angular-login-pages-login-idp-link-email.mjs +6 -6
  70. package/fesm2022/keycloakify-angular-login-pages-login-idp-link-email.mjs.map +1 -1
  71. package/fesm2022/keycloakify-angular-login-pages-login-oauth-grant.mjs +6 -6
  72. package/fesm2022/keycloakify-angular-login-pages-login-oauth-grant.mjs.map +1 -1
  73. package/fesm2022/keycloakify-angular-login-pages-login-oauth2-device-verify-user-code.mjs +6 -6
  74. package/fesm2022/keycloakify-angular-login-pages-login-oauth2-device-verify-user-code.mjs.map +1 -1
  75. package/fesm2022/keycloakify-angular-login-pages-login-otp.mjs +6 -6
  76. package/fesm2022/keycloakify-angular-login-pages-login-otp.mjs.map +1 -1
  77. package/fesm2022/keycloakify-angular-login-pages-login-page-expired.mjs +6 -6
  78. package/fesm2022/keycloakify-angular-login-pages-login-page-expired.mjs.map +1 -1
  79. package/fesm2022/keycloakify-angular-login-pages-login-passkeys-conditional-authenticate.mjs +6 -6
  80. package/fesm2022/keycloakify-angular-login-pages-login-passkeys-conditional-authenticate.mjs.map +1 -1
  81. package/fesm2022/keycloakify-angular-login-pages-login-password.mjs +7 -7
  82. package/fesm2022/keycloakify-angular-login-pages-login-password.mjs.map +1 -1
  83. package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-config.mjs +7 -7
  84. package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-config.mjs.map +1 -1
  85. package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-input.mjs +6 -6
  86. package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-input.mjs.map +1 -1
  87. package/fesm2022/keycloakify-angular-login-pages-login-reset-otp.mjs +6 -6
  88. package/fesm2022/keycloakify-angular-login-pages-login-reset-otp.mjs.map +1 -1
  89. package/fesm2022/keycloakify-angular-login-pages-login-reset-password.mjs +6 -6
  90. package/fesm2022/keycloakify-angular-login-pages-login-reset-password.mjs.map +1 -1
  91. package/fesm2022/keycloakify-angular-login-pages-login-update-password.mjs +6 -6
  92. package/fesm2022/keycloakify-angular-login-pages-login-update-password.mjs.map +1 -1
  93. package/fesm2022/keycloakify-angular-login-pages-login-update-profile.mjs +7 -7
  94. package/fesm2022/keycloakify-angular-login-pages-login-update-profile.mjs.map +1 -1
  95. package/fesm2022/keycloakify-angular-login-pages-login-username.mjs +7 -7
  96. package/fesm2022/keycloakify-angular-login-pages-login-username.mjs.map +1 -1
  97. package/fesm2022/keycloakify-angular-login-pages-login-verify-email.mjs +6 -6
  98. package/fesm2022/keycloakify-angular-login-pages-login-verify-email.mjs.map +1 -1
  99. package/fesm2022/keycloakify-angular-login-pages-login-x509-info.mjs +6 -6
  100. package/fesm2022/keycloakify-angular-login-pages-login-x509-info.mjs.map +1 -1
  101. package/fesm2022/keycloakify-angular-login-pages-login.mjs +7 -7
  102. package/fesm2022/keycloakify-angular-login-pages-login.mjs.map +1 -1
  103. package/fesm2022/keycloakify-angular-login-pages-logout-confirm.mjs +6 -6
  104. package/fesm2022/keycloakify-angular-login-pages-logout-confirm.mjs.map +1 -1
  105. package/fesm2022/keycloakify-angular-login-pages-register.mjs +8 -8
  106. package/fesm2022/keycloakify-angular-login-pages-register.mjs.map +1 -1
  107. package/fesm2022/keycloakify-angular-login-pages-saml-post-form.mjs +7 -7
  108. package/fesm2022/keycloakify-angular-login-pages-saml-post-form.mjs.map +1 -1
  109. package/fesm2022/keycloakify-angular-login-pages-select-authenticator.mjs +6 -6
  110. package/fesm2022/keycloakify-angular-login-pages-select-authenticator.mjs.map +1 -1
  111. package/fesm2022/keycloakify-angular-login-pages-terms.mjs +6 -6
  112. package/fesm2022/keycloakify-angular-login-pages-terms.mjs.map +1 -1
  113. package/fesm2022/keycloakify-angular-login-pages-update-email.mjs +7 -7
  114. package/fesm2022/keycloakify-angular-login-pages-update-email.mjs.map +1 -1
  115. package/fesm2022/keycloakify-angular-login-pages-webauthn-authenticate.mjs +6 -6
  116. package/fesm2022/keycloakify-angular-login-pages-webauthn-authenticate.mjs.map +1 -1
  117. package/fesm2022/keycloakify-angular-login-pages-webauthn-error.mjs +6 -6
  118. package/fesm2022/keycloakify-angular-login-pages-webauthn-error.mjs.map +1 -1
  119. package/fesm2022/keycloakify-angular-login-pages-webauthn-register.mjs +6 -6
  120. package/fesm2022/keycloakify-angular-login-pages-webauthn-register.mjs.map +1 -1
  121. package/fesm2022/keycloakify-angular-login-services-i18n.mjs +3 -3
  122. package/fesm2022/keycloakify-angular-login-services-login-resource-injector.mjs +3 -3
  123. package/fesm2022/keycloakify-angular-login-services-user-profile-form.mjs +3 -3
  124. package/fesm2022/keycloakify-angular-login-template.mjs +8 -8
  125. package/fesm2022/keycloakify-angular-login-template.mjs.map +1 -1
  126. package/package.json +1 -1
  127. package/src/bin/tools/getThisCodebaseRootDirPath.ts +7 -0
  128. package/src/bin/tools/nodeModulesBinDirPath.ts +34 -1
  129. package/src/bin/tools/runPrettier.ts +43 -39
  130. package/src/bin/tools/readThisNpmPackageVersion.ts +0 -24
package/bin/671.index.js CHANGED
@@ -1104,7 +1104,8 @@ async function command(params) {
1104
1104
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1105
1105
 
1106
1106
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1107
- /* harmony export */ J: () => (/* binding */ getThisCodebaseRootDirPath)
1107
+ /* harmony export */ J: () => (/* binding */ getThisCodebaseRootDirPath),
1108
+ /* harmony export */ x: () => (/* binding */ getNearestPackageJsonDirPath)
1108
1109
  /* harmony export */ });
1109
1110
  /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896);
1110
1111
  /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__);
@@ -1129,6 +1130,12 @@ function getThisCodebaseRootDirPath() {
1129
1130
  }
1130
1131
  return (result = getThisCodebaseRootDirPath_rec(__dirname));
1131
1132
  }
1133
+ function getNearestPackageJsonDirPath(dirPath) {
1134
+ if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(path__WEBPACK_IMPORTED_MODULE_1__.join(dirPath, 'package.json'))) {
1135
+ return dirPath;
1136
+ }
1137
+ return getNearestPackageJsonDirPath(path__WEBPACK_IMPORTED_MODULE_1__.join(dirPath, '..'));
1138
+ }
1132
1139
 
1133
1140
 
1134
1141
  /***/ }),
@@ -1141,13 +1148,35 @@ function getThisCodebaseRootDirPath() {
1141
1148
  /* harmony export */ });
1142
1149
  /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(928);
1143
1150
  /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
1151
+ /* harmony import */ var _getThisCodebaseRootDirPath__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(221);
1152
+
1144
1153
 
1145
1154
  let cache = undefined;
1155
+ /** NOTE: Careful, this function can fail when the binary
1156
+ * Used is not in the node_modules directory of the project
1157
+ * (for example when running tests with vscode extension we'll get
1158
+ * '/Users/dylan/.vscode/extensions/vitest.explorer-1.16.0/dist/worker.js'
1159
+ *
1160
+ * instead of
1161
+ * '/Users/joseph/.nvm/versions/node/v22.12.0/bin/node'
1162
+ * or
1163
+ * '/Users/joseph/github/keycloakify-starter/node_modules/.bin/vite'
1164
+ *
1165
+ * as the value of process.argv[1]
1166
+ */
1146
1167
  function getNodeModulesBinDirPath() {
1147
1168
  if (cache !== undefined) {
1148
1169
  return cache;
1149
1170
  }
1150
1171
  const binPath = process.argv[1];
1172
+ special_case_running_not_from_distribution: {
1173
+ if (!binPath.endsWith('.ts')) {
1174
+ break special_case_running_not_from_distribution;
1175
+ }
1176
+ const packageJsonDirPath = (0,_getThisCodebaseRootDirPath__WEBPACK_IMPORTED_MODULE_1__/* .getNearestPackageJsonDirPath */ .x)((0,path__WEBPACK_IMPORTED_MODULE_0__.dirname)(binPath));
1177
+ const nodeModulesBinDirPath = (0,path__WEBPACK_IMPORTED_MODULE_0__.join)(packageJsonDirPath, 'node_modules', '.bin');
1178
+ return nodeModulesBinDirPath;
1179
+ }
1151
1180
  const segments = ['.bin'];
1152
1181
  let foundNodeModules = false;
1153
1182
  for (const segment of binPath.split(path__WEBPACK_IMPORTED_MODULE_0__.sep).reverse()) {
@@ -1163,43 +1192,15 @@ function getNodeModulesBinDirPath() {
1163
1192
  }
1164
1193
  segments.unshift(segment);
1165
1194
  }
1195
+ if (!foundNodeModules) {
1196
+ throw new Error(`Could not find node_modules in path ${binPath}`);
1197
+ }
1166
1198
  const nodeModulesBinDirPath = segments.join(path__WEBPACK_IMPORTED_MODULE_0__.sep);
1167
1199
  cache = nodeModulesBinDirPath;
1168
1200
  return nodeModulesBinDirPath;
1169
1201
  }
1170
1202
 
1171
1203
 
1172
- /***/ }),
1173
-
1174
- /***/ 972:
1175
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1176
-
1177
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1178
- /* harmony export */ M: () => (/* binding */ readThisNpmPackageVersion)
1179
- /* harmony export */ });
1180
- /* harmony import */ var _getThisCodebaseRootDirPath__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(221);
1181
- /* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(559);
1182
- /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896);
1183
- /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__);
1184
- /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928);
1185
- /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
1186
-
1187
-
1188
-
1189
-
1190
- let cache = undefined;
1191
- function readThisNpmPackageVersion() {
1192
- if (cache !== undefined) {
1193
- return cache;
1194
- }
1195
- const version = JSON.parse(fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync((0,path__WEBPACK_IMPORTED_MODULE_1__.join)((0,_getThisCodebaseRootDirPath__WEBPACK_IMPORTED_MODULE_2__/* .getThisCodebaseRootDirPath */ .J)(), 'package.json'))
1196
- .toString('utf8'))['version'];
1197
- (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_3__/* .assert */ .v)(typeof version === 'string');
1198
- cache = version;
1199
- return version;
1200
- }
1201
-
1202
-
1203
1204
  /***/ }),
1204
1205
 
1205
1206
  /***/ 915:
@@ -1210,21 +1211,19 @@ function readThisNpmPackageVersion() {
1210
1211
  /* harmony export */ L: () => (/* binding */ getIsPrettierAvailable)
1211
1212
  /* harmony export */ });
1212
1213
  /* unused harmony export getPrettier */
1213
- /* harmony import */ var _nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(395);
1214
- /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(928);
1215
- /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
1214
+ /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(276);
1215
+ /* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(982);
1216
+ /* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_0__);
1216
1217
  /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(943);
1217
1218
  /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_1__);
1218
- /* harmony import */ var tsafe_id__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94);
1219
+ /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(928);
1220
+ /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_2__);
1219
1221
  /* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(559);
1220
- /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(276);
1221
- /* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(982);
1222
- /* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_2__);
1223
- /* harmony import */ var tsafe_symToStr__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(886);
1224
- /* harmony import */ var _readThisNpmPackageVersion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(972);
1222
+ /* harmony import */ var tsafe_id__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94);
1223
+ /* harmony import */ var tsafe_symToStr__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(886);
1224
+ /* harmony import */ var _nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(395);
1225
1225
  /* module decorator */ module = __webpack_require__.hmd(module);
1226
-
1227
-
1226
+ /* eslint-disable @typescript-eslint/consistent-type-imports */
1228
1227
 
1229
1228
 
1230
1229
 
@@ -1240,7 +1239,7 @@ async function getIsPrettierAvailable() {
1240
1239
  return getIsPrettierAvailable.cache;
1241
1240
  }
1242
1241
  const nodeModulesBinDirPath = (0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_4__/* .getNodeModulesBinDirPath */ .p)();
1243
- const prettierBinPath = (0,path__WEBPACK_IMPORTED_MODULE_0__.join)(nodeModulesBinDirPath, 'prettier');
1242
+ const prettierBinPath = (0,path__WEBPACK_IMPORTED_MODULE_2__.join)(nodeModulesBinDirPath, 'prettier');
1244
1243
  const stats = await fs_promises__WEBPACK_IMPORTED_MODULE_1__.stat(prettierBinPath).catch(() => undefined);
1245
1244
  const isPrettierAvailable = (_a = stats === null || stats === void 0 ? void 0 : stats.isFile()) !== null && _a !== void 0 ? _a : false;
1246
1245
  getIsPrettierAvailable.cache = isPrettierAvailable;
@@ -1254,33 +1253,26 @@ async function getPrettier() {
1254
1253
  }
1255
1254
  let prettier = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_3__.id)(undefined);
1256
1255
  import_prettier: {
1257
- // NOTE: When module is linked we want to make sure we import the correct version
1258
- // of prettier, that is the one of the project, not the one of this repo.
1259
- // So we do a sketchy eval to bypass ncc.
1260
- // We make sure to only do that when linking, otherwise we import properly.
1261
- if ((0,_readThisNpmPackageVersion__WEBPACK_IMPORTED_MODULE_6__/* .readThisNpmPackageVersion */ .M)().startsWith('0.0.0')) {
1262
- const prettierDirPath = (0,path__WEBPACK_IMPORTED_MODULE_0__.resolve)((0,path__WEBPACK_IMPORTED_MODULE_0__.join)((0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_4__/* .getNodeModulesBinDirPath */ .p)(), '..', 'prettier'));
1263
- const isCJS = true && module.exports;
1264
- if (isCJS) {
1265
- eval(`${(0,tsafe_symToStr__WEBPACK_IMPORTED_MODULE_7__/* .symToStr */ .I)({ prettier })} = require("${prettierDirPath}")`);
1266
- }
1267
- else {
1268
- prettier = await new Promise(_resolve => {
1269
- eval(`import("file:///${(0,path__WEBPACK_IMPORTED_MODULE_0__.join)(prettierDirPath, 'index.mjs').replace(/\\/g, '/')}").then(prettier => _resolve(prettier))`);
1270
- });
1271
- }
1272
- (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_5__/* .assert */ .v)(!(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_5__.is)(prettier));
1273
- break import_prettier;
1256
+ const prettierDirPath = (0,path__WEBPACK_IMPORTED_MODULE_2__.resolve)((0,path__WEBPACK_IMPORTED_MODULE_2__.join)((0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_4__/* .getNodeModulesBinDirPath */ .p)(), '..', 'prettier'));
1257
+ const isCJS = true && module.exports;
1258
+ if (isCJS) {
1259
+ eval(`${(0,tsafe_symToStr__WEBPACK_IMPORTED_MODULE_6__/* .symToStr */ .I)({ prettier })} = require("${prettierDirPath}")`);
1260
+ }
1261
+ else {
1262
+ prettier = await new Promise(_resolve => {
1263
+ eval(`import("file:///${(0,path__WEBPACK_IMPORTED_MODULE_2__.join)(prettierDirPath, 'index.mjs').replace(/\\/g, '/')}").then(prettier => _resolve(prettier))`);
1264
+ });
1274
1265
  }
1275
- prettier = await Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 166));
1266
+ (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_5__/* .assert */ .v)(!(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_5__.is)(prettier));
1267
+ break import_prettier;
1276
1268
  }
1277
1269
  const configHash = await (async () => {
1278
- const configFilePath = await prettier.resolveConfigFile((0,path__WEBPACK_IMPORTED_MODULE_0__.join)((0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_4__/* .getNodeModulesBinDirPath */ .p)(), '..'));
1270
+ const configFilePath = await prettier.resolveConfigFile((0,path__WEBPACK_IMPORTED_MODULE_2__.join)((0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_4__/* .getNodeModulesBinDirPath */ .p)(), '..', '..'));
1279
1271
  if (configFilePath === null) {
1280
1272
  return '';
1281
1273
  }
1282
1274
  const data = await fs_promises__WEBPACK_IMPORTED_MODULE_1__.readFile(configFilePath);
1283
- return crypto__WEBPACK_IMPORTED_MODULE_2__.createHash('sha256').update(data).digest('hex');
1275
+ return crypto__WEBPACK_IMPORTED_MODULE_0__.createHash('sha256').update(data).digest('hex');
1284
1276
  })();
1285
1277
  const prettierAndConfig = {
1286
1278
  prettier,
@@ -1297,17 +1289,19 @@ async function runPrettier(params) {
1297
1289
  const { ignored, inferredParser } = await prettier.getFileInfo(filePath, {
1298
1290
  resolveConfig: true
1299
1291
  });
1300
- if (ignored) {
1292
+ if (ignored || inferredParser === null) {
1301
1293
  return sourceCode;
1302
1294
  }
1303
1295
  const config = await prettier.resolveConfig(filePath);
1304
- formattedSourceCode = await prettier.format(sourceCode, Object.assign(Object.assign({}, config), { filePath, parser: inferredParser !== null && inferredParser !== void 0 ? inferredParser : undefined }));
1296
+ formattedSourceCode = await prettier.format(typeof sourceCode === 'string' ? sourceCode : sourceCode.toString('utf8'), Object.assign(Object.assign({}, config), { filePath, parser: inferredParser }));
1305
1297
  }
1306
1298
  catch (error) {
1307
- console.log(chalk__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Ay.red(`You probably need to upgrade the version of prettier in your project`));
1299
+ console.log(chalk__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Ay.red(`You probably need to upgrade the version of prettier in your project`));
1308
1300
  throw error;
1309
1301
  }
1310
- return formattedSourceCode;
1302
+ return typeof sourceCode === 'string'
1303
+ ? formattedSourceCode
1304
+ : Buffer.from(formattedSourceCode, 'utf8');
1311
1305
  }
1312
1306
 
1313
1307
 
package/bin/942.index.js CHANGED
@@ -678,7 +678,8 @@ async function command(params) {
678
678
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
679
679
 
680
680
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
681
- /* harmony export */ J: () => (/* binding */ getThisCodebaseRootDirPath)
681
+ /* harmony export */ J: () => (/* binding */ getThisCodebaseRootDirPath),
682
+ /* harmony export */ x: () => (/* binding */ getNearestPackageJsonDirPath)
682
683
  /* harmony export */ });
683
684
  /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896);
684
685
  /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__);
@@ -703,6 +704,12 @@ function getThisCodebaseRootDirPath() {
703
704
  }
704
705
  return (result = getThisCodebaseRootDirPath_rec(__dirname));
705
706
  }
707
+ function getNearestPackageJsonDirPath(dirPath) {
708
+ if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(path__WEBPACK_IMPORTED_MODULE_1__.join(dirPath, 'package.json'))) {
709
+ return dirPath;
710
+ }
711
+ return getNearestPackageJsonDirPath(path__WEBPACK_IMPORTED_MODULE_1__.join(dirPath, '..'));
712
+ }
706
713
 
707
714
 
708
715
  /***/ }),
@@ -715,13 +722,35 @@ function getThisCodebaseRootDirPath() {
715
722
  /* harmony export */ });
716
723
  /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(928);
717
724
  /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
725
+ /* harmony import */ var _getThisCodebaseRootDirPath__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(221);
726
+
718
727
 
719
728
  let cache = undefined;
729
+ /** NOTE: Careful, this function can fail when the binary
730
+ * Used is not in the node_modules directory of the project
731
+ * (for example when running tests with vscode extension we'll get
732
+ * '/Users/dylan/.vscode/extensions/vitest.explorer-1.16.0/dist/worker.js'
733
+ *
734
+ * instead of
735
+ * '/Users/joseph/.nvm/versions/node/v22.12.0/bin/node'
736
+ * or
737
+ * '/Users/joseph/github/keycloakify-starter/node_modules/.bin/vite'
738
+ *
739
+ * as the value of process.argv[1]
740
+ */
720
741
  function getNodeModulesBinDirPath() {
721
742
  if (cache !== undefined) {
722
743
  return cache;
723
744
  }
724
745
  const binPath = process.argv[1];
746
+ special_case_running_not_from_distribution: {
747
+ if (!binPath.endsWith('.ts')) {
748
+ break special_case_running_not_from_distribution;
749
+ }
750
+ const packageJsonDirPath = (0,_getThisCodebaseRootDirPath__WEBPACK_IMPORTED_MODULE_1__/* .getNearestPackageJsonDirPath */ .x)((0,path__WEBPACK_IMPORTED_MODULE_0__.dirname)(binPath));
751
+ const nodeModulesBinDirPath = (0,path__WEBPACK_IMPORTED_MODULE_0__.join)(packageJsonDirPath, 'node_modules', '.bin');
752
+ return nodeModulesBinDirPath;
753
+ }
725
754
  const segments = ['.bin'];
726
755
  let foundNodeModules = false;
727
756
  for (const segment of binPath.split(path__WEBPACK_IMPORTED_MODULE_0__.sep).reverse()) {
@@ -737,43 +766,15 @@ function getNodeModulesBinDirPath() {
737
766
  }
738
767
  segments.unshift(segment);
739
768
  }
769
+ if (!foundNodeModules) {
770
+ throw new Error(`Could not find node_modules in path ${binPath}`);
771
+ }
740
772
  const nodeModulesBinDirPath = segments.join(path__WEBPACK_IMPORTED_MODULE_0__.sep);
741
773
  cache = nodeModulesBinDirPath;
742
774
  return nodeModulesBinDirPath;
743
775
  }
744
776
 
745
777
 
746
- /***/ }),
747
-
748
- /***/ 972:
749
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
750
-
751
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
752
- /* harmony export */ M: () => (/* binding */ readThisNpmPackageVersion)
753
- /* harmony export */ });
754
- /* harmony import */ var _getThisCodebaseRootDirPath__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(221);
755
- /* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(559);
756
- /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896);
757
- /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__);
758
- /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928);
759
- /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
760
-
761
-
762
-
763
-
764
- let cache = undefined;
765
- function readThisNpmPackageVersion() {
766
- if (cache !== undefined) {
767
- return cache;
768
- }
769
- const version = JSON.parse(fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync((0,path__WEBPACK_IMPORTED_MODULE_1__.join)((0,_getThisCodebaseRootDirPath__WEBPACK_IMPORTED_MODULE_2__/* .getThisCodebaseRootDirPath */ .J)(), 'package.json'))
770
- .toString('utf8'))['version'];
771
- (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_3__/* .assert */ .v)(typeof version === 'string');
772
- cache = version;
773
- return version;
774
- }
775
-
776
-
777
778
  /***/ }),
778
779
 
779
780
  /***/ 915:
@@ -784,21 +785,19 @@ function readThisNpmPackageVersion() {
784
785
  /* harmony export */ L: () => (/* binding */ getIsPrettierAvailable)
785
786
  /* harmony export */ });
786
787
  /* unused harmony export getPrettier */
787
- /* harmony import */ var _nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(395);
788
- /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(928);
789
- /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
788
+ /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(276);
789
+ /* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(982);
790
+ /* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_0__);
790
791
  /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(943);
791
792
  /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_1__);
792
- /* harmony import */ var tsafe_id__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94);
793
+ /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(928);
794
+ /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_2__);
793
795
  /* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(559);
794
- /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(276);
795
- /* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(982);
796
- /* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_2__);
797
- /* harmony import */ var tsafe_symToStr__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(886);
798
- /* harmony import */ var _readThisNpmPackageVersion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(972);
796
+ /* harmony import */ var tsafe_id__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94);
797
+ /* harmony import */ var tsafe_symToStr__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(886);
798
+ /* harmony import */ var _nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(395);
799
799
  /* module decorator */ module = __webpack_require__.hmd(module);
800
-
801
-
800
+ /* eslint-disable @typescript-eslint/consistent-type-imports */
802
801
 
803
802
 
804
803
 
@@ -814,7 +813,7 @@ async function getIsPrettierAvailable() {
814
813
  return getIsPrettierAvailable.cache;
815
814
  }
816
815
  const nodeModulesBinDirPath = (0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_4__/* .getNodeModulesBinDirPath */ .p)();
817
- const prettierBinPath = (0,path__WEBPACK_IMPORTED_MODULE_0__.join)(nodeModulesBinDirPath, 'prettier');
816
+ const prettierBinPath = (0,path__WEBPACK_IMPORTED_MODULE_2__.join)(nodeModulesBinDirPath, 'prettier');
818
817
  const stats = await fs_promises__WEBPACK_IMPORTED_MODULE_1__.stat(prettierBinPath).catch(() => undefined);
819
818
  const isPrettierAvailable = (_a = stats === null || stats === void 0 ? void 0 : stats.isFile()) !== null && _a !== void 0 ? _a : false;
820
819
  getIsPrettierAvailable.cache = isPrettierAvailable;
@@ -828,33 +827,26 @@ async function getPrettier() {
828
827
  }
829
828
  let prettier = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_3__.id)(undefined);
830
829
  import_prettier: {
831
- // NOTE: When module is linked we want to make sure we import the correct version
832
- // of prettier, that is the one of the project, not the one of this repo.
833
- // So we do a sketchy eval to bypass ncc.
834
- // We make sure to only do that when linking, otherwise we import properly.
835
- if ((0,_readThisNpmPackageVersion__WEBPACK_IMPORTED_MODULE_6__/* .readThisNpmPackageVersion */ .M)().startsWith('0.0.0')) {
836
- const prettierDirPath = (0,path__WEBPACK_IMPORTED_MODULE_0__.resolve)((0,path__WEBPACK_IMPORTED_MODULE_0__.join)((0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_4__/* .getNodeModulesBinDirPath */ .p)(), '..', 'prettier'));
837
- const isCJS = true && module.exports;
838
- if (isCJS) {
839
- eval(`${(0,tsafe_symToStr__WEBPACK_IMPORTED_MODULE_7__/* .symToStr */ .I)({ prettier })} = require("${prettierDirPath}")`);
840
- }
841
- else {
842
- prettier = await new Promise(_resolve => {
843
- eval(`import("file:///${(0,path__WEBPACK_IMPORTED_MODULE_0__.join)(prettierDirPath, 'index.mjs').replace(/\\/g, '/')}").then(prettier => _resolve(prettier))`);
844
- });
845
- }
846
- (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_5__/* .assert */ .v)(!(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_5__.is)(prettier));
847
- break import_prettier;
830
+ const prettierDirPath = (0,path__WEBPACK_IMPORTED_MODULE_2__.resolve)((0,path__WEBPACK_IMPORTED_MODULE_2__.join)((0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_4__/* .getNodeModulesBinDirPath */ .p)(), '..', 'prettier'));
831
+ const isCJS = true && module.exports;
832
+ if (isCJS) {
833
+ eval(`${(0,tsafe_symToStr__WEBPACK_IMPORTED_MODULE_6__/* .symToStr */ .I)({ prettier })} = require("${prettierDirPath}")`);
834
+ }
835
+ else {
836
+ prettier = await new Promise(_resolve => {
837
+ eval(`import("file:///${(0,path__WEBPACK_IMPORTED_MODULE_2__.join)(prettierDirPath, 'index.mjs').replace(/\\/g, '/')}").then(prettier => _resolve(prettier))`);
838
+ });
848
839
  }
849
- prettier = await Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 166));
840
+ (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_5__/* .assert */ .v)(!(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_5__.is)(prettier));
841
+ break import_prettier;
850
842
  }
851
843
  const configHash = await (async () => {
852
- const configFilePath = await prettier.resolveConfigFile((0,path__WEBPACK_IMPORTED_MODULE_0__.join)((0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_4__/* .getNodeModulesBinDirPath */ .p)(), '..'));
844
+ const configFilePath = await prettier.resolveConfigFile((0,path__WEBPACK_IMPORTED_MODULE_2__.join)((0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_4__/* .getNodeModulesBinDirPath */ .p)(), '..', '..'));
853
845
  if (configFilePath === null) {
854
846
  return '';
855
847
  }
856
848
  const data = await fs_promises__WEBPACK_IMPORTED_MODULE_1__.readFile(configFilePath);
857
- return crypto__WEBPACK_IMPORTED_MODULE_2__.createHash('sha256').update(data).digest('hex');
849
+ return crypto__WEBPACK_IMPORTED_MODULE_0__.createHash('sha256').update(data).digest('hex');
858
850
  })();
859
851
  const prettierAndConfig = {
860
852
  prettier,
@@ -871,17 +863,19 @@ async function runPrettier(params) {
871
863
  const { ignored, inferredParser } = await prettier.getFileInfo(filePath, {
872
864
  resolveConfig: true
873
865
  });
874
- if (ignored) {
866
+ if (ignored || inferredParser === null) {
875
867
  return sourceCode;
876
868
  }
877
869
  const config = await prettier.resolveConfig(filePath);
878
- formattedSourceCode = await prettier.format(sourceCode, Object.assign(Object.assign({}, config), { filePath, parser: inferredParser !== null && inferredParser !== void 0 ? inferredParser : undefined }));
870
+ formattedSourceCode = await prettier.format(typeof sourceCode === 'string' ? sourceCode : sourceCode.toString('utf8'), Object.assign(Object.assign({}, config), { filePath, parser: inferredParser }));
879
871
  }
880
872
  catch (error) {
881
- console.log(chalk__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Ay.red(`You probably need to upgrade the version of prettier in your project`));
873
+ console.log(chalk__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Ay.red(`You probably need to upgrade the version of prettier in your project`));
882
874
  throw error;
883
875
  }
884
- return formattedSourceCode;
876
+ return typeof sourceCode === 'string'
877
+ ? formattedSourceCode
878
+ : Buffer.from(formattedSourceCode, 'utf8');
885
879
  }
886
880
 
887
881
 
package/bin/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import * as __WEBPACK_EXTERNAL_MODULE_prettier__ from "prettier";
3
2
  import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "module";
4
3
  /******/ var __webpack_modules__ = ({
5
4
 
@@ -89,13 +88,6 @@ const TEST_APP_URL = "https://my-theme.keycloakify.dev";
89
88
 
90
89
  /***/ }),
91
90
 
92
- /***/ 166:
93
- /***/ ((module) => {
94
-
95
- module.exports = __WEBPACK_EXTERNAL_MODULE_prettier__;
96
-
97
- /***/ }),
98
-
99
91
  /***/ 317:
100
92
  /***/ ((module) => {
101
93
 
@@ -986,6 +978,17 @@ function is(value) {
986
978
  /******/ __nccwpck_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
987
979
  /******/ })();
988
980
  /******/
981
+ /******/ /* webpack/runtime/make namespace object */
982
+ /******/ (() => {
983
+ /******/ // define __esModule on exports
984
+ /******/ __nccwpck_require__.r = (exports) => {
985
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
986
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
987
+ /******/ }
988
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
989
+ /******/ };
990
+ /******/ })();
991
+ /******/
989
992
  /******/ /* webpack/runtime/compat */
990
993
  /******/
991
994
  /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = new URL('.', import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/";
@@ -1109,7 +1112,7 @@ const { buildContext, commandName } = readParams({ apiVersion: 'v1' });
1109
1112
  return;
1110
1113
  case 'initialize-account-theme':
1111
1114
  {
1112
- const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(343), __nccwpck_require__.e(187)]).then(__nccwpck_require__.bind(__nccwpck_require__, 187));
1115
+ const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(644), __nccwpck_require__.e(187)]).then(__nccwpck_require__.bind(__nccwpck_require__, 187));
1113
1116
  command({ buildContext });
1114
1117
  }
1115
1118
  return;
@@ -120,10 +120,10 @@ class KcClassDirective {
120
120
  });
121
121
  }
122
122
  }
123
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: KcClassDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
124
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.1", type: KcClassDirective, isStandalone: true, selector: "[kcClass]", inputs: { klass: ["class", "klass"], ngClass: "ngClass", kcClass: "kcClass" }, ngImport: i0 }); }
123
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: KcClassDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
124
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.5", type: KcClassDirective, isStandalone: true, selector: "[kcClass]", inputs: { klass: ["class", "klass"], ngClass: "ngClass", kcClass: "kcClass" }, ngImport: i0 }); }
125
125
  }
126
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: KcClassDirective, decorators: [{
126
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: KcClassDirective, decorators: [{
127
127
  type: Directive,
128
128
  args: [{ selector: '[kcClass]' }]
129
129
  }], propDecorators: { klass: [{
@@ -20,15 +20,15 @@ class AccountComponent extends ComponentReference {
20
20
  };
21
21
  this.active = 'account';
22
22
  }
23
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: AccountComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
24
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.1", type: AccountComponent, isStandalone: true, selector: "kc-account", providers: [
23
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: AccountComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
24
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: AccountComponent, isStandalone: true, selector: "kc-account", providers: [
25
25
  {
26
26
  provide: ComponentReference,
27
27
  useExisting: forwardRef(() => AccountComponent)
28
28
  }
29
29
  ], usesInheritance: true, ngImport: i0, template: "@let url = kcContext.url;\n@let realm = kcContext.realm;\n@let messagesPerField = kcContext.messagesPerField;\n@let stateChecker = kcContext.stateChecker;\n@let account = kcContext.account;\n@let referrer = kcContext.referrer;\n\n<div class=\"row\">\n <div class=\"col-md-10\">\n <h2>{{ i18n.msgStr('editAccountHtmlTitle') }}</h2>\n </div>\n <div class=\"col-md-2 subtitle\">\n <span class=\"subtitle\"> <span class=\"required\">*</span> {{ i18n.msgStr('requiredFields') }} </span>\n </div>\n</div>\n<form\n class=\"form-horizontal\"\n method=\"post\"\n [action]=\"url.accountUrl\"\n>\n <input\n type=\"hidden\"\n id=\"stateChecker\"\n name=\"stateChecker\"\n [value]=\"stateChecker\"\n />\n @if (!realm.registrationEmailAsUsername) {\n <div\n class=\"form-group\"\n [class.has-error]=\"messagesPerField.existsError('username')\"\n >\n <div class=\"col-sm-2 col-md-2\">\n <label\n for=\"username\"\n class=\"control-label\"\n >\n {{ i18n.msgStr('username') }}\n </label>\n @if (realm.editUsernameAllowed) {\n <span class=\"required\">*</span>\n }\n </div>\n\n <div class=\"col-sm-10 col-md-10\">\n <input\n type=\"text\"\n class=\"form-control\"\n id=\"username\"\n name=\"username\"\n [disabled]=\"!realm.editUsernameAllowed\"\n [defaultValue]=\"account.username ?? ''\"\n />\n </div>\n </div>\n }\n\n <div\n class=\"form-group\"\n [class.has-error]=\"messagesPerField.existsError('email')\"\n >\n <div class=\"col-sm-2 col-md-2\">\n <label\n for=\"email\"\n class=\"control-label\"\n >\n {{ i18n.msgStr('email') }}\n </label>\n <span class=\"required\">*</span>\n </div>\n\n <div class=\"col-sm-10 col-md-10\">\n <input\n type=\"text\"\n class=\"form-control\"\n id=\"email\"\n name=\"email\"\n autofocus\n [defaultValue]=\"account.email ?? ''\"\n />\n </div>\n </div>\n\n <div\n class=\"form-group\"\n [class.has-error]=\"messagesPerField.existsError('firstName')\"\n >\n <div class=\"col-sm-2 col-md-2\">\n <label\n for=\"firstName\"\n class=\"control-label\"\n >\n {{ i18n.msgStr('firstName') }}\n </label>\n <span class=\"required\">*</span>\n </div>\n\n <div class=\"col-sm-10 col-md-10\">\n <input\n type=\"text\"\n class=\"form-control\"\n id=\"firstName\"\n name=\"firstName\"\n [defaultValue]=\"account.firstName\"\n />\n </div>\n </div>\n\n <div\n class=\"form-group\"\n [class.has-error]=\"messagesPerField.existsError('lastName')\"\n >\n <div class=\"col-sm-2 col-md-2\">\n <label\n for=\"lastName\"\n class=\"control-label\"\n >\n {{ i18n.msgStr('lastName') }}\n </label>\n <span class=\"required\">*</span>\n </div>\n\n <div class=\"col-sm-10 col-md-10\">\n <input\n type=\"text\"\n class=\"form-control\"\n id=\"lastName\"\n name=\"lastName\"\n [defaultValue]=\"account.lastName ?? ''\"\n />\n </div>\n </div>\n\n <div class=\"form-group\">\n <div\n id=\"kc-form-buttons\"\n class=\"col-md-offset-2 col-md-10 submit\"\n >\n <div>\n @if (referrer) {\n <a\n [href]=\"referrer!.url\"\n [innerHTML]=\"i18n.msgStr('backToApplication') | kcSanitize: 'html'\"\n >\n </a>\n }\n <button\n type=\"submit\"\n name=\"submitAction\"\n value=\"Save\"\n [kcClass]=\"['kcButtonClass', 'kcButtonPrimaryClass', 'kcButtonLargeClass']\"\n >\n {{ i18n.msgStr('doSave') }}\n </button>\n <button\n type=\"submit\"\n name=\"submitAction\"\n value=\"Cancel\"\n [kcClass]=\"['kcButtonClass', 'kcButtonPrimaryClass', 'kcButtonLargeClass']\"\n >\n {{ i18n.msgStr('doCancel') }}\n </button>\n </div>\n </div>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: KcClassDirective, selector: "[kcClass]", inputs: ["class", "ngClass", "kcClass"] }, { kind: "pipe", type: KcSanitizePipe, name: "kcSanitize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
30
30
  }
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: AccountComponent, decorators: [{
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: AccountComponent, decorators: [{
32
32
  type: Component,
33
33
  args: [{ imports: [KcClassDirective, KcSanitizePipe], selector: 'kc-account', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
34
34
  {
@@ -18,15 +18,15 @@ class ApplicationsComponent extends ComponentReference {
18
18
  this.classes = inject(ACCOUNT_CLASSES);
19
19
  this.active = 'applications';
20
20
  }
21
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: ApplicationsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
22
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.1", type: ApplicationsComponent, isStandalone: true, selector: "kc-applications", providers: [
21
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: ApplicationsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
22
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: ApplicationsComponent, isStandalone: true, selector: "kc-applications", providers: [
23
23
  {
24
24
  provide: ComponentReference,
25
25
  useExisting: forwardRef(() => ApplicationsComponent)
26
26
  }
27
27
  ], usesInheritance: true, ngImport: i0, template: "@let url = kcContext.url;\n@let stateChecker = kcContext.stateChecker;\n@let applications = kcContext.applications?.applications;\n\n<div class=\"row\">\n <div class=\"col-md-10\">\n <h2>{{ i18n.msgStr('applicationsHtmlTitle') }}</h2>\n </div>\n\n <form\n method=\"post\"\n [action]=\"url.applicationsUrl\"\n >\n <input\n type=\"hidden\"\n id=\"stateChecker\"\n name=\"stateChecker\"\n [value]=\"stateChecker\"\n />\n <input\n type=\"hidden\"\n id=\"referrer\"\n name=\"referrer\"\n [value]=\"stateChecker\"\n />\n\n <table class=\"table table-striped table-bordered\">\n <thead>\n <tr>\n <td>{{ i18n.msgStr('application') }}</td>\n <td>{{ i18n.msgStr('availableRoles') }}</td>\n <td>{{ i18n.msgStr('grantedPermissions') }}</td>\n <td>{{ i18n.msgStr('additionalGrants') }}</td>\n <td>{{ i18n.msgStr('action') }}</td>\n </tr>\n </thead>\n\n <tbody>\n @for (application of applications ?? []; track application) {\n <tr>\n <td>\n @if (application.effectiveUrl) {\n <a [href]=\"application.effectiveUrl\">\n @if (application.client.name) {\n {{ i18n.advancedMsgStr(application.client.name) }}\n } @else {\n {{ application.client.clientId }}\n }\n </a>\n } @else {\n @if (application.client.name) {\n {{ i18n.advancedMsgStr(application.client.name) }}\n } @else {\n {{ application.client.clientId }}\n }\n }\n </td>\n\n <td>\n @if (!(application.realmRolesAvailable | isArrayWithEmptyObject)) {\n @for (role of application.realmRolesAvailable; track role; let last = $last) {\n <span>\n @if (role.description) {\n {{ i18n.advancedMsgStr(role.description) }}\n } @else {\n {{ i18n.advancedMsgStr(role.name) }}\n }\n @if (!last) {\n ,&nbsp;\n }\n </span>\n }\n }\n @if (application.resourceRolesAvailable) {\n @for (resource of application.resourceRolesAvailable | keyvalue; track resource.key) {\n <span>\n @if (!(application.realmRolesAvailable | isArrayWithEmptyObject)) {\n ,&nbsp;\n }\n @for (\n clientRole of application.resourceRolesAvailable[resource.key];\n track clientRole;\n let roleLast = $last\n ) {\n <span>\n {{\n i18n.advancedMsgStr(clientRole.roleDescription ? clientRole.roleDescription : clientRole.roleName)\n }}\n {{ i18n.msgStr('inResource') }}\n <strong>\n {{\n clientRole.clientName ? i18n.advancedMsgStr(clientRole.clientName) : clientRole.clientId\n }}</strong\n >\n @if (!roleLast) {\n ,&nbsp;\n }\n </span>\n }\n </span>\n }\n }\n </td>\n\n <td>\n @if (application.client.consentRequired) {\n @for (claim of application.clientScopesGranted; track claim; let last = $last) {\n {{ i18n.advancedMsgStr(claim) }}\n @if (!last) {\n ,&nbsp;\n }\n }\n } @else {\n <strong>{{ i18n.msgStr('fullAccess') }}</strong>\n }\n </td>\n\n <td>\n @for (grant of application.additionalGrants; track grant; let last = $last) {\n {{ i18n.advancedMsgStr(grant) }}\n @if (!last) {\n ,&nbsp;\n }\n }\n </td>\n\n <td>\n @if (\n (application.client.consentRequired && application.clientScopesGranted.length > 0) ||\n application.additionalGrants.length > 0\n ) {\n <button\n type=\"submit\"\n name=\"clientId\"\n [kcClass]=\"['kcButtonPrimaryClass', 'kcButtonClass']\"\n [id]=\"'revoke-' + application.client.clientId\"\n [value]=\"application.client.id\"\n >\n {{ i18n.msgStr('revoke') }}\n </button>\n }\n </td>\n </tr>\n }\n </tbody>\n </table>\n </form>\n</div>\n", dependencies: [{ kind: "directive", type: KcClassDirective, selector: "[kcClass]", inputs: ["class", "ngClass", "kcClass"] }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: IsArrayWithEmptyObjectPipe, name: "isArrayWithEmptyObject" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
28
28
  }
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: ApplicationsComponent, decorators: [{
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: ApplicationsComponent, decorators: [{
30
30
  type: Component,
31
31
  args: [{ imports: [KcClassDirective, KeyValuePipe, IsArrayWithEmptyObjectPipe], selector: 'kc-applications', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
32
32
  {
@@ -15,15 +15,15 @@ class FederatedIdentityComponent extends ComponentReference {
15
15
  this.classes = inject(ACCOUNT_CLASSES);
16
16
  this.active = 'social';
17
17
  }
18
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: FederatedIdentityComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
19
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.1", type: FederatedIdentityComponent, isStandalone: true, selector: "kc-federated-identity", providers: [
18
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: FederatedIdentityComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
19
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: FederatedIdentityComponent, isStandalone: true, selector: "kc-federated-identity", providers: [
20
20
  {
21
21
  provide: ComponentReference,
22
22
  useExisting: forwardRef(() => FederatedIdentityComponent)
23
23
  }
24
24
  ], usesInheritance: true, ngImport: i0, template: "@let url = kcContext.url;\n@let federatedIdentity = kcContext.federatedIdentity;\n@let stateChecker = kcContext.stateChecker;\n\n<div class=\"main-layout social\">\n <div class=\"row\">\n <div class=\"col-md-10\">\n <h2>{{ i18n.msgStr('federatedIdentitiesHtmlTitle') }}</h2>\n </div>\n </div>\n <div id=\"federated-identities\">\n @for (identity of federatedIdentity.identities; track identity) {\n <div class=\"row margin-bottom\">\n <div class=\"col-sm-2 col-md-2\">\n <label\n class=\"control-label\"\n [for]=\"identity.providerId\"\n >\n {{ identity.displayName }}\n </label>\n </div>\n <div class=\"col-sm-5 col-md-5\">\n <input\n disabled\n class=\"form-control\"\n [value]=\"identity.userName\"\n />\n </div>\n <div class=\"col-sm-5 col-md-5\">\n @if (identity.connected) {\n @if (federatedIdentity.removeLinkPossible) {\n <form\n method=\"post\"\n class=\"form-inline\"\n [action]=\"url.socialUrl\"\n >\n <input\n type=\"hidden\"\n name=\"stateChecker\"\n [value]=\"stateChecker\"\n />\n <input\n type=\"hidden\"\n name=\"action\"\n value=\"remove\"\n />\n <input\n type=\"hidden\"\n name=\"providerId\"\n [value]=\"identity.providerId\"\n />\n <button\n class=\"btn btn-default\"\n [id]=\"'remove-link-' + identity.providerId\"\n >\n {{ i18n.msgStr('doRemove') }}\n </button>\n </form>\n }\n } @else {\n <form\n method=\"post\"\n class=\"form-inline\"\n [action]=\"url.socialUrl\"\n >\n <input\n type=\"hidden\"\n name=\"stateChecker\"\n [value]=\"stateChecker\"\n />\n <input\n type=\"hidden\"\n name=\"action\"\n value=\"add\"\n />\n <input\n type=\"hidden\"\n name=\"providerId\"\n [value]=\"identity.providerId\"\n />\n <button\n class=\"btn btn-default\"\n [id]=\"'add-link-' + identity.providerId\"\n >\n {{ i18n.msgStr('doAdd') }}\n </button>\n </form>\n }\n </div>\n </div>\n }\n </div>\n</div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
25
25
  }
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: FederatedIdentityComponent, decorators: [{
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: FederatedIdentityComponent, decorators: [{
27
27
  type: Component,
28
28
  args: [{ selector: 'kc-federated-identity', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
29
29
  {
@@ -17,15 +17,15 @@ class LogComponent extends ComponentReference {
17
17
  this.classes = inject(ACCOUNT_CLASSES);
18
18
  this.active = 'log';
19
19
  }
20
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: LogComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
21
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.1", type: LogComponent, isStandalone: true, selector: "kc-log", providers: [
20
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: LogComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
21
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: LogComponent, isStandalone: true, selector: "kc-log", providers: [
22
22
  {
23
23
  provide: ComponentReference,
24
24
  useExisting: forwardRef(() => LogComponent)
25
25
  }
26
26
  ], usesInheritance: true, ngImport: i0, template: "@let log = kcContext.log;\n\n<div [kcClass]=\"'kcContentWrapperClass'\">\n <div class=\"col-md-10\">\n <h2>{{ i18n.msgStr('accountLogHtmlTitle') }}</h2>\n </div>\n\n <table class=\"table table-striped table-bordered\">\n <thead>\n <tr>\n <td>{{ i18n.msgStr('date') }}</td>\n <td>{{ i18n.msgStr('event') }}</td>\n <td>{{ i18n.msgStr('ip') }}</td>\n <td>{{ i18n.msgStr('client') }}</td>\n <td>{{ i18n.msgStr('details') }}</td>\n </tr>\n </thead>\n\n <tbody>\n @for (event of log.events; track event) {\n <tr>\n <td>{{ event.date ? (event.date | date) : '' }}</td>\n <td>{{ event.event }}</td>\n <td>{{ event.ipAddress }}</td>\n <td>{{ event.client || '' }}</td>\n <td>\n @for (detail of event.details; track detail; let last = $last) {\n <span>\n {{ detail.key }} = {{ detail.value }}\n @if (!last) {\n ,&nbsp;\n }\n </span>\n }\n </td>\n </tr>\n }\n </tbody>\n </table>\n</div>\n", dependencies: [{ kind: "directive", type: KcClassDirective, selector: "[kcClass]", inputs: ["class", "ngClass", "kcClass"] }, { kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
27
27
  }
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: LogComponent, decorators: [{
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: LogComponent, decorators: [{
29
29
  type: Component,
30
30
  args: [{ imports: [KcClassDirective, DatePipe], selector: 'kc-log', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
31
31
  {