Fix other scripts

This commit is contained in:
garronej 2023-03-19 16:58:26 +01:00
parent 2b6c991190
commit 59d47592d9
4 changed files with 61 additions and 58 deletions

View File

@ -19,7 +19,7 @@
"_format": "prettier '**/*.{ts,tsx,json,md}'",
"format": "yarn _format --write",
"format:check": "yarn _format --list-different",
"generate-messages": "ts-node --skipProject scripts/generate-i18n-messages.ts",
"generate-i18n-messages": "ts-node --skipProject scripts/generate-i18n-messages.ts",
"link-in-app": "ts-node --skipProject scripts/link-in-app.ts",
"link-in-starter": "yarn link-in-app keycloakify-starter",
"tsc-watch": "tsc -p src/bin -w & tsc -p src/lib -w "

View File

@ -16,14 +16,15 @@ const propertiesParser = require("properties-parser");
const { isSilent } = getCliOptions(process.argv.slice(2));
const logger = getLogger({ isSilent });
for (const keycloakVersion of ["11.0.3", "15.0.2", "18.0.1"]) {
(async () => {
for (const keycloakVersion of ["11.0.3", "15.0.2", "18.0.1", "21.0.1"]) {
logger.log(JSON.stringify({ keycloakVersion }));
const tmpDirPath = pathJoin(getProjectRoot(), "tmp_xImOef9dOd44");
fs.rmSync(tmpDirPath, { "recursive": true, "force": true });
downloadBuiltinKeycloakTheme({
await downloadBuiltinKeycloakTheme({
keycloakVersion,
"destDirPath": tmpDirPath,
isSilent
@ -84,3 +85,4 @@ for (const keycloakVersion of ["11.0.3", "15.0.2", "18.0.1"]) {
});
});
}
})();

View File

@ -23,7 +23,7 @@ if (require.main === module) {
const builtinKeycloakThemeTmpDirPath = pathJoin(keycloakThemeEmailDirPath, "..", "tmp_xIdP3_builtin_keycloak_theme");
downloadBuiltinKeycloakTheme({
await downloadBuiltinKeycloakTheme({
keycloakVersion,
"destDirPath": builtinKeycloakThemeTmpDirPath,
isSilent

View File

@ -42,6 +42,7 @@ export function crc32(input: Readable | String | Buffer): Promise<number> {
} else if (input instanceof Readable) {
return new Promise<number>((resolve, reject) => {
let crc = ~0;
input.setMaxListeners(Infinity);
input.on("end", () => resolve((crc ^ -1) >>> 0));
input.on("error", e => reject(e));
input.on("data", (chunk: Buffer) => {