keycloakify 11.3.19 → 11.3.21

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 (67) hide show
  1. package/bin/124.index.js +676 -0
  2. package/bin/356.index.js +700 -0
  3. package/bin/40.index.js +41 -21
  4. package/bin/{903.index.js → 450.index.js} +2 -680
  5. package/bin/453.index.js +143 -85
  6. package/bin/573.index.js +51 -24
  7. package/bin/{599.index.js → 735.index.js} +438 -121
  8. package/bin/786.index.js +129 -78
  9. package/bin/805.index.js +674 -0
  10. package/bin/854.index.js +68 -0
  11. package/bin/{780.index.js → 921.index.js} +168 -109
  12. package/bin/932.index.js +41 -21
  13. package/bin/97.index.js +125 -75
  14. package/bin/eject-file.d.ts +7 -0
  15. package/bin/keycloakify/generateResources/generateMessageProperties.d.ts +1 -1
  16. package/bin/keycloakify/generateResources/readFieldNameUsage.d.ts +1 -1
  17. package/bin/main.js +70 -7
  18. package/bin/postinstall/getUiModuleFileSourceCodeReadyToBeCopied.d.ts +12 -0
  19. package/bin/postinstall/index.d.ts +1 -0
  20. package/bin/postinstall/installUiModulesPeerDependencies.d.ts +11 -0
  21. package/bin/postinstall/managedGitignoreFile.d.ts +14 -0
  22. package/bin/postinstall/postinstall.d.ts +4 -0
  23. package/bin/postinstall/uiModuleMeta.d.ts +21 -0
  24. package/bin/shared/buildContext.d.ts +3 -0
  25. package/bin/shared/constants.d.ts +2 -1
  26. package/bin/shared/constants.js +2 -1
  27. package/bin/shared/constants.js.map +1 -1
  28. package/bin/shared/customHandler.d.ts +1 -1
  29. package/bin/shared/customHandler.js.map +1 -1
  30. package/bin/shared/exitIfUncommittedChanges.d.ts +3 -0
  31. package/bin/tools/crawlAsync.d.ts +6 -0
  32. package/bin/tools/getInstalledModuleDirPath.d.ts +5 -0
  33. package/bin/tools/listInstalledModules.d.ts +12 -0
  34. package/bin/tools/nodeModulesBinDirPath.d.ts +1 -0
  35. package/bin/tools/runPrettier.d.ts +17 -0
  36. package/package.json +34 -6
  37. package/src/bin/add-story.ts +28 -10
  38. package/src/bin/eject-file.ts +68 -0
  39. package/src/bin/eject-page.ts +51 -31
  40. package/src/bin/initialize-account-theme/initialize-account-theme.ts +4 -32
  41. package/src/bin/initialize-account-theme/initializeAccountTheme_singlePage.ts +2 -16
  42. package/src/bin/keycloakify/generateResources/generateMessageProperties.ts +1 -1
  43. package/src/bin/keycloakify/generateResources/generateResources.ts +58 -26
  44. package/src/bin/keycloakify/generateResources/readFieldNameUsage.ts +1 -1
  45. package/src/bin/main.ts +50 -0
  46. package/src/bin/postinstall/getUiModuleFileSourceCodeReadyToBeCopied.ts +73 -0
  47. package/src/bin/postinstall/index.ts +1 -0
  48. package/src/bin/postinstall/installUiModulesPeerDependencies.ts +158 -0
  49. package/src/bin/postinstall/managedGitignoreFile.ts +136 -0
  50. package/src/bin/postinstall/postinstall.ts +79 -0
  51. package/src/bin/postinstall/uiModuleMeta.ts +309 -0
  52. package/src/bin/shared/buildContext.ts +11 -5
  53. package/src/bin/shared/constants.ts +3 -1
  54. package/src/bin/shared/customHandler.ts +1 -0
  55. package/src/bin/shared/customHandler_delegate.ts +2 -27
  56. package/src/bin/shared/exitIfUncommittedChanges.ts +36 -0
  57. package/src/bin/tools/crawlAsync.ts +51 -0
  58. package/src/bin/tools/getInstalledModuleDirPath.ts +51 -0
  59. package/src/bin/tools/listInstalledModules.ts +131 -0
  60. package/src/bin/tools/nodeModulesBinDirPath.ts +38 -0
  61. package/src/bin/tools/npmInstall.ts +411 -15
  62. package/src/bin/tools/readThisNpmPackageVersion.ts +8 -0
  63. package/src/bin/tools/runPrettier.ts +106 -0
  64. package/src/bin/update-kc-gen.ts +28 -17
  65. package/vite-plugin/index.js +9237 -9163
  66. package/bin/tools/runFormat.d.ts +0 -3
  67. package/src/bin/tools/runFormat.ts +0 -76
package/bin/97.index.js CHANGED
@@ -23,7 +23,7 @@ __webpack_require__.r(__webpack_exports__);
23
23
  /* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(29041);
24
24
  /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(78818);
25
25
  /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_6__);
26
- /* harmony import */ var _tools_runFormat__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(22577);
26
+ /* harmony import */ var _tools_runPrettier__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(48433);
27
27
  /* harmony import */ var _shared_customHandler_delegate__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(72138);
28
28
 
29
29
 
@@ -53,6 +53,8 @@ async function command(params) {
53
53
  return buildContext.implementedThemeTypes.account.isImplemented;
54
54
  case "login":
55
55
  return buildContext.implementedThemeTypes.login.isImplemented;
56
+ case "admin":
57
+ return buildContext.implementedThemeTypes.admin.isImplemented;
56
58
  }
