keycloakify 11.3.0-rc.4 → 11.3.0-rc.6

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.
@@ -0,0 +1,204 @@
1
+ "use strict";
2
+ exports.id = 61;
3
+ exports.ids = [61];
4
+ exports.modules = {
5
+
6
+ /***/ 43765:
7
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8
+
9
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10
+ /* harmony export */ "o": () => (/* binding */ existsAsync)
11
+ /* harmony export */ });
12
+ /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73292);
13
+ /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_0__);
14
+
15
+ async function existsAsync(path) {
16
+ try {
17
+ await fs_promises__WEBPACK_IMPORTED_MODULE_0__.stat(path);
18
+ return true;
19
+ }
20
+ catch (error) {
21
+ if (error.code === "ENOENT")
22
+ return false;
23
+ throw error;
24
+ }
25
+ }
26
+ //# sourceMappingURL=fs.existsAsync.js.map
27
+
28
+ /***/ }),
29
+
30
+ /***/ 13061:
31
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32
+
33
+ // ESM COMPAT FLAG
34
+ __webpack_require__.r(__webpack_exports__);
35
+
36
+ // EXPORTS
37
+ __webpack_require__.d(__webpack_exports__, {
38
+ "command": () => (/* binding */ command)
39
+ });
40
+
41
+ // EXTERNAL MODULE: external "fs/promises"
42
+ var promises_ = __webpack_require__(73292);
43
+ // EXTERNAL MODULE: external "path"
44
+ var external_path_ = __webpack_require__(71017);
45
+ // EXTERNAL MODULE: ./dist/bin/tools/fs.existsAsync.js
46
+ var fs_existsAsync = __webpack_require__(43765);
47
+ // EXTERNAL MODULE: ./node_modules/tsafe/esm/assert.mjs + 1 modules
48
+ var esm_assert = __webpack_require__(29041);
49
+ // EXTERNAL MODULE: ./dist/bin/shared/constants.js
50
+ var constants = __webpack_require__(173);
51
+ ;// CONCATENATED MODULE: ./dist/bin/shared/customHandler.js
52
+
53
+
54
+ const BIN_NAME = "_keycloakify-custom-handler";
55
+ const NOT_IMPLEMENTED_EXIT_CODE = 78;
56
+ function readParams(params) {
57
+ const { apiVersion } = params;
58
+ assert(apiVersion === "v1");
59
+ const commandName = (() => {
60
+ const envValue = process.env[CUSTOM_HANDLER_ENV_NAMES.COMMAND_NAME];
61
+ assert(envValue !== undefined);
62
+ return envValue;
63
+ })();
64
+ const buildContext = (() => {
65
+ const envValue = process.env[CUSTOM_HANDLER_ENV_NAMES.BUILD_CONTEXT];
66
+ assert(envValue !== undefined);
67
+ return JSON.parse(envValue);
68
+ })();
69
+ return { commandName, buildContext };
70
+ }
71
+ //# sourceMappingURL=customHandler.js.map
72
+ // EXTERNAL MODULE: external "child_process"
73
+ var external_child_process_ = __webpack_require__(32081);
74
+ // EXTERNAL MODULE: external "fs"
75
+ var external_fs_ = __webpack_require__(57147);
76
+ ;// CONCATENATED MODULE: ./dist/bin/shared/customHandler_delegate.js
77
+
78
+
79
+
80
+
81
+
82
+
83
+ (0,esm_assert/* assert */.h)();
84
+ function maybeDelegateCommandToCustomHandler(params) {
85
+ const { commandName, buildContext } = params;
86
+ if (!external_fs_.readdirSync((0,external_path_.dirname)(process.argv[1])).includes(BIN_NAME)) {
87
+ return;
88
+ }
89
+ try {
90
+ external_child_process_.execSync(`npx ${BIN_NAME}`, {
91
+ stdio: "inherit",
92
+ env: Object.assign(Object.assign({}, process.env), { [constants/* CUSTOM_HANDLER_ENV_NAMES.COMMAND_NAME */._S.COMMAND_NAME]: commandName, [constants/* CUSTOM_HANDLER_ENV_NAMES.BUILD_CONTEXT */._S.BUILD_CONTEXT]: JSON.stringify(buildContext) })
93
+ });
94
+ }
95
+ catch (error) {
96
+ const status = error.status;
97
+ if (status === NOT_IMPLEMENTED_EXIT_CODE) {
98
+ return;
99
+ }
100
+ process.exit(status);
101
+ }
102
+ process.exit(0);
103
+ }
104
+ //# sourceMappingURL=customHandler_delegate.js.map
105
+ ;// CONCATENATED MODULE: ./dist/bin/update-kc-gen.js
106
+
107
+
108
+
109
+
110
+ async function command(params) {
111
+ const { buildContext } = params;
112
+ maybeDelegateCommandToCustomHandler({
113
+ commandName: "update-kc-gen",
114
+ buildContext
115
+ });
116
+ const filePath = (0,external_path_.join)(buildContext.themeSrcDirPath, `kc.gen.tsx`);
117
+ const currentContent = (await (0,fs_existsAsync/* existsAsync */.o)(filePath))
118
+ ? await promises_.readFile(filePath)
119
+ : undefined;
120
+ const hasLoginTheme = buildContext.implementedThemeTypes.login.isImplemented;
121
+ const hasAccountTheme = buildContext.implementedThemeTypes.account.isImplemented;
122
+ const newContent = Buffer.from([
123
+ `/* prettier-ignore-start */`,
124
+ ``,
125
+ `/* eslint-disable */`,
126
+ ``,
127
+ `// @ts-nocheck`,
128
+ ``,
129
+ `// noinspection JSUnusedGlobalSymbols`,
130
+ ``,
131
+ `// This file is auto-generated by Keycloakify`,
132
+ ``,
133
+ `import { lazy, Suspense, type ReactNode } from "react";`,
134
+ ``,
135
+ `export type ThemeName = ${buildContext.themeNames.map(themeName => `"${themeName}"`).join(" | ")};`,
136
+ ``,
137
+ `export const themeNames: ThemeName[] = [${buildContext.themeNames.map(themeName => `"${themeName}"`).join(", ")}];`,
138
+ ``,
139
+ `export type KcEnvName = ${buildContext.environmentVariables.length === 0 ? "never" : buildContext.environmentVariables.map(({ name }) => `"${name}"`).join(" | ")};`,
140
+ ``,
141
+ `export const kcEnvNames: KcEnvName[] = [${buildContext.environmentVariables.map(({ name }) => `"${name}"`).join(", ")}];`,
142
+ ``,
143
+ `export const kcEnvDefaults: Record<KcEnvName, string> = ${JSON.stringify(Object.fromEntries(buildContext.environmentVariables.map(({ name, default: defaultValue }) => [name, defaultValue])), null, 2)};`,
144
+ ``,
145
+ `export type KcContext =`,
146
+ hasLoginTheme && ` | import("./login/KcContext").KcContext`,
147
+ hasAccountTheme && ` | import("./account/KcContext").KcContext`,
148
+ ` ;`,
149
+ ``,
150
+ `declare global {`,
151
+ ` interface Window {`,
152
+ ` kcContext?: KcContext;`,
153
+ ` }`,
154
+ `}`,
155
+ ``,
156
+ hasLoginTheme &&
157
+ `export const KcLoginPage = lazy(() => import("./login/KcPage"));`,
158
+ hasAccountTheme &&
159
+ `export const KcAccountPage = lazy(() => import("./account/KcPage"));`,
160
+ ``,
161
+ `export function KcPage(`,
162
+ ` props: {`,
163
+ ` kcContext: KcContext;`,
164
+ ` fallback?: ReactNode;`,
165
+ ` }`,
166
+ `) {`,
167
+ ` const { kcContext, fallback } = props;`,
168
+ ` return (`,
169
+ ` <Suspense fallback={fallback}>`,
170
+ ` {(() => {`,
171
+ ` switch (kcContext.themeType) {`,
172
+ hasLoginTheme &&
173
+ ` case "login": return <KcLoginPage kcContext={kcContext} />;`,
174
+ hasAccountTheme &&
175
+ ` case "account": return <KcAccountPage kcContext={kcContext} />;`,
176
+ ` }`,
177
+ ` })()}`,
178
+ ` </Suspense>`,
179
+ ` );`,
180
+ `}`,
181
+ ``,
182
+ `/* prettier-ignore-end */`,
183
+ ``
184
+ ]
185
+ .filter(item => typeof item === "string")
186
+ .join("\n"), "utf8");
187
+ if (currentContent !== undefined && currentContent.equals(newContent)) {
188
+ return;
189
+ }
190
+ await promises_.writeFile(filePath, newContent);
191
+ delete_legacy_file: {
192
+ const legacyFilePath = filePath.replace(/tsx$/, "ts");
193
+ if (!(await (0,fs_existsAsync/* existsAsync */.o)(legacyFilePath))) {
194
+ break delete_legacy_file;
195
+ }
196
+ await promises_.unlink(legacyFilePath);
197
+ }
198
+ }
199
+ //# sourceMappingURL=update-kc-gen.js.map
200
+
201
+ /***/ })
202
+
203
+ };
204
+ ;
package/bin/780.index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  exports.id = 780;
3
- exports.ids = [780];
3
+ exports.ids = [780,61];
4
4
  exports.modules = {
5
5
 
6
6
  /***/ 75780:
@@ -83,8 +83,8 @@ function updateAccountThemeImplementationInConfig(params) {
83
83
  }
84
84
  }
