keycloakify 11.6.1 → 11.7.0
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/{653.index.js → 288.index.js} +221 -201
- package/bin/313.index.js +377 -0
- package/bin/{174.index.js → 33.index.js} +37 -2
- package/bin/{615.index.js → 355.index.js} +353 -102
- package/bin/363.index.js +1537 -0
- package/bin/453.index.js +6 -42
- package/bin/{503.index.js → 678.index.js} +577 -53
- package/bin/{921.index.js → 780.index.js} +54 -45
- package/bin/880.index.js +206 -21
- package/bin/9.index.js +850 -0
- package/bin/{525.index.js → 911.index.js} +1302 -2
- package/bin/930.index.js +164 -0
- package/bin/946.index.js +20 -0
- package/bin/{153.index.js → 947.index.js} +22 -797
- package/bin/main.js +61 -19
- package/bin/{eject-file.d.ts → own.d.ts} +2 -1
- package/bin/shared/{addPostinstallScriptIfNotPresent.d.ts → initializeSpa/addSyncExtensionsToPostinstallScript.d.ts} +1 -1
- package/bin/shared/initializeSpa/index.d.ts +1 -0
- package/bin/shared/initializeSpa/initializeSpa.d.ts +9 -0
- package/bin/{postinstall/uiModuleMeta.d.ts → sync-extensions/extensionModuleMeta.d.ts} +5 -5
- package/bin/sync-extensions/getExtensionModuleFileSourceCodeReadyToBeCopied.d.ts +12 -0
- package/bin/sync-extensions/index.d.ts +1 -0
- package/bin/{postinstall/installUiModulesPeerDependencies.d.ts → sync-extensions/installExtensionModulesPeerDependencies.d.ts} +3 -3
- package/bin/{postinstall → sync-extensions}/managedGitignoreFile.d.ts +4 -4
- package/bin/tools/getInstalledModuleDirPath.d.ts +0 -1
- package/bin/tools/isKnownByGit.d.ts +3 -0
- package/bin/tools/isRootPath.d.ts +1 -0
- package/bin/tools/listInstalledModules.d.ts +0 -1
- package/package.json +41 -63
- package/src/bin/eject-page.ts +8 -84
- package/src/bin/initialize-account-theme/initialize-account-theme.ts +15 -14
- package/src/bin/initialize-admin-theme.ts +17 -124
- package/src/bin/initialize-email-theme.ts +10 -34
- package/src/bin/keycloakify/generateResources/generateResources.ts +49 -21
- package/src/bin/main.ts +61 -16
- package/src/bin/own.ts +208 -0
- package/src/bin/shared/{addPostinstallScriptIfNotPresent.ts → initializeSpa/addSyncExtensionsToPostinstallScript.ts} +4 -4
- package/src/bin/shared/initializeSpa/index.ts +1 -0
- package/src/bin/shared/initializeSpa/initializeSpa.ts +149 -0
- package/src/bin/{postinstall/uiModuleMeta.ts → sync-extensions/extensionModuleMeta.ts} +48 -43
- package/src/bin/{postinstall/getUiModuleFileSourceCodeReadyToBeCopied.ts → sync-extensions/getExtensionModuleFileSourceCodeReadyToBeCopied.ts} +32 -21
- package/src/bin/sync-extensions/index.ts +1 -0
- package/src/bin/{postinstall/installUiModulesPeerDependencies.ts → sync-extensions/installExtensionModulesPeerDependencies.ts} +15 -13
- package/src/bin/{postinstall → sync-extensions}/managedGitignoreFile.ts +18 -18
- package/src/bin/{postinstall/postinstall.ts → sync-extensions/sync-extension.ts} +14 -26
- package/src/bin/tools/getInstalledModuleDirPath.ts +24 -22
- package/src/bin/tools/isKnownByGit.ts +45 -0
- package/src/bin/tools/isRootPath.ts +22 -0
- package/src/bin/tools/listInstalledModules.ts +4 -6
- package/src/bin/tools/npmInstall.ts +1 -1
- package/src/bin/tools/untrackFromGit.ts +19 -3
- package/src/bin/tsconfig.json +1 -1
- package/bin/300.index.js +0 -770
- package/bin/375.index.js +0 -4089
- package/bin/490.index.js +0 -1108
- package/bin/568.index.js +0 -1867
- package/bin/735.index.js +0 -907
- package/bin/743.index.js +0 -69
- package/bin/854.index.js +0 -68
- package/bin/initialize-account-theme/copyBoilerplate.d.ts +0 -4
- package/bin/initialize-account-theme/initializeAccountTheme_multiPage.d.ts +0 -3
- package/bin/initialize-account-theme/initializeAccountTheme_singlePage.d.ts +0 -11
- package/bin/postinstall/getUiModuleFileSourceCodeReadyToBeCopied.d.ts +0 -12
- package/bin/postinstall/index.d.ts +0 -1
- package/bin/shared/getLatestsSemVersionedTag.d.ts +0 -15
- package/bin/shared/promptKeycloakVersion.d.ts +0 -10
- package/bin/tools/OptionalIfCanBeUndefined.d.ts +0 -14
- package/bin/tools/crc32.d.ts +0 -9
- package/bin/tools/deflate.d.ts +0 -24
- package/bin/tools/isTrackedByGit.d.ts +0 -3
- package/bin/tools/octokit-addons/getLatestsSemVersionedTag.d.ts +0 -15
- package/bin/tools/octokit-addons/listTags.d.ts +0 -13
- package/bin/tools/tee.d.ts +0 -3
- package/bin/tools/trimIndent.d.ts +0 -5
- package/src/bin/eject-file.ts +0 -68
- package/src/bin/initialize-account-theme/copyBoilerplate.ts +0 -32
- package/src/bin/initialize-account-theme/initializeAccountTheme_multiPage.ts +0 -21
- package/src/bin/initialize-account-theme/initializeAccountTheme_singlePage.ts +0 -142
- package/src/bin/initialize-account-theme/src/single-page/KcContext.ts +0 -7
- package/src/bin/initialize-account-theme/src/single-page/KcPage.tsx +0 -11
- package/src/bin/postinstall/index.ts +0 -1
- package/src/bin/shared/getLatestsSemVersionedTag.ts +0 -201
- package/src/bin/shared/promptKeycloakVersion.ts +0 -72
- package/src/bin/tools/OptionalIfCanBeUndefined.ts +0 -12
- package/src/bin/tools/crc32.ts +0 -73
- package/src/bin/tools/deflate.ts +0 -61
- package/src/bin/tools/isTrackedByGit.ts +0 -29
- package/src/bin/tools/octokit-addons/getLatestsSemVersionedTag.ts +0 -47
- package/src/bin/tools/octokit-addons/listTags.ts +0 -60
- package/src/bin/tools/tee.ts +0 -39
- package/src/bin/tools/trimIndent.ts +0 -49
- /package/bin/{postinstall/postinstall.d.ts → sync-extensions/sync-extension.d.ts} +0 -0
- /package/src/bin/initialize-account-theme/{src/multi-page → multi-page-boilerplate}/KcContext.ts +0 -0
- /package/src/bin/initialize-account-theme/{src/multi-page → multi-page-boilerplate}/KcPage.tsx +0 -0
- /package/src/bin/initialize-account-theme/{src/multi-page → multi-page-boilerplate}/KcPageStory.tsx +0 -0
- /package/src/bin/initialize-account-theme/{src/multi-page → multi-page-boilerplate}/i18n.ts +0 -0
package/bin/930.index.js
ADDED
@@ -0,0 +1,164 @@
|
|
1
|
+
"use strict";
|
2
|
+
exports.id = 930;
|
3
|
+
exports.ids = [930];
|
4
|
+
exports.modules = {
|
5
|
+
|
6
|
+
/***/ 71930:
|
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 */ "command": () => (/* binding */ command)
|
12
|
+
/* harmony export */ });
|
13
|
+
/* harmony import */ var _sync_extensions_getExtensionModuleFileSourceCodeReadyToBeCopied__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2237);
|
14
|
+
/* harmony import */ var _sync_extensions_sync_extension__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28363);
|
15
|
+
/* harmony import */ var _sync_extensions_managedGitignoreFile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(69674);
|
16
|
+
/* harmony import */ var _sync_extensions_extensionModuleMeta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(77372);
|
17
|
+
/* harmony import */ var _tools_getAbsoluteAndInOsFormatPath__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84794);
|
18
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(71017);
|
19
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_5__);
|
20
|
+
/* harmony import */ var _tools_getInstalledModuleDirPath__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(93721);
|
21
|
+
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(73292);
|
22
|
+
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_7__);
|
23
|
+
/* harmony import */ var _tools_isInside__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90665);
|
24
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(78818);
|
25
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_9__);
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
async function command(params) {
|
37
|
+
const { buildContext, cliCommandOptions } = params;
|
38
|
+
const extensionModuleMetas = await (0,_sync_extensions_extensionModuleMeta__WEBPACK_IMPORTED_MODULE_3__/* .getExtensionModuleMetas */ .f)({ buildContext });
|
39
|
+
const { targetFileRelativePathsByExtensionModuleMeta } = await (async () => {
|
40
|
+
const fileOrDirectoryRelativePath = (0,path__WEBPACK_IMPORTED_MODULE_5__.relative)(buildContext.themeSrcDirPath, (0,_tools_getAbsoluteAndInOsFormatPath__WEBPACK_IMPORTED_MODULE_4__/* .getAbsoluteAndInOsFormatPath */ .c)({
|
41
|
+
cwd: buildContext.themeSrcDirPath,
|
42
|
+
pathIsh: cliCommandOptions.path
|
43
|
+
}));
|
44
|
+
const arr = extensionModuleMetas
|
45
|
+
.map(extensionModuleMeta => ({
|
46
|
+
extensionModuleMeta,
|
47
|
+
fileRelativePaths: extensionModuleMeta.files
|
48
|
+
.map(({ fileRelativePath }) => fileRelativePath)
|
49
|
+
.filter(fileRelativePath => fileRelativePath === fileOrDirectoryRelativePath ||
|
50
|
+
(0,_tools_isInside__WEBPACK_IMPORTED_MODULE_8__/* .isInside */ .V)({
|
51
|
+
dirPath: fileOrDirectoryRelativePath,
|
52
|
+
filePath: fileRelativePath
|
53
|
+
}))
|
54
|
+
}))
|
55
|
+
.filter(({ fileRelativePaths }) => fileRelativePaths.length !== 0);
|
56
|
+
const targetFileRelativePathsByExtensionModuleMeta = new Map();
|
57
|
+
for (const { extensionModuleMeta, fileRelativePaths } of arr) {
|
58
|
+
targetFileRelativePathsByExtensionModuleMeta.set(extensionModuleMeta, fileRelativePaths);
|
59
|
+
}
|
60
|
+
return { targetFileRelativePathsByExtensionModuleMeta };
|
61
|
+
})();
|
62
|
+
if (targetFileRelativePathsByExtensionModuleMeta.size === 0) {
|
63
|
+
console.log(chalk__WEBPACK_IMPORTED_MODULE_9___default().yellow("There is no Keycloakify extension modules files matching the provided path."));
|
64
|
+
process.exit(1);
|
65
|
+
}
|
66
|
+
const { ownedFilesRelativePaths: ownedFilesRelativePaths_current } = await (0,_sync_extensions_managedGitignoreFile__WEBPACK_IMPORTED_MODULE_2__/* .readManagedGitignoreFile */ .w)({
|
67
|
+
buildContext
|
68
|
+
});
|
69
|
+
await (cliCommandOptions.isRevert ? command_revert : command_own)({
|
70
|
+
extensionModuleMetas,
|
71
|
+
targetFileRelativePathsByExtensionModuleMeta,
|
72
|
+
ownedFilesRelativePaths_current,
|
73
|
+
buildContext
|
74
|
+
});
|
75
|
+
}
|
76
|
+
async function command_own(params) {
|
77
|
+
const { extensionModuleMetas, targetFileRelativePathsByExtensionModuleMeta, ownedFilesRelativePaths_current, buildContext } = params;
|
78
|
+
await (0,_sync_extensions_managedGitignoreFile__WEBPACK_IMPORTED_MODULE_2__/* .writeManagedGitignoreFile */ .Y)({
|
79
|
+
buildContext,
|
80
|
+
extensionModuleMetas,
|
81
|
+
ownedFilesRelativePaths: [
|
82
|
+
...ownedFilesRelativePaths_current,
|
83
|
+
...Array.from(targetFileRelativePathsByExtensionModuleMeta.values())
|
84
|
+
.flat()
|
85
|
+
.filter(fileRelativePath => !ownedFilesRelativePaths_current.includes(fileRelativePath))
|
86
|
+
]
|
87
|
+
});
|
88
|
+
const writeActions = [];
|
89
|
+
for (const [extensionModuleMeta, fileRelativePaths] of targetFileRelativePathsByExtensionModuleMeta.entries()) {
|
90
|
+
const extensionModuleDirPath = await (0,_tools_getInstalledModuleDirPath__WEBPACK_IMPORTED_MODULE_6__/* .getInstalledModuleDirPath */ .p)({
|
91
|
+
moduleName: extensionModuleMeta.moduleName,
|
92
|
+
packageJsonDirPath: (0,path__WEBPACK_IMPORTED_MODULE_5__.dirname)(buildContext.packageJsonFilePath)
|
93
|
+
});
|
94
|
+
for (const fileRelativePath of fileRelativePaths) {
|
95
|
+
if (ownedFilesRelativePaths_current.includes(fileRelativePath)) {
|
96
|
+
console.log(chalk__WEBPACK_IMPORTED_MODULE_9___default().grey(`You already have ownership over '${fileRelativePath}'.`));
|
97
|
+
continue;
|
98
|
+
}
|
99
|
+
writeActions.push(async () => {
|
100
|
+
const sourceCode = await (0,_sync_extensions_getExtensionModuleFileSourceCodeReadyToBeCopied__WEBPACK_IMPORTED_MODULE_0__/* .getExtensionModuleFileSourceCodeReadyToBeCopied */ .p)({
|
101
|
+
buildContext,
|
102
|
+
fileRelativePath,
|
103
|
+
isOwnershipAction: true,
|
104
|
+
extensionModuleName: extensionModuleMeta.moduleName,
|
105
|
+
extensionModuleDirPath,
|
106
|
+
extensionModuleVersion: extensionModuleMeta.version
|
107
|
+
});
|
108
|
+
await fs_promises__WEBPACK_IMPORTED_MODULE_7__.writeFile((0,path__WEBPACK_IMPORTED_MODULE_5__.join)(buildContext.themeSrcDirPath, fileRelativePath), sourceCode);
|
109
|
+
console.log(chalk__WEBPACK_IMPORTED_MODULE_9___default().green(`Ownership over '${fileRelativePath}' claimed.`));
|
110
|
+
});
|
111
|
+
}
|
112
|
+
}
|
113
|
+
if (writeActions.length === 0) {
|
114
|
+
console.log(chalk__WEBPACK_IMPORTED_MODULE_9___default().yellow("No new file claimed."));
|
115
|
+
return;
|
116
|
+
}
|
117
|
+
await Promise.all(writeActions.map(action => action()));
|
118
|
+
}
|
119
|
+
async function command_revert(params) {
|
120
|
+
const { extensionModuleMetas, targetFileRelativePathsByExtensionModuleMeta, ownedFilesRelativePaths_current, buildContext } = params;
|
121
|
+
const ownedFilesRelativePaths_toRemove = Array.from(targetFileRelativePathsByExtensionModuleMeta.values())
|
122
|
+
.flat()
|
123
|
+
.filter(fileRelativePath => {
|
124
|
+
if (!ownedFilesRelativePaths_current.includes(fileRelativePath)) {
|
125
|
+
console.log(chalk__WEBPACK_IMPORTED_MODULE_9___default().grey(`Ownership over '${fileRelativePath}' wasn't claimed.`));
|
126
|
+
return false;
|
127
|
+
}
|
128
|
+
console.log(chalk__WEBPACK_IMPORTED_MODULE_9___default().green(`Ownership over '${fileRelativePath}' relinquished.`));
|
129
|
+
return true;
|
130
|
+
});
|
131
|
+
if (ownedFilesRelativePaths_toRemove.length === 0) {
|
132
|
+
console.log(chalk__WEBPACK_IMPORTED_MODULE_9___default().yellow("No file relinquished."));
|
133
|
+
return;
|
134
|
+
}
|
135
|
+
await (0,_sync_extensions_managedGitignoreFile__WEBPACK_IMPORTED_MODULE_2__/* .writeManagedGitignoreFile */ .Y)({
|
136
|
+
buildContext,
|
137
|
+
extensionModuleMetas,
|
138
|
+
ownedFilesRelativePaths: ownedFilesRelativePaths_current.filter(fileRelativePath => !ownedFilesRelativePaths_toRemove.includes(fileRelativePath))
|
139
|
+
});
|
140
|
+
await (0,_sync_extensions_sync_extension__WEBPACK_IMPORTED_MODULE_1__/* .command */ .W)({ buildContext });
|
141
|
+
}
|
142
|
+
//# sourceMappingURL=own.js.map
|
143
|
+
|
144
|
+
/***/ }),
|
145
|
+
|
146
|
+
/***/ 90665:
|
147
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
148
|
+
|
149
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
150
|
+
/* harmony export */ "V": () => (/* binding */ isInside)
|
151
|
+
/* harmony export */ });
|
152
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71017);
|
153
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
154
|
+
|
155
|
+
function isInside(params) {
|
156
|
+
const { dirPath, filePath } = params;
|
157
|
+
return !(0,path__WEBPACK_IMPORTED_MODULE_0__.relative)(dirPath, filePath).startsWith("..");
|
158
|
+
}
|
159
|
+
//# sourceMappingURL=isInside.js.map
|
160
|
+
|
161
|
+
/***/ })
|
162
|
+
|
163
|
+
};
|
164
|
+
;
|
package/bin/946.index.js
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
exports.id = 946;
|
3
|
+
exports.ids = [946];
|
4
|
+
exports.modules = {
|
5
|
+
|
6
|
+
/***/ 74946:
|
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 */ "command": () => (/* reexport safe */ _sync_extension__WEBPACK_IMPORTED_MODULE_0__.W)
|
12
|
+
/* harmony export */ });
|
13
|
+
/* harmony import */ var _sync_extension__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28363);
|
14
|
+
|
15
|
+
//# sourceMappingURL=index.js.map
|
16
|
+
|
17
|
+
/***/ })
|
18
|
+
|
19
|
+
};
|
20
|
+
;
|