57
59
  (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_5__/* .assert */ .h)(false);
58
60
  });
@@ -72,6 +74,12 @@ async function command(params) {
72
74
  buildContext.implementedThemeTypes.account.type === "Single-Page")) {
73
75
  console.log(`${chalk__WEBPACK_IMPORTED_MODULE_6___default().red("✗")} Sorry, there is no Storybook support for Single-Page Account themes.`);
74
76
  process.exit(0);
77
+ return;
78
+ }
79
+ if (themeType === "admin") {
80
+ console.log(`${chalk__WEBPACK_IMPORTED_MODULE_6___default().red("✗")} Sorry, there is no Storybook support for the Account UI.`);
81
+ process.exit(0);
82
+ return;
75
83
  }
76
84
  console.log(`→ ${themeType}`);
77
85
  console.log(chalk__WEBPACK_IMPORTED_MODULE_6___default().cyan("Select the page you want to create a Storybook for:"));
@@ -95,20 +103,26 @@ async function command(params) {
95
103
  console.log(`${(0,path__WEBPACK_IMPORTED_MODULE_4__.relative)(process.cwd(), targetFilePath)} already exists`);
96
104
  process.exit(-1);
97
105
  }
98
- const componentCode = fs__WEBPACK_IMPORTED_MODULE_3__.readFileSync((0,path__WEBPACK_IMPORTED_MODULE_4__.join)((0,_tools_getThisCodebaseRootDirPath__WEBPACK_IMPORTED_MODULE_0__/* .getThisCodebaseRootDirPath */ .e)(), "stories", themeType, "pages", componentBasename))
106
+ let sourceCode = fs__WEBPACK_IMPORTED_MODULE_3__.readFileSync((0,path__WEBPACK_IMPORTED_MODULE_4__.join)((0,_tools_getThisCodebaseRootDirPath__WEBPACK_IMPORTED_MODULE_0__/* .getThisCodebaseRootDirPath */ .e)(), "stories", themeType, "pages", componentBasename))
99
107
  .toString("utf8")
100
108
  .replace('import React from "react";\n', "")
101
109
  .replace(/from "[./]+dist\//, 'from "keycloakify/');
110
+ run_prettier: {
111
+ if (!(await (0,_tools_runPrettier__WEBPACK_IMPORTED_MODULE_7__/* .getIsPrettierAvailable */ .MT)())) {
112
+ break run_prettier;
113
+ }
114
+ sourceCode = await (0,_tools_runPrettier__WEBPACK_IMPORTED_MODULE_7__/* .runPrettier */ .eY)({
115
+ filePath: targetFilePath,
116
+ sourceCode: sourceCode
117
+ });
118
+ }
102
119
  {
103
120
  const targetDirPath = (0,path__WEBPACK_IMPORTED_MODULE_4__.dirname)(targetFilePath);
104
121
  if (!fs__WEBPACK_IMPORTED_MODULE_3__.existsSync(targetDirPath)) {
105
122
  fs__WEBPACK_IMPORTED_MODULE_3__.mkdirSync(targetDirPath, { recursive: true });
106
123
  }
107
124
  }
108
- fs__WEBPACK_IMPORTED_MODULE_3__.writeFileSync(targetFilePath, Buffer.from(componentCode, "utf8"));
109
- (0,_tools_runFormat__WEBPACK_IMPORTED_MODULE_7__/* .runFormat */ .S)({
110
- packageJsonFilePath: buildContext.packageJsonFilePath
111
- });
125
+ fs__WEBPACK_IMPORTED_MODULE_3__.writeFileSync(targetFilePath, Buffer.from(sourceCode, "utf8"));
112
126
  console.log([
113
127
  `${chalk__WEBPACK_IMPORTED_MODULE_6___default().green("✓")} ${chalk__WEBPACK_IMPORTED_MODULE_6___default().bold((0,path__WEBPACK_IMPORTED_MODULE_4__.join)(".", (0,path__WEBPACK_IMPORTED_MODULE_4__.relative)(process.cwd(), targetFilePath)))} copy pasted from the Keycloakify source code into your project`,
114
128
  `You can start storybook with ${chalk__WEBPACK_IMPORTED_MODULE_6___default().bold("npm run storybook")}`
@@ -154,8 +168,8 @@ function readParams(params) {
154
168
  //# sourceMappingURL=customHandler.js.map
155
169
  // EXTERNAL MODULE: external "child_process"
156
170
  var external_child_process_ = __webpack_require__(32081);
157
- // EXTERNAL MODULE: external "path"
158
- var external_path_ = __webpack_require__(71017);
171
+ // EXTERNAL MODULE: ./dist/bin/tools/nodeModulesBinDirPath.js
172
+ var tools_nodeModulesBinDirPath = __webpack_require__(73776);
159
173
  // EXTERNAL MODULE: external "fs"
160
174
  var external_fs_ = __webpack_require__(57147);
161
175
  ;// CONCATENATED MODULE: ./dist/bin/shared/customHandler_delegate.js
@@ -168,25 +182,7 @@ var external_fs_ = __webpack_require__(57147);
168
182
  (0,esm_assert/* assert */.h)();
169
183
  function maybeDelegateCommandToCustomHandler(params) {
170
184
  const { commandName, buildContext } = params;
171
- const nodeModulesBinDirPath = (() => {
172
- const binPath = process.argv[1];
173
- const segments = [".bin"];
174
- let foundNodeModules = false;
175
- for (const segment of binPath.split(external_path_.sep).reverse()) {
176
- skip_segment: {
177
- if (foundNodeModules) {
178
- break skip_segment;
179
- }
180
- if (segment === "node_modules") {
181
- foundNodeModules = true;
182
- break skip_segment;
183
- }
184
- continue;
185
- }
186
- segments.unshift(segment);
187
- }
188
- return segments.join(external_path_.sep);
189
- })();
185
+ const nodeModulesBinDirPath = (0,tools_nodeModulesBinDirPath/* getNodeModulesBinDirPath */.K)();
190
186
  if (!external_fs_.readdirSync(nodeModulesBinDirPath).includes(BIN_NAME)) {
191
187
  return { hasBeenHandled: false };
192
188
  }
@@ -225,25 +221,63 @@ function kebabCaseToCamelCase(kebabCaseString) {
225
221
 
226
222
  /***/ }),
227
223
 
228
- /***/ 22577:
224
+ /***/ 73776:
225
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
226
+
227
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
228
+ /* harmony export */ "K": () => (/* binding */ getNodeModulesBinDirPath)
229
+ /* harmony export */ });
230
+ /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71017);
231
+ /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
232
+
233
+ let cache = undefined;
234
+ function getNodeModulesBinDirPath() {
235
+ if (cache !== undefined) {
236
+ return cache;
237
+ }
238
+ const binPath = process.argv[1];
239
+ const segments = [".bin"];
240
+ let foundNodeModules = false;
241
+ for (const segment of binPath.split(path__WEBPACK_IMPORTED_MODULE_0__.sep).reverse()) {
242
+ skip_segment: {
243
+ if (foundNodeModules) {
244
+ break skip_segment;
245
+ }
246
+ if (segment === "node_modules") {
247
+ foundNodeModules = true;
248
+ break skip_segment;
249
+ }
250
+ continue;
251
+ }
252
+ segments.unshift(segment);
253
+ }
254
+ const nodeModulesBinDirPath = segments.join(path__WEBPACK_IMPORTED_MODULE_0__.sep);
255
+ cache = nodeModulesBinDirPath;
256
+ return nodeModulesBinDirPath;
257
+ }
258
+ //# sourceMappingURL=nodeModulesBinDirPath.js.map
259
+
260
+ /***/ }),
261
+
262
+ /***/ 48433:
229
263
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
230
264
 
