keycloakify 4.7.2 → 4.7.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/CHANGELOG.md +12 -0
- package/README.md +9 -6
- package/bin/build-keycloak-theme/build-keycloak-theme.js +5 -8
- package/bin/build-keycloak-theme/build-keycloak-theme.js.map +1 -1
- package/bin/build-keycloak-theme/generateKeycloakThemeResources.d.ts +1 -2
- package/bin/build-keycloak-theme/generateKeycloakThemeResources.js.map +1 -1
- package/bin/build-keycloak-theme/generateStartKeycloakTestingContainer.d.ts +9 -0
- package/bin/build-keycloak-theme/generateStartKeycloakTestingContainer.js +50 -0
- package/bin/build-keycloak-theme/generateStartKeycloakTestingContainer.js.map +1 -0
- package/bin/download-builtin-keycloak-theme.d.ts +1 -2
- package/bin/download-builtin-keycloak-theme.js.map +1 -1
- package/bin/generate-i18n-messages.js +3 -4
- package/bin/generate-i18n-messages.js.map +1 -1
- package/lib/components/Template.js +1 -1
- package/lib/components/Template.js.map +1 -1
- package/package.json +5 -23
- package/src/bin/build-keycloak-theme/build-keycloak-theme.ts +5 -8
- package/src/bin/build-keycloak-theme/generateKeycloakThemeResources.ts +1 -2
- package/src/bin/build-keycloak-theme/generateStartKeycloakTestingContainer.ts +44 -0
- package/src/bin/download-builtin-keycloak-theme.ts +2 -3
- package/src/bin/generate-i18n-messages.ts +1 -2
- package/src/lib/components/Template.tsx +1 -1
- package/bin/KeycloakVersion.d.ts +0 -2
- package/bin/KeycloakVersion.js +0 -5
- package/bin/KeycloakVersion.js.map +0 -1
- package/bin/build-keycloak-theme/generateDebugFiles/generateDebugFiles.d.ts +0 -8
- package/bin/build-keycloak-theme/generateDebugFiles/generateDebugFiles.js +0 -75
- package/bin/build-keycloak-theme/generateDebugFiles/generateDebugFiles.js.map +0 -1
- package/bin/build-keycloak-theme/generateDebugFiles/index.d.ts +0 -1
- package/bin/build-keycloak-theme/generateDebugFiles/index.js +0 -14
- package/bin/build-keycloak-theme/generateDebugFiles/index.js.map +0 -1
- package/bin/build-keycloak-theme/generateDebugFiles/standalone-ha_11.0.3.xml +0 -666
- package/bin/build-keycloak-theme/generateDebugFiles/standalone-ha_15.0.2.xml +0 -693
- package/bin/build-keycloak-theme/generateDebugFiles/standalone-ha_16.1.0.xml +0 -652
- package/bin/tools/isM1.d.ts +0 -1
- package/bin/tools/isM1.js +0 -28
- package/bin/tools/isM1.js.map +0 -1
- package/src/bin/KeycloakVersion.ts +0 -3
- package/src/bin/build-keycloak-theme/generateDebugFiles/generateDebugFiles.ts +0 -90
- package/src/bin/build-keycloak-theme/generateDebugFiles/index.ts +0 -1
- package/src/bin/build-keycloak-theme/generateDebugFiles/standalone-ha_11.0.3.xml +0 -666
- package/src/bin/build-keycloak-theme/generateDebugFiles/standalone-ha_15.0.2.xml +0 -693
- package/src/bin/build-keycloak-theme/generateDebugFiles/standalone-ha_16.1.0.xml +0 -652
- package/src/bin/tools/isM1.ts +0 -5
package/bin/tools/isM1.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export declare function getIsM1(): boolean;
|
package/bin/tools/isM1.js
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
5
|
-
}) : (function(o, m, k, k2) {
|
6
|
-
if (k2 === undefined) k2 = k;
|
7
|
-
o[k2] = m[k];
|
8
|
-
}));
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
11
|
-
}) : function(o, v) {
|
12
|
-
o["default"] = v;
|
13
|
-
});
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
15
|
-
if (mod && mod.__esModule) return mod;
|
16
|
-
var result = {};
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
18
|
-
__setModuleDefault(result, mod);
|
19
|
-
return result;
|
20
|
-
};
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
22
|
-
exports.getIsM1 = void 0;
|
23
|
-
var os = __importStar(require("os"));
|
24
|
-
function getIsM1() {
|
25
|
-
return os.cpus()[0].model.includes("Apple M1");
|
26
|
-
}
|
27
|
-
exports.getIsM1 = getIsM1;
|
28
|
-
//# sourceMappingURL=isM1.js.map
|
package/bin/tools/isM1.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"isM1.js","sourceRoot":"","sources":["../../src/bin/tools/isM1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAyB;AAEzB,SAAgB,OAAO;IACnB,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AACnD,CAAC;AAFD,0BAEC"}
|
@@ -1,90 +0,0 @@
|
|
1
|
-
import * as fs from "fs";
|
2
|
-
import { join as pathJoin, dirname as pathDirname } from "path";
|
3
|
-
import type { KeycloakVersion } from "../../KeycloakVersion";
|
4
|
-
import { getIsM1 } from "../../tools/isM1";
|
5
|
-
|
6
|
-
export const containerLaunchScriptBasename = "start_keycloak_testing_container.sh";
|
7
|
-
|
8
|
-
/** Files for being able to run a hot reload keycloak container */
|
9
|
-
export function generateDebugFiles(params: { keycloakVersion: KeycloakVersion; themeName: string; keycloakThemeBuildingDirPath: string }) {
|
10
|
-
const { themeName, keycloakThemeBuildingDirPath, keycloakVersion } = params;
|
11
|
-
|
12
|
-
fs.writeFileSync(
|
13
|
-
pathJoin(keycloakThemeBuildingDirPath, "Dockerfile"),
|
14
|
-
Buffer.from(
|
15
|
-
[
|
16
|
-
`FROM ${
|
17
|
-
getIsM1()
|
18
|
-
? "eduardosanzb/keycloak@sha256:b1f5bc674eaff6f4e7b37808b9863440310ff93c282fc9bff812377be48bf519"
|
19
|
-
: `jboss/keycloak:${keycloakVersion}`
|
20
|
-
}`,
|
21
|
-
"",
|
22
|
-
"USER root",
|
23
|
-
"",
|
24
|
-
"WORKDIR /",
|
25
|
-
"",
|
26
|
-
"ADD configuration /opt/jboss/keycloak/standalone/configuration/",
|
27
|
-
"",
|
28
|
-
'ENTRYPOINT [ "/opt/jboss/tools/docker-entrypoint.sh" ]',
|
29
|
-
].join("\n"),
|
30
|
-
"utf8",
|
31
|
-
),
|
32
|
-
);
|
33
|
-
|
34
|
-
const dockerImage = `${themeName}/keycloak-hot-reload`;
|
35
|
-
const containerName = "keycloak-testing-container";
|
36
|
-
|
37
|
-
fs.writeFileSync(
|
38
|
-
pathJoin(keycloakThemeBuildingDirPath, containerLaunchScriptBasename),
|
39
|
-
Buffer.from(
|
40
|
-
[
|
41
|
-
"#!/bin/bash",
|
42
|
-
"",
|
43
|
-
`cd ${keycloakThemeBuildingDirPath}`,
|
44
|
-
"",
|
45
|
-
`docker rm ${containerName} || true`,
|
46
|
-
"",
|
47
|
-
`docker build . -t ${dockerImage}`,
|
48
|
-
"",
|
49
|
-
"docker run \\",
|
50
|
-
" -p 8080:8080 \\",
|
51
|
-
` --name ${containerName} \\`,
|
52
|
-
" -e KEYCLOAK_USER=admin \\",
|
53
|
-
" -e KEYCLOAK_PASSWORD=admin \\",
|
54
|
-
" -e JAVA_OPTS=-Dkeycloak.profile=preview \\",
|
55
|
-
` -v ${pathJoin(
|
56
|
-
keycloakThemeBuildingDirPath,
|
57
|
-
"src",
|
58
|
-
"main",
|
59
|
-
"resources",
|
60
|
-
"theme",
|
61
|
-
themeName,
|
62
|
-
)}:/opt/jboss/keycloak/themes/${themeName}:rw \\`,
|
63
|
-
` -it ${dockerImage}:latest`,
|
64
|
-
"",
|
65
|
-
].join("\n"),
|
66
|
-
"utf8",
|
67
|
-
),
|
68
|
-
{ "mode": 0o755 },
|
69
|
-
);
|
70
|
-
|
71
|
-
const standaloneHaFilePath = pathJoin(keycloakThemeBuildingDirPath, "configuration", `standalone-ha.xml`);
|
72
|
-
|
73
|
-
try {
|
74
|
-
fs.mkdirSync(pathDirname(standaloneHaFilePath));
|
75
|
-
} catch {}
|
76
|
-
|
77
|
-
fs.writeFileSync(
|
78
|
-
standaloneHaFilePath,
|
79
|
-
fs
|
80
|
-
.readFileSync(pathJoin(__dirname, `standalone-ha_${keycloakVersion}.xml`))
|
81
|
-
.toString("utf8")
|
82
|
-
.replace(
|
83
|
-
new RegExp(
|
84
|
-
["<staticMaxAge>2592000</staticMaxAge>", "<cacheThemes>true</cacheThemes>", "<cacheTemplates>true</cacheTemplates>"].join("\\s*"),
|
85
|
-
"g",
|
86
|
-
),
|
87
|
-
["<staticMaxAge>-1</staticMaxAge>", "<cacheThemes>false</cacheThemes>", "<cacheTemplates>false</cacheTemplates>"].join("\n"),
|
88
|
-
),
|
89
|
-
);
|
90
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from "./generateDebugFiles";
|