85
85
  //# sourceMappingURL=updateAccountThemeImplementationInConfig.js.map
86
- // EXTERNAL MODULE: ./dist/bin/shared/generateKcGenTs.js
87
- var generateKcGenTs = __webpack_require__(58585);
86
+ // EXTERNAL MODULE: ./dist/bin/update-kc-gen.js + 2 modules
87
+ var update_kc_gen = __webpack_require__(13061);
88
88
  ;// CONCATENATED MODULE: ./dist/bin/initialize-account-theme/initialize-account-theme.js
89
89
 
90
90
 
@@ -150,7 +150,7 @@ async function command(params) {
150
150
  break;
151
151
  }
152
152
  updateAccountThemeImplementationInConfig({ buildContext, accountThemeType });
153
- await (0,generateKcGenTs/* generateKcGenTs */.b)({
153
+ await (0,update_kc_gen.command)({
154
154
  buildContext: Object.assign(Object.assign({}, buildContext), { implementedThemeTypes: Object.assign(Object.assign({}, buildContext.implementedThemeTypes), { account: {
155
155
  isImplemented: true,
156
156
  type: accountThemeType
@@ -164,46 +164,119 @@ async function command(params) {
164
164
 
165
165
  /***/ }),
166
166
 
167
- /***/ 58585:
167
+ /***/ 43765:
168
168
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
169
169
 
170
170
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
171
- /* harmony export */ "b": () => (/* binding */ generateKcGenTs)
171
+ /* harmony export */ "o": () => (/* binding */ existsAsync)
172
172
  /* harmony export */ });
173
- /* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29041);
174
- /* harmony import */ var tsafe_id__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(38469);
175
- /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73292);
176
- /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_1__);
177
- /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71017);
178
- /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_2__);
179
- /* harmony import */ var _tools_fs_existsAsync__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43765);
180
- /* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(52300);
173
+ /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73292);
174
+ /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_0__);
181
175
 
176
+ async function existsAsync(path) {
177
+ try {
178
+ await fs_promises__WEBPACK_IMPORTED_MODULE_0__.stat(path);
179
+ return true;
180
+ }
181
+ catch (error) {
182
+ if (error.code === "ENOENT")
183
+ return false;
184
+ throw error;
185
+ }
186
+ }
187
+ //# sourceMappingURL=fs.existsAsync.js.map
182
188
 
189
+ /***/ }),
183
190
 
