keycloakify 11.8.33 → 11.8.35-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/{355.index.js → 313.index.js} +145 -255
- package/bin/{932.index.js → 618.index.js} +163 -115
- package/bin/698.index.js +298 -0
- package/bin/780.index.js +10 -294
- package/bin/{502.index.js → 84.index.js} +99 -147
- package/bin/97.index.js +224 -589
- package/bin/main.js +15362 -15338
- package/package.json +5 -5
- package/src/bin/initialize-account-theme/initialize-account-theme.ts +10 -16
- package/src/bin/initialize-admin-theme.ts +0 -13
- package/src/bin/sync-extensions/getExtensionModuleFileSourceCodeReadyToBeCopied.ts +16 -0
- package/src/bin/sync-extensions/sync-extension.ts +8 -0
- package/bin/656.index.js +0 -119
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "keycloakify",
|
3
|
-
"version": "11.8.
|
3
|
+
"version": "11.8.35-rc.1",
|
4
4
|
"description": "Framework to create custom Keycloak UIs",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -1124,24 +1124,24 @@
|
|
1124
1124
|
"bin/main.js",
|
1125
1125
|
"bin/266.index.js",
|
1126
1126
|
"bin/304.index.js",
|
1127
|
-
"bin/
|
1127
|
+
"bin/313.index.js",
|
1128
1128
|
"bin/369.index.js",
|
1129
1129
|
"bin/375.index.js",
|
1130
1130
|
"bin/40.index.js",
|
1131
1131
|
"bin/453.index.js",
|
1132
|
-
"bin/
|
1133
|
-
"bin/656.index.js",
|
1132
|
+
"bin/618.index.js",
|
1134
1133
|
"bin/658.index.js",
|
1135
1134
|
"bin/69.index.js",
|
1135
|
+
"bin/698.index.js",
|
1136
1136
|
"bin/712.index.js",
|
1137
1137
|
"bin/720.index.js",
|
1138
1138
|
"bin/780.index.js",
|
1139
1139
|
"bin/783.index.js",
|
1140
1140
|
"bin/786.index.js",
|
1141
|
+
"bin/84.index.js",
|
1141
1142
|
"bin/877.index.js",
|
1142
1143
|
"bin/910.index.js",
|
1143
1144
|
"bin/930.index.js",
|
1144
|
-
"bin/932.index.js",
|
1145
1145
|
"bin/946.index.js",
|
1146
1146
|
"bin/949.index.js",
|
1147
1147
|
"bin/97.index.js",
|
@@ -4,7 +4,6 @@ import chalk from "chalk";
|
|
4
4
|
import { join as pathJoin, relative as pathRelative } from "path";
|
5
5
|
import * as fs from "fs";
|
6
6
|
import { updateAccountThemeImplementationInConfig } from "./updateAccountThemeImplementationInConfig";
|
7
|
-
import { command as updateKcGenCommand } from "../update-kc-gen";
|
8
7
|
import { maybeDelegateCommandToCustomHandler } from "../shared/customHandler_delegate";
|
9
8
|
import { exitIfUncommittedChanges } from "../shared/exitIfUncommittedChanges";
|
10
9
|
import { getThisCodebaseRootDirPath } from "../tools/getThisCodebaseRootDirPath";
|
@@ -52,6 +51,11 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
52
51
|
process.exit(-1);
|
53
52
|
}
|
54
53
|
|
54
|
+
updateAccountThemeImplementationInConfig({
|
55
|
+
buildContext,
|
56
|
+
accountThemeType
|
57
|
+
});
|
58
|
+
|
55
59
|
fs.cpSync(
|
56
60
|
pathJoin(
|
57
61
|
getThisCodebaseRootDirPath(),
|
@@ -67,6 +71,11 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
67
71
|
break;
|
68
72
|
case "Single-Page":
|
69
73
|
{
|
74
|
+
updateAccountThemeImplementationInConfig({
|
75
|
+
buildContext,
|
76
|
+
accountThemeType
|
77
|
+
});
|
78
|
+
|
70
79
|
const { initializeSpa } = await import("../shared/initializeSpa");
|
71
80
|
|
72
81
|
await initializeSpa({
|
@@ -76,19 +85,4 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
76
85
|
}
|
77
86
|
break;
|
78
87
|
}
|
79
|
-
|
80
|
-
updateAccountThemeImplementationInConfig({ buildContext, accountThemeType });
|
81
|
-
|
82
|
-
await updateKcGenCommand({
|
83
|
-
buildContext: {
|
84
|
-
...buildContext,
|
85
|
-
implementedThemeTypes: {
|
86
|
-
...buildContext.implementedThemeTypes,
|
87
|
-
account: {
|
88
|
-
isImplemented: true,
|
89
|
-
type: accountThemeType
|
90
|
-
}
|
91
|
-
}
|
92
|
-
}
|
93
|
-
});
|
94
88
|
}
|
@@ -2,7 +2,6 @@ import type { BuildContext } from "./shared/buildContext";
|
|
2
2
|
import { maybeDelegateCommandToCustomHandler } from "./shared/customHandler_delegate";
|
3
3
|
import { initializeSpa } from "./shared/initializeSpa";
|
4
4
|
import { exitIfUncommittedChanges } from "./shared/exitIfUncommittedChanges";
|
5
|
-
import { command as updateKcGenCommand } from "./update-kc-gen";
|
6
5
|
|
7
6
|
export async function command(params: { buildContext: BuildContext }) {
|
8
7
|
const { buildContext } = params;
|
@@ -24,16 +23,4 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
24
23
|
themeType: "admin",
|
25
24
|
buildContext
|
26
25
|
});
|
27
|
-
|
28
|
-
await updateKcGenCommand({
|
29
|
-
buildContext: {
|
30
|
-
...buildContext,
|
31
|
-
implementedThemeTypes: {
|
32
|
-
...buildContext.implementedThemeTypes,
|
33
|
-
admin: {
|
34
|
-
isImplemented: true
|
35
|
-
}
|
36
|
-
}
|
37
|
-
}
|
38
|
-
});
|
39
26
|
}
|
@@ -34,6 +34,22 @@ export async function getExtensionModuleFileSourceCodeReadyToBeCopied(params: {
|
|
34
34
|
)
|
35
35
|
).toString("utf8");
|
36
36
|
|
37
|
+
add_eslint_disable: {
|
38
|
+
if (isOwnershipAction) {
|
39
|
+
break add_eslint_disable;
|
40
|
+
}
|
41
|
+
|
42
|
+
if (!fileRelativePath.endsWith(".ts") && !fileRelativePath.endsWith(".tsx")) {
|
43
|
+
break add_eslint_disable;
|
44
|
+
}
|
45
|
+
|
46
|
+
if (sourceCode.includes("/* eslint-disable */")) {
|
47
|
+
break add_eslint_disable;
|
48
|
+
}
|
49
|
+
|
50
|
+
sourceCode = ["/* eslint-disable */", "", sourceCode].join("\n");
|
51
|
+
}
|
52
|
+
|
37
53
|
sourceCode = addCommentToSourceCode({
|
38
54
|
sourceCode,
|
39
55
|
fileRelativePath,
|
@@ -10,6 +10,8 @@ import { join as pathJoin } from "path";
|
|
10
10
|
import { existsAsync } from "../tools/fs.existsAsync";
|
11
11
|
import * as fsPr from "fs/promises";
|
12
12
|
import { getIsKnownByGit, untrackFromGit } from "../tools/gitUtils";
|
13
|
+
import { command as updateKcGenCommand } from "../update-kc-gen";
|
14
|
+
import { getBuildContext } from "../shared/buildContext";
|
13
15
|
|
14
16
|
export async function command(params: { buildContext: BuildContext }) {
|
15
17
|
const { buildContext } = params;
|
@@ -85,4 +87,10 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
85
87
|
)
|
86
88
|
.flat()
|
87
89
|
);
|
90
|
+
|
91
|
+
await updateKcGenCommand({
|
92
|
+
buildContext: getBuildContext({
|
93
|
+
projectDirPath: buildContext.projectDirPath
|
94
|
+
})
|
95
|
+
});
|
88
96
|
}
|
package/bin/656.index.js
DELETED
@@ -1,119 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
exports.id = 656;
|
3
|
-
exports.ids = [656];
|
4
|
-
exports.modules = {
|
5
|
-
|
6
|
-
/***/ 98656:
|
7
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
8
|
-
|
9
|
-
__webpack_require__.r(__webpack_exports__);
|
10
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
11
|
-
/* harmony export */ "initializeSpa": () => (/* binding */ initializeSpa)
|
12
|
-
/* harmony export */ });
|
13
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71017);
|
14
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
15
|
-
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57147);
|
16
|
-
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_1__);
|
17
|
-
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29041);
|
18
|
-
/* harmony import */ var tsafe_id__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(38469);
|
19
|
-
/* harmony import */ var _addSyncExtensionsToPostinstallScript__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(80339);
|
20
|
-
/* harmony import */ var _tools_runPrettier__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(48433);
|
21
|
-
/* harmony import */ var _tools_npmInstall__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(63046);
|
22
|
-
/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(32081);
|
23
|
-
/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(child_process__WEBPACK_IMPORTED_MODULE_6__);
|
24
|
-
/* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(52300);
|
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__);
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_2__/* .assert */ .h)();
|
38
|
-
async function initializeSpa(params) {
|
39
|
-
var _a;
|
40
|
-
const { themeType, buildContext } = params;
|
41
|
-
{
|
42
|
-
const themeTypeSrcDirPath = (0,path__WEBPACK_IMPORTED_MODULE_0__.join)(buildContext.themeSrcDirPath, themeType);
|
43
|
-
if (fs__WEBPACK_IMPORTED_MODULE_1__.existsSync(themeTypeSrcDirPath) &&
|
44
|
-
fs__WEBPACK_IMPORTED_MODULE_1__.readdirSync(themeTypeSrcDirPath).length > 0) {
|
45
|
-
console.warn(chalk__WEBPACK_IMPORTED_MODULE_7___default().red(`There is already a ${(0,path__WEBPACK_IMPORTED_MODULE_0__.relative)(process.cwd(), themeTypeSrcDirPath)} directory in your project. Aborting.`));
|
46
|
-
process.exit(-1);
|
47
|
-
}
|
48
|
-
}
|
49
|
-
const parsedPackageJson = (() => {
|
50
|
-
const zParsedPackageJson = (() => {
|
51
|
-
const zTargetType = zod__WEBPACK_IMPORTED_MODULE_8__.z.object({
|
52
|
-
scripts: zod__WEBPACK_IMPORTED_MODULE_8__.z.record(zod__WEBPACK_IMPORTED_MODULE_8__.z.union([zod__WEBPACK_IMPORTED_MODULE_8__.z.string(), zod__WEBPACK_IMPORTED_MODULE_8__.z.undefined()])).optional(),
|
53
|
-
dependencies: zod__WEBPACK_IMPORTED_MODULE_8__.z.record(zod__WEBPACK_IMPORTED_MODULE_8__.z.union([zod__WEBPACK_IMPORTED_MODULE_8__.z.string(), zod__WEBPACK_IMPORTED_MODULE_8__.z.undefined()])).optional(),
|
54
|
-
devDependencies: zod__WEBPACK_IMPORTED_MODULE_8__.z.record(zod__WEBPACK_IMPORTED_MODULE_8__.z.union([zod__WEBPACK_IMPORTED_MODULE_8__.z.string(), zod__WEBPACK_IMPORTED_MODULE_8__.z.undefined()])).optional()
|
55
|
-
});
|
56
|
-
tsafe_assert__WEBPACK_IMPORTED_MODULE_2__/* .assert */ .h;
|
57
|
-
return (0,tsafe_id__WEBPACK_IMPORTED_MODULE_9__.id)(zTargetType);
|
58
|
-
})();
|
59
|
-
const parsedPackageJson = JSON.parse(fs__WEBPACK_IMPORTED_MODULE_1__.readFileSync(buildContext.packageJsonFilePath).toString("utf8"));
|
60
|
-
zParsedPackageJson.parse(parsedPackageJson);
|
61
|
-
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_2__/* .assert */ .h)((0,tsafe_assert__WEBPACK_IMPORTED_MODULE_2__.is)(parsedPackageJson));
|
62
|
-
return parsedPackageJson;
|
63
|
-
})();
|
64
|
-
(0,_addSyncExtensionsToPostinstallScript__WEBPACK_IMPORTED_MODULE_3__/* .addSyncExtensionsToPostinstallScript */ .N)({
|
65
|
-
parsedPackageJson,
|
66
|
-
buildContext
|
67
|
-
});
|
68
|
-
const uiSharedMajor = (() => {
|
69
|
-
const dependencies = Object.assign(Object.assign({}, parsedPackageJson.devDependencies), parsedPackageJson.dependencies);
|
70
|
-
const version = dependencies["@keycloakify/keycloak-ui-shared"];
|
71
|
-
if (version === undefined) {
|
72
|
-
return undefined;
|
73
|
-
}
|
74
|
-
const match = version.match(/^[^~]?(\d+)\./);
|
75
|
-
if (match === null) {
|
76
|
-
return undefined;
|
77
|
-
}
|
78
|
-
return match[1];
|
79
|
-
})();
|
80
|
-
const moduleName = `@keycloakify/keycloak-${themeType}-ui`;
|
81
|
-
const version = (() => {
|
82
|
-
const cmdOutput = child_process__WEBPACK_IMPORTED_MODULE_6__.execSync(`npm show ${moduleName} versions --json`)
|
83
|
-
.toString("utf8")
|
84
|
-
.trim();
|
85
|
-
const versions = JSON.parse(cmdOutput);
|
86
|
-
// NOTE: Bug in some older npm versions
|
87
|
-
if (typeof versions === "string") {
|
88
|
-
return [versions];
|
89
|
-
}
|
90
|
-
return versions;
|
91
|
-
})()
|
92
|
-
.reverse()
|
93
|
-
.filter(version => !version.includes("-"))
|
94
|
-
.find(version => uiSharedMajor === undefined ? true : version.startsWith(`${uiSharedMajor}.`));
|
95
|
-
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_2__/* .assert */ .h)(version !== undefined);
|
96
|
-
((_a = parsedPackageJson.dependencies) !== null && _a !== void 0 ? _a : (parsedPackageJson.dependencies = {}))[moduleName] = `~${version}`;
|
97
|
-
if (parsedPackageJson.devDependencies !== undefined) {
|
98
|
-
delete parsedPackageJson.devDependencies[moduleName];
|
99
|
-
}
|
100
|
-
{
|
101
|
-
let sourceCode = JSON.stringify(parsedPackageJson, undefined, 2);
|
102
|
-
if (await (0,_tools_runPrettier__WEBPACK_IMPORTED_MODULE_4__/* .getIsPrettierAvailable */ .MT)()) {
|
103
|
-
sourceCode = await (0,_tools_runPrettier__WEBPACK_IMPORTED_MODULE_4__/* .runPrettier */ .eY)({
|
104
|
-
sourceCode,
|
105
|
-
filePath: buildContext.packageJsonFilePath
|
106
|
-
});
|
107
|
-
}
|
108
|
-
fs__WEBPACK_IMPORTED_MODULE_1__.writeFileSync(buildContext.packageJsonFilePath, Buffer.from(sourceCode, "utf8"));
|
109
|
-
}
|
110
|
-
await (0,_tools_npmInstall__WEBPACK_IMPORTED_MODULE_5__/* .npmInstall */ .c)({
|
111
|
-
packageJsonDirPath: (0,path__WEBPACK_IMPORTED_MODULE_0__.dirname)(buildContext.packageJsonFilePath)
|
112
|
-
});
|
113
|
-
}
|
114
|
-
//# sourceMappingURL=initializeSpa.js.map
|
115
|
-
|
116
|
-
/***/ })
|
117
|
-
|
118
|
-
};
|
119
|
-
;
|