231
265
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
232
- /* harmony export */ "S": () => (/* binding */ runFormat)
266
+ /* harmony export */ "LG": () => (/* binding */ getPrettier),
267
+ /* harmony export */ "MT": () => (/* binding */ getIsPrettierAvailable),
268
+ /* harmony export */ "eY": () => (/* binding */ runPrettier)
233
269
  /* harmony export */ });
234
- /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57147);
235
- /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__);
270
+ /* harmony import */ var _nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73776);
236
271
  /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71017);
237
272
  /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
238
- /* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29041);
239
- /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(78818);
240
- /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_3__);
241
- /* harmony import */ var tsafe_id__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(38469);
242
- /* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(52300);
243
- /* harmony import */ var tsafe_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(16453);
244
- /* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(32081);
245
- /* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(child_process__WEBPACK_IMPORTED_MODULE_5__);
246
-
273
+ /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(73292);
274
+ /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_2__);
275
+ /* harmony import */ var tsafe_id__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(38469);
276
+ /* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29041);
277
+ /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(78818);
278
+ /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_4__);
279
+ /* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6113);
280
+ /* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_5__);
247
281
 
248
282
 
249
283
 
@@ -251,46 +285,62 @@ function kebabCaseToCamelCase(kebabCaseString) {
251
285
 
252
286
 
253
287
 
254
- function runFormat(params) {
255
- const { packageJsonFilePath } = params;
256
- const parsedPackageJson = (() => {
257
- const zParsedPackageJson = (() => {
258
- const zTargetType = zod__WEBPACK_IMPORTED_MODULE_6__.z.object({
259
- scripts: zod__WEBPACK_IMPORTED_MODULE_6__.z.record(zod__WEBPACK_IMPORTED_MODULE_6__.z.string()).optional()
260
- });
261
- (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_2__/* .assert */ .h)();
262
- return (0,tsafe_id__WEBPACK_IMPORTED_MODULE_7__.id)(zTargetType);
263
- })();
264
- const parsedPackageJson = JSON.parse(fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync(packageJsonFilePath).toString("utf8"));
265
- zParsedPackageJson.parse(parsedPackageJson);
266
- (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_2__/* .assert */ .h)((0,tsafe_is__WEBPACK_IMPORTED_MODULE_4__.is)(parsedPackageJson));
267
- return parsedPackageJson;
268
- })();
269
- const { scripts } = parsedPackageJson;
270
- if (scripts === undefined) {
271
- return;
288
+ getIsPrettierAvailable.cache = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_6__.id)(undefined);
289
+ async function getIsPrettierAvailable() {
290
+ var _a;
291
+ if (getIsPrettierAvailable.cache !== undefined) {
292
+ return getIsPrettierAvailable.cache;
272
293
  }
273
- const scriptKeys = Object.keys(scripts);
274
- const scriptNames = scriptKeys.filter(scriptKey => scriptKey.trim().match(/^(lint|format)/));
275
- for (const scriptName of scriptNames) {
276
- if (!(scriptName in scripts)) {
277
- continue;
278
- }
279
- const command = `npm run ${scriptName}`;
280
- console.log(chalk__WEBPACK_IMPORTED_MODULE_3___default().grey(`$ ${command}`));
281
- try {
282
- child_process__WEBPACK_IMPORTED_MODULE_5__.execSync(`npm run ${scriptName}`, {
283
- stdio: "inherit",
284
- cwd: (0,path__WEBPACK_IMPORTED_MODULE_1__.dirname)(packageJsonFilePath)
285
- });
294
+ const nodeModulesBinDirPath = (0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_0__/* .getNodeModulesBinDirPath */ .K)();
295
+ const prettierBinPath = (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(nodeModulesBinDirPath, "prettier");
296
+ const stats = await fs_promises__WEBPACK_IMPORTED_MODULE_2__.stat(prettierBinPath).catch(() => undefined);
297
+ const isPrettierAvailable = (_a = stats === null || stats === void 0 ? void 0 : stats.isFile()) !== null && _a !== void 0 ? _a : false;
298
+ getIsPrettierAvailable.cache = isPrettierAvailable;
299
+ return isPrettierAvailable;
300
+ }
301
+ getPrettier.cache = (0,tsafe_id__WEBPACK_IMPORTED_MODULE_6__.id)(undefined);
302
+ async function getPrettier() {
303
+ (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_3__/* .assert */ .h)(getIsPrettierAvailable());
304
+ if (getPrettier.cache !== undefined) {
305
+ return getPrettier.cache;
306
+ }
307
+ const prettier = await Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 79421, 23));
308
+ const configHash = await (async () => {
309
+ const configFilePath = await prettier.resolveConfigFile((0,path__WEBPACK_IMPORTED_MODULE_1__.join)((0,_nodeModulesBinDirPath__WEBPACK_IMPORTED_MODULE_0__/* .getNodeModulesBinDirPath */ .K)(), ".."));
310
+ if (configFilePath === null) {
311
+ return "";
286
312
  }
287
- catch (_a) {
288
- console.log(chalk__WEBPACK_IMPORTED_MODULE_3___default().yellow(`\`${command}\` failed, it does not matter, please format your code manually, continuing...`));
313
+ const data = await fs_promises__WEBPACK_IMPORTED_MODULE_2__.readFile(configFilePath);
314
+ return crypto__WEBPACK_IMPORTED_MODULE_5__.createHash("sha256").update(data).digest("hex");
315
+ })();
316
+ const prettierAndConfig = {
317
+ prettier,
318
+ configHash
319
+ };
320
+ getPrettier.cache = prettierAndConfig;
321
+ return prettierAndConfig;
322
+ }
323
+ async function runPrettier(params) {
324
+ const { sourceCode, filePath } = params;
325
+ let formattedSourceCode;
326
+ try {
327
+ const { prettier } = await getPrettier();
328
+ const { ignored, inferredParser } = await prettier.getFileInfo(filePath, {
329
+ resolveConfig: true
330
+ });
331
+ if (ignored) {
332
+ return sourceCode;
289
333
  }
290
- return;
334
+ const config = await prettier.resolveConfig(filePath);
335
+ formattedSourceCode = await prettier.format(sourceCode, Object.assign(Object.assign({}, config), { filePath, parser: inferredParser !== null && inferredParser !== void 0 ? inferredParser : undefined }));
336
+ }
337
+ catch (error) {
338
+ console.log(chalk__WEBPACK_IMPORTED_MODULE_4___default().red(`You probably need to upgrade the version of prettier in your project`));
339
+ throw error;
291
340
  }
341
+ return formattedSourceCode;
292
342
  }
293
- //# sourceMappingURL=runFormat.js.map
343
+ //# sourceMappingURL=runPrettier.js.map
294
344
 
295
345
  /***/ }),