191
+ /***/ 13061:
192
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
184
193
 
194
+ // ESM COMPAT FLAG
195
+ __webpack_require__.r(__webpack_exports__);
185
196
 
197
+ // EXPORTS
198
+ __webpack_require__.d(__webpack_exports__, {
199
+ "command": () => (/* binding */ command)
200
+ });
186
201
 
187
- (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_0__/* .assert */ .h)();
188
- async function generateKcGenTs(params) {
189
- const { buildContext } = params;
190
- const isReactProject = await (async () => {
191
- const parsedPackageJson = await (async () => {
192
- const zParsedPackageJson = (() => {
193
- const zTargetType = zod__WEBPACK_IMPORTED_MODULE_4__.z.object({
194
- dependencies: zod__WEBPACK_IMPORTED_MODULE_4__.z.record(zod__WEBPACK_IMPORTED_MODULE_4__.z.string()).optional(),
195
- devDependencies: zod__WEBPACK_IMPORTED_MODULE_4__.z.record(zod__WEBPACK_IMPORTED_MODULE_4__.z.string()).optional()
196
- });
197
- (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_0__/* .assert */ .h)();
198
- return (0,tsafe_id__WEBPACK_IMPORTED_MODULE_5__.id)(zTargetType);
199
- })();
200
- return zParsedPackageJson.parse(JSON.parse((await fs_promises__WEBPACK_IMPORTED_MODULE_1__.readFile(buildContext.packageJsonFilePath)).toString("utf8")));
201
- })();
202
- return (Object.assign(Object.assign({}, parsedPackageJson.dependencies), parsedPackageJson.devDependencies).react !== undefined);
202
+ // EXTERNAL MODULE: external "fs/promises"
203
+ var promises_ = __webpack_require__(73292);
204
+ // EXTERNAL MODULE: external "path"
205
+ var external_path_ = __webpack_require__(71017);
206
+ // EXTERNAL MODULE: ./dist/bin/tools/fs.existsAsync.js
207
+ var fs_existsAsync = __webpack_require__(43765);
208
+ // EXTERNAL MODULE: ./node_modules/tsafe/esm/assert.mjs + 1 modules
209
+ var esm_assert = __webpack_require__(29041);
210
+ // EXTERNAL MODULE: ./dist/bin/shared/constants.js
211
+ var constants = __webpack_require__(173);
212
+ ;// CONCATENATED MODULE: ./dist/bin/shared/customHandler.js
213
+
214
+
215
+ const BIN_NAME = "_keycloakify-custom-handler";
216
+ const NOT_IMPLEMENTED_EXIT_CODE = 78;
217
+ function readParams(params) {
218
+ const { apiVersion } = params;
219
+ assert(apiVersion === "v1");
220
+ const commandName = (() => {
221
+ const envValue = process.env[CUSTOM_HANDLER_ENV_NAMES.COMMAND_NAME];
222
+ assert(envValue !== undefined);
223
+ return envValue;
224
+ })();
225
+ const buildContext = (() => {
226
+ const envValue = process.env[CUSTOM_HANDLER_ENV_NAMES.BUILD_CONTEXT];
227
+ assert(envValue !== undefined);
228
+ return JSON.parse(envValue);
203
229
  })();
204
- const filePath = (0,path__WEBPACK_IMPORTED_MODULE_2__.join)(buildContext.themeSrcDirPath, `kc.gen.ts${isReactProject ? "x" : ""}`);
205
- const currentContent = (await (0,_tools_fs_existsAsync__WEBPACK_IMPORTED_MODULE_3__/* .existsAsync */ .o)(filePath))
206
- ? await fs_promises__WEBPACK_IMPORTED_MODULE_1__.readFile(filePath)
230
+ return { commandName, buildContext };
231
+ }
232
+ //# sourceMappingURL=customHandler.js.map
233
+ // EXTERNAL MODULE: external "child_process"
234
+ var external_child_process_ = __webpack_require__(32081);
235
+ // EXTERNAL MODULE: external "fs"
236
+ var external_fs_ = __webpack_require__(57147);
237
+ ;// CONCATENATED MODULE: ./dist/bin/shared/customHandler_delegate.js
238
+
239
+
240
+
241
+
242
+
243
+
244
+ (0,esm_assert/* assert */.h)();
245
+ function maybeDelegateCommandToCustomHandler(params) {
246
+ const { commandName, buildContext } = params;
247
+ if (!external_fs_.readdirSync((0,external_path_.dirname)(process.argv[1])).includes(BIN_NAME)) {
248
+ return;
249
+ }
250
+ try {
251
+ external_child_process_.execSync(`npx ${BIN_NAME}`, {
252
+ stdio: "inherit",
253
+ env: Object.assign(Object.assign({}, process.env), { [constants/* CUSTOM_HANDLER_ENV_NAMES.COMMAND_NAME */._S.COMMAND_NAME]: commandName, [constants/* CUSTOM_HANDLER_ENV_NAMES.BUILD_CONTEXT */._S.BUILD_CONTEXT]: JSON.stringify(buildContext) })
254
+ });
255
+ }
256
+ catch (error) {
257
+ const status = error.status;
258
+ if (status === NOT_IMPLEMENTED_EXIT_CODE) {
259
+ return;
260
+ }
261
+ process.exit(status);
262
+ }
263
+ process.exit(0);
264
+ }
265
+ //# sourceMappingURL=customHandler_delegate.js.map
266
+ ;// CONCATENATED MODULE: ./dist/bin/update-kc-gen.js
267
+
268
+
269
+
270
+
271
+ async function command(params) {
272
+ const { buildContext } = params;
273
+ maybeDelegateCommandToCustomHandler({
274
+ commandName: "update-kc-gen",
275
+ buildContext
276
+ });
277
+ const filePath = (0,external_path_.join)(buildContext.themeSrcDirPath, `kc.gen.tsx`);
278
+ const currentContent = (await (0,fs_existsAsync/* existsAsync */.o)(filePath))
279
+ ? await promises_.readFile(filePath)
207
280
  : undefined;
208
281
  const hasLoginTheme = buildContext.implementedThemeTypes.login.isImplemented;
209
282
  const hasAccountTheme = buildContext.implementedThemeTypes.account.isImplemented;
@@ -218,7 +291,7 @@ async function generateKcGenTs(params) {
218
291
  ``,
219
292
  `// This file is auto-generated by Keycloakify`,
220
293
  ``,
221
- isReactProject && `import { lazy, Suspense, type ReactNode } from "react";`,
294
+ `import { lazy, Suspense, type ReactNode } from "react";`,
222
295
  ``,
223
296
  `export type ThemeName = ${buildContext.themeNames.map(themeName => `"${themeName}"`).join(" | ")};`,
224
297
  ``,
@@ -241,35 +314,31 @@ async function generateKcGenTs(params) {
241
314
  ` }`,
242
315
  `}`,
243
316
  ``,
244
- ...(!isReactProject
245
- ? []
246
- : [
247
- hasLoginTheme &&
248
- `export const KcLoginPage = lazy(() => import("./login/KcPage"));`,
249
- hasAccountTheme &&
250
- `export const KcAccountPage = lazy(() => import("./account/KcPage"));`,
251
- ``,
252
- `export function KcPage(`,
253
- ` props: {`,
254
- ` kcContext: KcContext;`,
255
- ` fallback?: ReactNode;`,
256
- ` }`,
257
- `) {`,
258
- ` const { kcContext, fallback } = props;`,
259
- ` return (`,
260
- ` <Suspense fallback={fallback}>`,
261
- ` {(() => {`,
262
- ` switch (kcContext.themeType) {`,
263
- hasLoginTheme &&
264
- ` case "login": return <KcLoginPage kcContext={kcContext} />;`,
265
- hasAccountTheme &&
266
- ` case "account": return <KcAccountPage kcContext={kcContext} />;`,
267
- ` }`,
268
- ` })()}`,
269
- ` </Suspense>`,
270
- ` );`,
271
- `}`
272
- ]),
317
+ hasLoginTheme &&
318
+ `export const KcLoginPage = lazy(() => import("./login/KcPage"));`,
319
+ hasAccountTheme &&
320
+ `export const KcAccountPage = lazy(() => import("./account/KcPage"));`,
321
+ ``,
322
+ `export function KcPage(`,
323
+ ` props: {`,
324
+ ` kcContext: KcContext;`,
325
+ ` fallback?: ReactNode;`,
326
+ ` }`,
327
+ `) {`,
328
+ ` const { kcContext, fallback } = props;`,
329
+ ` return (`,
330
+ ` <Suspense fallback={fallback}>`,
331
+ ` {(() => {`,
332
+ ` switch (kcContext.themeType) {`,
333
+ hasLoginTheme &&
334
+ ` case "login": return <KcLoginPage kcContext={kcContext} />;`,
335
+ hasAccountTheme &&
336
+ ` case "account": return <KcAccountPage kcContext={kcContext} />;`,
337
+ ` }`,
338
+ ` })()}`,
339
+ ` </Suspense>`,
340
+ ` );`,
341
+ `}`,
273
342
  ``,
274
343
  `/* prettier-ignore-end */`,
275
344
  ``
@@ -279,43 +348,16 @@ async function generateKcGenTs(params) {
279
348
  if (currentContent !== undefined && currentContent.equals(newContent)) {
280
349
  return;
281
350
  }
282
- await fs_promises__WEBPACK_IMPORTED_MODULE_1__.writeFile(filePath, newContent);
351
+ await promises_.writeFile(filePath, newContent);
283
352
  delete_legacy_file: {
284
- if (!isReactProject) {
285
- break delete_legacy_file;
286
- }
287
353
  const legacyFilePath = filePath.replace(/tsx$/, "ts");
288
- if (!(await (0,_tools_fs_existsAsync__WEBPACK_IMPORTED_MODULE_3__/* .existsAsync */ .o)(legacyFilePath))) {
354
+ if (!(await (0,fs_existsAsync/* existsAsync */.o)(legacyFilePath))) {
289
355
  break delete_legacy_file;
290
356
  }
291
- await fs_promises__WEBPACK_IMPORTED_MODULE_1__.unlink(legacyFilePath);
292
- }
293
- }
294
- //# sourceMappingURL=generateKcGenTs.js.map
295
-
296
- /***/ }),
297
-
298
- /***/ 43765:
299
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
300
-
301
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
302
- /* harmony export */ "o": () => (/* binding */ existsAsync)
303
- /* harmony export */ });
304
- /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73292);
305
- /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_0__);
306
-
307
- async function existsAsync(path) {
308
- try {
309
- await fs_promises__WEBPACK_IMPORTED_MODULE_0__.stat(path);
310
- return true;
311
- }
312
- catch (error) {
313
- if (error.code === "ENOENT")
314
- return false;
315
- throw error;
357
+ await promises_.unlink(legacyFilePath);
316
358
  }
317
359
  }
318
- //# sourceMappingURL=fs.existsAsync.js.map
360
+ //# sourceMappingURL=update-kc-gen.js.map
319
361
 
320
362
  /***/ }),
321
363