keycloakify 10.0.0-rc.13 → 10.0.0-rc.14
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/package.json +10 -9053
- package/bin/copy-keycloak-resources-to-public.d.ts +0 -4
- package/bin/copy-keycloak-resources-to-public.js +0 -72
- package/bin/copy-keycloak-resources-to-public.js.map +0 -1
- package/bin/download-builtin-keycloak-theme.d.ts +0 -4
- package/bin/download-builtin-keycloak-theme.js +0 -76
- package/bin/download-builtin-keycloak-theme.js.map +0 -1
- package/bin/eject-keycloak-page.d.ts +0 -5
- package/bin/eject-keycloak-page.js +0 -201
- package/bin/eject-keycloak-page.js.map +0 -1
- package/bin/initialize-email-theme.d.ts +0 -4
- package/bin/initialize-email-theme.js +0 -121
- package/bin/initialize-email-theme.js.map +0 -1
- package/bin/keycloakify/buildJars/buildJar.d.ts +0 -15
- package/bin/keycloakify/buildJars/buildJar.js +0 -213
- package/bin/keycloakify/buildJars/buildJar.js.map +0 -1
- package/bin/keycloakify/buildJars/buildJars.d.ts +0 -7
- package/bin/keycloakify/buildJars/buildJars.js +0 -104
- package/bin/keycloakify/buildJars/buildJars.js.map +0 -1
- package/bin/keycloakify/buildJars/extensionVersions.d.ts +0 -12
- package/bin/keycloakify/buildJars/extensionVersions.js +0 -7
- package/bin/keycloakify/buildJars/extensionVersions.js.map +0 -1
- package/bin/keycloakify/buildJars/generatePom.d.ts +0 -13
- package/bin/keycloakify/buildJars/generatePom.js +0 -95
- package/bin/keycloakify/buildJars/generatePom.js.map +0 -1
- package/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.d.ts +0 -7
- package/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.js +0 -57
- package/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.js.map +0 -1
- package/bin/keycloakify/buildJars/index.d.ts +0 -1
- package/bin/keycloakify/buildJars/index.js +0 -18
- package/bin/keycloakify/buildJars/index.js.map +0 -1
- package/bin/keycloakify/generateFtl/generateFtl.d.ts +0 -23
- package/bin/keycloakify/generateFtl/generateFtl.js +0 -170
- package/bin/keycloakify/generateFtl/generateFtl.js.map +0 -1
- package/bin/keycloakify/generateFtl/index.d.ts +0 -1
- package/bin/keycloakify/generateFtl/index.js +0 -18
- package/bin/keycloakify/generateFtl/index.js.map +0 -1
- package/bin/keycloakify/generateSrcMainResources/bringInAccountV1.d.ts +0 -9
- package/bin/keycloakify/generateSrcMainResources/bringInAccountV1.js +0 -153
- package/bin/keycloakify/generateSrcMainResources/bringInAccountV1.js.map +0 -1
- package/bin/keycloakify/generateSrcMainResources/generateMessageProperties.d.ts +0 -8
- package/bin/keycloakify/generateSrcMainResources/generateMessageProperties.js +0 -271
- package/bin/keycloakify/generateSrcMainResources/generateMessageProperties.js.map +0 -1
- package/bin/keycloakify/generateSrcMainResources/generateSrcMainResources.d.ts +0 -7
- package/bin/keycloakify/generateSrcMainResources/generateSrcMainResources.js +0 -109
- package/bin/keycloakify/generateSrcMainResources/generateSrcMainResources.js.map +0 -1
- package/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForMainTheme.d.ts +0 -17
- package/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForMainTheme.js +0 -341
- package/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForMainTheme.js.map +0 -1
- package/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForThemeVariant.d.ts +0 -8
- package/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForThemeVariant.js +0 -47
- package/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForThemeVariant.js.map +0 -1
- package/bin/keycloakify/generateSrcMainResources/index.d.ts +0 -1
- package/bin/keycloakify/generateSrcMainResources/index.js +0 -18
- package/bin/keycloakify/generateSrcMainResources/index.js.map +0 -1
- package/bin/keycloakify/generateSrcMainResources/readExtraPageNames.d.ts +0 -5
- package/bin/keycloakify/generateSrcMainResources/readExtraPageNames.js +0 -105
- package/bin/keycloakify/generateSrcMainResources/readExtraPageNames.js.map +0 -1
- package/bin/keycloakify/generateSrcMainResources/readFieldNameUsage.d.ts +0 -6
- package/bin/keycloakify/generateSrcMainResources/readFieldNameUsage.js +0 -142
- package/bin/keycloakify/generateSrcMainResources/readFieldNameUsage.js.map +0 -1
- package/bin/keycloakify/generateStartKeycloakTestingContainer.d.ts +0 -13
- package/bin/keycloakify/generateStartKeycloakTestingContainer.js +0 -86
- package/bin/keycloakify/generateStartKeycloakTestingContainer.js.map +0 -1
- package/bin/keycloakify/index.d.ts +0 -1
- package/bin/keycloakify/index.js +0 -18
- package/bin/keycloakify/index.js.map +0 -1
- package/bin/keycloakify/keycloakify.d.ts +0 -4
- package/bin/keycloakify/keycloakify.js +0 -152
- package/bin/keycloakify/keycloakify.js.map +0 -1
- package/bin/keycloakify/replacers/replaceImportsInCssCode.d.ts +0 -15
- package/bin/keycloakify/replacers/replaceImportsInCssCode.js +0 -88
- package/bin/keycloakify/replacers/replaceImportsInCssCode.js.map +0 -1
- package/bin/keycloakify/replacers/replaceImportsInInlineCssCode.d.ts +0 -9
- package/bin/keycloakify/replacers/replaceImportsInInlineCssCode.js +0 -38
- package/bin/keycloakify/replacers/replaceImportsInInlineCssCode.js.map +0 -1
- package/bin/keycloakify/replacers/replaceImportsInJsCode/index.d.ts +0 -1
- package/bin/keycloakify/replacers/replaceImportsInJsCode/index.js +0 -18
- package/bin/keycloakify/replacers/replaceImportsInJsCode/index.js.map +0 -1
- package/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.d.ts +0 -12
- package/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.js +0 -70
- package/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.js.map +0 -1
- package/bin/keycloakify/replacers/replaceImportsInJsCode/vite.d.ts +0 -13
- package/bin/keycloakify/replacers/replaceImportsInJsCode/vite.js +0 -95
- package/bin/keycloakify/replacers/replaceImportsInJsCode/vite.js.map +0 -1
- package/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.d.ts +0 -12
- package/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.js +0 -103
- package/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.js.map +0 -1
- package/bin/main.d.ts +0 -4
- package/bin/main.js.map +0 -1
- package/bin/main.original.js +0 -287
- package/bin/shared/KeycloakVersionRange.d.ts +0 -5
- package/bin/shared/KeycloakVersionRange.js +0 -3
- package/bin/shared/KeycloakVersionRange.js.map +0 -1
- package/bin/shared/buildOptions.d.ts +0 -40
- package/bin/shared/buildOptions.js +0 -214
- package/bin/shared/buildOptions.js.map +0 -1
- package/bin/shared/copyKeycloakResourcesToPublic.d.ts +0 -8
- package/bin/shared/copyKeycloakResourcesToPublic.js +0 -177
- package/bin/shared/copyKeycloakResourcesToPublic.js.map +0 -1
- package/bin/shared/downloadAndUnzip.d.ts +0 -16
- package/bin/shared/downloadAndUnzip.js +0 -255
- package/bin/shared/downloadAndUnzip.js.map +0 -1
- package/bin/shared/downloadBuiltinKeycloakTheme.d.ts +0 -9
- package/bin/shared/downloadBuiltinKeycloakTheme.js +0 -316
- package/bin/shared/downloadBuiltinKeycloakTheme.js.map +0 -1
- package/bin/shared/downloadKeycloakStaticResources.d.ts +0 -11
- package/bin/shared/downloadKeycloakStaticResources.js +0 -102
- package/bin/shared/downloadKeycloakStaticResources.js.map +0 -1
- package/bin/shared/getJarFileBasename.d.ts +0 -6
- package/bin/shared/getJarFileBasename.js +0 -10
- package/bin/shared/getJarFileBasename.js.map +0 -1
- package/bin/shared/getThemeSrcDirPath.d.ts +0 -6
- package/bin/shared/getThemeSrcDirPath.js +0 -123
- package/bin/shared/getThemeSrcDirPath.js.map +0 -1
- package/bin/shared/metaInfKeycloakThemes.d.ts +0 -17
- package/bin/shared/metaInfKeycloakThemes.js +0 -51
- package/bin/shared/metaInfKeycloakThemes.js.map +0 -1
- package/bin/shared/promptKeycloakVersion.d.ts +0 -6
- package/bin/shared/promptKeycloakVersion.js +0 -159
- package/bin/shared/promptKeycloakVersion.js.map +0 -1
- package/bin/start-keycloak.d.ts +0 -8
- package/bin/start-keycloak.js +0 -287
- package/bin/start-keycloak.js.map +0 -1
- package/bin/tools/OptionalIfCanBeUndefined.d.ts +0 -14
- package/bin/tools/OptionalIfCanBeUndefined.js +0 -3
- package/bin/tools/OptionalIfCanBeUndefined.js.map +0 -1
- package/bin/tools/SemVer.d.ts +0 -26
- package/bin/tools/SemVer.js +0 -119
- package/bin/tools/SemVer.js.map +0 -1
- package/bin/tools/String.prototype.replaceAll.d.ts +0 -1
- package/bin/tools/String.prototype.replaceAll.js +0 -29
- package/bin/tools/String.prototype.replaceAll.js.map +0 -1
- package/bin/tools/crawl.d.ts +0 -5
- package/bin/tools/crawl.js +0 -74
- package/bin/tools/crawl.js.map +0 -1
- package/bin/tools/crc32.d.ts +0 -9
- package/bin/tools/crc32.js +0 -64
- package/bin/tools/crc32.js.map +0 -1
- package/bin/tools/deflate.d.ts +0 -24
- package/bin/tools/deflate.js +0 -164
- package/bin/tools/deflate.js.map +0 -1
- package/bin/tools/fetchProxyOptions.d.ts +0 -5
- package/bin/tools/fetchProxyOptions.js +0 -172
- package/bin/tools/fetchProxyOptions.js.map +0 -1
- package/bin/tools/fs.existsAsync.d.ts +0 -1
- package/bin/tools/fs.existsAsync.js +0 -86
- package/bin/tools/fs.existsAsync.js.map +0 -1
- package/bin/tools/fs.rm.d.ts +0 -8
- package/bin/tools/fs.rm.js +0 -151
- package/bin/tools/fs.rm.js.map +0 -1
- package/bin/tools/fs.rmSync.d.ts +0 -8
- package/bin/tools/fs.rmSync.js +0 -58
- package/bin/tools/fs.rmSync.js.map +0 -1
- package/bin/tools/getAbsoluteAndInOsFormatPath.d.ts +0 -4
- package/bin/tools/getAbsoluteAndInOsFormatPath.js +0 -44
- package/bin/tools/getAbsoluteAndInOsFormatPath.js.map +0 -1
- package/bin/tools/getNpmWorkspaceRootDirPath.d.ts +0 -5
- package/bin/tools/getNpmWorkspaceRootDirPath.js +0 -74
- package/bin/tools/getNpmWorkspaceRootDirPath.js.map +0 -1
- package/bin/tools/getThisCodebaseRootDirPath.d.ts +0 -1
- package/bin/tools/getThisCodebaseRootDirPath.js +0 -43
- package/bin/tools/getThisCodebaseRootDirPath.js.map +0 -1
- package/bin/tools/isInside.d.ts +0 -4
- package/bin/tools/isInside.js +0 -10
- package/bin/tools/isInside.js.map +0 -1
- package/bin/tools/kebabCaseToSnakeCase.d.ts +0 -1
- package/bin/tools/kebabCaseToSnakeCase.js +0 -35
- package/bin/tools/kebabCaseToSnakeCase.js.map +0 -1
- package/bin/tools/octokit-addons/getLatestsSemVersionedTag.d.ts +0 -14
- package/bin/tools/octokit-addons/getLatestsSemVersionedTag.js +0 -116
- package/bin/tools/octokit-addons/getLatestsSemVersionedTag.js.map +0 -1
- package/bin/tools/octokit-addons/listTags.d.ts +0 -13
- package/bin/tools/octokit-addons/listTags.js +0 -155
- package/bin/tools/octokit-addons/listTags.js.map +0 -1
- package/bin/tools/partitionPromiseSettledResults.d.ts +0 -2
- package/bin/tools/partitionPromiseSettledResults.js +0 -41
- package/bin/tools/partitionPromiseSettledResults.js.map +0 -1
- package/bin/tools/readThisNpmPackageVersion.d.ts +0 -1
- package/bin/tools/readThisNpmPackageVersion.js +0 -37
- package/bin/tools/readThisNpmPackageVersion.js.map +0 -1
- package/bin/tools/tee.d.ts +0 -3
- package/bin/tools/tee.js +0 -37
- package/bin/tools/tee.js.map +0 -1
- package/bin/tools/transformCodebase.d.ts +0 -20
- package/bin/tools/transformCodebase.js +0 -97
- package/bin/tools/transformCodebase.js.map +0 -1
- package/bin/tools/trimIndent.d.ts +0 -5
- package/bin/tools/trimIndent.js +0 -82
- package/bin/tools/trimIndent.js.map +0 -1
- package/bin/tools/unzip.d.ts +0 -2
- package/bin/tools/unzip.js +0 -274
- package/bin/tools/unzip.js.map +0 -1
- package/bin/tsconfig.tsbuildinfo +0 -1
- package/tsconfig.tsbuildinfo +0 -1
- package/vite-plugin/index.js +0 -50866
- package/vite-plugin/index.original.js +0 -17
- package/vite-plugin/tsconfig.tsbuildinfo +0 -1
- package/vite-plugin/vite-plugin.d.ts +0 -5
- package/vite-plugin/vite-plugin.js +0 -136
@@ -1,72 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
3
|
-
__assign = Object.assign || function(t) {
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
5
|
-
s = arguments[i];
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
7
|
-
t[p] = s[p];
|
8
|
-
}
|
9
|
-
return t;
|
10
|
-
};
|
11
|
-
return __assign.apply(this, arguments);
|
12
|
-
};
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
20
|
-
});
|
21
|
-
};
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
24
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
26
|
-
function step(op) {
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
28
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
29
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
31
|
-
switch (op[0]) {
|
32
|
-
case 0: case 1: t = op; break;
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
36
|
-
default:
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
41
|
-
if (t[2]) _.ops.pop();
|
42
|
-
_.trys.pop(); continue;
|
43
|
-
}
|
44
|
-
op = body.call(thisArg, _);
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
47
|
-
}
|
48
|
-
};
|
49
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
50
|
-
exports.command = void 0;
|
51
|
-
var copyKeycloakResourcesToPublic_1 = require("./shared/copyKeycloakResourcesToPublic");
|
52
|
-
var buildOptions_1 = require("./shared/buildOptions");
|
53
|
-
function command(params) {
|
54
|
-
return __awaiter(this, void 0, void 0, function () {
|
55
|
-
var cliCommandOptions, buildOptions;
|
56
|
-
return __generator(this, function (_a) {
|
57
|
-
switch (_a.label) {
|
58
|
-
case 0:
|
59
|
-
cliCommandOptions = params.cliCommandOptions;
|
60
|
-
buildOptions = (0, buildOptions_1.readBuildOptions)({ cliCommandOptions: cliCommandOptions });
|
61
|
-
return [4 /*yield*/, (0, copyKeycloakResourcesToPublic_1.copyKeycloakResourcesToPublic)({
|
62
|
-
"buildOptions": __assign(__assign({}, buildOptions), { "publicDirPath": buildOptions.reactAppRootDirPath })
|
63
|
-
})];
|
64
|
-
case 1:
|
65
|
-
_a.sent();
|
66
|
-
return [2 /*return*/];
|
67
|
-
}
|
68
|
-
});
|
69
|
-
});
|
70
|
-
}
|
71
|
-
exports.command = command;
|
72
|
-
//# sourceMappingURL=copy-keycloak-resources-to-public.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"copy-keycloak-resources-to-public.js","sourceRoot":"","sources":["../src/bin/copy-keycloak-resources-to-public.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wFAAuF;AACvF,sDAAyD;AAGzD,SAAsB,OAAO,CAAC,MAAgD;;;;;;oBAClE,iBAAiB,GAAK,MAAM,kBAAX,CAAY;oBAE/B,YAAY,GAAG,IAAA,+BAAgB,EAAC,EAAE,iBAAiB,mBAAA,EAAE,CAAC,CAAC;oBAE7D,qBAAM,IAAA,6DAA6B,EAAC;4BAChC,cAAc,wBACP,YAAY,KACf,eAAe,EAAE,YAAY,CAAC,mBAAmB,GACpD;yBACJ,CAAC,EAAA;;oBALF,SAKE,CAAC;;;;;CACN;AAXD,0BAWC"}
|
@@ -1,76 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
-
});
|
10
|
-
};
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
15
|
-
function step(op) {
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
20
|
-
switch (op[0]) {
|
21
|
-
case 0: case 1: t = op; break;
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
25
|
-
default:
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
30
|
-
if (t[2]) _.ops.pop();
|
31
|
-
_.trys.pop(); continue;
|
32
|
-
}
|
33
|
-
op = body.call(thisArg, _);
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
36
|
-
}
|
37
|
-
};
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
39
|
-
exports.command = void 0;
|
40
|
-
var path_1 = require("path");
|
41
|
-
var promptKeycloakVersion_1 = require("./shared/promptKeycloakVersion");
|
42
|
-
var buildOptions_1 = require("./shared/buildOptions");
|
43
|
-
var downloadBuiltinKeycloakTheme_1 = require("./shared/downloadBuiltinKeycloakTheme");
|
44
|
-
function command(params) {
|
45
|
-
return __awaiter(this, void 0, void 0, function () {
|
46
|
-
var cliCommandOptions, buildOptions, keycloakVersion, destDirPath;
|
47
|
-
return __generator(this, function (_a) {
|
48
|
-
switch (_a.label) {
|
49
|
-
case 0:
|
50
|
-
cliCommandOptions = params.cliCommandOptions;
|
51
|
-
buildOptions = (0, buildOptions_1.readBuildOptions)({
|
52
|
-
cliCommandOptions: cliCommandOptions
|
53
|
-
});
|
54
|
-
console.log("Select the Keycloak version from which you want to download the builtins theme:");
|
55
|
-
return [4 /*yield*/, (0, promptKeycloakVersion_1.promptKeycloakVersion)({
|
56
|
-
"startingFromMajor": undefined,
|
57
|
-
"cacheDirPath": buildOptions.cacheDirPath
|
58
|
-
})];
|
59
|
-
case 1:
|
60
|
-
keycloakVersion = (_a.sent()).keycloakVersion;
|
61
|
-
destDirPath = (0, path_1.join)(buildOptions.keycloakifyBuildDirPath, "src", "main", "resources", "theme");
|
62
|
-
console.log("Downloading builtins theme of Keycloak ".concat(keycloakVersion, " here ").concat(destDirPath));
|
63
|
-
return [4 /*yield*/, (0, downloadBuiltinKeycloakTheme_1.downloadBuiltinKeycloakTheme)({
|
64
|
-
keycloakVersion: keycloakVersion,
|
65
|
-
destDirPath: destDirPath,
|
66
|
-
buildOptions: buildOptions
|
67
|
-
})];
|
68
|
-
case 2:
|
69
|
-
_a.sent();
|
70
|
-
return [2 /*return*/];
|
71
|
-
}
|
72
|
-
});
|
73
|
-
});
|
74
|
-
}
|
75
|
-
exports.command = command;
|
76
|
-
//# sourceMappingURL=download-builtin-keycloak-theme.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"download-builtin-keycloak-theme.js","sourceRoot":"","sources":["../src/bin/download-builtin-keycloak-theme.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAAwC;AACxC,wEAAuE;AACvE,sDAAyD;AACzD,sFAAqF;AAGrF,SAAsB,OAAO,CAAC,MAAgD;;;;;;oBAClE,iBAAiB,GAAK,MAAM,kBAAX,CAAY;oBAE/B,YAAY,GAAG,IAAA,+BAAgB,EAAC;wBAClC,iBAAiB,mBAAA;qBACpB,CAAC,CAAC;oBAEH,OAAO,CAAC,GAAG,CAAC,iFAAiF,CAAC,CAAC;oBAEnE,qBAAM,IAAA,6CAAqB,EAAC;4BACpD,mBAAmB,EAAE,SAAS;4BAC9B,cAAc,EAAE,YAAY,CAAC,YAAY;yBAC5C,CAAC,EAAA;;oBAHM,eAAe,GAAK,CAAA,SAG1B,CAAA,gBAHqB;oBAKjB,WAAW,GAAG,IAAA,WAAQ,EAAC,YAAY,CAAC,uBAAuB,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;oBAExG,OAAO,CAAC,GAAG,CAAC,iDAA0C,eAAe,mBAAS,WAAW,CAAE,CAAC,CAAC;oBAE7F,qBAAM,IAAA,2DAA4B,EAAC;4BAC/B,eAAe,iBAAA;4BACf,WAAW,aAAA;4BACX,YAAY,cAAA;yBACf,CAAC,EAAA;;oBAJF,SAIE,CAAC;;;;;CACN;AAvBD,0BAuBC"}
|
@@ -1,201 +0,0 @@
|
|
1
|
-
#!/usr/bin/env node
|
2
|
-
"use strict";
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
4
|
-
if (k2 === undefined) k2 = k;
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
8
|
-
}
|
9
|
-
Object.defineProperty(o, k2, desc);
|
10
|
-
}) : (function(o, m, k, k2) {
|
11
|
-
if (k2 === undefined) k2 = k;
|
12
|
-
o[k2] = m[k];
|
13
|
-
}));
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
16
|
-
}) : function(o, v) {
|
17
|
-
o["default"] = v;
|
18
|
-
});
|
19
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
20
|
-
if (mod && mod.__esModule) return mod;
|
21
|
-
var result = {};
|
22
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
23
|
-
__setModuleDefault(result, mod);
|
24
|
-
return result;
|
25
|
-
};
|
26
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
27
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
28
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
29
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
30
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
31
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
32
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
33
|
-
});
|
34
|
-
};
|
35
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
36
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
37
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
38
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
39
|
-
function step(op) {
|
40
|
-
if (f) throw new TypeError("Generator is already executing.");
|
41
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
42
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
43
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
44
|
-
switch (op[0]) {
|
45
|
-
case 0: case 1: t = op; break;
|
46
|
-
case 4: _.label++; return { value: op[1], done: false };
|
47
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
48
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
49
|
-
default:
|
50
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
51
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
52
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
53
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
54
|
-
if (t[2]) _.ops.pop();
|
55
|
-
_.trys.pop(); continue;
|
56
|
-
}
|
57
|
-
op = body.call(thisArg, _);
|
58
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
59
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
60
|
-
}
|
61
|
-
};
|
62
|
-
var __read = (this && this.__read) || function (o, n) {
|
63
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
64
|
-
if (!m) return o;
|
65
|
-
var i = m.call(o), r, ar = [], e;
|
66
|
-
try {
|
67
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
68
|
-
}
|
69
|
-
catch (error) { e = { error: error }; }
|
70
|
-
finally {
|
71
|
-
try {
|
72
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
73
|
-
}
|
74
|
-
finally { if (e) throw e.error; }
|
75
|
-
}
|
76
|
-
return ar;
|
77
|
-
};
|
78
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
79
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
80
|
-
if (ar || !(i in from)) {
|
81
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
82
|
-
ar[i] = from[i];
|
83
|
-
}
|
84
|
-
}
|
85
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
86
|
-
};
|
87
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
88
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
89
|
-
};
|
90
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
91
|
-
exports.command = void 0;
|
92
|
-
var getThisCodebaseRootDirPath_1 = require("./tools/getThisCodebaseRootDirPath");
|
93
|
-
var cli_select_1 = __importDefault(require("cli-select"));
|
94
|
-
var constants_1 = require("./shared/constants");
|
95
|
-
var capitalize_1 = require("tsafe/capitalize");
|
96
|
-
var fs = __importStar(require("fs"));
|
97
|
-
var path_1 = require("path");
|
98
|
-
var kebabCaseToSnakeCase_1 = require("./tools/kebabCaseToSnakeCase");
|
99
|
-
var assert_1 = require("tsafe/assert");
|
100
|
-
var getThemeSrcDirPath_1 = require("./shared/getThemeSrcDirPath");
|
101
|
-
var buildOptions_1 = require("./shared/buildOptions");
|
102
|
-
function command(params) {
|
103
|
-
return __awaiter(this, void 0, void 0, function () {
|
104
|
-
var cliCommandOptions, buildOptions, themeType, pageId, componentPageBasename, themeSrcDirPath, targetFilePath, targetDirPath, componentPageContent, userProfileFormFieldComponentName;
|
105
|
-
return __generator(this, function (_a) {
|
106
|
-
switch (_a.label) {
|
107
|
-
case 0:
|
108
|
-
cliCommandOptions = params.cliCommandOptions;
|
109
|
-
buildOptions = (0, buildOptions_1.readBuildOptions)({
|
110
|
-
cliCommandOptions: cliCommandOptions
|
111
|
-
});
|
112
|
-
console.log("Theme type:");
|
113
|
-
return [4 /*yield*/, (0, cli_select_1.default)({
|
114
|
-
"values": __spreadArray([], __read(constants_1.themeTypes), false)
|
115
|
-
}).catch(function () {
|
116
|
-
console.log("Aborting");
|
117
|
-
process.exit(-1);
|
118
|
-
})];
|
119
|
-
case 1:
|
120
|
-
themeType = (_a.sent()).value;
|
121
|
-
console.log("Select the page you want to customize:");
|
122
|
-
return [4 /*yield*/, (0, cli_select_1.default)({
|
123
|
-
"values": (function () {
|
124
|
-
switch (themeType) {
|
125
|
-
case "login":
|
126
|
-
return __spreadArray([], __read(constants_1.loginThemePageIds), false);
|
127
|
-
case "account":
|
128
|
-
return __spreadArray([], __read(constants_1.accountThemePageIds), false);
|
129
|
-
}
|
130
|
-
(0, assert_1.assert)(false);
|
131
|
-
})()
|
132
|
-
}).catch(function () {
|
133
|
-
console.log("Aborting");
|
134
|
-
process.exit(-1);
|
135
|
-
})];
|
136
|
-
case 2:
|
137
|
-
pageId = (_a.sent()).value;
|
138
|
-
componentPageBasename = (0, capitalize_1.capitalize)((0, kebabCaseToSnakeCase_1.kebabCaseToCamelCase)(pageId)).replace(/ftl$/, "tsx");
|
139
|
-
themeSrcDirPath = (0, getThemeSrcDirPath_1.getThemeSrcDirPath)({ "reactAppRootDirPath": buildOptions.reactAppRootDirPath }).themeSrcDirPath;
|
140
|
-
targetFilePath = (0, path_1.join)(themeSrcDirPath, themeType, "pages", componentPageBasename);
|
141
|
-
if (fs.existsSync(targetFilePath)) {
|
142
|
-
console.log("".concat(pageId, " is already ejected, ").concat((0, path_1.relative)(process.cwd(), targetFilePath), " already exists"));
|
143
|
-
process.exit(-1);
|
144
|
-
}
|
145
|
-
{
|
146
|
-
targetDirPath = (0, path_1.dirname)(targetFilePath);
|
147
|
-
if (!fs.existsSync(targetDirPath)) {
|
148
|
-
fs.mkdirSync(targetDirPath, { "recursive": true });
|
149
|
-
}
|
150
|
-
}
|
151
|
-
componentPageContent = fs
|
152
|
-
.readFileSync((0, path_1.join)((0, getThisCodebaseRootDirPath_1.getThisCodebaseRootDirPath)(), "src", themeType, "pages", componentPageBasename))
|
153
|
-
.toString("utf8");
|
154
|
-
fs.writeFileSync(targetFilePath, Buffer.from(componentPageContent, "utf8"));
|
155
|
-
userProfileFormFieldComponentName = "UserProfileFormFields";
|
156
|
-
console.log(__spreadArray(__spreadArray([
|
157
|
-
"",
|
158
|
-
"`".concat((0, path_1.join)(".", (0, path_1.relative)(process.cwd(), targetFilePath)), "` copy pasted from the Keycloakify source code into your project."),
|
159
|
-
"",
|
160
|
-
"You now need to update your page router:",
|
161
|
-
"",
|
162
|
-
"`".concat((0, path_1.join)(".", (0, path_1.relative)(process.cwd(), themeSrcDirPath), themeType, "KcApp.tsx"), "`:"),
|
163
|
-
"```",
|
164
|
-
"// ...",
|
165
|
-
"",
|
166
|
-
"+const ".concat(componentPageBasename.replace(/.tsx$/, ""), " = lazy(() => import(\"./pages/").concat(componentPageBasename, "\"));"),
|
167
|
-
"",
|
168
|
-
" export default function KcApp(props: { kcContext: KcContext; }) {",
|
169
|
-
"",
|
170
|
-
" // ...",
|
171
|
-
"",
|
172
|
-
" return (",
|
173
|
-
" <Suspense>",
|
174
|
-
" {(() => {",
|
175
|
-
" switch (kcContext.pageId) {",
|
176
|
-
" // ...",
|
177
|
-
" case \"".concat(pageId, "\": return ("),
|
178
|
-
"+ <Login",
|
179
|
-
"+ {...{ kcContext, i18n, classes }}",
|
180
|
-
"+ Template={Template}"
|
181
|
-
], __read((!componentPageContent.includes(userProfileFormFieldComponentName)
|
182
|
-
? []
|
183
|
-
: ["+ ".concat(userProfileFormFieldComponentName, "={").concat(userProfileFormFieldComponentName, "}")])), false), [
|
184
|
-
"+ doUseDefaultCss={true}",
|
185
|
-
"+ />",
|
186
|
-
"+ );",
|
187
|
-
" default: return <Fallback /* .. */ />;",
|
188
|
-
" }",
|
189
|
-
" })()}",
|
190
|
-
" </Suspense>",
|
191
|
-
" );",
|
192
|
-
" }",
|
193
|
-
"```"
|
194
|
-
], false).join("\n"));
|
195
|
-
return [2 /*return*/];
|
196
|
-
}
|
197
|
-
});
|
198
|
-
});
|
199
|
-
}
|
200
|
-
exports.command = command;
|
201
|
-
//# sourceMappingURL=eject-keycloak-page.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"eject-keycloak-page.js","sourceRoot":"","sources":["../src/bin/eject-keycloak-page.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,iFAAgF;AAChF,0DAAmC;AACnC,gDAO4B;AAC5B,+CAA8C;AAC9C,qCAAyB;AACzB,6BAA0F;AAC1F,qEAAoE;AACpE,uCAA8C;AAC9C,kEAAiE;AAEjE,sDAAyD;AAEzD,SAAsB,OAAO,CAAC,MAAgD;;;;;;oBAClE,iBAAiB,GAAK,MAAM,kBAAX,CAAY;oBAE/B,YAAY,GAAG,IAAA,+BAAgB,EAAC;wBAClC,iBAAiB,mBAAA;qBACpB,CAAC,CAAC;oBAEH,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;oBAEE,qBAAM,IAAA,oBAAS,EAAY;4BACpD,QAAQ,2BAAM,sBAAU,SAAC;yBAC5B,CAAC,CAAC,KAAK,CAAC;4BACL,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;4BAExB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;wBACrB,CAAC,CAAC,EAAA;;oBANa,SAAS,GAAK,CAAA,SAM3B,CAAA,MANsB;oBAQxB,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;oBAE5B,qBAAM,IAAA,oBAAS,EAAwC;4BAC7E,QAAQ,EAAE,CAAC;gCACP,QAAQ,SAAS,EAAE,CAAC;oCAChB,KAAK,OAAO;wCACR,gCAAW,6BAAiB,UAAE;oCAClC,KAAK,SAAS;wCACV,gCAAW,+BAAmB,UAAE;gCACxC,CAAC;gCACD,IAAA,eAAM,EAAkC,KAAK,CAAC,CAAC;4BACnD,CAAC,CAAC,EAAE;y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@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
-
if (mod && mod.__esModule) return mod;
|
20
|
-
var result = {};
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
-
__setModuleDefault(result, mod);
|
23
|
-
return result;
|
24
|
-
};
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
32
|
-
});
|
33
|
-
};
|
34
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
35
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
36
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
37
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
38
|
-
function step(op) {
|
39
|
-
if (f) throw new TypeError("Generator is already executing.");
|
40
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
41
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
42
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
43
|
-
switch (op[0]) {
|
44
|
-
case 0: case 1: t = op; break;
|
45
|
-
case 4: _.label++; return { value: op[1], done: false };
|
46
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
47
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
48
|
-
default:
|
49
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
50
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
51
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
52
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
53
|
-
if (t[2]) _.ops.pop();
|
54
|
-
_.trys.pop(); continue;
|
55
|
-
}
|
56
|
-
op = body.call(thisArg, _);
|
57
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
58
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
59
|
-
}
|
60
|
-
};
|
61
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
62
|
-
exports.command = void 0;
|
63
|
-
var downloadBuiltinKeycloakTheme_1 = require("./shared/downloadBuiltinKeycloakTheme");
|
64
|
-
var path_1 = require("path");
|
65
|
-
var transformCodebase_1 = require("./tools/transformCodebase");
|
66
|
-
var promptKeycloakVersion_1 = require("./shared/promptKeycloakVersion");
|
67
|
-
var buildOptions_1 = require("./shared/buildOptions");
|
68
|
-
var fs = __importStar(require("fs"));
|
69
|
-
var getThemeSrcDirPath_1 = require("./shared/getThemeSrcDirPath");
|
70
|
-
var fs_rmSync_1 = require("./tools/fs.rmSync");
|
71
|
-
function command(params) {
|
72
|
-
return __awaiter(this, void 0, void 0, function () {
|
73
|
-
var cliCommandOptions, buildOptions, themeSrcDirPath, emailThemeSrcDirPath, keycloakVersion, builtinKeycloakThemeTmpDirPath, themePropertyFilePath;
|
74
|
-
return __generator(this, function (_a) {
|
75
|
-
switch (_a.label) {
|
76
|
-
case 0:
|
77
|
-
cliCommandOptions = params.cliCommandOptions;
|
78
|
-
buildOptions = (0, buildOptions_1.readBuildOptions)({ cliCommandOptions: cliCommandOptions });
|
79
|
-
themeSrcDirPath = (0, getThemeSrcDirPath_1.getThemeSrcDirPath)({
|
80
|
-
"reactAppRootDirPath": buildOptions.reactAppRootDirPath
|
81
|
-
}).themeSrcDirPath;
|
82
|
-
emailThemeSrcDirPath = (0, path_1.join)(themeSrcDirPath, "email");
|
83
|
-
if (fs.existsSync(emailThemeSrcDirPath)) {
|
84
|
-
console.warn("There is already a ".concat((0, path_1.relative)(process.cwd(), emailThemeSrcDirPath), " directory in your project. Aborting."));
|
85
|
-
process.exit(-1);
|
86
|
-
}
|
87
|
-
console.log("Initialize with the base email theme from which version of Keycloak?");
|
88
|
-
return [4 /*yield*/, (0, promptKeycloakVersion_1.promptKeycloakVersion)({
|
89
|
-
// NOTE: This is arbitrary
|
90
|
-
"startingFromMajor": 17,
|
91
|
-
"cacheDirPath": buildOptions.cacheDirPath
|
92
|
-
})];
|
93
|
-
case 1:
|
94
|
-
keycloakVersion = (_a.sent()).keycloakVersion;
|
95
|
-
builtinKeycloakThemeTmpDirPath = (0, path_1.join)(buildOptions.cacheDirPath, "initialize-email-theme_tmp");
|
96
|
-
(0, fs_rmSync_1.rmSync)(builtinKeycloakThemeTmpDirPath, { "recursive": true, "force": true });
|
97
|
-
return [4 /*yield*/, (0, downloadBuiltinKeycloakTheme_1.downloadBuiltinKeycloakTheme)({
|
98
|
-
keycloakVersion: keycloakVersion,
|
99
|
-
"destDirPath": builtinKeycloakThemeTmpDirPath,
|
100
|
-
buildOptions: buildOptions
|
101
|
-
})];
|
102
|
-
case 2:
|
103
|
-
_a.sent();
|
104
|
-
(0, transformCodebase_1.transformCodebase)({
|
105
|
-
"srcDirPath": (0, path_1.join)(builtinKeycloakThemeTmpDirPath, "base", "email"),
|
106
|
-
"destDirPath": emailThemeSrcDirPath
|
107
|
-
});
|
108
|
-
{
|
109
|
-
themePropertyFilePath = (0, path_1.join)(emailThemeSrcDirPath, "theme.properties");
|
110
|
-
fs.writeFileSync(themePropertyFilePath, Buffer.from("parent=base\n".concat(fs.readFileSync(themePropertyFilePath).toString("utf8")), "utf8"));
|
111
|
-
}
|
112
|
-
console.log("The `".concat((0, path_1.join)(".", (0, path_1.relative)(process.cwd(), emailThemeSrcDirPath)), "` directory have been created."));
|
113
|
-
console.log("You can delete any file you don't modify.");
|
114
|
-
(0, fs_rmSync_1.rmSync)(builtinKeycloakThemeTmpDirPath, { "recursive": true });
|
115
|
-
return [2 /*return*/];
|
116
|
-
}
|
117
|
-
});
|
118
|
-
});
|
119
|
-
}
|
120
|
-
exports.command = command;
|
121
|
-
//# sourceMappingURL=initialize-email-theme.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"initialize-email-theme.js","sourceRoot":"","sources":["../src/bin/initialize-email-theme.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sFAAqF;AACrF,6BAAkE;AAClE,+DAA8D;AAC9D,wEAAuE;AACvE,sDAAyD;AACzD,qCAAyB;AACzB,kEAAiE;AACjE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IAAA,WAAQ,EAAC,8BAA8B,EAAE,MAAM,EAAE,OAAO,CAAC;wBACvE,aAAa,EAAE,oBAAoB;qBACtC,CAAC,CAAC;oBAEH,CAAC;wBACS,qBAAqB,GAAG,IAAA,WAAQ,EAAC,oBAAoB,EAAE,kBAAkB,CAAC,CAAC;wBAEjF,EAAE,CAAC,aAAa,CAAC,qBAAqB,EAAE,MAAM,CAAC,IAAI,CAAC,uBAAgB,EAAE,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAE,EAAE,MAAM,CAAC,CAAC,CAAC;oBAC5I,CAAC;oBAED,OAAO,CAAC,GAAG,CAAC,eAAS,IAAA,WAAQ,EAAC,GAAG,EAAE,IAAA,eAAY,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,oBAAoB,CAAC,CAAC,mCAAiC,CAAC,CAAC;oBACxH,OAAO,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAC;oBAEzD,IAAA,kBAAM,EAAC,8BAA8B,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;;;;;CACjE;AAlDD,0BAkDC"}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import type { KeycloakAccountV1Version, KeycloakThemeAdditionalInfoExtensionVersion } from "./extensionVersions";
|
2
|
-
import { BuildOptionsLike as BuildOptionsLike_generatePom } from "./generatePom";
|
3
|
-
export type BuildOptionsLike = BuildOptionsLike_generatePom & {
|
4
|
-
keycloakifyBuildDirPath: string;
|
5
|
-
themeNames: string[];
|
6
|
-
artifactId: string;
|
7
|
-
themeVersion: string;
|
8
|
-
cacheDirPath: string;
|
9
|
-
};
|
10
|
-
export declare function buildJar(params: {
|
11
|
-
jarFileBasename: string;
|
12
|
-
keycloakAccountV1Version: KeycloakAccountV1Version;
|
13
|
-
keycloakThemeAdditionalInfoExtensionVersion: KeycloakThemeAdditionalInfoExtensionVersion;
|
14
|
-
buildOptions: BuildOptionsLike;
|
15
|
-
}): Promise<void>;
|