296
346
 
@@ -0,0 +1,7 @@
1
+ import type { BuildContext } from "./shared/buildContext";
2
+ export declare function command(params: {
3
+ buildContext: BuildContext;
4
+ cliCommandOptions: {
5
+ file: string;
6
+ };
7
+ }): Promise<void>;
@@ -5,7 +5,7 @@ export type BuildContextLike = {
5
5
  };
6
6
  export declare function generateMessageProperties(params: {
7
7
  buildContext: BuildContextLike;
8
- themeType: ThemeType;
8
+ themeType: Exclude<ThemeType, "admin">;
9
9
  }): {
10
10
  languageTags: string[];
11
11
  writeMessagePropertiesFiles: (params: {
@@ -2,5 +2,5 @@ import type { ThemeType } from "../../shared/constants";
2
2
  /** Assumes the theme type exists */
3
3
  export declare function readFieldNameUsage(params: {
4
4
  themeSrcDirPath: string;
5
- themeType: ThemeType;
5
+ themeType: Exclude<ThemeType, "admin">;
6
6
  }): string[];
package/bin/main.js CHANGED
@@ -9,6 +9,7 @@
9
9
  /* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
10
10
  /* harmony export */ "Jh": () => (/* binding */ THEME_TYPES),
11
11
  /* harmony export */ "Ju": () => (/* binding */ WELL_KNOWN_DIRECTORY_BASE_NAME),
12
+ /* harmony export */ "PC": () => (/* binding */ KEYCLOAK_THEME),
12
13
  /* harmony export */ "TE": () => (/* binding */ VITE_PLUGIN_SUB_SCRIPTS_ENV_NAMES),
13
14
  /* harmony export */ "XV": () => (/* binding */ LOGIN_THEME_PAGE_IDS),
14
15
  /* harmony export */ "_L": () => (/* binding */ FALLBACK_LANGUAGE_TAG),
@@ -22,7 +23,7 @@ const WELL_KNOWN_DIRECTORY_BASE_NAME = {
22
23
  RESOURCES_COMMON: "resources-common",
23
24
  DIST: "dist"
24
25
  };
25
- const THEME_TYPES = ["login", "account"];
26
+ const THEME_TYPES = ["login", "account", "admin"];
26
27
  const VITE_PLUGIN_SUB_SCRIPTS_ENV_NAMES = {
27
28
  RUN_POST_BUILD_SCRIPT: "KEYCLOAKIFY_RUN_POST_BUILD_SCRIPT",
28
29
  RESOLVE_VITE_CONFIG: "KEYCLOAKIFY_RESOLVE_VITE_CONFIG"
@@ -81,6 +82,7 @@ const CUSTOM_HANDLER_ENV_NAMES = {
81
82
  COMMAND_NAME: "KEYCLOAKIFY_COMMAND_NAME",
82
83
  BUILD_CONTEXT: "KEYCLOAKIFY_BUILD_CONTEXT"
83
84
  };
85
+ const KEYCLOAK_THEME = "keycloak-theme";
84
86
  //# sourceMappingURL=constants.js.map
85
87
 
86
88
  /***/ }),
@@ -202,10 +204,15 @@ function getThisCodebaseRootDirPath() {
202
204
 
203
205
 
204
206
 
207
+ let cache = undefined;
205
208
  function readThisNpmPackageVersion() {
209
+ if (cache !== undefined) {
210
+ return cache;
211
+ }
206
212
  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"))
207
213
  .toString("utf8"))["version"];
208
214
  (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_1__/* .assert */ .h)(typeof version === "string");
215
+ cache = version;
209
216
  return version;
210
217
  }
211
218
  //# sourceMappingURL=readThisNpmPackageVersion.js.map
@@ -8451,6 +8458,14 @@ module.exports = require("path");
8451
8458
 
8452
8459
  /***/ }),
