keycloakify 11.2.3 → 11.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/193.index.js +3 -3
- package/bin/20.index.js +11 -13
- package/bin/{941.index.js → 238.index.js} +64 -199
- package/bin/31.index.js +48 -48
- package/bin/33.index.js +212 -1
- package/bin/453.index.js +71 -57
- package/bin/526.index.js +13 -13
- package/bin/573.index.js +66 -67
- package/bin/599.index.js +19 -20
- package/bin/743.index.js +2 -3
- package/bin/780.index.js +27 -28
- package/bin/{860.index.js → 783.index.js} +18 -20
- package/bin/786.index.js +21 -22
- package/bin/903.index.js +19 -1
- package/bin/97.index.js +46 -32
- package/bin/main.js +220 -222
- package/package.json +4 -4
- package/src/vite-plugin/vite-plugin.ts +1 -1
- package/vite-plugin/index.js +336 -313
package/bin/453.index.js
CHANGED
@@ -14,17 +14,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
14
14
|
/* harmony import */ var cli_select__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99398);
|
15
15
|
/* harmony import */ var cli_select__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cli_select__WEBPACK_IMPORTED_MODULE_1__);
|
16
16
|
/* harmony import */ var _shared_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(173);
|
17
|
-
/* harmony import */ var
|
18
|
-
/* harmony import */ var
|
19
|
-
/* harmony import */ var
|
20
|
-
/* harmony import */ var
|
21
|
-
/* harmony import */ var
|
22
|
-
/* harmony import */ var
|
23
|
-
/* harmony import */ var
|
24
|
-
/* harmony import */ var
|
25
|
-
/* harmony import */ var
|
26
|
-
/* harmony import */ var
|
27
|
-
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_9__);
|
17
|
+
/* harmony import */ var tsafe_capitalize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(14899);
|
18
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(57147);
|
19
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_3__);
|
20
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(71017);
|
21
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_4__);
|
22
|
+
/* harmony import */ var _tools_kebabCaseToSnakeCase__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(17192);
|
23
|
+
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(29041);
|
24
|
+
/* harmony import */ var _shared_buildContext__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(56031);
|
25
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(78818);
|
26
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_7__);
|
28
27
|
|
29
28
|
|
30
29
|
|
@@ -37,10 +36,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
37
36
|
|
38
37
|
async function command(params) {
|
39
38
|
const { cliCommandOptions } = params;
|
40
|
-
const buildContext = (0,
|
39
|
+
const buildContext = (0,_shared_buildContext__WEBPACK_IMPORTED_MODULE_6__/* .getBuildContext */ .s)({
|
41
40
|
cliCommandOptions
|
42
41
|
});
|
43
|
-
console.log(
|
42
|
+
console.log(chalk__WEBPACK_IMPORTED_MODULE_7___default().cyan("Theme type:"));
|
44
43
|
const themeType = await (async () => {
|
45
44
|
const values = _shared_constants__WEBPACK_IMPORTED_MODULE_2__/* .THEME_TYPES.filter */ .Jh.filter(themeType => {
|
46
45
|
switch (themeType) {
|
@@ -49,9 +48,9 @@ async function command(params) {
|
|
49
48
|
case "login":
|
50
49
|
return buildContext.implementedThemeTypes.login.isImplemented;
|
51
50
|
}
|
52
|
-
(0,
|
51
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_5__/* .assert */ .h)(false);
|
53
52
|
});
|
54
|
-
(0,
|
53
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_5__/* .assert */ .h)(values.length > 0, "No theme is implemented in this project");
|
55
54
|
if (values.length === 1) {
|
56
55
|
return values[0];
|
57
56
|
}
|
@@ -63,43 +62,43 @@ async function command(params) {
|
|
63
62
|
return value;
|
64
63
|
})();
|
65
64
|
if (themeType === "account" &&
|
66
|
-
((0,
|
65
|
+
((0,tsafe_assert__WEBPACK_IMPORTED_MODULE_5__/* .assert */ .h)(buildContext.implementedThemeTypes.account.isImplemented),
|
67
66
|
buildContext.implementedThemeTypes.account.type === "Single-Page")) {
|
68
|
-
const srcDirPath = (0,
|
67
|
+
const srcDirPath = (0,path__WEBPACK_IMPORTED_MODULE_4__.join)((0,path__WEBPACK_IMPORTED_MODULE_4__.dirname)(buildContext.packageJsonFilePath), "node_modules", "@keycloakify", "keycloak-account-ui", "src");
|
69
68
|
console.log([
|
70
69
|
`There isn't an interactive CLI to eject components of the Single-Page Account theme.`,
|
71
70
|
`You can however copy paste into your codebase the any file or directory from the following source directory:`,
|
72
71
|
``,
|
73
|
-
`${
|
72
|
+
`${chalk__WEBPACK_IMPORTED_MODULE_7___default().bold((0,path__WEBPACK_IMPORTED_MODULE_4__.join)((0,path__WEBPACK_IMPORTED_MODULE_4__.relative)(process.cwd(), srcDirPath)))}`,
|
74
73
|
``
|
75
74
|
].join("\n"));
|
76
75
|
eject_entrypoint: {
|
77
76
|
const kcAccountUiTsxFileRelativePath = "KcAccountUi.tsx";
|
78
|
-
const accountThemeSrcDirPath = (0,
|
79
|
-
const targetFilePath = (0,
|
80
|
-
if (
|
77
|
+
const accountThemeSrcDirPath = (0,path__WEBPACK_IMPORTED_MODULE_4__.join)(buildContext.themeSrcDirPath, "account");
|
78
|
+
const targetFilePath = (0,path__WEBPACK_IMPORTED_MODULE_4__.join)(accountThemeSrcDirPath, kcAccountUiTsxFileRelativePath);
|
79
|
+
if (fs__WEBPACK_IMPORTED_MODULE_3__.existsSync(targetFilePath)) {
|
81
80
|
break eject_entrypoint;
|
82
81
|
}
|
83
|
-
|
82
|
+
fs__WEBPACK_IMPORTED_MODULE_3__.cpSync((0,path__WEBPACK_IMPORTED_MODULE_4__.join)(srcDirPath, kcAccountUiTsxFileRelativePath), targetFilePath);
|
84
83
|
{
|
85
|
-
const kcPageTsxFilePath = (0,
|
86
|
-
const kcPageTsxCode =
|
87
|
-
const componentName = (0,
|
84
|
+
const kcPageTsxFilePath = (0,path__WEBPACK_IMPORTED_MODULE_4__.join)(accountThemeSrcDirPath, "KcPage.tsx");
|
85
|
+
const kcPageTsxCode = fs__WEBPACK_IMPORTED_MODULE_3__.readFileSync(kcPageTsxFilePath).toString("utf8");
|
86
|
+
const componentName = (0,path__WEBPACK_IMPORTED_MODULE_4__.basename)(kcAccountUiTsxFileRelativePath).replace(/.tsx$/, "");
|
88
87
|
const modifiedKcPageTsxCode = kcPageTsxCode.replace(`@keycloakify/keycloak-account-ui/${componentName}`, `./${componentName}`);
|
89
|
-
|
88
|
+
fs__WEBPACK_IMPORTED_MODULE_3__.writeFileSync(kcPageTsxFilePath, Buffer.from(modifiedKcPageTsxCode, "utf8"));
|
90
89
|
}
|
91
|
-
const routesTsxFilePath = (0,
|
90
|
+
const routesTsxFilePath = (0,path__WEBPACK_IMPORTED_MODULE_4__.relative)(process.cwd(), (0,path__WEBPACK_IMPORTED_MODULE_4__.join)(srcDirPath, "routes.tsx"));
|
92
91
|
console.log([
|
93
|
-
`To help you get started ${
|
94
|
-
`The next step is usually to eject ${
|
95
|
-
`with \`cp ${routesTsxFilePath} ${(0,
|
92
|
+
`To help you get started ${chalk__WEBPACK_IMPORTED_MODULE_7___default().bold((0,path__WEBPACK_IMPORTED_MODULE_4__.relative)(process.cwd(), targetFilePath))} has been copied into your project.`,
|
93
|
+
`The next step is usually to eject ${chalk__WEBPACK_IMPORTED_MODULE_7___default().bold(routesTsxFilePath)}`,
|
94
|
+
`with \`cp ${routesTsxFilePath} ${(0,path__WEBPACK_IMPORTED_MODULE_4__.relative)(process.cwd(), accountThemeSrcDirPath)}\``,
|
96
95
|
`then update the import of routes in ${kcAccountUiTsxFileRelativePath}.`
|
97
96
|
].join("\n"));
|
98
97
|
}
|
99
98
|
process.exit(0);
|
100
99
|
}
|
101
100
|
console.log(`→ ${themeType}`);
|
102
|
-
console.log(
|
101
|
+
console.log(chalk__WEBPACK_IMPORTED_MODULE_7___default().cyan("Select the page you want to customize:"));
|
103
102
|
const templateValue = "Template.tsx (Layout common to every page)";
|
104
103
|
const userProfileFormFieldsValue = "UserProfileFormFields.tsx (Renders the form of the register.ftl, login-update-profile.ftl, update-email.ftl and idp-review-user-profile.ftl)";
|
105
104
|
const { value: pageIdOrComponent } = await cli_select__WEBPACK_IMPORTED_MODULE_1___default()({
|
@@ -114,7 +113,7 @@ async function command(params) {
|
|
114
113
|
case "account":
|
115
114
|
return [templateValue, ..._shared_constants__WEBPACK_IMPORTED_MODULE_2__/* .ACCOUNT_THEME_PAGE_IDS */ .yV];
|
116
115
|
}
|
117
|
-
(0,
|
116
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_5__/* .assert */ .h)(false);
|
118
117
|
})()
|
119
118
|
}).catch(() => {
|
120
119
|
process.exit(-1);
|
@@ -127,7 +126,7 @@ async function command(params) {
|
|
127
126
|
if (pageIdOrComponent === userProfileFormFieldsValue) {
|
128
127
|
return "UserProfileFormFields.tsx";
|
129
128
|
}
|
130
|
-
return (0,
|
129
|
+
return (0,tsafe_capitalize__WEBPACK_IMPORTED_MODULE_8__/* .capitalize */ .k)((0,_tools_kebabCaseToSnakeCase__WEBPACK_IMPORTED_MODULE_9__/* .kebabCaseToCamelCase */ .A)(pageIdOrComponent)).replace(/ftl$/, "tsx");
|
131
130
|
})();
|
132
131
|
const pagesOrDot = (() => {
|
133
132
|
if (pageIdOrComponent === templateValue ||
|
@@ -136,28 +135,28 @@ async function command(params) {
|
|
136
135
|
}
|
137
136
|
return "pages";
|
138
137
|
})();
|
139
|
-
const targetFilePath = (0,
|
140
|
-
if (
|
141
|
-
console.log(`${pageIdOrComponent} is already ejected, ${(0,
|
138
|
+
const targetFilePath = (0,path__WEBPACK_IMPORTED_MODULE_4__.join)(buildContext.themeSrcDirPath, themeType, pagesOrDot, componentBasename);
|
139
|
+
if (fs__WEBPACK_IMPORTED_MODULE_3__.existsSync(targetFilePath)) {
|
140
|
+
console.log(`${pageIdOrComponent} is already ejected, ${(0,path__WEBPACK_IMPORTED_MODULE_4__.relative)(process.cwd(), targetFilePath)} already exists`);
|
142
141
|
process.exit(-1);
|
143
142
|
}
|
144
|
-
const componentCode =
|
143
|
+
const componentCode = fs__WEBPACK_IMPORTED_MODULE_3__.readFileSync((0,path__WEBPACK_IMPORTED_MODULE_4__.join)((0,_tools_getThisCodebaseRootDirPath__WEBPACK_IMPORTED_MODULE_0__/* .getThisCodebaseRootDirPath */ .e)(), "src", themeType, pagesOrDot, componentBasename))
|
145
144
|
.toString("utf8");
|
146
145
|
{
|
147
|
-
const targetDirPath = (0,
|
148
|
-
if (!
|
149
|
-
|
146
|
+
const targetDirPath = (0,path__WEBPACK_IMPORTED_MODULE_4__.dirname)(targetFilePath);
|
147
|
+
if (!fs__WEBPACK_IMPORTED_MODULE_3__.existsSync(targetDirPath)) {
|
148
|
+
fs__WEBPACK_IMPORTED_MODULE_3__.mkdirSync(targetDirPath, { recursive: true });
|
150
149
|
}
|
151
150
|
}
|
152
|
-
|
153
|
-
console.log(`${
|
151
|
+
fs__WEBPACK_IMPORTED_MODULE_3__.writeFileSync(targetFilePath, Buffer.from(componentCode, "utf8"));
|
152
|
+
console.log(`${chalk__WEBPACK_IMPORTED_MODULE_7___default().green("✓")} ${chalk__WEBPACK_IMPORTED_MODULE_7___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`);
|
154
153
|
edit_KcApp: {
|
155
154
|
if (pageIdOrComponent !== templateValue &&
|
156
155
|
pageIdOrComponent !== userProfileFormFieldsValue) {
|
157
156
|
break edit_KcApp;
|
158
157
|
}
|
159
|
-
const kcAppTsxPath = (0,
|
160
|
-
const kcAppTsxCode =
|
158
|
+
const kcAppTsxPath = (0,path__WEBPACK_IMPORTED_MODULE_4__.join)(buildContext.themeSrcDirPath, themeType, "KcPage.tsx");
|
159
|
+
const kcAppTsxCode = fs__WEBPACK_IMPORTED_MODULE_3__.readFileSync(kcAppTsxPath).toString("utf8");
|
161
160
|
const modifiedKcAppTsxCode = (() => {
|
162
161
|
switch (pageIdOrComponent) {
|
163
162
|
case templateValue:
|
@@ -165,14 +164,14 @@ async function command(params) {
|
|
165
164
|
case userProfileFormFieldsValue:
|
166
165
|
return kcAppTsxCode.replace(`keycloakify/login/UserProfileFormFields`, "./UserProfileFormFields");
|
167
166
|
}
|
168
|
-
(0,
|
167
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_5__/* .assert */ .h)(false);
|
169
168
|
})();
|
170
169
|
if (kcAppTsxCode === modifiedKcAppTsxCode) {
|
171
|
-
console.log(
|
170
|
+
console.log(chalk__WEBPACK_IMPORTED_MODULE_7___default().red("Unable to automatically update KcPage.tsx, please update it manually"));
|
172
171
|
return;
|
173
172
|
}
|
174
|
-
|
175
|
-
console.log(`${
|
173
|
+
fs__WEBPACK_IMPORTED_MODULE_3__.writeFileSync(kcAppTsxPath, Buffer.from(modifiedKcAppTsxCode, "utf8"));
|
174
|
+
console.log(`${chalk__WEBPACK_IMPORTED_MODULE_7___default().green("✓")} ${chalk__WEBPACK_IMPORTED_MODULE_7___default().bold((0,path__WEBPACK_IMPORTED_MODULE_4__.join)(".", (0,path__WEBPACK_IMPORTED_MODULE_4__.relative)(process.cwd(), kcAppTsxPath)))} Updated`);
|
176
175
|
return;
|
177
176
|
}
|
178
177
|
const userProfileFormFieldComponentName = "UserProfileFormFields";
|
@@ -181,11 +180,11 @@ async function command(params) {
|
|
181
180
|
``,
|
182
181
|
`You now need to update your page router:`,
|
183
182
|
``,
|
184
|
-
`${
|
185
|
-
|
183
|
+
`${chalk__WEBPACK_IMPORTED_MODULE_7___default().bold((0,path__WEBPACK_IMPORTED_MODULE_4__.join)(".", (0,path__WEBPACK_IMPORTED_MODULE_4__.relative)(process.cwd(), buildContext.themeSrcDirPath), themeType, "KcPage.tsx"))}:`,
|
184
|
+
chalk__WEBPACK_IMPORTED_MODULE_7___default().grey("```"),
|
186
185
|
`// ...`,
|
187
186
|
``,
|
188
|
-
|
187
|
+
chalk__WEBPACK_IMPORTED_MODULE_7___default().green(`+const ${componentName} = lazy(() => import("./pages/${componentName}"));`),
|
189
188
|
...[
|
190
189
|
``,
|
191
190
|
` export default function KcPage(props: { kcContext: KcContext; }) {`,
|
@@ -218,14 +217,14 @@ async function command(params) {
|
|
218
217
|
` }`
|
219
218
|
].map(line => {
|
220
219
|
if (line.startsWith("+")) {
|
221
|
-
return
|
220
|
+
return chalk__WEBPACK_IMPORTED_MODULE_7___default().green(line);
|
222
221
|
}
|
223
222
|
if (line.startsWith("-")) {
|
224
|
-
return
|
223
|
+
return chalk__WEBPACK_IMPORTED_MODULE_7___default().red(line);
|
225
224
|
}
|
226
|
-
return
|
225
|
+
return chalk__WEBPACK_IMPORTED_MODULE_7___default().grey(line);
|
227
226
|
}),
|
228
|
-
|
227
|
+
chalk__WEBPACK_IMPORTED_MODULE_7___default().grey("```")
|
229
228
|
].join("\n"));
|
230
229
|
}
|
231
230
|
//# sourceMappingURL=eject-page.js.map
|
@@ -238,11 +237,11 @@ async function command(params) {
|
|
238
237
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
239
238
|
/* harmony export */ "A": () => (/* binding */ kebabCaseToCamelCase)
|
240
239
|
/* harmony export */ });
|
241
|
-
/* harmony import */ var tsafe_capitalize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
240
|
+
/* harmony import */ var tsafe_capitalize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14899);
|
242
241
|
|
243
242
|
function kebabCaseToCamelCase(kebabCaseString) {
|
244
243
|
const [first, ...rest] = kebabCaseString.split("-");
|
245
|
-
return [first, ...rest.map(tsafe_capitalize__WEBPACK_IMPORTED_MODULE_0__.capitalize)].join("");
|
244
|
+
return [first, ...rest.map(tsafe_capitalize__WEBPACK_IMPORTED_MODULE_0__/* .capitalize */ .k)].join("");
|
246
245
|
}
|
247
246
|
//# sourceMappingURL=kebabCaseToSnakeCase.js.map
|
248
247
|
|
@@ -815,6 +814,21 @@ const withObjectValues = options => {
|
|
815
814
|
|
816
815
|
exports.withObjectValues = withObjectValues;
|
817
816
|
|
817
|
+
/***/ }),
|
818
|
+
|
819
|
+
/***/ 14899:
|
820
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
821
|
+
|
822
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
823
|
+
/* harmony export */ "k": () => (/* binding */ capitalize)
|
824
|
+
/* harmony export */ });
|
825
|
+
/** @see <https://docs.tsafe.dev/capitalize> */
|
826
|
+
function capitalize(str) {
|
827
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
828
|
+
return (str.charAt(0).toUpperCase() + str.slice(1));
|
829
|
+
}
|
830
|
+
//# sourceMappingURL=capitalize.mjs.map
|
831
|
+
|
818
832
|
/***/ })
|
819
833
|
|
820
834
|
};
|
package/bin/526.index.js
CHANGED
@@ -16,16 +16,16 @@ __webpack_require__.d(__webpack_exports__, {
|
|
16
16
|
|
17
17
|
// EXTERNAL MODULE: ./dist/bin/shared/buildContext.js + 1 modules
|
18
18
|
var shared_buildContext = __webpack_require__(56031);
|
19
|
-
// EXTERNAL MODULE: ./node_modules/tsafe/exclude.
|
20
|
-
var exclude = __webpack_require__(
|
19
|
+
// EXTERNAL MODULE: ./node_modules/tsafe/esm/exclude.mjs
|
20
|
+
var exclude = __webpack_require__(83101);
|
21
21
|
// EXTERNAL MODULE: ./dist/bin/shared/promptKeycloakVersion.js
|
22
22
|
var promptKeycloakVersion = __webpack_require__(82635);
|
23
23
|
// EXTERNAL MODULE: ./dist/bin/shared/constants.js
|
24
24
|
var constants = __webpack_require__(173);
|
25
25
|
// EXTERNAL MODULE: ./dist/bin/tools/SemVer.js
|
26
26
|
var SemVer = __webpack_require__(12171);
|
27
|
-
// EXTERNAL MODULE: ./node_modules/tsafe/assert.
|
28
|
-
var assert = __webpack_require__(
|
27
|
+
// EXTERNAL MODULE: ./node_modules/tsafe/esm/assert.mjs + 1 modules
|
28
|
+
var assert = __webpack_require__(29041);
|
29
29
|
// EXTERNAL MODULE: external "fs"
|
30
30
|
var external_fs_ = __webpack_require__(57147);
|
31
31
|
// EXTERNAL MODULE: external "path"
|
@@ -61,7 +61,7 @@ var Deferred = __webpack_require__(50689);
|
|
61
61
|
|
62
62
|
|
63
63
|
|
64
|
-
(0,assert
|
64
|
+
(0,assert/* assert */.h)();
|
65
65
|
async function appBuild(params) {
|
66
66
|
const { buildContext } = params;
|
67
67
|
switch (buildContext.bundler) {
|
@@ -73,7 +73,7 @@ async function appBuild(params) {
|
|
73
73
|
}
|
74
74
|
async function appBuild_vite(params) {
|
75
75
|
const { buildContext } = params;
|
76
|
-
(0,assert
|
76
|
+
(0,assert/* assert */.h)(buildContext.bundler === "vite");
|
77
77
|
const dIsSuccess = new Deferred.Deferred();
|
78
78
|
console.log(source_default().blue("$ npx vite build"));
|
79
79
|
const child = external_child_process_.spawn("npx", ["vite", "build"], {
|
@@ -94,7 +94,7 @@ async function appBuild_vite(params) {
|
|
94
94
|
async function appBuild_webpack(params) {
|
95
95
|
var _a;
|
96
96
|
const { buildContext } = params;
|
97
|
-
(0,assert
|
97
|
+
(0,assert/* assert */.h)(buildContext.bundler === "webpack");
|
98
98
|
const entries = Object.entries(((_a = JSON.parse(external_fs_.readFileSync(buildContext.packageJsonFilePath).toString("utf8"))
|
99
99
|
.scripts) !== null && _a !== void 0 ? _a : {})).filter(([, scriptCommand]) => scriptCommand.includes("keycloakify build"));
|
100
100
|
if (entries.length === 0) {
|
@@ -168,7 +168,7 @@ async function appBuild_webpack(params) {
|
|
168
168
|
|
169
169
|
|
170
170
|
|
171
|
-
(0,assert
|
171
|
+
(0,assert/* assert */.h)();
|
172
172
|
async function keycloakifyBuild(params) {
|
173
173
|
const { buildForKeycloakMajorVersionNumber, buildContext } = params;
|
174
174
|
const dResult = new Deferred.Deferred();
|
@@ -318,11 +318,11 @@ async function command(params) {
|
|
318
318
|
.filter(fileBasename => fileBasename.endsWith(".jar"))
|
319
319
|
.map(fileBasename => (0,external_path_.join)(buildContext.keycloakifyBuildDirPath, fileBasename))
|
320
320
|
.sort((a, b) => external_fs_.statSync(b).mtimeMs - external_fs_.statSync(a).mtimeMs)[0];
|
321
|
-
(0,assert
|
321
|
+
(0,assert/* assert */.h)(jarFilePath !== undefined);
|
322
322
|
const extensionJarFilePaths = await Promise.all(buildContext.startKeycloakOptions.extensionJars.map(async (extensionJar) => {
|
323
323
|
switch (extensionJar.type) {
|
324
324
|
case "path": {
|
325
|
-
(0,assert
|
325
|
+
(0,assert/* assert */.h)(await (0,fs_existsAsync/* existsAsync */.o)(extensionJar.path), `${extensionJar.path} does not exist`);
|
326
326
|
return extensionJar.path;
|
327
327
|
}
|
328
328
|
case "url": {
|
@@ -336,7 +336,7 @@ async function command(params) {
|
|
336
336
|
return archiveFilePath;
|
337
337
|
}
|
338
338
|
}
|
339
|
-
(0,assert
|
339
|
+
(0,assert/* assert */.h)(false);
|
340
340
|
}));
|
341
341
|
const getRealmJsonFilePath_defaultForKeycloakMajor = (keycloakMajorVersionNumber) => (0,external_path_.join)((0,getThisCodebaseRootDirPath/* getThisCodebaseRootDirPath */.e)(), "src", "bin", "start-keycloak", `myrealm-realm-${keycloakMajorVersionNumber}.json`);
|
342
342
|
const realmJsonFilePath = await (async () => {
|
@@ -350,7 +350,7 @@ async function command(params) {
|
|
350
350
|
});
|
351
351
|
}
|
352
352
|
if (buildContext.startKeycloakOptions.realmJsonFilePath !== undefined) {
|
353
|
-
(0,assert
|
353
|
+
(0,assert/* assert */.h)(await (0,fs_existsAsync/* existsAsync */.o)(buildContext.startKeycloakOptions.realmJsonFilePath), `${(0,external_path_.relative)(process.cwd(), buildContext.startKeycloakOptions.realmJsonFilePath)} does not exist`);
|
354
354
|
return buildContext.startKeycloakOptions.realmJsonFilePath;
|
355
355
|
}
|
356
356
|
const internalFilePath = await (async () => {
|
@@ -467,7 +467,7 @@ async function command(params) {
|
|
467
467
|
...buildContext.environmentVariables
|
468
468
|
.map(({ name }) => ({ name, envValue: process.env[name] }))
|
469
469
|
.map(({ name, envValue }) => envValue === undefined ? undefined : { name, envValue })
|
470
|
-
.filter((0,exclude
|
470
|
+
.filter((0,exclude/* exclude */.D)(undefined))
|
471
471
|
.map(({ name, envValue }) => `--env${SPACE_PLACEHOLDER}${name}='${envValue.replace(/'/g, "'\\''")}'`),
|
472
472
|
`${(_e = (_d = buildContext.startKeycloakOptions.dockerImage) === null || _d === void 0 ? void 0 : _d.reference) !== null && _e !== void 0 ? _e : "quay.io/keycloak/keycloak"}:${dockerImageTag}`,
|
473
473
|
"start-dev",
|