Compare commits
19 Commits
Author | SHA1 | Date | |
---|---|---|---|
b5b3af4659 | |||
6cd231426d | |||
0c7cd1cd75 | |||
2425704ead | |||
4e22159206 | |||
52cf1ba02c | |||
516e84182f | |||
a3a9853e18 | |||
08e26600fd | |||
7793c2c6ba | |||
9e826d16dd | |||
80618bbd9c | |||
38ad47ea75 | |||
45ed359bef | |||
fcc26c3e7a | |||
d4ff6b1f40 | |||
557de34eea | |||
e034dc4d90 | |||
cfbd1e5e4b |
@ -49,9 +49,9 @@
|
|||||||
|
|
||||||
# Changelog highlights
|
# Changelog highlights
|
||||||
|
|
||||||
## 6.11.0
|
## 6.11.4
|
||||||
|
|
||||||
- <del>You no longer need to have Maven installed to build the theme. Thanks to @lordvlad, [see PR](https://github.com/InseeFrLab/keycloakify/pull/239)</del>.
|
- You no longer need to have Maven installed to build the theme. Thanks to @lordvlad, [see PR](https://github.com/InseeFrLab/keycloakify/pull/239).
|
||||||
- Feature new build options: [`bundler`](https://docs.keycloakify.dev/build-options#keycloakify.bundler), [`groupId`](https://docs.keycloakify.dev/build-options#keycloakify.groupid), [`artifactId`](https://docs.keycloakify.dev/build-options#keycloakify.artifactid), [`version`](https://docs.keycloakify.dev/build-options#version).
|
- Feature new build options: [`bundler`](https://docs.keycloakify.dev/build-options#keycloakify.bundler), [`groupId`](https://docs.keycloakify.dev/build-options#keycloakify.groupid), [`artifactId`](https://docs.keycloakify.dev/build-options#keycloakify.artifactid), [`version`](https://docs.keycloakify.dev/build-options#version).
|
||||||
Theses options can be user to customize the output name of the .jar. You can use environnement variables to overrides the values read in the package.json. Thanks to @lordvlad.
|
Theses options can be user to customize the output name of the .jar. You can use environnement variables to overrides the values read in the package.json. Thanks to @lordvlad.
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "keycloakify",
|
"name": "keycloakify",
|
||||||
"version": "6.11.2",
|
"version": "6.11.7",
|
||||||
"description": "Keycloak theme generator for Reacts app",
|
"description": "Keycloak theme generator for Reacts app",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -82,11 +82,11 @@
|
|||||||
"minimal-polyfills": "^2.2.2",
|
"minimal-polyfills": "^2.2.2",
|
||||||
"minimist": "^1.2.6",
|
"minimist": "^1.2.6",
|
||||||
"path-browserify": "^1.0.1",
|
"path-browserify": "^1.0.1",
|
||||||
"powerhooks": "^0.22.1",
|
"powerhooks": "^0.26.0",
|
||||||
"react-markdown": "^5.0.3",
|
"react-markdown": "^5.0.3",
|
||||||
"rfc4648": "^1.5.2",
|
"rfc4648": "^1.5.2",
|
||||||
"scripting-tools": "^0.19.13",
|
"scripting-tools": "^0.19.13",
|
||||||
"tsafe": "^1.4.2",
|
"tsafe": "^1.4.3",
|
||||||
"tss-react": "4.4.1-rc.0",
|
"tss-react": "4.4.1-rc.0",
|
||||||
"zod": "^3.17.10"
|
"zod": "^3.17.10"
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ export function readBuildOptions(params: {
|
|||||||
`${symToStr({ KEYCLOAKIFY_BUNDLER })} should be one of ${bundlers.join(", ")}`
|
`${symToStr({ KEYCLOAKIFY_BUNDLER })} should be one of ${bundlers.join(", ")}`
|
||||||
);
|
);
|
||||||
|
|
||||||
return KEYCLOAKIFY_BUNDLER ?? bundler ?? "mvn";
|
return KEYCLOAKIFY_BUNDLER ?? bundler ?? "keycloakify";
|
||||||
})(),
|
})(),
|
||||||
"artifactId": process.env.KEYCLOAKIFY_ARTIFACT_ID ?? artifactId ?? `${themeName}-keycloak-theme`,
|
"artifactId": process.env.KEYCLOAKIFY_ARTIFACT_ID ?? artifactId ?? `${themeName}-keycloak-theme`,
|
||||||
"groupId": (() => {
|
"groupId": (() => {
|
||||||
|
@ -4,5 +4,5 @@ export * from "./keycloakify";
|
|||||||
import { main } from "./keycloakify";
|
import { main } from "./keycloakify";
|
||||||
|
|
||||||
if (require.main === module) {
|
if (require.main === module) {
|
||||||
main();
|
main().catch(e => console.error(e));
|
||||||
}
|
}
|
||||||
|
@ -60,10 +60,10 @@ export async function main() {
|
|||||||
case "keycloakify":
|
case "keycloakify":
|
||||||
logger.log("🫶 Let keycloakify do its thang");
|
logger.log("🫶 Let keycloakify do its thang");
|
||||||
await jar({
|
await jar({
|
||||||
"rootPath": keycloakThemeBuildingDirPath,
|
"rootPath": pathJoin(keycloakThemeBuildingDirPath, "src", "main", "resources"),
|
||||||
"version": buildOptions.version,
|
"version": buildOptions.version,
|
||||||
"groupId": buildOptions.groupId,
|
"groupId": buildOptions.groupId,
|
||||||
"artifactId": buildOptions.artifactId || `${buildOptions.themeName}-keycloak-theme`,
|
"artifactId": buildOptions.artifactId,
|
||||||
"targetPath": jarFilePath
|
"targetPath": jarFilePath
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import { Readable, Transform } from "stream";
|
import { Readable, Transform } from "stream";
|
||||||
import { pipeline } from "stream/promises";
|
import { dirname, relative, sep } from "path";
|
||||||
import { relative, sep } from "path";
|
|
||||||
import { createWriteStream } from "fs";
|
import { createWriteStream } from "fs";
|
||||||
|
|
||||||
import walk from "./walk";
|
import walk from "./walk";
|
||||||
import type { ZipSource } from "./zip";
|
import type { ZipSource } from "./zip";
|
||||||
import zip from "./zip";
|
import zip from "./zip";
|
||||||
|
import { mkdir } from "fs/promises";
|
||||||
|
|
||||||
/** Trim leading whitespace from every line */
|
/** Trim leading whitespace from every line */
|
||||||
const trimIndent = (s: string) => s.replace(/(\n)\s+/g, "$1");
|
const trimIndent = (s: string) => s.replace(/(\n)\s+/g, "$1");
|
||||||
@ -57,9 +57,9 @@ export default async function jar({ groupId, artifactId, version, rootPath, targ
|
|||||||
const pathToRecord = () =>
|
const pathToRecord = () =>
|
||||||
new Transform({
|
new Transform({
|
||||||
objectMode: true,
|
objectMode: true,
|
||||||
transform: function (path, _, cb) {
|
transform: function (fsPath, _, cb) {
|
||||||
const filename = relative(rootPath, path).split(sep).join("/");
|
const path = relative(rootPath, fsPath).split(sep).join("/");
|
||||||
this.push({ filename, path });
|
this.push({ path, fsPath });
|
||||||
cb();
|
cb();
|
||||||
},
|
},
|
||||||
final: function () {
|
final: function () {
|
||||||
@ -69,19 +69,21 @@ export default async function jar({ groupId, artifactId, version, rootPath, targ
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
await mkdir(dirname(targetPath), { recursive: true });
|
||||||
* Create an async pipeline, wait until everything is fully processed
|
|
||||||
*/
|
// Create an async pipeline, wait until everything is fully processed
|
||||||
await pipeline(
|
await new Promise<void>((resolve, reject) => {
|
||||||
// walk all files in `rootPath` recursively
|
// walk all files in `rootPath` recursively
|
||||||
Readable.from(walk(rootPath)),
|
Readable.from(walk(rootPath))
|
||||||
// transform every path into a ZipSource object
|
// transform every path into a ZipSource object
|
||||||
pathToRecord(),
|
.pipe(pathToRecord())
|
||||||
// let the zip lib convert all ZipSource objects into a byte stream
|
// let the zip lib convert all ZipSource objects into a byte stream
|
||||||
zip(),
|
.pipe(zip())
|
||||||
// write that byte stream to targetPath
|
// write that byte stream to targetPath
|
||||||
createWriteStream(targetPath, { encoding: "binary" })
|
.pipe(createWriteStream(targetPath, { encoding: "binary" }))
|
||||||
);
|
.on("finish", () => resolve())
|
||||||
|
.on("error", e => reject(e));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { Transform, TransformOptions } from "stream";
|
import { Transform, TransformOptions } from "stream";
|
||||||
import { createReadStream } from "fs";
|
import { createReadStream } from "fs";
|
||||||
import { stat } from "fs/promises";
|
import { stat } from "fs/promises";
|
||||||
|
import { Blob } from "buffer";
|
||||||
|
|
||||||
import { deflateBuffer, deflateStream } from "./deflate";
|
import { deflateBuffer, deflateStream } from "./deflate";
|
||||||
|
|
||||||
@ -216,7 +217,7 @@ export default function zip() {
|
|||||||
const writeRecord = async (source: ZipSource) => {
|
const writeRecord = async (source: ZipSource) => {
|
||||||
if ("fsPath" in source) await writeFromPath(source.path, source.fsPath);
|
if ("fsPath" in source) await writeFromPath(source.path, source.fsPath);
|
||||||
else if ("data" in source) await writeFromBuffer(source.path, source.data);
|
else if ("data" in source) await writeFromBuffer(source.path, source.data);
|
||||||
else throw new Error("Illegal argument " + typeof source + " " + source);
|
else throw new Error("Illegal argument " + typeof source + " " + JSON.stringify(source));
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
13
yarn.lock
13
yarn.lock
@ -1639,10 +1639,10 @@ please-upgrade-node@^3.2.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
semver-compare "^1.0.0"
|
semver-compare "^1.0.0"
|
||||||
|
|
||||||
powerhooks@^0.22.1:
|
powerhooks@^0.26.0:
|
||||||
version "0.22.1"
|
version "0.26.0"
|
||||||
resolved "https://registry.yarnpkg.com/powerhooks/-/powerhooks-0.22.1.tgz#4e6c720e702e138c0869447e0d04bd0550530bbb"
|
resolved "https://registry.yarnpkg.com/powerhooks/-/powerhooks-0.26.0.tgz#260f8e5c019ea117911c880bf3b371ecd09786df"
|
||||||
integrity sha512-wR/gVPtpOeVAkjJXAHbTB6IBAIWL3RZo69DqxPZ2rXV108cwzOW978KZKd2h7m0QHJdg4ZXYwOsZ13E1EGrTFA==
|
integrity sha512-FvoEuj340Jm9HPGV98gjDVVdlolaIYXvQ4Xg7fiNtYdeClAJk264uFHAwFo9isXP92OW2ksvy9wVMCwMhFUGGQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
evt "^2.4.13"
|
evt "^2.4.13"
|
||||||
memoizee "^0.4.15"
|
memoizee "^0.4.15"
|
||||||
@ -2007,6 +2007,11 @@ tsafe@^1.4.2:
|
|||||||
resolved "https://registry.yarnpkg.com/tsafe/-/tsafe-1.4.2.tgz#1cc597f6e286ef8a64b918a0a6284bd04347e11f"
|
resolved "https://registry.yarnpkg.com/tsafe/-/tsafe-1.4.2.tgz#1cc597f6e286ef8a64b918a0a6284bd04347e11f"
|
||||||
integrity sha512-KfP0PYzRjl1LY1DnJPNlD4a0tZSg4uUuZxI4aG04T+j7WJvKZbh1zpaukphhSmtoJMgX1RV8eZVKTEiH8wOGbA==
|
integrity sha512-KfP0PYzRjl1LY1DnJPNlD4a0tZSg4uUuZxI4aG04T+j7WJvKZbh1zpaukphhSmtoJMgX1RV8eZVKTEiH8wOGbA==
|
||||||
|
|
||||||
|
tsafe@^1.4.3:
|
||||||
|
version "1.4.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/tsafe/-/tsafe-1.4.3.tgz#a98ce83616f0d9c01e3c6167a2ead45ba455b2ae"
|
||||||
|
integrity sha512-KjCdgjIqsbKW9oeJGSMVC23jhWm/VXJwkaZ7jffo/WaTioLGTHJqliHe9dECEVzIACNVNs/fwtKwU8wWK4jY4g==
|
||||||
|
|
||||||
tslib@^2.1.0:
|
tslib@^2.1.0:
|
||||||
version "2.4.0"
|
version "2.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
|
||||||
|
Reference in New Issue
Block a user