8453
8460
 
8461
+ /***/ 79421:
8462
+ /***/ ((module) => {
8463
+
8464
+ "use strict";
8465
+ module.exports = require("prettier");
8466
+
8467
+ /***/ }),
8468
+
8454
8469
  /***/ 14521:
8455
8470
  /***/ ((module) => {
8456
8471
 
@@ -15543,7 +15558,10 @@ function getBuildContext(params) {
15543
15558
  returnedPathsType: "relative to dirPath"
15544
15559
  })
15545
15560
  .map(fileRelativePath => {
15546
- for (const themeSrcDirBasename of ["keycloak-theme", "keycloak_theme"]) {
15561
+ for (const themeSrcDirBasename of [
15562
+ constants/* KEYCLOAK_THEME */.PC,
15563
+ constants/* KEYCLOAK_THEME.replace */.PC.replace(/-/g, "_")
15564
+ ]) {
15547
15565
  const split = fileRelativePath.split(themeSrcDirBasename);
15548
15566
  if (split.length === 2) {
15549
15567
  return (0,external_path_.join)(srcDirPath, split[0] + themeSrcDirBasename);
@@ -15564,7 +15582,7 @@ function getBuildContext(params) {
15564
15582
  console.log(source_default().red([
15565
15583
  `Can't locate your Keycloak theme source directory in .${external_path_.sep}${(0,external_path_.relative)(process.cwd(), srcDirPath)}`,
15566
15584
  `Make sure to either use the Keycloakify CLI in the root of your Keycloakify project or use the --project CLI option`,
15567
- `If you are collocating your Keycloak theme with your app you must have a directory named 'keycloak-theme' or 'keycloak_theme' in your 'src' directory`
15585
+ `If you are collocating your Keycloak theme with your app you must have a directory named '${constants/* KEYCLOAK_THEME */.PC}' or '${constants/* KEYCLOAK_THEME.replace */.PC.replace(/-/g, "_")}' in your 'src' directory`
15568
15586
  ].join("\n")));
15569
15587
  process.exit(1);
15570
15588
  })();
@@ -15734,7 +15752,10 @@ function getBuildContext(params) {
15734
15752
  isImplemented: true,
15735
15753
  type: buildOptions.accountThemeImplementation
15736
15754
  };
15737
- })()
15755
+ })(),
15756
+ admin: {
15757
+ isImplemented: external_fs_.existsSync((0,external_path_.join)(themeSrcDirPath, "admin"))
15758
+ }
15738
15759
  };
15739
15760
  if (implementedThemeTypes.account.isImplemented &&
15740
15761
  !external_fs_.existsSync((0,external_path_.join)(themeSrcDirPath, "account"))) {
@@ -16219,7 +16240,7 @@ program
16219
16240
  .task({
16220
16241
  skip,
16221
16242
  handler: async ({ projectDirPath, keycloakVersion, port, realmJsonFilePath }) => {
16222
- const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(903), __nccwpck_require__.e(33), __nccwpck_require__.e(36), __nccwpck_require__.e(20), __nccwpck_require__.e(526)]).then(__nccwpck_require__.bind(__nccwpck_require__, 80526));
16243
+ const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(805), __nccwpck_require__.e(450), __nccwpck_require__.e(33), __nccwpck_require__.e(36), __nccwpck_require__.e(20), __nccwpck_require__.e(526)]).then(__nccwpck_require__.bind(__nccwpck_require__, 80526));
16223
16244
  await command({
16224
16245
  buildContext: getBuildContext({ projectDirPath }),
16225
16246
  cliCommandOptions: { keycloakVersion, port, realmJsonFilePath }
@@ -16258,7 +16279,7 @@ program
16258
16279
  .task({
16259
16280
  skip,
16260
16281
  handler: async ({ projectDirPath }) => {
16261
- const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(903), __nccwpck_require__.e(33), __nccwpck_require__.e(20), __nccwpck_require__.e(932)]).then(__nccwpck_require__.bind(__nccwpck_require__, 16932));
16282
+ const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(805), __nccwpck_require__.e(450), __nccwpck_require__.e(33), __nccwpck_require__.e(20), __nccwpck_require__.e(932)]).then(__nccwpck_require__.bind(__nccwpck_require__, 16932));
16262
16283
  await command({ buildContext: getBuildContext({ projectDirPath }) });
16263
16284
  }
16264
16285
  });
@@ -16270,7 +16291,7 @@ program
16270
16291
  .task({
16271
16292
  skip,
16272
16293
  handler: async ({ projectDirPath }) => {
16273
- const { command } = await __nccwpck_require__.e(/* import() */ 780).then(__nccwpck_require__.bind(__nccwpck_require__, 75780));
16294
+ const { command } = await __nccwpck_require__.e(/* import() */ 921).then(__nccwpck_require__.bind(__nccwpck_require__, 21921));
16274
16295
  await command({ buildContext: getBuildContext({ projectDirPath }) });
16275
16296
  }
16276
16297
  });
@@ -16298,6 +16319,48 @@ program
16298
16319
  await command({ buildContext: getBuildContext({ projectDirPath }) });
16299
16320
  }
16300
16321
  });
16322
+ program
16323
+ .command({
16324
+ name: "postinstall",
16325
+ description: "Initialize all the Keycloakify UI modules installed in the project."
16326
+ })
16327
+ .task({
16328
+ skip,
16329
+ handler: async ({ projectDirPath }) => {
16330
+ const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(805), __nccwpck_require__.e(356), __nccwpck_require__.e(124)]).then(__nccwpck_require__.bind(__nccwpck_require__, 67124));
16331
+ await command({ buildContext: getBuildContext({ projectDirPath }) });
16332
+ }
16333
+ });
16334
+ program
16335
+ .command({
16336
+ name: "eject-file",
16337
+ description: [
16338
+ "WARNING: Not usable yet, will be used for future features",
16339
+ "Take ownership over a given file"
16340
+ ].join(" ")
16341
+ })
16342
+ .option({
16343
+ key: "file",
16344
+ name: (() => {
16345
+ const name = "file";
16346
+ optionsKeys.push(name);
16347
+ return name;
16348
+ })(),
16349
+ description: [
16350
+ "Relative path of the file relative to the directory of your keycloak theme source",
16351
+ "Example `--file src/login/page/Login.tsx`"
16352
+ ].join(" ")
16353
+ })
16354
+ .task({
16355
+ skip,
16356
+ handler: async ({ projectDirPath, file }) => {
16357
+ const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(356), __nccwpck_require__.e(854)]).then(__nccwpck_require__.bind(__nccwpck_require__, 85854));
16358
+ await command({
16359
+ buildContext: getBuildContext({ projectDirPath }),
16360
+ cliCommandOptions: { file }
16361
+ });
16362
+ }
16363
+ });
16301
16364
  // Fallback to build command if no command is provided
16302
16365
  {
16303
16366
  const [, , ...rest] = process.argv;
@@ -0,0 +1,12 @@
1
+ /// <reference types="node" />
2
+ export type BuildContextLike = {
3
+ themeSrcDirPath: string;
4
+ };
5
+ export declare function getUiModuleFileSourceCodeReadyToBeCopied(params: {
6
+ buildContext: BuildContextLike;
7
+ fileRelativePath: string;
8
+ isForEjection: boolean;
9
+ uiModuleDirPath: string;
10
+ uiModuleName: string;
11
+ uiModuleVersion: string;
12
+ }): Promise<Buffer>;
@@ -0,0 +1 @@
1
+ export * from "./postinstall";
@@ -0,0 +1,11 @@
1
+ export type BuildContextLike = {
2
+ packageJsonFilePath: string;
3
+ };
4
+ export type UiModuleMetaLike = {
5
+ moduleName: string;
6
+ peerDependencies: Record<string, string>;
7
+ };
8
+ export declare function installUiModulesPeerDependencies(params: {
9
+ buildContext: BuildContextLike;
10
+ uiModuleMetas: UiModuleMetaLike[];
11
+ }): Promise<void | never>;
@@ -0,0 +1,14 @@
1
+ import type { UiModuleMeta } from "./uiModuleMeta";
2
+ export type BuildContextLike = {
3
+ themeSrcDirPath: string;
4
+ };
5
+ export declare function writeManagedGitignoreFile(params: {
6
+ buildContext: BuildContextLike;
7
+ uiModuleMetas: UiModuleMeta[];
8
+ ejectedFilesRelativePaths: string[];
9
+ }): Promise<void>;
10
+ export declare function readManagedGitignoreFile(params: {
11
+ buildContext: BuildContextLike;
12
+ }): Promise<{
13
+ ejectedFilesRelativePaths: string[];
14
+ }>;
@@ -0,0 +1,4 @@
1
+ import type { BuildContext } from "../shared/buildContext";
2
+ export declare function command(params: {
3
+ buildContext: BuildContext;
4
+ }): Promise<void>;
@@ -0,0 +1,21 @@
1
+ /// <reference types="node" />
2
+ import { type BuildContextLike as BuildContextLike_getUiModuleFileSourceCodeReadyToBeCopied } from "./getUiModuleFileSourceCodeReadyToBeCopied";
3
+ export type UiModuleMeta = {
4
+ moduleName: string;
5
+ version: string;
6
+ files: {
7
+ fileRelativePath: string;
8
+ hash: string;
9
+ copyableFilePath: string;
10
+ }[];
11
+ peerDependencies: Record<string, string>;
12
+ };
13
+ export type BuildContextLike = BuildContextLike_getUiModuleFileSourceCodeReadyToBeCopied & {
14
+ cacheDirPath: string;
15
+ packageJsonFilePath: string;
16
+ projectDirPath: string;
17
+ };
18
+ export declare function getUiModuleMetas(params: {
19
+ buildContext: BuildContextLike;
20
+ }): Promise<UiModuleMeta[]>;
21
+ export declare function computeHash(data: Buffer): string;
@@ -36,6 +36,9 @@ export type BuildContext = {
36
36
  isImplemented: true;
37
37
  type: "Single-Page" | "Multi-Page";
38
38
  };
39
+ admin: {
40
+ isImplemented: boolean;
41
+ };
39
42
  };
40
43
  packageJsonFilePath: string;
41
44
  bundler: "vite" | "webpack";
@@ -3,7 +3,7 @@ export declare const WELL_KNOWN_DIRECTORY_BASE_NAME: {
3
3
  readonly RESOURCES_COMMON: "resources-common";
4
4
  readonly DIST: "dist";
5
5
  };
6
- export declare const THEME_TYPES: readonly ["login", "account"];
6
+ export declare const THEME_TYPES: readonly ["login", "account", "admin"];
7
7
  export type ThemeType = (typeof THEME_TYPES)[number];
8
8
  export declare const VITE_PLUGIN_SUB_SCRIPTS_ENV_NAMES: {
9
9
  readonly RUN_POST_BUILD_SCRIPT: "KEYCLOAKIFY_RUN_POST_BUILD_SCRIPT";
@@ -20,3 +20,4 @@ export declare const CUSTOM_HANDLER_ENV_NAMES: {
20
20
  COMMAND_NAME: string;
21
21
  BUILD_CONTEXT: string;
22
22
  };
23
+ export declare const KEYCLOAK_THEME = "keycloak-theme";
@@ -3,7 +3,7 @@ export const WELL_KNOWN_DIRECTORY_BASE_NAME = {
3
3
  RESOURCES_COMMON: "resources-common",
4
4
  DIST: "dist"
5
5
  };
6
- export const THEME_TYPES = ["login", "account"];
6
+ export const THEME_TYPES = ["login", "account", "admin"];
7
7
  export const VITE_PLUGIN_SUB_SCRIPTS_ENV_NAMES = {
8
8
  RUN_POST_BUILD_SCRIPT: "KEYCLOAKIFY_RUN_POST_BUILD_SCRIPT",
9
9
  RESOLVE_VITE_CONFIG: "KEYCLOAKIFY_RESOLVE_VITE_CONFIG"
@@ -62,4 +62,5 @@ export const CUSTOM_HANDLER_ENV_NAMES = {
62
62
  COMMAND_NAME: "KEYCLOAKIFY_COMMAND_NAME",
63
63
  BUILD_CONTEXT: "KEYCLOAKIFY_BUILD_CONTEXT"
64
64
  };
65
+ export const KEYCLOAK_THEME = "keycloak-theme";
65
66
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/bin/shared/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC1C,yBAAyB,EAAE,2BAA2B;IACtD,gBAAgB,EAAE,kBAAkB;IACpC,IAAI,EAAE,MAAM;CACN,CAAC;AAEX,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,SAAS,CAAU,CAAC;AAIzD,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC7C,qBAAqB,EAAE,mCAAmC;IAC1D,mBAAmB,EAAE,iCAAiC;CAChD,CAAC;AAEX,MAAM,CAAC,MAAM,yCAAyC,GAClD,8CAA8C,CAAC;AAEnD,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAChC,WAAW;IACX,oBAAoB;IACpB,oBAAoB;IACpB,2BAA2B;IAC3B,uBAAuB;IACvB,cAAc;IACd,UAAU;IACV,WAAW;IACX,0BAA0B;IAC1B,wBAAwB;IACxB,WAAW;IACX,0CAA0C;IAC1C,uBAAuB;IACvB,eAAe;IACf,0BAA0B;IAC1B,2BAA2B;IAC3B,4BAA4B;IAC5B,0BAA0B;IAC1B,wBAAwB;IACxB,uBAAuB;IACvB,oBAAoB;IACpB,6BAA6B;IAC7B,kBAAkB;IAClB,0BAA0B;IAC1B,oBAAoB;IACpB,uBAAuB;IACvB,UAAU;IACV,4BAA4B;IAC5B,yBAAyB;IACzB,sCAAsC;IACtC,qCAAqC;IACrC,qBAAqB;IACrB,qBAAqB;IACrB,oBAAoB;IACpB,6CAA6C;IAC7C,qCAAqC;CAC/B,CAAC;AAEX,MAAM,CAAC,MAAM,sBAAsB,GAAG;IAClC,cAAc;IACd,aAAa;IACb,cAAc;IACd,UAAU;IACV,kBAAkB;IAClB,SAAS;IACT,uBAAuB;CACjB,CAAC;AAKX,MAAM,CAAC,MAAM,cAAc,GAAG,sBAAsB,CAAC;AAErD,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAE1C,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACpC,YAAY,EAAE,0BAA0B;IACxC,aAAa,EAAE,2BAA2B;CAC7C,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/bin/shared/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC1C,yBAAyB,EAAE,2BAA2B;IACtD,gBAAgB,EAAE,kBAAkB;IACpC,IAAI,EAAE,MAAM;CACN,CAAC;AAEX,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAU,CAAC;AAIlE,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC7C,qBAAqB,EAAE,mCAAmC;IAC1D,mBAAmB,EAAE,iCAAiC;CAChD,CAAC;AAEX,MAAM,CAAC,MAAM,yCAAyC,GAClD,8CAA8C,CAAC;AAEnD,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAChC,WAAW;IACX,oBAAoB;IACpB,oBAAoB;IACpB,2BAA2B;IAC3B,uBAAuB;IACvB,cAAc;IACd,UAAU;IACV,WAAW;IACX,0BAA0B;IAC1B,wBAAwB;IACxB,WAAW;IACX,0CAA0C;IAC1C,uBAAuB;IACvB,eAAe;IACf,0BAA0B;IAC1B,2BAA2B;IAC3B,4BAA4B;IAC5B,0BAA0B;IAC1B,wBAAwB;IACxB,uBAAuB;IACvB,oBAAoB;IACpB,6BAA6B;IAC7B,kBAAkB;IAClB,0BAA0B;IAC1B,oBAAoB;IACpB,uBAAuB;IACvB,UAAU;IACV,4BAA4B;IAC5B,yBAAyB;IACzB,sCAAsC;IACtC,qCAAqC;IACrC,qBAAqB;IACrB,qBAAqB;IACrB,oBAAoB;IACpB,6CAA6C;IAC7C,qCAAqC;CAC/B,CAAC;AAEX,MAAM,CAAC,MAAM,sBAAsB,GAAG;IAClC,cAAc;IACd,aAAa;IACb,cAAc;IACd,UAAU;IACV,kBAAkB;IAClB,SAAS;IACT,uBAAuB;CACjB,CAAC;AAKX,MAAM,CAAC,MAAM,cAAc,GAAG,sBAAsB,CAAC;AAErD,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAE1C,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACpC,YAAY,EAAE,0BAA0B;IACxC,aAAa,EAAE,2BAA2B;CAC7C,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { BuildContext } from "./buildContext";
2
2
  export declare const BIN_NAME = "_keycloakify-custom-handler";
3
3
  export declare const NOT_IMPLEMENTED_EXIT_CODE = 78;
4
- export type CommandName = "update-kc-gen" | "eject-page" | "add-story" | "initialize-account-theme" | "initialize-email-theme" | "copy-keycloak-resources-to-public";
4
+ export type CommandName = "update-kc-gen" | "eject-page" | "add-story" | "initialize-account-theme" | "initialize-admin-theme" | "initialize-email-theme" | "copy-keycloak-resources-to-public";
5
5
  export type ApiVersion = "v1";
6
6
  export declare function readParams(params: {
7
7
  apiVersion: ApiVersion;
@@ -1 +1 @@
1
- {"version":3,"file":"customHandler.js","sourceRoot":"","sources":["../../src/bin/shared/customHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,CAAC,MAAM,QAAQ,GAAG,6BAA6B,CAAC;AAEtD,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAY5C,MAAM,UAAU,UAAU,CAAC,MAAkC;IACzD,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;IAE9B,MAAM,CAAC,UAAU,KAAK,IAAI,CAAC,CAAC;IAE5B,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE;QACtB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,YAAY,CAAC,CAAC;QAEpE,MAAM,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC;QAE/B,OAAO,QAAuB,CAAC;IACnC,CAAC,CAAC,EAAE,CAAC;IAEL,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,aAAa,CAAC,CAAC;QAErE,MAAM,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC;QAE/B,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAiB,CAAC;IAChD,CAAC,CAAC,EAAE,CAAC;IAEL,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;AACzC,CAAC"}
1
+ {"version":3,"file":"customHandler.js","sourceRoot":"","sources":["../../src/bin/shared/customHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,CAAC,MAAM,QAAQ,GAAG,6BAA6B,CAAC;AAEtD,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAa5C,MAAM,UAAU,UAAU,CAAC,MAAkC;IACzD,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;IAE9B,MAAM,CAAC,UAAU,KAAK,IAAI,CAAC,CAAC;IAE5B,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE;QACtB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,YAAY,CAAC,CAAC;QAEpE,MAAM,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC;QAE/B,OAAO,QAAuB,CAAC;IACnC,CAAC,CAAC,EAAE,CAAC;IAEL,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,aAAa,CAAC,CAAC;QAErE,MAAM,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC;QAE/B,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAiB,CAAC;IAChD,CAAC,CAAC,EAAE,CAAC;IAEL,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;AACzC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function exitIfUncommittedChanges(params: {
2
+ projectDirPath: string;
3
+ }): void;
@@ -0,0 +1,6 @@
1
+ /** List all files in a given directory return paths relative to the dir_path */
2
+ export declare function crawlAsync(params: {
3
+ dirPath: string;
4
+ returnedPathsType: "absolute" | "relative to dirPath";
5
+ onFileFound: (filePath: string) => Promise<void>;
6
+ }): Promise<void>;
@@ -0,0 +1,5 @@
1
+ export declare function getInstalledModuleDirPath(params: {
2
+ moduleName: string;
3
+ packageJsonDirPath: string;
4
+ projectDirPath: string;
5
+ }): Promise<string>;
@@ -0,0 +1,12 @@
1
+ export declare function listInstalledModules(params: {
2
+ packageJsonFilePath: string;
3
+ projectDirPath: string;
4
+ filter: (params: {
5
+ moduleName: string;
6
+ }) => boolean;
7
+ }): Promise<{
8
+ moduleName: string;
9
+ version: string;
10
+ dirPath: string;
11
+ peerDependencies: Record<string, string>;
12
+ }[]>;
@@ -0,0 +1 @@
1
+ export declare function getNodeModulesBinDirPath(): string;