Compare commits

..

59 Commits

Author SHA1 Message Date
a40fdeb8f8 Enabling shorter import paths [automatic] 2021-02-28 19:01:03 +00:00
692ef67657 Update changelog v0.0.21 2021-02-28 19:00:18 +00:00
1f1c050467 Restore yarn file 2021-02-28 19:59:00 +01:00
8ff05917f2 Multiple fixes 2021-02-28 19:56:01 +01:00
a09157fe98 Update deps 2021-02-28 19:34:08 +01:00
e61fba3ffd Update deps 2021-02-28 18:45:55 +01:00
58ad8c1568 Merge branch 'develop' of https://github.com/garronej/keycloak-react-theming into develop 2021-02-28 18:41:08 +01:00
cd145b42d6 includes translations 2021-02-28 18:40:57 +01:00
a2ddadf88b Update README.md 2021-02-27 22:49:52 +01:00
f70625bf3f improve docs 2021-02-27 18:19:02 +01:00
06bc126584 Merge branch 'develop' of https://github.com/garronej/keycloak-react-theming into develop 2021-02-27 15:18:38 +01:00
63a0a30d44 update 2021-02-27 15:18:31 +01:00
06c1ef7eea Update README.md 2021-02-27 14:57:49 +01:00
9fc12ee74d update 2021-02-27 14:49:26 +01:00
b6bc851e60 update 2021-02-27 14:28:50 +01:00
217b2666a1 update 2021-02-27 13:59:53 +01:00
d122d17ff5 Merge branch 'develop' of https://github.com/garronej/keycloak-react-theming into develop 2021-02-27 13:47:05 +01:00
fef6883885 update 2021-02-27 13:46:59 +01:00
afe4fd4272 Update changelog v0.0.20 2021-02-27 01:33:17 +00:00
df00825abb update 2021-02-27 02:31:47 +01:00
79eb207b71 Merge branch 'develop' of https://github.com/garronej/keycloak-react-theming into develop 2021-02-27 02:22:52 +01:00
b884d157de update 2021-02-27 02:22:45 +01:00
6e2b9071a6 Update changelog v0.0.19 2021-02-27 01:17:04 +00:00
9d4dc5500d update 2021-02-27 02:15:49 +01:00
867b9b6965 update 2021-02-27 02:15:17 +01:00
a57700f978 Update changelog v0.0.18 2021-02-23 23:29:13 +00:00
f4f8145fca Bump version number 2021-02-24 00:27:54 +01:00
1e500c9344 Moving on with implementation of the lib 2021-02-24 00:27:16 +01:00
de3dce2598 Update readme 2021-02-23 18:11:03 +01:00
1e749b6df8 Readme eddit 2021-02-23 18:08:46 +01:00
95e04a282f Fixing video link 2021-02-23 18:07:09 +01:00
545e73d2c8 Merge branch 'develop' of https://github.com/garronej/keycloak-react-theming into develop 2021-02-23 18:03:08 +01:00
79cca43ad2 Bump version number (changelog ingore) 2021-02-23 18:03:01 +01:00
278f83a0f3 Update readme, add video 2021-02-23 18:02:20 +01:00
8024631dcc Update changelog v0.0.16 2021-02-23 16:45:33 +00:00
690596a347 Bump version 2021-02-23 17:44:51 +01:00
5b361df960 Merge branch 'develop' of https://github.com/garronej/keycloak-react-theming into develop 2021-02-23 17:44:00 +01:00
3482951a61 Give test container credentials 2021-02-23 17:43:54 +01:00
2a666f4823 Update changelog v0.0.14 2021-02-23 15:00:06 +00:00
6098e94f0e Merge branch 'develop' of https://github.com/garronej/keycloak-react-theming into develop 2021-02-23 15:58:38 +01:00
6d0f43da96 Bump version number 2021-02-23 15:58:32 +01:00
9d8eed255d enable the docker container to be run from the root of the react project 2021-02-23 15:58:10 +01:00
dda2d59690 Update changelog v0.0.13 2021-02-23 14:34:09 +00:00
8b28b10aea Merge branch 'develop' of https://github.com/garronej/keycloak-react-theming into develop 2021-02-23 15:32:42 +01:00
da5efb67e0 bump version 2021-02-23 15:32:37 +01:00
1ce8b1d4c2 Update changelog v0.0.12 2021-02-23 12:28:23 +00:00
c08c70dbd8 Merge branch 'develop' of https://github.com/garronej/keycloak-react-theming into develop 2021-02-23 13:26:56 +01:00
c275e12066 update readme 2021-02-23 13:14:43 +01:00
0c1c7b6a72 Update changelog v0.0.11 2021-02-23 12:14:12 +00:00
e4060a3802 Merge branch 'develop' of https://github.com/garronej/keycloak-react-theming into develop 2021-02-23 13:12:02 +01:00
1290d953d5 Add documentation 2021-02-23 13:11:56 +01:00
4944566b3d Update changelog v0.0.10 2021-02-23 08:51:59 +00:00
6ecc610680 Merge branch 'develop' of https://github.com/garronej/keycloak-react-theming into develop 2021-02-23 09:50:32 +01:00
278474bd61 Remove extra closing bracket 2021-02-23 09:50:24 +01:00
7f786f6ba9 Update changelog v0.0.9 2021-02-22 11:17:57 +00:00
4db546c23d Merge branch 'develop' of https://github.com/garronej/keycloak-react-theming into develop 2021-02-22 12:16:33 +01:00
fcd5aaa127 Bump version (changelog ignore) 2021-02-22 12:16:21 +01:00
002ffc0fde fix container startup script 2021-02-22 12:15:27 +01:00
47708d222e minor update 2021-02-22 12:11:00 +01:00
101 changed files with 27501 additions and 1977 deletions
.gitattributesCHANGELOG.mdREADME.md
bin
lib
package-lock.jsonpackage.json
src
test
tools
tsconfig.tsbuildinfoyarn.lock

3
.gitattributes vendored Normal file

@ -0,0 +1,3 @@
/src/lib/i18n/messages.generated.ts linguist-vendored=false
/src/bin/download-sample-keycloak-themes.ts linguist-vendored=false
/src/bin/build-keycloak-theme/index.ts linguist-vendored=false

@ -1,3 +1,68 @@
### **0.0.21** (2021-02-28)
- Restore yarn file
- Multiple fixes
- Update deps
- Update deps
- includes translations
- Update README.md
- improve docs
- update
- Update README.md
- update
- update
- update
- update
### **0.0.20** (2021-02-27)
- update
- update
### **0.0.19** (2021-02-27)
- update
- update
### **0.0.18** (2021-02-23)
- Bump version number
- Moving on with implementation of the lib
- Update readme
- Readme eddit
- Fixing video link
### **0.0.16** (2021-02-23)
- Bump version
- Give test container credentials
### **0.0.14** (2021-02-23)
- Bump version number
- enable the docker container to be run from the root of the react project
### **0.0.13** (2021-02-23)
- bump version
### **0.0.12** (2021-02-23)
- update readme
### **0.0.11** (2021-02-23)
- Add documentation
### **0.0.10** (2021-02-23)
- Remove extra closing bracket
### **0.0.9** (2021-02-22)
- fix container startup script
- minor update
### **0.0.8** (2021-02-21)
- Include theme properties

101
README.md

@ -1,8 +1,8 @@
<p align="center">
<img src="https://user-images.githubusercontent.com/6702424/80216211-00ef5280-863e-11ea-81de-59f3a3d4b8e4.png">
<img src="https://user-images.githubusercontent.com/6702424/109387840-eba11f80-7903-11eb-9050-db1dad883f78.png">
</p>
<p align="center">
<i>Provides a way to customize Keycloak login and register pages with React</i>
<i>🔏 Keycloak theme generator for Reacts app 🔏</i>
<br>
<br>
<img src="https://github.com/garronej/keycloak-react-theming/workflows/ci/badge.svg?branch=develop">
@ -10,31 +10,90 @@
<img src="https://img.shields.io/npm/dw/keycloak-react-theming">
<img src="https://img.shields.io/npm/l/keycloak-react-theming">
</p>
<p align="center">
<a href="https://github.com/garronej/keycloak-react-theming">Home</a>
-
<a href="https://github.com/garronej/keycloak-react-theming">Documentation</a>
</p>
# REQUIREMENT
## For building the theme:
- `mvn` must be installed
## For development, (testing the theme on a docker container ect ):
**!!! This module is under active developement. It is not usable yet!!!**
- `rm`
- `mkdir` )
- `wget`
- `unzip`
# Motivations
Tested on MacOS
The problem:
# USAGE
![keycloak_before](https://user-images.githubusercontent.com/6702424/108838381-dbbbcf80-75d3-11eb-8ae8-db41563ef9db.gif)
## Build the theme:
`npx build-keycloak-theme`
When we redirected to Keycloak the user suffers from a harsh context switch.
On je login/register pages the language is set back to default and the theme is different that the one on the app.
## (Optional/Debug) Download more themes:
Keycloak does offer a way to customize theses pages but it requires a lot of raw HTML/CSS hacking
to reproduce the look and feel of a specific app. Not mentioning the maintenance cost of such an endeavour.
`npx download-sample-keycloak-themes`
Wouldn't it be great if we could just design the login and register pages as if they where part of our app while
still letting Keycloak handle the heavy lifting of actually authenticating the users?
Here is `yarn add keycloak-react-theming` for you 🍸
TODO: Insert video after.
# How to use
## Setting up the build tool
Add `keycloak-react-theming` to the dev dependencies of your project `npm install --save-dev keycloak-react-theming` or `yarn add --dev keycloak-react-theming`
then configure your `package.json` build's script to build the keycloak's theme by adding `&& build-keycloak-theme`.
Typically you will get:
`package.json`:
```json
"devDependencies": {
"keycloak-react-theming": "^0.0.10"
},
"scripts": {
"build": "react-scripts build && build-keycloak-theme"
},
```
Then build your app with `yarn run build` or `npm run build`, you will be provided with instructions
about how to load the theme into Keycloak.
[![kickstart_video](https://user-images.githubusercontent.com/6702424/108877866-f146ee80-75ff-11eb-8120-003b3c5f6dd8.png)](https://youtu.be/xTz0Rj7i2v8)
## Developing your login and register pages in your React app
TODO
# How to implement context persistance
If you want dark mode preference, language and others users preferences your can do so
very easily by using [`powerhooks/useGlobalState`](https://github.com/garronej/powerhooks)
WARNING: `powerhooks` is still a work in progress.
# REQUIREMENTS
This tools assumes you are bundling your app with Webpack (tested with 4.44.2) .
It assumes there is a `build/` directory at the root of your react project directory containing a `index.html` file
and a `static/` directory generated by webpack.
**All this is defaults with [`create-react-app`](https://create-react-app.dev)** (tested with 4.0.3=)
- For building the theme: `mvn` (Maven) must be installed
- For development, (testing the theme in a local container ): `rm`, `mkdir`, `wget`, `unzip` are assumed to be available
and `docker` up and running.
NOTE: This build tool has only be tested on MacOS.
# API Reference
## The build tool
Part of the lib that runs with node, at build time.
- `npx build-keycloak-theme`: Builds the theme, the CWD is assumed to be the root of your react project.
- `npx download-sample-keycloak-themes`: Downloads the keycloak default themes (for development purposes)
## The fronted lib ( imported into your react app )
Part of the lib that you import in your react project and runs on the browser.
**TODO**

@ -1,3 +1,4 @@
export declare const containerLaunchScriptBasename = "start_keycloak_testing_container.sh";
/** Files for being able to run a hot reload keycloak container */
export declare function generateDebugFiles(params: {
packageJsonName: string;

@ -19,9 +19,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateDebugFiles = void 0;
exports.generateDebugFiles = exports.containerLaunchScriptBasename = void 0;
var fs = __importStar(require("fs"));
var path_1 = require("path");
exports.containerLaunchScriptBasename = "start_keycloak_testing_container.sh";
/** Files for being able to run a hot reload keycloak container */
function generateDebugFiles(params) {
var packageJsonName = params.packageJsonName, keycloakThemeBuildingDirPath = params.keycloakThemeBuildingDirPath;
@ -38,9 +39,11 @@ function generateDebugFiles(params) {
].join("\n"), "utf8"));
var dockerImage = packageJsonName + "/keycloak-hot-reload";
var containerName = "keycloak-testing-container";
fs.writeFileSync(path_1.join(keycloakThemeBuildingDirPath, "start_keycloak_testing_container.sh"), Buffer.from([
fs.writeFileSync(path_1.join(keycloakThemeBuildingDirPath, exports.containerLaunchScriptBasename), Buffer.from([
"#!/bin/bash",
"",
"cd " + keycloakThemeBuildingDirPath,
"",
"docker rm " + containerName + " || true",
"",
"docker build . -t " + dockerImage,
@ -50,7 +53,7 @@ function generateDebugFiles(params) {
"\t--name " + containerName + " \\",
" -e KEYCLOAK_USER=admin \\",
" -e KEYCLOAK_PASSWORD=admin \\",
"\t-v " + path_1.join(keycloakThemeBuildingDirPath, "src", "main", "resources", "theme", "onyxia") + ":/opt/jboss/keycloak/themes/onyxia:rw \\",
"\t-v " + path_1.join(keycloakThemeBuildingDirPath, "src", "main", "resources", "theme", packageJsonName) + ":/opt/jboss/keycloak/themes/" + packageJsonName + ":rw \\",
"\t-it " + dockerImage + ":latest",
""
].join("\n"), "utf8"), { "mode": 493 });

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/bin/build-keycloak-theme/generateDebugFiles/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AACA,qCAAyB;AACzB,6BAA0F;AAE1F,kEAAkE;AAClE,SAAgB,kBAAkB,CAC9B,MAGC;IAGO,IAAA,eAAe,GAAmC,MAAM,gBAAzC,EAAE,4BAA4B,GAAK,MAAM,6BAAX,CAAY;IAEjE,EAAE,CAAC,aAAa,CACZ,WAAQ,CAAC,4BAA4B,EAAE,YAAY,CAAC,EACpD,MAAM,CAAC,IAAI,CACP;QACI,4BAA4B;QAC5B,EAAE;QACF,WAAW;QACX,EAAE;QACF,WAAW;QACX,EAAE;QACF,iEAAiE;QACjE,EAAE;QACF,wDAAwD;KAC3D,CAAC,IAAI,CAAC,IAAI,CAAC,EACZ,MAAM,CACT,CACJ,CAAC;IAEF,IAAM,WAAW,GAAM,eAAe,yBAAsB,CAAC;IAC7D,IAAM,aAAa,GAAG,4BAA4B,CAAC;IAEnD,EAAE,CAAC,aAAa,CACZ,WAAQ,CAAC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CAAE,UAAU,CAAC,GAAG,EAAC,EAAE;gBACxB,OAAO;aACV;YAED,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,sBAAsB,GAAG,IAAI,CAAC,CAAC;QAE7D,CAAC,CAAC;IAVF,CAUE,CACL,CAAC;IAEF,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CACb;QACI,EAAE;QACF,SAAS;QACT,wDAA8B,CAC1B,EAAE,kBAAkB,oBAAA,EAAE,CACzB,CAAC,sBAAsB;QACxB,UAAU;QACV,EAAE;QACF,UAAU;QACV,oBAAoB;QACpB,oBAAkB,mBAAmB,MAAG;QACxC,WAAW;QACX,sBAAsB;QACtB,sDAAsD;QACtD,yDAAyD;QACzD,eAAe;QACf,WAAW;QACX,SAAS;QACT,WAAW;QACX,EAAE;KACL,CAAC,IAAI,CAAC,IAAI,CAAC,CACf,CAAC;IAGF,IAAM,2BAA2B,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;IAE7C,SAAS,oBAAoB,CACzB,MAEC;QAGO,IAAA,YAAY,GAAK,MAAM,aAAX,CAAY;QAEhC,IAAM,CAAC,GAAG,iBAAO,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;QAEpD,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CACb;YACI,EAAE;YACF,UAAU;YACV,eAAa,mBAAmB,iCAAyB,YAAY,UAAM;YAC3E,WAAW;YACX,EAAE;SACL,CAAC,IAAI,CAAC,IAAI,CAAC,CAEf,CAAC;QAEF,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;IAEnC,CAAC;IAED,OAAO,EAAE,oBAAoB,sBAAA,EAAE,CAAC;AAGpC,CAAC;AAhGD,kEAgGC"}

@ -0,0 +1,113 @@
<script>const _=
{
"url": {
"loginAction": "${url.loginAction}",
"resourcesPath": "${url.resourcesPath}",
"resourcesCommonPath": "${url.resourcesCommonPath}",
"loginRestartFlowUrl": "${url.loginRestartFlowUrl}"
},
"realm": {
"displayName": "${realm.displayName!''}" || undefined,
"displayNameHtml": "${realm.displayNameHtml!''}" || undefined,
"internationalizationEnabled": ${realm.internationalizationEnabled?c}
},
"locale": (function (){
<#if realm.internationalizationEnabled>
return {
"supported": (function(){
<#if realm.internationalizationEnabled>
var out= [];
<#list locale.supported as lng>
out.push({
"url": "${lng.url}",
"label": "${lng.label}",
"languageTag": "${lng.languageTag}"
});
</#list>
return out;
</#if>
return undefined;
})(),
"current": "${locale.current}"
};
</#if>
return undefined;
})(),
"auth": (function (){
<#if auth?has_content>
var out= {
"showUsername": ${auth.showUsername()?c},
"showResetCredentials": ${auth.showResetCredentials()?c},
"showTryAnotherWayLink": ${auth.showTryAnotherWayLink()?c}
};
<#if auth.showUsername() && !auth.showResetCredentials()>
Object.assign(
out,
{
"attemptedUsername": "${auth.attemptedUsername}"
}
);
</#if>
return out;
</#if>
return undefined;
})(),
"scripts": (function(){
var out = [];
<#if scripts??>
<#list scripts as script>
out.push("${script}");
</#list>
</#if>
return out;
})(),
"message": (function (){
<#if message?has_content>
return { 
"type": "${message.type}",
"summary": "${kcSanitize(message.summary)?no_esc}"
};
</#if>
return undefined;
})(),
"isAppInitiatedAction": (function (){
<#if isAppInitiatedAction??>
return true;
</#if>
return false;
})()
}
</script>

@ -15,13 +15,21 @@ var __read = (this && this.__read) || function (o, n) {
}
return ar;
};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateFtlFilesCodeFactory = void 0;
var cheerio_1 = __importDefault(require("cheerio"));
var replaceImportFromStatic_1 = require("./replaceImportFromStatic");
var replaceImportFromStatic_1 = require("../replaceImportFromStatic");
var fs_1 = __importDefault(require("fs"));
var path_1 = require("path");
var objectKeys_1 = require("evt/tools/typeSafety/objectKeys");
function generateFtlFilesCodeFactory(params) {
var ftlValuesGlobalName = params.ftlValuesGlobalName, cssGlobalsToDefine = params.cssGlobalsToDefine, indexHtmlCode = params.indexHtmlCode;
var $ = cheerio_1.default.load(indexHtmlCode);
@ -55,25 +63,36 @@ function generateFtlFilesCodeFactory(params) {
$(element).attr(attrName, "${url.resourcesPath}" + href);
});
});
$("head").prepend([
//FTL is no valid html, we can't insert with cheerio, we put placeholder for injecting later.
var ftlPlaceholders = {
'{ "x": "xIdLqMeOed9sdLdIdOxdK0d" }': fs_1.default.readFileSync(path_1.join(__dirname, "ftl2js.ftl"))
.toString("utf8")
.match(/^<script>const _=((?:.|\n)+)<\/script>[\n]?$/)[1],
'<!-- xIdLqMeOedErIdLsPdNdI9dSlxI -->': [
'<#if scripts??>',
' <#list scripts as script>',
' <script src="${script}" type="text/javascript"></script>',
' </#list>',
'</#if>',
].join("\n")
};
$("head").prepend(__spreadArray(__spreadArray([], __read((Object.keys(cssGlobalsToDefine).length === 0 ? [] : [
'',
'<style>',
replaceImportFromStatic_1.generateCssCodeToDefineGlobals({ cssGlobalsToDefine: cssGlobalsToDefine }).cssCodeToPrependInHead,
'</style>',
'',
''
]))), [
'<script>',
' Object.assign(',
" window." + ftlValuesGlobalName + ",",
' {',
' "url": {',
' "loginAction": "${url.loginAction}",',
' "resourcesPath": "${url.resourcesPath}"',
' }',
' }',
' });',
" " + objectKeys_1.objectKeys(ftlPlaceholders)[0],
' );',
'</script>',
'',
objectKeys_1.objectKeys(ftlPlaceholders)[1],
''
].join("\n"));
]).join("\n"));
var partiallyFixedIndexHtmlCode = $.html();
function generateFtlFilesCode(params) {
var pageBasename = params.pageBasename;
@ -85,9 +104,12 @@ function generateFtlFilesCodeFactory(params) {
'</script>',
''
].join("\n"));
return { "ftlCode": $.html() };
var ftlCode = $.html();
objectKeys_1.objectKeys(ftlPlaceholders)
.forEach(function (id) { return ftlCode = ftlCode.replace(id, ftlPlaceholders[id]); });
return { ftlCode: ftlCode };
}
return { generateFtlFilesCode: generateFtlFilesCode };
}
exports.generateFtlFilesCodeFactory = generateFtlFilesCodeFactory;
//# sourceMappingURL=generateFtl.js.map
//# sourceMappingURL=index.js.map

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/bin/build-keycloak-theme/generateFtl/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,oDAA8B;AAC9B,sEAGoC;AACpC,0CAAoB;AACpB,6BAAwC;AACxC,8DAA6D;AAE7D,SAAgB,2BAA2B,CACvC,MAIC;IAGO,IAAA,mBAAmB,GAAwC,MAAM,oBAA9C,EAAE,kBAAkB,GAAoB,MAAM,mBAA1B,EAAE,aAAa,GAAK,MAAM,cAAX,CAAY;IAE1E,IAAM,CAAC,GAAG,iBAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAEtC,CAAC,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC;QAAC,YAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,uBAAc;;QAAd,IAAA,KAAA,aAAc,EAAR,OAAO,QAAA,CAAC;QAE/B,IAAA,WAAW,GAAK,yDAA+B,CAAC;YACpD,mBAAmB,qBAAA;YACnB,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAG;SAC/B,CAAC,YAHiB,CAGhB;QAEH,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAEjC,CAAC,CAAC,CAAC;IAGF;QACG,CAAC,MAAM,EAAE,MAAM,CAAC;QAChB,CAAC,QAAQ,EAAE,KAAK,CAAC;KACV,CAAC,OAAO,CAAC,UAAC,EAAoB;YAApB,KAAA,aAAoB,EAAnB,QAAQ,QAAA,EAAE,QAAQ,QAAA;QACpC,OAAA,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC;YAAC,YAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IA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C;QAC9B,EAAE;OACJ,IAAI,CAAC,IAAI,CAAC,CACf,CAAC;IAGF,IAAM,2BAA2B,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;IAE7C,SAAS,oBAAoB,CACzB,MAEC;QAGO,IAAA,YAAY,GAAK,MAAM,aAAX,CAAY;QAEhC,IAAM,CAAC,GAAG,iBAAO,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;QAEpD,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CACb;YACI,EAAE;YACF,UAAU;YACV,eAAa,mBAAmB,iCAAyB,YAAY,UAAM;YAC3E,WAAW;YACX,EAAE;SACL,CAAC,IAAI,CAAC,IAAI,CAAC,CACf,CAAC;QAEF,IAAI,OAAO,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;QAEvB,uBAAU,CAAC,eAAe,CAAC;aACtB,OAAO,CAAC,UAAA,EAAE,IAAI,OAAA,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE,eAAe,CAAC,EAAE,CAAC,CAAC,EAAlD,CAAkD,CAAC,CAAC;QAEvE,OAAO,EAAE,OAAO,SAAA,EAAE,CAAC;IAEvB,CAAC;IAED,OAAO,EAAE,oBAAoB,sBAAA,EAAE,CAAC;AAGpC,CAAC;AAnHD,kEAmHC"}

@ -6,4 +6,6 @@ export declare type ParsedPackageJson = {
export declare function generateJavaStackFiles(params: {
parsedPackageJson: ParsedPackageJson;
keycloakThemeBuildingDirPath: string;
}): void;
}): {
jarFilePath: string;
};

@ -31,7 +31,8 @@ function generateJavaStackFiles(params) {
var _a, _b;
var fallbackGroupId = "there.was.no.homepage.field.in.the.package.json." + name;
return (!homepage ?
fallbackGroupId : (_b = (_a = url.parse(homepage).host) === null || _a === void 0 ? void 0 : _a.split(".").reverse().join(".")) !== null && _b !== void 0 ? _b : fallbackGroupId) + ".keycloak";
fallbackGroupId :
(_b = (_a = url.parse(homepage).host) === null || _a === void 0 ? void 0 : _a.split(".").reverse().join(".")) !== null && _b !== void 0 ? _b : fallbackGroupId) + ".keycloak";
})();
var artefactId = name + "-keycloak-theme";
var pomFileCode = [
@ -66,6 +67,7 @@ function generateJavaStackFiles(params) {
]
}, null, 2), "utf8"));
}
return { "jarFilePath": path_1.join(keycloakThemeBuildingDirPath, "target", name + "-" + version + ".jar") };
}
exports.generateJavaStackFiles = generateJavaStackFiles;
//# sourceMappingURL=generateJavaStackFiles.js.map

@ -1 +1 @@
{"version":3,"file":"generateJavaStackFiles.js","sourceRoot":"","sources":["../../src/bin/build-keycloak-theme/generateJavaStackFiles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AACA,uCAA2B;AAC3B,qCAAyB;AACzB,6BAAgE;AAQhE,SAAgB,sBAAsB,CAClC,MAGC;IAIG,IAAA,KAEA,MAAM,kBAFwC,EAAzB,IAAI,UAAA,EAAE,OAAO,aAAA,EAAE,QAAQ,cAAA,EAC5C,4BAA4B,GAC5B,MAAM,6BADsB,CACrB;IAEX;QAEY,IAAA,WAAW,GAAK,CAAC,SAAS,mBAAmB;YAGjD,IAAM,OAAO,GAAG,CAAC;;gBAEb,IAAM,eAAe,GAAG,qDAAmD,IAAM,CAAC;gBAElF,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC;oBACf,eAAe,CAAC,CAAC,aACjB,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,0CAAE,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC,GAAG,oCAAK,eAAe,CAC9E,GAAG,WAAW,CAAC;YAEpB,CAAC,CAAC,EAAE,CAAC;YAEL,IAAM,UAAU,GAAM,IAAI,oBAAiB,CAAC;YAE5C,IAAM,WAAW,GAAG;gBAChB,yBAAuB;gBACvB,sDAAoD;gBACpD,2DAAwD;gBACxD,sGAAmG;gBACnG,sCAAqC;gBACrC,gBAAa,OAAO,eAAY;gBAChC,mBAAgB,UAAU,kBAAe;gBACzC,gBAAa,OAAO,eAAY;gBAChC,aAAU,UA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I,MAAM,EAAE,IAAI;oBACZ,OAAO,EAAE,CAAC,OAAO,CAAC;iBACrB;aACJ;SACJ,EAAE,IAAI,EAAE,CAAC,CAAC,EACX,MAAM,CACT,CACJ,CAAC;KAEL;IAED,OAAO,EAAE,aAAa,EAAE,WAAQ,CAAC,4BAA4B,EAAE,QAAQ,EAAK,IAAI,SAAI,OAAO,SAAM,CAAC,EAAE,CAAC;AAEzG,CAAC;AAvFD,wDAuFC"}

@ -1,3 +1,4 @@
export declare const ftlValuesGlobalName = "keycloakPagesContext";
export declare function generateKeycloakThemeResources(params: {
themeName: string;
reactAppBuildDirPath: string;

@ -30,13 +30,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateKeycloakThemeResources = void 0;
var transformCodebase_1 = require("../../tools/transformCodebase");
exports.generateKeycloakThemeResources = exports.ftlValuesGlobalName = void 0;
var transformCodebase_1 = require("../tools/transformCodebase");
var fs = __importStar(require("fs"));
var path_1 = require("path");
var replaceImportFromStatic_1 = require("./replaceImportFromStatic");
var generateFtl_1 = require("./generateFtl");
var ftlValuesGlobalName = "keycloakFtlValues";
exports.ftlValuesGlobalName = "keycloakPagesContext";
function generateKeycloakThemeResources(params) {
var themeName = params.themeName, reactAppBuildDirPath = params.reactAppBuildDirPath, keycloakThemeBuildingDirPath = params.keycloakThemeBuildingDirPath;
var themeDirPath = path_1.join(keycloakThemeBuildingDirPath, "src", "main", "resources", "theme", themeName, "login");
@ -54,7 +54,7 @@ function generateKeycloakThemeResources(params) {
if (/\.js?$/i.test(filePath)) {
var fixedJsCode = replaceImportFromStatic_1.replaceImportFromStaticInJsCode({
"jsCode": sourceCode.toString("utf8"),
ftlValuesGlobalName: ftlValuesGlobalName
ftlValuesGlobalName: exports.ftlValuesGlobalName
}).fixedJsCode;
return { "modifiedSourceCode": Buffer.from(fixedJsCode, "utf8") };
}
@ -63,7 +63,7 @@ function generateKeycloakThemeResources(params) {
});
var generateFtlFilesCode = generateFtl_1.generateFtlFilesCodeFactory({
"cssGlobalsToDefine": allCssGlobalsToDefine,
ftlValuesGlobalName: ftlValuesGlobalName,
ftlValuesGlobalName: exports.ftlValuesGlobalName,
"indexHtmlCode": fs.readFileSync(path_1.join(reactAppBuildDirPath, "index.html")).toString("utf8")
}).generateFtlFilesCode;
["login.ftl", "register.ftl"].forEach(function (pageBasename) {

@ -1 +1 @@
{"version":3,"file":"generateKeycloakThemeResources.js","sourceRoot":"","sources":["../../src/bin/build-keycloak-theme/generateKeycloakThemeResources.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,mEAAkE;AAClE,qCAAyB;AACzB,6BAAwC;AACxC,qEAGmC;AACnC,6CAA4D;AAE5D,IAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAEhD,SAAgB,8BAA8B,CAC1C,MAIC;IAGO,IAAA,SAAS,GAAyD,MAAM,UAA/D,EAAE,oBAAoB,GAAmC,MAAM,qBAAzC,EAAE,4BAA4B,GAAK,MAAM,6BAAX,CAAY;IAEjF,IAAM,YAAY,GAAG,WAAQ,CAAC,4BAA4B,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAErH,IAAI,qBAAqB,GAA2B,EAAE,CAAC;IAEvD,qCAAiB,CAAC;QACd,aAAa,EAAE,WAAQ,CAAC,YAAY,EAAE,WAAW,CAAC;QAClD,YAAY,EAAE,oBAAoB;QAClC,2BAA2B,EAAE,UAAC,EAAwB;gBAAtB,QAAQ,cAAA,EAAE,UAAU,gBAAA;YAEhD,IAAI,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;gBAErB,IAAA,KAAuC,0DAAgC,CACzE,EAAE,SAAS,EAAE,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAC7C,EAFO,kBAAkB,wBAAA,EAAE,YAAY,kBAEvC,CAAC;gBAEF,qBAAqB,y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wEA0EC"}
{"version":3,"file":"generateKeycloakThemeResources.js","sourceRoot":"","sources":["../../src/bin/build-keycloak-theme/generateKeycloakThemeResources.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,gEAA+D;AAC/D,qCAAyB;AACzB,6BAAwC;AACxC,qEAGmC;AACnC,6CAA4D;AAE/C,QAAA,mBAAmB,GAAG,sBAAsB,CAAC;AAE1D,SAAgB,8BAA8B,CAC1C,MAIC;IAGO,IAAA,SAAS,GAAyD,MAAM,UAA/D,EAAE,oBAAoB,GAAmC,MAAM,qBAAzC,EAAE,4BAA4B,GAAK,MAAM,6BAAX,CAAY;IAEjF,IAAM,YAAY,GAAG,WAAQ,CAAC,4BAA4B,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAErH,IAAI,qBAAqB,GAA2B,EAAE,CAAC;IAEvD,qCAAiB,CAAC;QACd,aAAa,EAAE,WAAQ,CAAC,YAAY,EAAE,WAAW,CAAC;QAClD,YAAY,EAAE,oBAAoB;QAClC,2BAA2B,EAAE,UAAC,EAAwB;gBAAtB,QAAQ,cAAA,EAAE,UAAU,gBAAA;YAEhD,IAAI,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;gBAErB,IAAA,KAAuC,0DAAgC,CACzE,EAAE,SAAS,EAAE,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAC7C,EAFO,kBAAkB,wBAAA,EAAE,YAAY,kBAEvC,CAAC;gBAEF,qBAAqB,yBACd,qBAAqB,GACrB,kBAAkB,CACxB,CAAC;gBAEF,OAAO,EAAE,oBAAoB,EAAE,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE,CAAC;aAEtE;YAED,IAAI,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;gBAElB,IAAA,WAAW,GAAK,yDAA+B,CAAC;oBACpD,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC;oBACrC,mBAAmB,6BAAA;iBACtB,CAAC,YAHiB,CAGhB;gBAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,CAAC;aAErE;YAED,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,CAAC;QAEhD,CAAC;KACJ,CAAC,CAAC;IAEK,IAAA,oBAAoB,GAAK,yCAA2B,CAAC;QACzD,oBAAoB,EAAE,qBAAqB;QAC3C,mBAAmB,6BAAA;QACnB,eAAe,EAAE,EAAE,CAAC,YAAY,CAC5B,WAAQ,CAAC,oBAAoB,EAAE,YAAY,CAAC,CAC/C,CAAC,QAAQ,CAAC,MAAM,CAAC;KACrB,CAAC,qBAN0B,CAMzB;IAEF,CAAC,WAAW,EAAE,cAAc,CAAW,CAAC,OAAO,CAAC,UAAA,YAAY;QAEjD,IAAA,OAAO,GAAK,oBAAoB,CAAC,EAAE,YAAY,cAAA,EAAE,CAAC,QAA3C,CAA4C;QAE3D,EAAE,CAAC,aAAa,CACZ,WAAQ,CAAC,YAAY,EAAE,YAAY,CAAC,EACpC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAC/B,CAAA;IAEL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,aAAa,CACZ,WAAQ,CAAC,YAAY,EAAE,kBAAkB,CAAC,EAC1C,MAAM,CAAC,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,CACvC,CAAC;AAEN,CAAC;AA1ED,wEA0EC"}

@ -30,19 +30,57 @@ var reactProjectDirPath = process.cwd();
var parsedPackageJson = require(path_1.join(reactProjectDirPath, "package.json"));
exports.keycloakThemeBuildingDirPath = path_1.join(reactProjectDirPath, "build_keycloak");
if (require.main === module) {
console.log("🔏 Building the keycloak theme...⌚");
generateKeycloakThemeResources_1.generateKeycloakThemeResources({
keycloakThemeBuildingDirPath: exports.keycloakThemeBuildingDirPath,
"reactAppBuildDirPath": path_1.join(reactProjectDirPath, "build"),
"themeName": parsedPackageJson.name
});
generateJavaStackFiles_1.generateJavaStackFiles({
var jarFilePath = generateJavaStackFiles_1.generateJavaStackFiles({
parsedPackageJson: parsedPackageJson,
keycloakThemeBuildingDirPath: exports.keycloakThemeBuildingDirPath
});
}).jarFilePath;
child_process.execSync("mvn package", { "cwd": exports.keycloakThemeBuildingDirPath });
generateDebugFiles_1.generateDebugFiles({
keycloakThemeBuildingDirPath: exports.keycloakThemeBuildingDirPath,
"packageJsonName": parsedPackageJson.name
});
console.log([
'',
"\u2705 Your keycloak theme has been generated and bundled into ./" + path_1.relative(reactProjectDirPath, jarFilePath) + " \uD83D\uDE80",
"It is to be placed in \"/opt/jboss/keycloak/standalone/deployments\" in the container running a jboss/keycloak Docker image. (Tested with 11.0.3)",
'',
'Using Helm (https://github.com/codecentric/helm-charts), edit to reflect:',
'',
'value.yaml: ',
' extraInitContainers: |',
' - name: realm-ext-provider',
' image: curlimages/curl',
' imagePullPolicy: IfNotPresent',
' command:',
' - sh',
' args:',
' - -c',
" - curl -L -f -S -o /extensions/" + path_1.basename(jarFilePath) + " https://AN.URL.FOR/" + path_1.basename(jarFilePath),
' volumeMounts:',
' - name: extensions',
' mountPath: /extensions',
' ',
' extraVolumeMounts: |',
' - name: extensions',
' mountPath: /opt/jboss/keycloak/standalone/deployments',
'',
'',
'To test your theme locally, with hot reloading, you can spin up a Keycloak container image with the theme loaded by running:',
'',
"\uD83D\uDC49 $ ./" + path_1.relative(reactProjectDirPath, path_1.join(exports.keycloakThemeBuildingDirPath, generateDebugFiles_1.containerLaunchScriptBasename)) + " \uD83D\uDC48",
'',
'To enable the theme within keycloak log into the admin console ( 👉 http://localhost:8080 username: admin, password: admin 👈), create a realm (called "myrealm" for example),',
"go to your realm settings, click on the theme tab then select " + parsedPackageJson.name + ".",
"More details: https://www.keycloak.org/getting-started/getting-started-docker",
'',
'Once your container is up and configured 👉 http://localhost:8080/auth/realms/myrealm/account 👈',
'',
].join("\n"));
}
//# sourceMappingURL=index.js.map

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/bin/build-keycloak-theme/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA,mFAAkF;AAClF,mEAAkE;AAElE,6BAAwC;AACxC,2DAA+C;AAC/C,2DAA0D;AAE1D,IAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAE1C,IAAM,iBAAiB,GAAsB,OAAO,CAAC,WAAQ,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC,CAAC;AAEvF,QAAA,4BAA4B,GAAG,WAAQ,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,CAAC;AAE5F,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE;IAEzB,+DAA8B,CAAC;QAC3B,4BAA4B,sCAAA;QAC5B,sBAAsB,EAAE,WAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC;QAC9D,WAAW,EAAE,iBAAiB,CAAC,IAAI;KACtC,CAAC,CAAC;IAEH,+CAAsB,CAAC;QACnB,iBAAiB,mBAAA;QACjB,4BAA4B,sCAAA;KAC/B,CAAC,CAAC;IAEH,aAAa,CAAC,QAAQ,CAClB,aAAa,EACb,EAAE,KAAK,EAAE,oCAA4B,EAAE,CAC1C,CAAC;IAEF,uCAAkB,CAAC;QACf,4BAA4B,sCAAA;QAC5B,iBAAiB,EAAE,iBAAiB,CAAC,IAAI;KAC5C,CAAC,CAAC;CAEN"}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/bin/build-keycloak-theme/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA,mFAAkF;AAClF,mEAAkE;AAElE,6BAA4F;AAC5F,2DAA+C;AAC/C,2DAAyF;AAGzF,IAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAE1C,IAAM,iBAAiB,GAAsB,OA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B,EAAE,WAAQ,CAAC,oCAA4B,EAAE,kDAA6B,CAAC,CAAC,kBAAK;QACvH,EAAE;QACF,gLAAgL;QAChL,mEAAiE,iBAAiB,CAAC,IAAI,MAAG;QAC1F,+EAA+E;QAC/E,EAAE;QACF,kGAAkG;QAClG,EAAE;KACL,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;CAEjB"}

@ -34,9 +34,10 @@ var __read = (this && this.__read) || function (o, n) {
}
return ar;
};
var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateCssCodeToDefineGlobals = exports.replaceImportFromStaticInCssCode = exports.replaceImportFromStaticInJsCode = void 0;
@ -72,9 +73,9 @@ exports.replaceImportFromStaticInCssCode = replaceImportFromStaticInCssCode;
function generateCssCodeToDefineGlobals(params) {
var cssGlobalsToDefine = params.cssGlobalsToDefine;
return {
"cssCodeToPrependInHead": __spread([
"cssCodeToPrependInHead": __spreadArray(__spreadArray([
":root {"
], Object.keys(cssGlobalsToDefine)
], __read(Object.keys(cssGlobalsToDefine)
.map(function (cssVariableName) { return [
"--" + cssVariableName + ":",
[
@ -84,7 +85,7 @@ function generateCssCodeToDefineGlobals(params) {
")"
].join("")
].join(" "); })
.map(function (line) { return " " + line + ";"; }), [
.map(function (line) { return " " + line + ";"; }))), [
"}"
]).join("\n")
};

@ -1 +1 @@
{"version":3,"file":"replaceImportFromStatic.js","sourceRoot":"","sources":["../../src/bin/build-keycloak-theme/replaceImportFromStatic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAAiC;AAEjC,SAAgB,+BAA+B,CAC3C,MAGC;IAGO,IAAA,MAAM,GAA0B,MAAM,OAAhC,EA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ACpB,OAAK,eAAe,MAAG;YACvB;gBACI,MAAM;gBACN,sBAAsB;oBACtB,kBAAkB,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAE,CAAC,CAAC,CAAC;gBACjE,GAAG;aACN,CAAC,IAAI,CAAC,EAAE,CAAC;SACb,CAAC,IAAI,CAAC,GAAG,CAAC,EARa,CAQb,CAAC;aACX,GAAG,CAAC,UAAA,IAAI,IAAI,OAAA,SAAO,IAAI,MAAG,EAAd,CAAc,CAAC;YAChC,GAAG;WACL,IAAI,CAAC,IAAI,CAAC;KACf,CAAC;AAEN,CAAC;AA5BD,wEA4BC"}
{"version":3,"file":"replaceImportFromStatic.js","sourceRoot":"","sources":["../../src/bin/build-keycloak-theme/replaceImportFromStatic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAAiC;AAEjC,SAAgB,+BAA+B,CAC3C,MAGC;IAGO,IAAA,MAAM,GAA0B,MAAM,OAAhC,EAAE,mBAAmB,GAAK,MAAM,oBAAX,CAAY;IAE/C,IAAM,WAAW,GAAG,MAAO,CAAC,OAAO,CAC/B,YAAY,EACZ,YAAU,mBAAmB,gEAAwD,CACxF,CAAC;IAEF,OAAO,EAAE,WAAW,aAAA,EAAE,CAAC;AAE3B,CAAC;AAhBD,0EAgBC;AAED,SAAgB,gCAAgC,CAC5C,MAEC;;IAMO,IAAA,OAAO,GAAK,MAAM,QAAX,CAAY;IAE3B,IAAM,kBAAkB,GAA2B,EAAE,CAAC;IAEtD,IAAI,GAAG,CAAC,MAAA,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,mCAAI,EAAE,CAAC;SAC5C,OAAO,CAAC,UAAA,KAAK;QACV,OAAA,kBAAkB,CAClB,KAAK,GAAG,MAAM;aACT,UAAU,CAAC,QAAQ,CAAC;aACpB,MAAM,CAAC,KAAK,CAAC;aACb,MAAM,CAAC,KAAK,CAAC;aACb,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CACpB,GAAG,KAAK;IANT,CAMS,CACZ,CAAC;IAEN,IAAI,YAAY,GAAG,OAAO,CAAC;IAE3B,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,OAAO,CACnC,UAAA,eAAe;QACX,wCAAwC;QACxC,OAAA,YAAY;YACZ,YAAY,CAAC,KAAK,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAC;iBAClD,IAAI,CAAC,WAAS,eAAe,MAAG,CAAC;IAFtC,CAEsC,CAC7C,CAAC;IAEF,OAAO,EAAE,YAAY,cAAA,EAAE,kBAAkB,oBAAA,EAAE,CAAC;AAEhD,CAAC;AApCD,4EAoCC;AAED,SAAgB,8BAA8B,CAC1C,MAEC;IAKO,IAAA,kBAAkB,GAAK,MAAM,mBAAX,CAAY;IAEtC,OAAO;QACH,wBAAwB,EAAE;YACtB,SAAS;kBACN,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC;aAC7B,GAAG,CAAC,UAAA,eAAe,IAAI,OAAA;YACpB,OAAK,eAAe,MAAG;YACvB;gBACI,MAAM;gBACN,sBAAsB;oBACtB,kBAAkB,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAE,CAAC,CAAC,CAAC;gBACjE,GAAG;aACN,CAAC,IAAI,CAAC,EAAE,CAAC;SACb,CAAC,IAAI,CAAC,GAAG,CAAC,EARa,CAQb,CAAC;aACX,GAAG,CAAC,UAAA,IAAI,IAAI,OAAA,SAAO,IAAI,MAAG,EAAd,CAAc,CAAC;YAChC,GAAG;WACL,IAAI,CAAC,IAAI,CAAC;KACf,CAAC;AAEN,CAAC;AA5BD,wEA4BC"}

@ -1,2 +1,2 @@
#!/usr/bin/env node
export {};
export declare const keycloakBuiltinThemesAndThirdPartyExamplesThemsUrl = "https://github.com/garronej/keycloak-react-theming/releases/download/v0.0.1/other_keycloak_thems.zip";

@ -1,58 +1,15 @@
#!/usr/bin/env node
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var fs = __importStar(require("fs"));
var path_1 = require("path");
exports.keycloakBuiltinThemesAndThirdPartyExamplesThemsUrl = void 0;
var build_keycloak_theme_1 = require("./build-keycloak-theme");
var child_process_1 = __importDefault(require("child_process"));
if (!fs.existsSync(build_keycloak_theme_1.keycloakThemeBuildingDirPath)) {
console.log("Error: The keycloak theme need to be build");
process.exit(1);
var downloadAndUnzip_1 = require("./tools/downloadAndUnzip");
exports.keycloakBuiltinThemesAndThirdPartyExamplesThemsUrl = "https://github.com/garronej/keycloak-react-theming/releases/download/v0.0.1/other_keycloak_thems.zip";
if (require.main === module) {
console.log("execute!");
downloadAndUnzip_1.downloadAndUnzip({
"url": exports.keycloakBuiltinThemesAndThirdPartyExamplesThemsUrl,
"destDirPath": build_keycloak_theme_1.keycloakThemeBuildingDirPath
});
}
var url = "https://github.com/garronej/keycloak-react-theming/releases/download/v0.0.1/other_keycloak_thems.zip";
__spread([
"wget " + url
], ["unzip", "rm"].map(function (prg) { return prg + " " + path_1.basename(url); })).forEach(function (cmd) { return child_process_1.default.execSync(cmd, { "cwd": path_1.join(build_keycloak_theme_1.keycloakThemeBuildingDirPath, "src", "main", "resources", "theme") }); });
//# sourceMappingURL=download-sample-keycloak-themes.js.map

@ -1 +1 @@
{"version":3,"file":"download-sample-keycloak-themes.js","sourceRoot":"","sources":["../src/bin/download-sample-keycloak-themes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,qCAAyB;AACzB,6BAAkE;AAClE,+DAAsE;AACtE,gEAA0C;AAE1C,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,mDAA4B,CAAC,EAAE;IAC9C,OAAO,CAAC,GAAG,CAAC,4CAA4C,CAAC,CAAC;IAC1D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CACnB;AAED,IAAM,GAAG,GAAG,sGAAsG,CAAC;AAEnH;IACI,UAAQ,GAAK;GACV,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,UAAA,GAAG,IAAI,OAAG,GAAG,SAAI,eAAY,CAAC,GAAG,CAAG,EAA7B,CAA6B,CAAC,EAC9D,OAAO,CAAC,UAAA,GAAG,IAAI,OAAA,uBAAa,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,WAAQ,CAAC,mDAA4B,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,CAAC,EAAnH,CAAmH,CAAC,CAAC"}
{"version":3,"file":"download-sample-keycloak-themes.js","sourceRoot":"","sources":["../src/bin/download-sample-keycloak-themes.ts"],"names":[],"mappings":";;;;AAEA,+DAAsE;AACtE,6DAA4D;AAE/C,QAAA,kDAAkD,GAC3D,sGAAsG,CAAC;AAE3G,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE;IAEzB,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAExB,mCAAgB,CAAC;QACb,KAAK,EAAE,0DAAkD;QACzD,aAAa,EAAE,mDAA4B;KAC9C,CAAC,CAAC;CAEN"}

@ -0,0 +1,78 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
Object.defineProperty(exports, "__esModule", { value: true });
var fs = __importStar(require("fs"));
var path_1 = require("path");
var crawl_1 = require("./tools/crawl");
var downloadAndUnzip_1 = require("./tools/downloadAndUnzip");
var download_sample_keycloak_themes_1 = require("./download-sample-keycloak-themes");
var getProjectRoot_1 = require("./tools/getProjectRoot");
var child_process = __importStar(require("child_process"));
//@ts-ignore
var propertiesParser = require("properties-parser");
console.log(propertiesParser);
var tmpDirPath = path_1.join(getProjectRoot_1.getProjectRoot(), "tmp_xImOef9dOd44");
child_process.execSync("rm -rf " + tmpDirPath);
downloadAndUnzip_1.downloadAndUnzip({
"destDirPath": tmpDirPath,
"url": download_sample_keycloak_themes_1.keycloakBuiltinThemesAndThirdPartyExamplesThemsUrl
});
var record = {};
process.chdir(path_1.join(tmpDirPath, "base"));
crawl_1.crawl(".").forEach(function (filePath) {
var _a;
var match = filePath.match(/^([^/]+)\/messages\/messages_([^.]+)\.properties$/);
if (match === null) {
return;
}
var _b = __read(match, 3), typeOfPage = _b[1], language = _b[2];
((_a = record[typeOfPage]) !== null && _a !== void 0 ? _a : (record[typeOfPage] = {}))[language] =
propertiesParser.parse(fs.readFileSync(filePath)
.toString("utf8"));
});
child_process.execSync("rm -r " + tmpDirPath);
var targetFilePath = path_1.join("src", "lib", "i18n", "messages.generated.ts");
fs.writeFileSync(path_1.join(getProjectRoot_1.getProjectRoot(), targetFilePath), Buffer.from([
"//This code was automatically generated by running " + path_1.relative(getProjectRoot_1.getProjectRoot(), __filename),
'//PLEASE DO NOT EDIT MANUALLY',
'',
'/* spell-checker: disable */',
"export const messages= " + JSON.stringify(record, null, 2) + " as const;",
'/* spell-checker: enable */'
].join("\n"), "utf8"));
console.log(targetFilePath + " wrote");
//# sourceMappingURL=generate-i18n-messages.js.map

@ -0,0 +1 @@
{"version":3,"file":"generate-i18n-messages.js","sourceRoot":"","sources":["../src/bin/generate-i18n-messages.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAyB;AACzB,6BAAkE;AAClE,uCAAsC;AACtC,6DAA4D;AAC5D,qFAAuG;AACvG,yDAAwD;AACxD,2DAA+C;AAE/C,YAAY;AACZ,IAAM,gBAAgB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAEtD,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AAE9B,IAAM,UAAU,GAAG,WAAQ,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C,CAAC,eAAY;IACrE,6BAA6B;CAChC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAC5B,CAAC;AAEF,OAAO,CAAC,GAAG,CAAI,cAAc,WAAQ,CAAC,CAAC"}

1
bin/tools/crawl.js.map Normal file

@ -0,0 +1 @@
{"version":3,"file":"crawl.js","sourceRoot":"","sources":["../../src/bin/tools/crawl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAyB;AACzB,yCAA6B;AAE7B,gFAAgF;AACnE,QAAA,KAAK,GAAG,CAAC;IAElB,IAAM,QAAQ,GAAG,UAAC,QAAgB,EAAE,KAAe;;;YAE/C,KAAwB,IAAA,KAAA,SAAA,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA,gBAAA,4BAAE;gBAA7C,IAAM,SAAS,WAAA;gBAEhB,IAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;gBAEjD,IAAI,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,EAAE;oBAEvC,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;oBAE3B,SAAS;iBAEZ;gBAED,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aAEzB;;;;;;;;;IAEL,CAAC,CAAC;IAEF,OAAO,SAAS,KAAK,CAAC,QAAgB;QAElC,IAAM,KAAK,GAAa,EAAE,CAAC;QAE3B,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QAE1B,OAAO,KAAK,CAAC,GAAG,CAAC,UAAA,SAAS,IAAI,OAAA,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAlC,CAAkC,CAAC,CAAC;IAEtE,CAAC,CAAA;AAEL,CAAC,CAAC,EAAE,CAAC"}

4
bin/tools/downloadAndUnzip.d.ts vendored Normal file

@ -0,0 +1,4 @@
export declare function downloadAndUnzip(params: {
url: string;
destDirPath: string;
}): void;

@ -0,0 +1,39 @@
"use strict";
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.downloadAndUnzip = void 0;
var path_1 = require("path");
var child_process_1 = __importDefault(require("child_process"));
var fs_1 = __importDefault(require("fs"));
function downloadAndUnzip(params) {
var url = params.url, destDirPath = params.destDirPath;
fs_1.default.mkdirSync(destDirPath, { "recursive": true });
__spreadArray([
"wget " + url
], __read(["unzip", "rm"].map(function (prg) { return prg + " " + path_1.basename(url); }))).forEach(function (cmd) { return child_process_1.default.execSync(cmd, { "cwd": destDirPath }); });
}
exports.downloadAndUnzip = downloadAndUnzip;
//# sourceMappingURL=downloadAndUnzip.js.map

@ -0,0 +1 @@
{"version":3,"file":"downloadAndUnzip.js","sourceRoot":"","sources":["../../src/bin/tools/downloadAndUnzip.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6BAAgD;AAChD,gEAA0C;AAC1C,0CAAoB;AAEpB,SAAgB,gBAAgB,CAC5B,MAGC;IAGO,IAAA,GAAG,GAAkB,MAAM,IAAxB,EAAE,WAAW,GAAK,MAAM,YAAX,CAAY;IAEpC,YAAE,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;IAEjD;QACI,UAAQ,GAAK;cACV,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,UAAA,GAAG,IAAI,OAAG,GAAG,SAAI,eAAY,CAAC,GAAG,CAAG,EAA7B,CAA6B,CAAC,GAC9D,OAAO,CAAC,UAAA,GAAG,IAAI,OAAA,uBAAa,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,EAAnD,CAAmD,CAAC,CAAC;AAE1E,CAAC;AAhBD,4CAgBC"}

1
bin/tools/getProjectRoot.d.ts vendored Normal file

@ -0,0 +1 @@
export declare function getProjectRoot(): string;

@ -0,0 +1,39 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getProjectRoot = void 0;
var fs = __importStar(require("fs"));
var path = __importStar(require("path"));
function getProjectRootRec(dirPath) {
if (fs.existsSync(path.join(dirPath, "package.json"))) {
return dirPath;
}
return getProjectRootRec(path.join(dirPath, ".."));
}
var result = undefined;
function getProjectRoot() {
if (result !== undefined) {
return result;
}
return (result = getProjectRootRec(__dirname));
}
exports.getProjectRoot = getProjectRoot;
//# sourceMappingURL=getProjectRoot.js.map

@ -0,0 +1 @@
{"version":3,"file":"getProjectRoot.js","sourceRoot":"","sources":["../../src/bin/tools/getProjectRoot.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAyB;AACzB,yCAA6B;AAE7B,SAAS,iBAAiB,CAAC,OAAe;IACtC,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,EAAE;QACnD,OAAO,OAAO,CAAC;KAClB;IACD,OAAO,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;AACvD,CAAC;AAED,IAAI,MAAM,GAAuB,SAAS,CAAC;AAE3C,SAAgB,cAAc;IAC1B,IAAI,MAAM,KAAK,SAAS,EAAE;QACtB,OAAO,MAAM,CAAC;KACjB;IAED,OAAO,CAAC,MAAM,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC;AACnD,CAAC;AAND,wCAMC"}

1
bin/tools/grant-exec-perms.d.ts vendored Normal file

@ -0,0 +1 @@
export {};

@ -0,0 +1,30 @@
"use strict";
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var getProjectRoot_1 = require("./getProjectRoot");
var path_1 = require("path");
var child_process_1 = __importDefault(require("child_process"));
Object.entries(require(path_1.join(getProjectRoot_1.getProjectRoot(), "package.json"))["bin"])
.forEach(function (_a) {
var _b = __read(_a, 2), scriptPath = _b[1];
return child_process_1.default.execSync("chmod +x " + scriptPath, { "cwd": getProjectRoot_1.getProjectRoot() });
});
//# sourceMappingURL=grant-exec-perms.js.map

@ -0,0 +1 @@
{"version":3,"file":"grant-exec-perms.js","sourceRoot":"","sources":["../../src/bin/tools/grant-exec-perms.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,mDAAkD;AAClD,6BAAwC;AACxC,gEAA0C;AAE1C,MAAM,CAAC,OAAO,CAAS,OAAO,CAAC,WAAQ,CAAC,+BAAc,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;KAC7E,OAAO,CAAC,UAAC,EAAc;QAAd,KAAA,aAAc,EAAX,UAAU,QAAA;IAAM,OAAA,uBAAa,CAAC,QAAQ,CAAC,cAAY,UAAY,EAAE,EAAE,KAAK,EAAE,+BAAc,EAAE,EAAE,CAAC;AAA7E,CAA6E,CAAC,CAAC"}

@ -0,0 +1 @@
{"version":3,"file":"transformCodebase.js","sourceRoot":"","sources":["../../src/bin/tools/transformCodebase.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,qCAAyB;AACzB,yCAA6B;AAC7B,iCAAgC;AAEhC,iEAAiE;AACjE,SAAgB,iBAAiB,CAC7B,MAUC;;IAGO,IAAA,UAAU,GAA6C,MAAM,WAAnD,EAAE,WAAW,GAAgC,MAAM,YAAtC,EAAE,yBAAyB,GAAK,MAAM,0BAAX,CAAY;;QAEtE,KAAiC,IAAA,KAAA,SAAA,aAAK,CAAC,UAAU,CAAC,CAAA,gBAAA,4BAAE;YAA/C,IAAM,kBAAkB,WAAA;YAEzB,IAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAAC;YAE3D,IAAM,+BAA+B,GAAG,yBAAyB,CAAC;gBAC9D,YAAY,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC;gBACvC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,kBAAkB,CAAC;aACxD,CAAC,CAAC;YAEH,IAAI,+BAA+B,KAAK,SAAS,EAAE;gBAC/C,SAAS;aACZ;YAED,EAAE,CAAC,SAAS,CACR,IAAI,CAAC,OAAO,CACR,IAAI,CAAC,IAAI,CACL,WAAW,EACX,kBAAkB,CACrB,CACJ,EACD,EAAE,WAAW,EAAE,IAAI,EAAE,CACxB,CAAC;YAEM,IAAA,WAAW,GAAyB,+BAA+B,YAAxD,EAAE,kBAAkB,GAAK,+BAA+B,mBAApC,CAAqC;YAE5E,EAAE,CAAC,aAAa,CACZ,IAAI,CAAC,IAAI,CACL,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC,EACxD,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CACnD,EACD,kBAAkB,CACrB,CAAC;SAEL;;;;;;;;;AAGL,CAAC;AApDD,8CAoDC"}

3
lib/i18n/getLanguageLabel.d.ts vendored Normal file

@ -0,0 +1,3 @@
import type { AvailableLanguages } from "./useKeycloakLanguage";
export declare function getLanguageLabel(language: AvailableLanguages): LanguageLabel;
export declare type LanguageLabel = "Deutsch" | "Norsk" | "Русский" | "Svenska" | "Português (Brasil)" | "Lietuvių" | "English" | "Italiano" | "Français" | "中文简体" | "Español" | "Čeština" | "日本語" | "Slovenčina" | "Polish" | "Català" | "Nederlands" | "tr";

@ -0,0 +1,32 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getLanguageLabel = void 0;
function getLanguageLabel(language) {
switch (language) {
/* spell-checker: disable */
case "es": return "Español";
case "it": return "Italiano";
case "fr": return "Français";
case "ca": return "Català";
case "en": return "English";
case "de": return "Deutsch";
case "no": return "Norsk";
case "pt_BR": return "Português (Brasil)";
case "ru": return "Русский";
case "sk":
case "sv": return "Slovenčina";
case "ja": return "日本語";
case "pl": return "Polish";
case "zh_CN": return "中文简体";
case "sv": return "Svenska";
case "lt": return "Lietuvių";
case "cs": return "Čeština";
case "nl": return "Nederlands";
case "tr": return "tr";
/* spell-checker: enable */
}
return language;
}
exports.getLanguageLabel = getLanguageLabel;
/* spell-checker: enable */
//# sourceMappingURL=getLanguageLabel.js.map

@ -0,0 +1 @@
{"version":3,"file":"getLanguageLabel.js","sourceRoot":"","sources":["../../src/lib/i18n/getLanguageLabel.ts"],"names":[],"mappings":";;;AAGA,SAAgB,gBAAgB,CAAC,QAA4B;IAEzD,QAAQ,QAAQ,EAAE;QACd,4BAA4B;QAC5B,KAAK,IAAI,CAAC,CAAC,OAAO,SAAS,CAAC;QAC5B,KAAK,IAAI,CAAC,CAAC,OAAO,UAAU,CAAC;QAC7B,KAAK,IAAI,CAAC,CAAC,OAAO,UAAU,CAAC;QAC7B,KAAK,IAAI,CAAC,CAAC,OAAO,QAAQ,CAAC;QAC3B,KAAK,IAAI,CAAC,CAAC,OAAO,SAAS,CAAC;QAC5B,KAAK,IAAI,CAAC,CAAC,OAAO,SAAS,CAAC;QAC5B,KAAK,IAAI,CAAC,CAAC,OAAO,OAAO,CAAC;QAC1B,KAAK,OAAO,CAAC,CAAC,OAAO,oBAAoB,CAAC;QAC1C,KAAK,IAAI,CAAC,CAAC,OAAO,SAAS,CAAC;QAC5B,KAAK,IAAI,CAAC;QACV,KAAK,IAAI,CAAC,CAAC,OAAO,YAAY,CAAC;QAC/B,KAAK,IAAI,CAAC,CAAC,OAAO,KAAK,CAAC;QACxB,KAAK,IAAI,CAAC,CAAC,OAAO,QAAQ,CAAC;QAC3B,KAAK,OAAO,CAAC,CAAC,OAAO,MAAM,CAAA;QAC3B,KAAK,IAAI,CAAC,CAAC,OAAO,SAAS,CAAC;QAC5B,KAAK,IAAI,CAAC,CAAC,OAAO,UAAU,CAAC;QAC7B,KAAK,IAAI,CAAC,CAAC,OAAO,SAAS,CAAC;QAC5B,KAAK,IAAI,CAAC,CAAC,OAAO,YAAY,CAAC;QAC/B,KAAK,IAAI,CAAC,CAAC,OAAO,IAAI,CAAA;QACtB,2BAA2B;KAC9B;IAED,OAAO,QAAQ,CAAC;AAEpB,CAAC;AA5BD,4CA4BC;AAOD,2BAA2B"}

8292
lib/i18n/messages.generated.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

11
lib/i18n/useKeycloakLanguage.d.ts vendored Normal file

@ -0,0 +1,11 @@
declare const availableLanguages: ("tr" | "no" | "en" | "ca" | "cs" | "de" | "es" | "fr" | "it" | "ja" | "lt" | "nl" | "pl" | "pt_BR" | "ru" | "sk" | "sv" | "zh_CN")[];
export declare type AvailableLanguages = typeof availableLanguages[number];
export declare const useKeycloakLanguage: () => import("powerhooks").UseNamedStateReturnType<"tr" | "no" | "en" | "ca" | "cs" | "de" | "es" | "fr" | "it" | "ja" | "lt" | "nl" | "pl" | "pt_BR" | "ru" | "sk" | "sv" | "zh_CN", "keycloakLanguage">;
/**
* Pass in "fr-FR" or "français" for example, it will return the AvailableLanguage
* it corresponds to.
* If there is no reasonable match it's guessed from navigator.language.
* If still no matches en is returned.
*/
export declare function getKeycloakAvailableLanguageBestGuess(languageLike?: string): AvailableLanguages;
export {};

@ -0,0 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getKeycloakAvailableLanguageBestGuess = exports.useKeycloakLanguage = void 0;
var powerhooks_1 = require("powerhooks");
var messages_generated_1 = require("./messages.generated");
var objectKeys_1 = require("evt/tools/typeSafety/objectKeys");
var getLanguageLabel_1 = require("./getLanguageLabel");
var availableLanguages = objectKeys_1.objectKeys(messages_generated_1.messages["login"]);
exports.useKeycloakLanguage = powerhooks_1.createUseGlobalState("keycloakLanguage", getKeycloakAvailableLanguageBestGuess, { "persistance": "cookies" }).useKeycloakLanguage;
/**
* Pass in "fr-FR" or "français" for example, it will return the AvailableLanguage
* it corresponds to.
* If there is no reasonable match it's guessed from navigator.language.
* If still no matches en is returned.
*/
function getKeycloakAvailableLanguageBestGuess(languageLike) {
if (languageLike === void 0) { languageLike = navigator.language; }
var iso2LanguageLike = languageLike.split("-")[0].toLowerCase();
var language = availableLanguages.find(function (language) {
return language.toLowerCase().includes(iso2LanguageLike) ||
getLanguageLabel_1.getLanguageLabel(language).toLocaleLowerCase() === languageLike.toLocaleLowerCase();
});
if (language === undefined && languageLike !== navigator.language) {
return getKeycloakAvailableLanguageBestGuess(navigator.language);
}
return "en";
}
exports.getKeycloakAvailableLanguageBestGuess = getKeycloakAvailableLanguageBestGuess;
//# sourceMappingURL=useKeycloakLanguage.js.map

@ -0,0 +1 @@
{"version":3,"file":"useKeycloakLanguage.js","sourceRoot":"","sources":["../../src/lib/i18n/useKeycloakLanguage.ts"],"names":[],"mappings":";;;AACA,yCAAkD;AAClD,2DAAgD;AAChD,8DAA6D;AAC7D,uDAAsD;AAEtD,IAAM,kBAAkB,GAAG,uBAAU,CAAC,6BAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AAI1C,QAAA,mBAAmB,GAAK,iCAAoB,CACvD,kBAAkB,EAClB,qCAAqC,EACrC,EAAE,aAAa,EAAE,SAAS,EAAE,CAC/B,qBAAC;AAEF;;;;;EAKE;AACF,SAAgB,qCAAqC,CACjD,YAAyC;IAAzC,6BAAA,EAAA,eAAuB,SAAS,CAAC,QAAQ;IAGzC,IAAM,gBAAgB,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAElE,IAAM,QAAQ,GAAG,kBAAkB,CAAC,IAAI,CAAC,UAAA,QAAQ;QAC7C,OAAA,QAAQ,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;YACjD,mCAAgB,CAAC,QAAQ,CAAC,CAAC,iBAAiB,EAAE,KAAK,YAAY,CAAC,iBAAiB,EAAE;IADnF,CACmF,CACtF,CAAC;IAEF,IAAI,QAAQ,KAAK,SAAS,IAAI,YAAY,KAAK,SAAS,CAAC,QAAQ,EAAE;QAC/D,OAAO,qCAAqC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;KACpE;IAED,OAAO,IAAI,CAAC;AAChB,CAAC;AAhBD,sFAgBC"}

5
lib/i18n/useKeycloakTranslation.d.ts vendored Normal file

@ -0,0 +1,5 @@
import { messages } from "./messages.generated";
export declare type MessageKey = keyof typeof messages["login"]["en"];
export declare function useKeycloakThemeTranslation(): {
t: (key: MessageKey) => string;
};

@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useKeycloakThemeTranslation = void 0;
var useKeycloakLanguage_1 = require("./useKeycloakLanguage");
var messages_generated_1 = require("./messages.generated");
var powerhooks_1 = require("powerhooks");
function useKeycloakThemeTranslation() {
var keycloakLanguage = useKeycloakLanguage_1.useKeycloakLanguage().keycloakLanguage;
var t = powerhooks_1.useConstCallback(function (key) {
var out = messages_generated_1.messages["login"][keycloakLanguage][key];
if (out !== undefined) {
return out;
}
return messages_generated_1.messages["login"]["en"][key];
});
return { t: t };
}
exports.useKeycloakThemeTranslation = useKeycloakThemeTranslation;
//# sourceMappingURL=useKeycloakTranslation.js.map

@ -0,0 +1 @@
{"version":3,"file":"useKeycloakTranslation.js","sourceRoot":"","sources":["../../src/lib/i18n/useKeycloakTranslation.ts"],"names":[],"mappings":";;;AACA,6DAA4D;AAC5D,2DAAgD;AAChD,yCAA8C;AAI9C,SAAgB,2BAA2B;IAE/B,IAAA,gBAAgB,GAAK,yCAAmB,EAAE,iBAA1B,CAA2B;IAEnD,IAAM,CAAC,GAAG,6BAAgB,CACtB,UAAC,GAAe;QAEZ,IAAM,GAAG,GAAuB,6BAAQ,CAAC,OAAO,CAAC,CAAC,gBAA+B,CAAC,CAAC,GAAG,CAAC,CAAC;QAExF,IAAI,GAAG,KAAK,SAAS,EAAE;YACnB,OAAO,GAAG,CAAC;SACd;QAED,OAAO,6BAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IAExC,CAAC,CACJ,CAAC;IAEF,OAAO,EAAE,CAAC,GAAA,EAAE,CAAC;AAEjB,CAAC;AApBD,kEAoBC"}

4
lib/index.d.ts vendored Normal file

@ -0,0 +1,4 @@
export * from "./keycloakFtlValues";
export * from "./i18n/useKeycloakLanguage";
export * from "./i18n/useKeycloakTranslation";
export * from "./i18n/getLanguageLabel";

17
lib/index.js Normal file

@ -0,0 +1,17 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./keycloakFtlValues"), exports);
__exportStar(require("./i18n/useKeycloakLanguage"), exports);
__exportStar(require("./i18n/useKeycloakTranslation"), exports);
__exportStar(require("./i18n/getLanguageLabel"), exports);
//# sourceMappingURL=index.js.map

1
lib/index.js.map Normal file

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sDAAoC;AACpC,6DAA2C;AAC3C,gEAA8C;AAC9C,0DAAwC"}

@ -1,3 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=inex.js.map

@ -1 +0,0 @@
{"version":3,"file":"inex.js","sourceRoot":"","sources":["../src/lib/inex.ts"],"names":[],"mappings":""}

28
lib/keycloakFtlValues.d.ts vendored Normal file

@ -0,0 +1,28 @@
import type { generateFtlFilesCodeFactory } from "../bin/build-keycloak-theme/generateFtl";
export declare type KeycloakFtlValues = {
pageBasename: Parameters<ReturnType<typeof generateFtlFilesCodeFactory>["generateFtlFilesCode"]>[0]["pageBasename"];
url: {
loginAction: string;
resourcesPath: string;
resourcesCommonPath: string;
loginRestartFlowUrl: string;
};
realm: {
displayName?: string;
displayNameHtml?: string;
internationalizationEnabled: boolean;
};
auth?: {
showUsername: boolean;
showResetCredentials: boolean;
showTryAnotherWayLink: boolean;
attemptedUsername?: boolean;
};
scripts: string[];
message?: {
type: "success" | "warning" | "error" | "info";
summary: string;
};
isAppInitiatedAction: boolean;
};
export declare const keycloakPagesContext: KeycloakFtlValues | undefined;

9
lib/keycloakFtlValues.js Normal file

@ -0,0 +1,9 @@
"use strict";
var _a;
Object.defineProperty(exports, "__esModule", { value: true });
exports.keycloakPagesContext = void 0;
var generateKeycloakThemeResources_1 = require("../bin/build-keycloak-theme/generateKeycloakThemeResources");
var id_1 = require("evt/tools/typeSafety/id");
exports.keycloakPagesContext = (_a = {}, _a[generateKeycloakThemeResources_1.ftlValuesGlobalName] = id_1.id(window[generateKeycloakThemeResources_1.ftlValuesGlobalName]), _a).keycloakPagesContext;
;
//# sourceMappingURL=keycloakFtlValues.js.map

@ -0,0 +1 @@
{"version":3,"file":"keycloakFtlValues.js","sourceRoot":"","sources":["../src/lib/keycloakFtlValues.ts"],"names":[],"mappings":";;;;AAGA,6GAAiG;AAEjG,8CAA6C;AA2C9B,QAAA,oBAAoB,aAC7B,GAAC,oDAAmB,IAAG,OAAE,CAAiC,MAAc,CAAC,oDAAmB,CAAC,CAAC,2BAAG;AACvG,CAAC"}

1708
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -1,13 +1,13 @@
{
"name": "keycloak-react-theming",
"version": "0.0.8",
"description": "Provides a way to customize Keycloak login and register pages with React",
"version": "0.0.21",
"description": "Keycloak theme generator for Reacts app",
"repository": {
"type": "git",
"url": "git://github.com/garronej/keycloak-react-theming.git"
},
"main": "dist/lib/index.js",
"types": "dist/lib/index.d.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"bin": {
"build-keycloak-theme": "bin/build-keycloak-theme/index.js",
"download-sample-keycloak-themes": "bin/download-sample-keycloak-themes.js"
@ -17,22 +17,33 @@
"files": [
"src/bin/build-keycloak-theme/generateDebugFiles/index.ts",
"src/bin/build-keycloak-theme/generateDebugFiles/standalone-ha.xml",
"src/bin/build-keycloak-theme/generateFtl.ts",
"src/bin/build-keycloak-theme/generateFtl/ftl2js.ftl",
"src/bin/build-keycloak-theme/generateFtl/index.ts",
"src/bin/build-keycloak-theme/generateJavaStackFiles.ts",
"src/bin/build-keycloak-theme/generateKeycloakThemeResources.ts",
"src/bin/build-keycloak-theme/index.ts",
"src/bin/build-keycloak-theme/replaceImportFromStatic.ts",
"src/bin/download-sample-keycloak-themes.ts",
"src/lib/inex.ts",
"src/tools/crawl.ts",
"src/tools/transformCodebase.ts",
"src/bin/generate-i18n-messages.ts",
"src/bin/tools/crawl.ts",
"src/bin/tools/downloadAndUnzip.ts",
"src/bin/tools/getProjectRoot.ts",
"src/bin/tools/grant-exec-perms.ts",
"src/bin/tools/transformCodebase.ts",
"src/lib/i18n/getLanguageLabel.ts",
"src/lib/i18n/messages.generated.ts",
"src/lib/i18n/useKeycloakLanguage.ts",
"src/lib/i18n/useKeycloakTranslation.ts",
"src/lib/index.ts",
"src/lib/keycloakFtlValues.ts",
"bin/build-keycloak-theme/generateDebugFiles/index.d.ts",
"bin/build-keycloak-theme/generateDebugFiles/index.js",
"bin/build-keycloak-theme/generateDebugFiles/index.js.map",
"bin/build-keycloak-theme/generateDebugFiles/standalone-ha.xml",
"bin/build-keycloak-theme/generateFtl.d.ts",
"bin/build-keycloak-theme/generateFtl.js",
"bin/build-keycloak-theme/generateFtl.js.map",
"bin/build-keycloak-theme/generateFtl/ftl2js.ftl",
"bin/build-keycloak-theme/generateFtl/index.d.ts",
"bin/build-keycloak-theme/generateFtl/index.js",
"bin/build-keycloak-theme/generateFtl/index.js.map",
"bin/build-keycloak-theme/generateJavaStackFiles.d.ts",
"bin/build-keycloak-theme/generateJavaStackFiles.js",
"bin/build-keycloak-theme/generateJavaStackFiles.js.map",
@ -48,30 +59,67 @@
"bin/download-sample-keycloak-themes.d.ts",
"bin/download-sample-keycloak-themes.js",
"bin/download-sample-keycloak-themes.js.map",
"lib/inex.d.ts",
"lib/inex.js",
"lib/inex.js.map",
"tools/crawl.d.ts",
"tools/crawl.js",
"tools/crawl.js.map",
"tools/transformCodebase.d.ts",
"tools/transformCodebase.js",
"tools/transformCodebase.js.map"
"bin/generate-i18n-messages.d.ts",
"bin/generate-i18n-messages.js",
"bin/generate-i18n-messages.js.map",
"bin/tools/crawl.d.ts",
"bin/tools/crawl.js",
"bin/tools/crawl.js.map",
"bin/tools/downloadAndUnzip.d.ts",
"bin/tools/downloadAndUnzip.js",
"bin/tools/downloadAndUnzip.js.map",
"bin/tools/getProjectRoot.d.ts",
"bin/tools/getProjectRoot.js",
"bin/tools/getProjectRoot.js.map",
"bin/tools/grant-exec-perms.d.ts",
"bin/tools/grant-exec-perms.js",
"bin/tools/grant-exec-perms.js.map",
"bin/tools/transformCodebase.d.ts",
"bin/tools/transformCodebase.js",
"bin/tools/transformCodebase.js.map",
"lib/i18n/getLanguageLabel.d.ts",
"lib/i18n/getLanguageLabel.js",
"lib/i18n/getLanguageLabel.js.map",
"lib/i18n/messages.generated.d.ts",
"lib/i18n/messages.generated.js",
"lib/i18n/messages.generated.js.map",
"lib/i18n/useKeycloakLanguage.d.ts",
"lib/i18n/useKeycloakLanguage.js",
"lib/i18n/useKeycloakLanguage.js.map",
"lib/i18n/useKeycloakTranslation.d.ts",
"lib/i18n/useKeycloakTranslation.js",
"lib/i18n/useKeycloakTranslation.js.map",
"lib/index.d.ts",
"lib/index.js",
"lib/index.js.map",
"lib/keycloakFtlValues.d.ts",
"lib/keycloakFtlValues.js",
"lib/keycloakFtlValues.js.map"
],
"keywords": [
"keycloak",
"react",
"theme"
"theme",
"FreeMarker",
"ftl",
"login",
"register"
],
"homepage": "https://github.com/garronej/keycloak-react-theming",
"devDependencies": {
"@types/node": "^10.0.0",
"copyfiles": "^2.4.1",
"denoify": "^0.6.4",
"denoify": "^0.6.5",
"properties-parser": "^0.3.1",
"rimraf": "^3.0.2",
"scripting-tools": "^0.19.13",
"typescript": "^4.1.5"
"typescript": "^4.1.5",
"@types/react": "^17.0.0",
"react": "^17.0.1"
},
"dependencies": {
"cheerio": "^1.0.0-rc.5"
"cheerio": "^1.0.0-rc.5",
"evt": "^1.9.12",
"powerhooks": "^0.0.14"
}
}

@ -2,6 +2,8 @@
import * as fs from "fs";
import { join as pathJoin, dirname as pathDirname, basename as pathBasename } from "path";
export const containerLaunchScriptBasename = "start_keycloak_testing_container.sh";
/** Files for being able to run a hot reload keycloak container */
export function generateDebugFiles(
params: {
@ -34,11 +36,13 @@ export function generateDebugFiles(
const containerName = "keycloak-testing-container";
fs.writeFileSync(
pathJoin(keycloakThemeBuildingDirPath, "start_keycloak_testing_container.sh"),
pathJoin(keycloakThemeBuildingDirPath, containerLaunchScriptBasename),
Buffer.from(
[
"#!/bin/bash",
"",
`cd ${keycloakThemeBuildingDirPath}`,
"",
`docker rm ${containerName} || true`,
"",
`docker build . -t ${dockerImage}`,
@ -48,7 +52,8 @@ export function generateDebugFiles(
` --name ${containerName} \\`,
" -e KEYCLOAK_USER=admin \\",
" -e KEYCLOAK_PASSWORD=admin \\",
` -v ${pathJoin(keycloakThemeBuildingDirPath, "src", "main", "resources", "theme", "onyxia")}:/opt/jboss/keycloak/themes/onyxia:rw \\`,
` -v ${pathJoin(keycloakThemeBuildingDirPath, "src", "main", "resources", "theme", packageJsonName)
}:/opt/jboss/keycloak/themes/${packageJsonName}:rw \\`,
` -it ${dockerImage}:latest`,
""
].join("\n"),

@ -0,0 +1,113 @@
<script>const _=
{
"url": {
"loginAction": "${url.loginAction}",
"resourcesPath": "${url.resourcesPath}",
"resourcesCommonPath": "${url.resourcesCommonPath}",
"loginRestartFlowUrl": "${url.loginRestartFlowUrl}"
},
"realm": {
"displayName": "${realm.displayName!''}" || undefined,
"displayNameHtml": "${realm.displayNameHtml!''}" || undefined,
"internationalizationEnabled": ${realm.internationalizationEnabled?c}
},
"locale": (function (){
<#if realm.internationalizationEnabled>
return {
"supported": (function(){
<#if realm.internationalizationEnabled>
var out= [];
<#list locale.supported as lng>
out.push({
"url": "${lng.url}",
"label": "${lng.label}",
"languageTag": "${lng.languageTag}"
});
</#list>
return out;
</#if>
return undefined;
})(),
"current": "${locale.current}"
};
</#if>
return undefined;
})(),
"auth": (function (){
<#if auth?has_content>
var out= {
"showUsername": ${auth.showUsername()?c},
"showResetCredentials": ${auth.showResetCredentials()?c},
"showTryAnotherWayLink": ${auth.showTryAnotherWayLink()?c}
};
<#if auth.showUsername() && !auth.showResetCredentials()>
Object.assign(
out,
{
"attemptedUsername": "${auth.attemptedUsername}"
}
);
</#if>
return out;
</#if>
return undefined;
})(),
"scripts": (function(){
var out = [];
<#if scripts??>
<#list scripts as script>
out.push("${script}");
</#list>
</#if>
return out;
})(),
"message": (function (){
<#if message?has_content>
return { 
"type": "${message.type}",
"summary": "${kcSanitize(message.summary)?no_esc}"
};
</#if>
return undefined;
})(),
"isAppInitiatedAction": (function (){
<#if isAppInitiatedAction??>
return true;
</#if>
return false;
})()
}
</script>

@ -4,7 +4,10 @@ import cheerio from "cheerio";
import {
replaceImportFromStaticInJsCode,
generateCssCodeToDefineGlobals
} from "./replaceImportFromStatic";
} from "../replaceImportFromStatic";
import fs from "fs";
import { join as pathJoin } from "path";
import { objectKeys } from "evt/tools/typeSafety/objectKeys";
export function generateFtlFilesCodeFactory(
params: {
@ -47,26 +50,41 @@ export function generateFtlFilesCodeFactory(
})
);
//FTL is no valid html, we can't insert with cheerio, we put placeholder for injecting later.
const ftlPlaceholders = {
'{ "x": "xIdLqMeOed9sdLdIdOxdK0d" }':
fs.readFileSync(pathJoin(__dirname, "ftl2js.ftl"))
.toString("utf8")
.match(/^<script>const _=((?:.|\n)+)<\/script>[\n]?$/)![1],
'<!-- xIdLqMeOedErIdLsPdNdI9dSlxI -->':
[
'<#if scripts??>',
' <#list scripts as script>',
' <script src="${script}" type="text/javascript"></script>',
' </#list>',
'</#if>',
].join("\n")
};
$("head").prepend(
[
'',
'<style>',
generateCssCodeToDefineGlobals(
{ cssGlobalsToDefine }
).cssCodeToPrependInHead,
'</style>',
'',
...(Object.keys(cssGlobalsToDefine).length === 0 ? [] : [
'',
'<style>',
generateCssCodeToDefineGlobals(
{ cssGlobalsToDefine }
).cssCodeToPrependInHead,
'</style>',
''
]),
'<script>',
' Object.assign(',
` window.${ftlValuesGlobalName},`,
' {',
' "url": {',
' "loginAction": "${url.loginAction}",',
' "resourcesPath": "${url.resourcesPath}"',
' }',
' }',
' });',
` ${objectKeys(ftlPlaceholders)[0]}`,
' );',
'</script>',
'',
objectKeys(ftlPlaceholders)[1],
''
].join("\n"),
);
@ -91,11 +109,15 @@ export function generateFtlFilesCodeFactory(
` window.${ftlValuesGlobalName} = { "pageBasename": "${pageBasename}" };`,
'</script>',
''
].join("\n"),
].join("\n")
);
return { "ftlCode": $.html() };
let ftlCode = $.html();
objectKeys(ftlPlaceholders)
.forEach(id => ftlCode = ftlCode.replace(id, ftlPlaceholders[id]));
return { ftlCode };
}

@ -14,7 +14,7 @@ export function generateJavaStackFiles(
parsedPackageJson: ParsedPackageJson;
keycloakThemeBuildingDirPath: string;
}
): void {
): { jarFilePath: string; } {
const {
parsedPackageJson: { name, version, homepage },
@ -94,5 +94,7 @@ export function generateJavaStackFiles(
}
return { "jarFilePath": pathJoin(keycloakThemeBuildingDirPath, "target", `${name}-${version}.jar`) };
}

@ -1,5 +1,5 @@
import { transformCodebase } from "../../tools/transformCodebase";
import { transformCodebase } from "../tools/transformCodebase";
import * as fs from "fs";
import { join as pathJoin } from "path";
import {
@ -8,7 +8,7 @@ import {
} from "./replaceImportFromStatic";
import { generateFtlFilesCodeFactory } from "./generateFtl";
const ftlValuesGlobalName = "keycloakFtlValues";
export const ftlValuesGlobalName = "keycloakPagesContext";
export function generateKeycloakThemeResources(
params: {

@ -3,9 +3,10 @@
import { generateKeycloakThemeResources } from "./generateKeycloakThemeResources";
import { generateJavaStackFiles } from "./generateJavaStackFiles";
import type { ParsedPackageJson } from "./generateJavaStackFiles";
import { join as pathJoin } from "path";
import { join as pathJoin, relative as pathRelative, basename as pathBasename } from "path";
import * as child_process from "child_process";
import { generateDebugFiles } from "./generateDebugFiles";
import { generateDebugFiles, containerLaunchScriptBasename } from "./generateDebugFiles";
const reactProjectDirPath = process.cwd();
@ -13,15 +14,18 @@ const parsedPackageJson: ParsedPackageJson = require(pathJoin(reactProjectDirPat
export const keycloakThemeBuildingDirPath = pathJoin(reactProjectDirPath, "build_keycloak");
if (require.main === module) {
console.log("🔏 Building the keycloak theme...⌚");
generateKeycloakThemeResources({
keycloakThemeBuildingDirPath,
"reactAppBuildDirPath": pathJoin(reactProjectDirPath, "build"),
"themeName": parsedPackageJson.name
});
generateJavaStackFiles({
const { jarFilePath } = generateJavaStackFiles({
parsedPackageJson,
keycloakThemeBuildingDirPath
});
@ -36,4 +40,42 @@ if (require.main === module) {
"packageJsonName": parsedPackageJson.name
});
console.log([
'',
`✅ Your keycloak theme has been generated and bundled into ./${pathRelative(reactProjectDirPath, jarFilePath)} 🚀`,
`It is to be placed in "/opt/jboss/keycloak/standalone/deployments" in the container running a jboss/keycloak Docker image. (Tested with 11.0.3)`,
'',
'Using Helm (https://github.com/codecentric/helm-charts), edit to reflect:',
'',
'value.yaml: ',
' extraInitContainers: |',
' - name: realm-ext-provider',
' image: curlimages/curl',
' imagePullPolicy: IfNotPresent',
' command:',
' - sh',
' args:',
' - -c',
` - curl -L -f -S -o /extensions/${pathBasename(jarFilePath)} https://AN.URL.FOR/${pathBasename(jarFilePath)}`,
' volumeMounts:',
' - name: extensions',
' mountPath: /extensions',
' ',
' extraVolumeMounts: |',
' - name: extensions',
' mountPath: /opt/jboss/keycloak/standalone/deployments',
'',
'',
'To test your theme locally, with hot reloading, you can spin up a Keycloak container image with the theme loaded by running:',
'',
`👉 $ ./${pathRelative(reactProjectDirPath, pathJoin(keycloakThemeBuildingDirPath, containerLaunchScriptBasename))} 👈`,
'',
'To enable the theme within keycloak log into the admin console ( 👉 http://localhost:8080 username: admin, password: admin 👈), create a realm (called "myrealm" for example),',
`go to your realm settings, click on the theme tab then select ${parsedPackageJson.name}.`,
`More details: https://www.keycloak.org/getting-started/getting-started-docker`,
'',
'Once your container is up and configured 👉 http://localhost:8080/auth/realms/myrealm/account 👈',
'',
].join("\n"));
}

@ -1,18 +1,19 @@
#!/usr/bin/env node
import * as fs from "fs";
import { join as pathJoin, basename as pathBasename } from "path";
import { keycloakThemeBuildingDirPath } from "./build-keycloak-theme";
import child_process from "child_process";
import { downloadAndUnzip } from "./tools/downloadAndUnzip";
export const keycloakBuiltinThemesAndThirdPartyExamplesThemsUrl =
"https://github.com/garronej/keycloak-react-theming/releases/download/v0.0.1/other_keycloak_thems.zip";
if (require.main === module) {
console.log("execute!");
downloadAndUnzip({
"url": keycloakBuiltinThemesAndThirdPartyExamplesThemsUrl,
"destDirPath": keycloakThemeBuildingDirPath
});
if (!fs.existsSync(keycloakThemeBuildingDirPath)) {
console.log("Error: The keycloak theme need to be build");
process.exit(1);
}
const url = "https://github.com/garronej/keycloak-react-theming/releases/download/v0.0.1/other_keycloak_thems.zip";
[
`wget ${url}`,
...["unzip", "rm"].map(prg => `${prg} ${pathBasename(url)}`),
].forEach(cmd => child_process.execSync(cmd, { "cwd": pathJoin(keycloakThemeBuildingDirPath, "src", "main", "resources", "theme") }));

@ -0,0 +1,64 @@
import * as fs from "fs";
import { join as pathJoin, relative as pathRelative } from "path";
import { crawl } from "./tools/crawl";
import { downloadAndUnzip } from "./tools/downloadAndUnzip";
import { keycloakBuiltinThemesAndThirdPartyExamplesThemsUrl } from "./download-sample-keycloak-themes";
import { getProjectRoot } from "./tools/getProjectRoot";
import * as child_process from "child_process";
//@ts-ignore
const propertiesParser = require("properties-parser");
console.log(propertiesParser);
const tmpDirPath = pathJoin(getProjectRoot(), "tmp_xImOef9dOd44");
child_process.execSync(`rm -rf ${tmpDirPath}`);
downloadAndUnzip({
"destDirPath": tmpDirPath,
"url": keycloakBuiltinThemesAndThirdPartyExamplesThemsUrl
});
type Dictionary = { [idiomId: string]: string };
const record: { [typeOfPage: string]: { [language: string]: Dictionary } } = {};
process.chdir(pathJoin(tmpDirPath, "base"));
crawl(".").forEach(filePath => {
const match = filePath.match(/^([^/]+)\/messages\/messages_([^.]+)\.properties$/);
if (match === null) {
return;
}
const [, typeOfPage, language] = match;
(record[typeOfPage] ??= {})[language] =
propertiesParser.parse(
fs.readFileSync(filePath)
.toString("utf8")
);
});
child_process.execSync(`rm -r ${tmpDirPath}`);
const targetFilePath = pathJoin("src", "lib", "i18n", "messages.generated.ts");
fs.writeFileSync(
pathJoin(getProjectRoot(), targetFilePath),
Buffer.from(
[
`//This code was automatically generated by running ${pathRelative(getProjectRoot(), __filename)}`,
'//PLEASE DO NOT EDIT MANUALLY',
'',
'/* spell-checker: disable */',
`export const messages= ${JSON.stringify(record, null, 2)} as const;`,
'/* spell-checker: enable */'
].join("\n"), "utf8")
);
console.log(`${targetFilePath} wrote`);

@ -0,0 +1,22 @@
import { basename as pathBasename } from "path";
import child_process from "child_process";
import fs from "fs";
export function downloadAndUnzip(
params: {
url: string;
destDirPath: string;
}
) {
const { url, destDirPath } = params;
fs.mkdirSync(destDirPath, { "recursive": true });
[
`wget ${url}`,
...["unzip", "rm"].map(prg => `${prg} ${pathBasename(url)}`),
].forEach(cmd => child_process.execSync(cmd, { "cwd": destDirPath }));
}

@ -0,0 +1,19 @@
import * as fs from "fs";
import * as path from "path";
function getProjectRootRec(dirPath: string): string {
if (fs.existsSync(path.join(dirPath, "package.json"))) {
return dirPath;
}
return getProjectRootRec(path.join(dirPath, ".."));
}
let result: string | undefined = undefined;
export function getProjectRoot(): string {
if (result !== undefined) {
return result;
}
return (result = getProjectRootRec(__dirname));
}

@ -0,0 +1,8 @@
import { getProjectRoot } from "./getProjectRoot";
import { join as pathJoin } from "path";
import child_process from "child_process";
Object.entries<string>(require(pathJoin(getProjectRoot(), "package.json"))["bin"])
.forEach(([, scriptPath]) => child_process.execSync(`chmod +x ${scriptPath}`, { "cwd": getProjectRoot() }));

@ -0,0 +1,39 @@
import type { AvailableLanguages } from "./useKeycloakLanguage";
export function getLanguageLabel(language: AvailableLanguages): LanguageLabel {
switch (language) {
/* spell-checker: disable */
case "es": return "Español";
case "it": return "Italiano";
case "fr": return "Français";
case "ca": return "Català";
case "en": return "English";
case "de": return "Deutsch";
case "no": return "Norsk";
case "pt_BR": return "Português (Brasil)";
case "ru": return "Русский";
case "sk":
case "sv": return "Slovenčina";
case "ja": return "日本語";
case "pl": return "Polish";
case "zh_CN": return "中文简体"
case "sv": return "Svenska";
case "lt": return "Lietuvių";
case "cs": return "Čeština";
case "nl": return "Nederlands";
case "tr": return "tr"
/* spell-checker: enable */
}
return language;
}
export type LanguageLabel =
/* spell-checker: disable */
"Deutsch" | "Norsk" | "Русский" | "Svenska" | "Português (Brasil)" | "Lietuvių" |
"English" | "Italiano" | "Français" | "中文简体" | "Español" | "Čeština" | "日本語" |
"Slovenčina" | "Polish" | "Català" | "Nederlands" | "tr";
/* spell-checker: enable */

File diff suppressed because it is too large Load Diff

@ -0,0 +1,40 @@
import { createUseGlobalState } from "powerhooks";
import { messages } from "./messages.generated";
import { objectKeys } from "evt/tools/typeSafety/objectKeys";
import { getLanguageLabel } from "./getLanguageLabel";
const availableLanguages = objectKeys(messages["login"]);
export type AvailableLanguages = typeof availableLanguages[number];
export const { useKeycloakLanguage } = createUseGlobalState(
"keycloakLanguage",
getKeycloakAvailableLanguageBestGuess,
{ "persistance": "cookies" }
);
/**
* Pass in "fr-FR" or "français" for example, it will return the AvailableLanguage
* it corresponds to.
* If there is no reasonable match it's guessed from navigator.language.
* If still no matches en is returned.
*/
export function getKeycloakAvailableLanguageBestGuess(
languageLike: string = navigator.language
): AvailableLanguages {
const iso2LanguageLike = languageLike.split("-")[0].toLowerCase();
const language = availableLanguages.find(language =>
language.toLowerCase().includes(iso2LanguageLike) ||
getLanguageLabel(language).toLocaleLowerCase() === languageLike.toLocaleLowerCase()
);
if (language === undefined && languageLike !== navigator.language) {
return getKeycloakAvailableLanguageBestGuess(navigator.language);
}
return "en";
}

@ -0,0 +1,28 @@
import { useKeycloakLanguage } from "./useKeycloakLanguage";
import { messages } from "./messages.generated";
import { useConstCallback } from "powerhooks";
export type MessageKey = keyof typeof messages["login"]["en"]
export function useKeycloakThemeTranslation() {
const { keycloakLanguage } = useKeycloakLanguage();
const t = useConstCallback(
(key: MessageKey): string => {
const out: string | undefined = messages["login"][keycloakLanguage as any as "en"][key];
if (out !== undefined) {
return out;
}
return messages["login"]["en"][key];
}
);
return { t };
}

4
src/lib/index.ts Normal file

@ -0,0 +1,4 @@
export * from "./keycloakFtlValues";
export * from "./i18n/useKeycloakLanguage";
export * from "./i18n/useKeycloakTranslation";
export * from "./i18n/getLanguageLabel";

@ -1,3 +0,0 @@
export { };

@ -0,0 +1,51 @@
import { ftlValuesGlobalName } from "../bin/build-keycloak-theme/generateKeycloakThemeResources";
import type { generateFtlFilesCodeFactory } from "../bin/build-keycloak-theme/generateFtl";
import { id } from "evt/tools/typeSafety/id";
export type KeycloakFtlValues = {
pageBasename: Parameters<ReturnType<typeof generateFtlFilesCodeFactory>["generateFtlFilesCode"]>[0]["pageBasename"];
url: {
loginAction: string;
resourcesPath: string;
resourcesCommonPath: string;
loginRestartFlowUrl: string;
},
realm: {
displayName?: string;
displayNameHtml?: string;
internationalizationEnabled: boolean;
},
//NOTE: Undefined if !realm.internationalizationEnabled
//We hide this since we provide a client side internationalization engine
/*
locale?: {
supported: {
url: string;
languageTag: AvailableLanguages;
//NOTE: Is determined by languageTag. Ex: languageTag === "en" => label === "English"
label: LanguageLabel;
},
current: LanguageLabel;
},
*/
auth?: {
showUsername: boolean;
showResetCredentials: boolean;
showTryAnotherWayLink: boolean;
attemptedUsername?: boolean;
},
scripts: string[];
message?: {
type: "success" | "warning" | "error" | "info";
summary: string;
},
isAppInitiatedAction: boolean;
};
export const { keycloakPagesContext } =
{ [ftlValuesGlobalName]: id<KeycloakFtlValues | undefined>((window as any)[ftlValuesGlobalName]) };
;

@ -1,15 +1,24 @@
import { setupSampleReactProject } from "./setupSampleReactProject";
import {
setupSampleReactProject,
sampleReactProjectDirPath
} from "./setupSampleReactProject";
import * as st from "scripting-tools";
import { join as pathJoin } from "path";
import { getProjectRoot } from "../bin/tools/getProjectRoot";
setupSampleReactProject();
const { sampleReactProjectDirPath } = setupSampleReactProject();
console.log(`Running main in ${sampleReactProjectDirPath}`);
st.execSync(
`node ${pathJoin(__dirname, "../bin/build-keycloak-theme")}`,
{ "cwd": sampleReactProjectDirPath }
console.log(
st.execSync(
`node ${pathJoin(getProjectRoot(), "dist", "bin", "build-keycloak-theme")}`,
{ "cwd": sampleReactProjectDirPath }
)
);

@ -2,11 +2,12 @@
import { sampleReactProjectDirPath } from "./setupSampleReactProject";
import * as st from "scripting-tools";
import { join as pathJoin } from "path";
import { getProjectRoot } from "../bin/tools/getProjectRoot";
console.log(`Running main in ${sampleReactProjectDirPath}`);
st.execSync(
`node ${pathJoin(__dirname, "../bin/download-sample-keycloak-themes")}`,
`node ${pathJoin(getProjectRoot(), "dist","bin","download-sample-keycloak-themes")}`,
{ "cwd": sampleReactProjectDirPath }
);

@ -1,9 +1,12 @@
import { join as pathJoin } from "path";
import { generateKeycloakThemeResources } from "../bin/build-keycloak-theme/generateKeycloakThemeResources";
import { setupSampleReactProject } from "./setupSampleReactProject";
import {
setupSampleReactProject,
sampleReactProjectDirPath
} from "./setupSampleReactProject";
const { sampleReactProjectDirPath } = setupSampleReactProject();
setupSampleReactProject();
generateKeycloakThemeResources({
"themeName": "onyxia-ui",

@ -1,8 +1,9 @@
import { getProjectRoot } from "../bin/tools/getProjectRoot";
import * as st from "scripting-tools";
import { join as pathJoin, basename as pathBasename } from "path";
export const sampleReactProjectDirPath = pathJoin(__dirname, "..", "..", "sample_react_project");
export const sampleReactProjectDirPath = pathJoin(getProjectRoot(), "sample_react_project");
export function setupSampleReactProject() {
@ -16,6 +17,4 @@ export function setupSampleReactProject() {
...["unzip", "rm"].map(prg => `${prg} ${pathBasename(url)}`)
].forEach(cmd => st.execSync(cmd, { "cwd": sampleReactProjectDirPath }));
return { sampleReactProjectDirPath };
}

@ -22,7 +22,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
var setupSampleReactProject_1 = require("./setupSampleReactProject");
var st = __importStar(require("scripting-tools"));
var path_1 = require("path");
var sampleReactProjectDirPath = setupSampleReactProject_1.setupSampleReactProject().sampleReactProjectDirPath;
console.log("Running main in " + sampleReactProjectDirPath);
st.execSync("node " + path_1.join(__dirname, "../bin/build-keycloak-theme"), { "cwd": sampleReactProjectDirPath });
var getProjectRoot_1 = require("../bin/tools/getProjectRoot");
setupSampleReactProject_1.setupSampleReactProject();
console.log("Running main in " + setupSampleReactProject_1.sampleReactProjectDirPath);
console.log(st.execSync("node " + path_1.join(getProjectRoot_1.getProjectRoot(), "dist", "bin", "build-keycloak-theme"), { "cwd": setupSampleReactProject_1.sampleReactProjectDirPath }));
//# sourceMappingURL=build-keycloak-theme.js.map

@ -1 +1 @@
{"version":3,"file":"build-keycloak-theme.js","sourceRoot":"","sources":["../src/test/build-keycloak-theme.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,qEAAoE;AACpE,kDAAsC;AACtC,6BAAwC;AAEhC,IAAA,yBAAyB,GAAK,iDAAuB,EAAE,0BAA9B,CAA+B;AAEhE,OAAO,CAAC,GAAG,CAAC,qBAAmB,yBAA2B,CAAC,CAAC;AAE5D,EAAE,CAAC,QAAQ,CACP,UAAQ,WAAQ,CAAC,SAAS,EAAE,6BAA6B,CAAG,EAC5D,EAAE,KAAK,EAAE,yBAAyB,EAAE,CACvC,CAAC"}
{"version":3,"file":"build-keycloak-theme.js","sourceRoot":"","sources":["../src/test/build-keycloak-theme.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,qEAGmC;AACnC,kDAAsC;AACtC,6BAAwC;AACxC,8DAA6D;AAG7D,iDAAuB,EAAE,CAAC;AAG1B,OAAO,CAAC,GAAG,CAAC,qBAAmB,mDAA2B,CAAC,CAAC;AAE5D,OAAO,CAAC,GAAG,CACP,EAAE,CAAC,QAAQ,CACP,UAAQ,WAAQ,CAAC,+BAAc,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,sBAAsB,CAAG,EAC3E,EAAE,KAAK,EAAE,mDAAyB,EAAE,CACvC,CACJ,CAAC"}

@ -22,6 +22,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
var setupSampleReactProject_1 = require("./setupSampleReactProject");
var st = __importStar(require("scripting-tools"));
var path_1 = require("path");
var getProjectRoot_1 = require("../bin/tools/getProjectRoot");
console.log("Running main in " + setupSampleReactProject_1.sampleReactProjectDirPath);
st.execSync("node " + path_1.join(__dirname, "../bin/download-sample-keycloak-themes"), { "cwd": setupSampleReactProject_1.sampleReactProjectDirPath });
st.execSync("node " + path_1.join(getProjectRoot_1.getProjectRoot(), "dist", "bin", "download-sample-keycloak-themes"), { "cwd": setupSampleReactProject_1.sampleReactProjectDirPath });
//# sourceMappingURL=download-sample-keycloak-themes.js.map

@ -1 +1 @@
{"version":3,"file":"download-sample-keycloak-themes.js","sourceRoot":"","sources":["../src/test/download-sample-keycloak-themes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,qEAAsE;AACtE,kDAAsC;AACtC,6BAAwC;AAExC,OAAO,CAAC,GAAG,CAAC,qBAAmB,mDAA2B,CAAC,CAAC;AAE5D,EAAE,CAAC,QAAQ,CACP,UAAQ,WAAQ,CAAC,SAAS,EAAE,wCAAwC,CAAG,EACvE,EAAE,KAAK,EAAE,mDAAyB,EAAE,CACvC,CAAC"}
{"version":3,"file":"download-sample-keycloak-themes.js","sourceRoot":"","sources":["../src/test/download-sample-keycloak-themes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,qEAAsE;AACtE,kDAAsC;AACtC,6BAAwC;AACxC,8DAA6D;AAE7D,OAAO,CAAC,GAAG,CAAC,qBAAmB,mDAA2B,CAAC,CAAC;AAE5D,EAAE,CAAC,QAAQ,CACP,UAAQ,WAAQ,CAAC,+BAAc,EAAE,EAAE,MAAM,EAAC,KAAK,EAAC,iCAAiC,CAAG,EACpF,EAAE,KAAK,EAAE,mDAAyB,EAAE,CACvC,CAAC"}

@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
var path_1 = require("path");
var generateKeycloakThemeResources_1 = require("../bin/build-keycloak-theme/generateKeycloakThemeResources");
var setupSampleReactProject_1 = require("./setupSampleReactProject");
var sampleReactProjectDirPath = setupSampleReactProject_1.setupSampleReactProject().sampleReactProjectDirPath;
setupSampleReactProject_1.setupSampleReactProject();
generateKeycloakThemeResources_1.generateKeycloakThemeResources({
"themeName": "onyxia-ui",
"reactAppBuildDirPath": path_1.join(sampleReactProjectDirPath, "build"),
"keycloakThemeBuildingDirPath": path_1.join(sampleReactProjectDirPath, "build_keycloak_theme")
"reactAppBuildDirPath": path_1.join(setupSampleReactProject_1.sampleReactProjectDirPath, "build"),
"keycloakThemeBuildingDirPath": path_1.join(setupSampleReactProject_1.sampleReactProjectDirPath, "build_keycloak_theme")
});
//# sourceMappingURL=generateKeycloakThemeResources.js.map

@ -1 +1 @@
{"version":3,"file":"generateKeycloakThemeResources.js","sourceRoot":"","sources":["../src/test/generateKeycloakThemeResources.ts"],"names":[],"mappings":";;AACA,6BAAwC;AACxC,6GAA4G;AAC5G,qEAAoE;AAE5D,IAAA,yBAAyB,GAAK,iDAAuB,EAAE,0BAA9B,CAA+B;AAEhE,+DAA8B,CAAC;IAC3B,WAAW,EAAE,WAAW;IACxB,sBAAsB,EAAE,WAAQ,CAAC,yBAAyB,EAAE,OAAO,CAAC;IACpE,8BAA8B,EAAE,WAAQ,CAAC,yBAAyB,EAAE,sBAAsB,CAAC;CAC9F,CAAC,CAAC"}
{"version":3,"file":"generateKeycloakThemeResources.js","sourceRoot":"","sources":["../src/test/generateKeycloakThemeResources.ts"],"names":[],"mappings":";;AACA,6BAAwC;AACxC,6GAA4G;AAC5G,qEAGmC;AAEnC,iDAAuB,EAAE,CAAC;AAE1B,+DAA8B,CAAC;IAC3B,WAAW,EAAE,WAAW;IACxB,sBAAsB,EAAE,WAAQ,CAAC,mDAAyB,EAAE,OAAO,CAAC;IACpE,8BAA8B,EAAE,WAAQ,CAAC,mDAAyB,EAAE,sBAAsB,CAAC;CAC9F,CAAC,CAAC"}

@ -1,4 +1,2 @@
export declare const sampleReactProjectDirPath: string;
export declare function setupSampleReactProject(): {
sampleReactProjectDirPath: string;
};
export declare function setupSampleReactProject(): void;

@ -34,23 +34,24 @@ var __read = (this && this.__read) || function (o, n) {
}
return ar;
};
var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.setupSampleReactProject = exports.sampleReactProjectDirPath = void 0;
var getProjectRoot_1 = require("../bin/tools/getProjectRoot");
var st = __importStar(require("scripting-tools"));
var path_1 = require("path");
exports.sampleReactProjectDirPath = path_1.join(__dirname, "..", "..", "sample_react_project");
exports.sampleReactProjectDirPath = path_1.join(getProjectRoot_1.getProjectRoot(), "sample_react_project");
function setupSampleReactProject() {
st.execSync("rm -rf " + exports.sampleReactProjectDirPath);
st.execSync("mkdir " + exports.sampleReactProjectDirPath);
var url = "https://github.com/garronej/keycloak-react-theming/releases/download/v0.0.1/sample_build_dir_and_package_json.zip";
__spread([
__spreadArray([
"wget " + url
], ["unzip", "rm"].map(function (prg) { return prg + " " + path_1.basename(url); })).forEach(function (cmd) { return st.execSync(cmd, { "cwd": exports.sampleReactProjectDirPath }); });
return { sampleReactProjectDirPath: exports.sampleReactProjectDirPath };
], __read(["unzip", "rm"].map(function (prg) { return prg + " " + path_1.basename(url); }))).forEach(function (cmd) { return st.execSync(cmd, { "cwd": exports.sampleReactProjectDirPath }); });
}
exports.setupSampleReactProject = setupSampleReactProject;
//# sourceMappingURL=setupSampleReactProject.js.map

@ -1 +1 @@
{"version":3,"file":"setupSampleReactProject.js","sourceRoot":"","sources":["../src/test/setupSampleReactProject.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAsC;AACtC,6BAAkE;AAErD,QAAA,yBAAyB,GAAG,WAAQ,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,sBAAsB,CAAC,CAAC;AAEjG,SAAgB,uBAAuB;IAEnC,EAAE,CAAC,QAAQ,CAAC,YAAU,iCAA2B,CAAC,CAAC;IACnD,EAAE,CAAC,QAAQ,CAAC,WAAS,iCAA2B,CAAC,CAAC;IAElD,IAAM,GAAG,GAAG,mHAAmH,CAAC;IAEhI;QACI,UAAQ,GAAK;OACV,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,UAAA,GAAG,IAAI,OAAG,GAAG,SAAI,eAAY,CAAC,GAAG,CAAG,EAA7B,CAA6B,CAAC,EAC9D,OAAO,CAAC,UAAA,GAAG,IAAI,OAAA,EAAE,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,iCAAyB,EAAE,CAAC,EAAtD,CAAsD,CAAC,CAAC;IAEzE,OAAO,EAAE,yBAAyB,mCAAA,EAAE,CAAC;AAEzC,CAAC;AAdD,0DAcC"}
{"version":3,"file":"setupSampleReactProject.js","sourceRoot":"","sources":["../src/test/setupSampleReactProject.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,8DAA6D;AAC7D,kDAAsC;AACtC,6BAAkE;AAErD,QAAA,yBAAyB,GAAG,WAAQ,CAAC,+BAAc,EAAE,EAAE,sBAAsB,CAAC,CAAC;AAE5F,SAAgB,uBAAuB;IAEnC,EAAE,CAAC,QAAQ,CAAC,YAAU,iCAA2B,CAAC,CAAC;IACnD,EAAE,CAAC,QAAQ,CAAC,WAAS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AAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC,EACxD,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CACnD,EACD,kBAAkB,CACrB,CAAC;SAEL;;;;;;;;;AAGL,CAAC;AApDD,8CAoDC"}

@ -2,8 +2,8 @@
"program": {
"fileInfos": {
"../node_modules/typescript/lib/lib.es5.d.ts": {
"version": "9622e8bd7cc72a7dab819a8011ecbf81d443638082e5cb99ecf2e75ff56ffc9d",
"signature": "9622e8bd7cc72a7dab819a8011ecbf81d443638082e5cb99ecf2e75ff56ffc9d",
"version": "b3584bc5798ed422ce2516df360ffa9cf2d80b5eae852867db9ba3743145f895",
"signature": "b3584bc5798ed422ce2516df360ffa9cf2d80b5eae852867db9ba3743145f895",
"affectsGlobalScope": true
},
"../node_modules/typescript/lib/lib.es2015.d.ts": {
@ -27,8 +27,8 @@
"affectsGlobalScope": false
},
"../node_modules/typescript/lib/lib.dom.d.ts": {
"version": "abadddbf660adeec27e9a56584907d52fa1d6e1e1dc49f639a921baa951b7a84",
"signature": "abadddbf660adeec27e9a56584907d52fa1d6e1e1dc49f639a921baa951b7a84",
"version": "feeeb1dd8a80fb76be42b0426e8f3ffa9bdef3c2f3c12c147e7660b1c5ba8b3b",
"signature": "feeeb1dd8a80fb76be42b0426e8f3ffa9bdef3c2f3c12c147e7660b1c5ba8b3b",
"affectsGlobalScope": true
},
"../node_modules/typescript/lib/lib.es2015.core.d.ts": {
@ -57,13 +57,13 @@
"affectsGlobalScope": true
},
"../node_modules/typescript/lib/lib.es2015.proxy.d.ts": {
"version": "7207e317a2cb07a177e7d963ab7b8c0e85dde7f9ddb50351f830239bf597569e",
"signature": "7207e317a2cb07a177e7d963ab7b8c0e85dde7f9ddb50351f830239bf597569e",
"version": "810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357",
"signature": "810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357",
"affectsGlobalScope": true
},
"../node_modules/typescript/lib/lib.es2015.reflect.d.ts": {
"version": "cb609802a8698aa28b9c56331d4b53f590ca3c1c3a255350304ae3d06017779d",
"signature": "cb609802a8698aa28b9c56331d4b53f590ca3c1c3a255350304ae3d06017779d",
"version": "62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6",
"signature": "62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6",
"affectsGlobalScope": true
},
"../node_modules/typescript/lib/lib.es2015.symbol.d.ts": {
@ -137,16 +137,41 @@
"affectsGlobalScope": true
},
"../node_modules/typescript/lib/lib.esnext.intl.d.ts": {
"version": "89bf2b7a601b73ea4311eda9c41f86a58994fec1bee3b87c4a14d68d9adcdcbd",
"signature": "89bf2b7a601b73ea4311eda9c41f86a58994fec1bee3b87c4a14d68d9adcdcbd",
"version": "506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e",
"signature": "506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e",
"affectsGlobalScope": true
},
"../src/tools/crawl.ts": {
"../node_modules/@types/react/global.d.ts": {
"version": "ecf78e637f710f340ec08d5d92b3f31b134a46a4fcf2e758690d8c46ce62cba6",
"signature": "ecf78e637f710f340ec08d5d92b3f31b134a46a4fcf2e758690d8c46ce62cba6",
"affectsGlobalScope": true
},
"../node_modules/csstype/index.d.ts": {
"version": "0a6f28e1d77b99b0ef7da2f0bf50f301ea8a7eb7b4f573e458e725452a477bd2",
"signature": "0a6f28e1d77b99b0ef7da2f0bf50f301ea8a7eb7b4f573e458e725452a477bd2",
"affectsGlobalScope": false
},
"../node_modules/@types/prop-types/index.d.ts": {
"version": "a7e32dcb90bf0c1b7a1e4ac89b0f7747cbcba25e7beddc1ebf17be1e161842ad",
"signature": "a7e32dcb90bf0c1b7a1e4ac89b0f7747cbcba25e7beddc1ebf17be1e161842ad",
"affectsGlobalScope": false
},
"../node_modules/@types/react/index.d.ts": {
"version": "9692a141afe8f30a5542189ffceb1a043f3d1fbaf0e07d28a8e9ac6d32c4cb01",
"signature": "9692a141afe8f30a5542189ffceb1a043f3d1fbaf0e07d28a8e9ac6d32c4cb01",
"affectsGlobalScope": true
},
"../node_modules/@types/react/jsx-runtime.d.ts": {
"version": "af7fd2870746deed40e130fc0a3966de74e8f52a97ec114d0fbb35876ab05ca9",
"signature": "af7fd2870746deed40e130fc0a3966de74e8f52a97ec114d0fbb35876ab05ca9",
"affectsGlobalScope": false
},
"../src/bin/tools/crawl.ts": {
"version": "be352c5202d87414be6fb99a6841537ed64d838ebf98fe2ad76c7603fdcfbc98",
"signature": "5059ddaf08e8e94b7165b334b7eeacf2011e7a97d3ff28c35eff113dfbd01e8f",
"affectsGlobalScope": false
},
"../src/tools/transformCodebase.ts": {
"../src/bin/tools/transformCodebase.ts": {
"version": "b5d8a7d3621dd51c1589fb9f9f8acd94799cc99f9f17e2c99ccdc0ebd9ff8378",
"signature": "469179a125fe92f2436d23da406494b1a6a58726e8511dd1c57819a837996a71",
"affectsGlobalScope": false
@ -241,41 +266,166 @@
"signature": "c3a2f14af88ebca3c9e0445aa8c14d1cf6fcebfdadf54a46e26c46959e368119",
"affectsGlobalScope": false
},
"../src/bin/build-keycloak-theme/generateFtl.ts": {
"version": "9ff8e2f3fe2505639167e0574c85bbe0748103e8093eb2d956309b59ffeffdde",
"../node_modules/evt/tools/typeSafety/objectKeys.d.ts": {
"version": "4da2684f4596bd222840b428282b011560505fd93efb2de24709418ec33ad614",
"signature": "4da2684f4596bd222840b428282b011560505fd93efb2de24709418ec33ad614",
"affectsGlobalScope": false
},
"../src/bin/build-keycloak-theme/generateFtl/index.ts": {
"version": "0f236ff99727073587d85a380fc1e46f3176124d458ad699560507de2180c794",
"signature": "3a11af9abe294b90f19598d16e9d081f5452cdb668939e63abdd6a4d90955279",
"affectsGlobalScope": false
},
"../src/bin/build-keycloak-theme/generateKeycloakThemeResources.ts": {
"version": "b69ff16755d22c4ce24702ab0dc334d7c386643a72e42e7b9183429b28e23f2e",
"signature": "c53e9172d81232fc2b183d2105ce6b33db0803cdb01c188755460b66b9e7bf35",
"version": "65bb08ea44d6bf3544dcb5721747342d7026a3c000821ddc435d0df0cd42d0a2",
"signature": "91ea17958f25db390b27717b63af5395e85d44a75b1fcaf57ff05c0a46dcacae",
"affectsGlobalScope": false
},
"../src/bin/build-keycloak-theme/generateJavaStackFiles.ts": {
"version": "5ea7c3fa0f38cf5fb8d975843226927a2711c2d4407fe54f59cdc4a36761a49e",
"signature": "9467ef96692034313a18433a9f0ba9586d47d0d8b0862b756a94d58b0910660e",
"version": "9ce7db79f73f7e02e5c50134e826f9fe4c7a48c6d248ad0d500196d3606f1321",
"signature": "557c16c024b7430c3da3f19a980eca355acaa8275713ad3bc3fd91329248b921",
"affectsGlobalScope": false
},
"../src/bin/build-keycloak-theme/generateDebugFiles/index.ts": {
"version": "611e45ac6f36b781b20816282a04aea99ef815637556b98ec656359921809ece",
"signature": "e3d849f4c3846c3254bf58e796a6ed29216735252657be3dec24d30c1df5517b",
"version": "4411f80c0fb04b749da03ee2e605b6ab45780654682ebdcbb4c1adbd36385340",
"signature": "a32872c9b926d7fd1fd2ed3aca63380a6c333c9ea05f1f84fd0248cd637f2553",
"affectsGlobalScope": false
},
"../src/bin/build-keycloak-theme/index.ts": {
"version": "87c56909e792ee3afdc835081db05365537f1b2699945b7a8d59dcc896d30a78",
"version": "5b221c074c0a59d282b9959d10c33e845e1367b026b61bd398b382088b2ca5d7",
"signature": "cc0e708e12dd472472902f20c879f10b9352d52e6823ac341bc0941ef15b9618",
"affectsGlobalScope": false
},
"../src/bin/download-sample-keycloak-themes.ts": {
"version": "9d8f3dc2b3ca71deb6879f01ea7024382fcc7d28f0999f3924fa2105936611af",
"signature": "43e818adf60173644896298637f47b01d5819b17eda46eaa32d0c7d64724d012",
"../src/bin/tools/downloadAndUnzip.ts": {
"version": "b89489224a2f4b7172c50f8e3f667a5e71d119b3f01113a8885448fe6fd73ed8",
"signature": "4fdfe9418b5a6a5b03a719ab67e03a3a393129c129ec1d01e5cb06d8b5ce7104",
"affectsGlobalScope": false
},
"../src/lib/inex.ts": {
"version": "f5f88f79d2709a1ebf75743bef209380b3dd79f3b6f83e61f1ffdbabc4dcc903",
"../src/bin/download-sample-keycloak-themes.ts": {
"version": "1bfdd08b6de4acb2c84826b5f61a8a1ce63e87a38d31e730a62dc37964e3147b",
"signature": "0e57409fe60937b7a31136195e80078dd33a8818f606840619670f76bddcbe7a",
"affectsGlobalScope": false
},
"../src/bin/tools/getProjectRoot.ts": {
"version": "cc5fd6cb2c3aec24f23c38310be23e6066e76dcfa920467231a9de15cf3f5d0a",
"signature": "200426c8d87ae866a7eb0e9ce577ebd7b9437df0f4d166965840e01e96144eff",
"affectsGlobalScope": false
},
"../src/bin/generate-i18n-messages.ts": {
"version": "f483b613a214b575aee19aa80e3e867ebf24dc339519eb6e5e98e3b2913ac85b",
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
"affectsGlobalScope": false
},
"../src/bin/tools/grant-exec-perms.ts": {
"version": "a424a8ecaa5383af695735eb6afe6317896a775f63f0be587d0bfd4f8c75e59d",
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
"affectsGlobalScope": false
},
"../node_modules/evt/tools/typeSafety/id.d.ts": {
"version": "9b4cbbc5d76a0e78a053503ed153a83f48799f1519e3aef593cb0987700704b8",
"signature": "9b4cbbc5d76a0e78a053503ed153a83f48799f1519e3aef593cb0987700704b8",
"affectsGlobalScope": false
},
"../src/lib/keycloakFtlValues.ts": {
"version": "04cc589ec06954e67430e4c0fd122d6083f48211258d0eba4e1734ff683826d8",
"signature": "3d0bdb181fa554bc560636c4302e7fce144bf8d61ffc90c14ab53bc01fb1c655",
"affectsGlobalScope": false
},
"../node_modules/powerhooks/useArrayDiff.d.ts": {
"version": "620ca7040ee32f150413664279db427e04707cbbac9ee9d6611bccd0f15b3314",
"signature": "620ca7040ee32f150413664279db427e04707cbbac9ee9d6611bccd0f15b3314",
"affectsGlobalScope": false
},
"../node_modules/powerhooks/useCallbackFactory.d.ts": {
"version": "22d06cac10104b94037685bcf39b11c602eb966f21d5f20135113f7c3867aba1",
"signature": "22d06cac10104b94037685bcf39b11c602eb966f21d5f20135113f7c3867aba1",
"affectsGlobalScope": false
},
"../node_modules/powerhooks/useClick.d.ts": {
"version": "c2e9602698239180d84c3b4f5a27962a530df7bb1d84f91c8bdd7586b9b32fb5",
"signature": "c2e9602698239180d84c3b4f5a27962a530df7bb1d84f91c8bdd7586b9b32fb5",
"affectsGlobalScope": false
},
"../node_modules/powerhooks/useConstCallback.d.ts": {
"version": "28e2c55f2f9332ca6aeac7adbfc1fd5f5a236be9aca724616367bc899de1b8bd",
"signature": "28e2c55f2f9332ca6aeac7adbfc1fd5f5a236be9aca724616367bc899de1b8bd",
"affectsGlobalScope": false
},
"../node_modules/powerhooks/useDomRect.d.ts": {
"version": "00a870deb01c65e881cf30fa2f7d57f9eb53ea0c4d39b4def11a9df88b675e2a",
"signature": "00a870deb01c65e881cf30fa2f7d57f9eb53ea0c4d39b4def11a9df88b675e2a",
"affectsGlobalScope": false
},
"../node_modules/powerhooks/useEffectButSkipFirstRender.d.ts": {
"version": "5af2a5c2cd07aad4986ccb5d7398be85c398713ead750a2c6da8c8a6b07d479b",
"signature": "5af2a5c2cd07aad4986ccb5d7398be85c398713ead750a2c6da8c8a6b07d479b",
"affectsGlobalScope": false
},
"../node_modules/powerhooks/useNamedState.d.ts": {
"version": "27de2f2c6af66864b71b7b66d5c88e142f29481c69a432c736b555a5fad5fb00",
"signature": "27de2f2c6af66864b71b7b66d5c88e142f29481c69a432c736b555a5fad5fb00",
"affectsGlobalScope": false
},
"../node_modules/powerhooks/useGlobalState.d.ts": {
"version": "fc15c972a7aede37948ddeae7fc10aa957ad6d2ce175cd2f66c3cc0ebb99e224",
"signature": "fc15c972a7aede37948ddeae7fc10aa957ad6d2ce175cd2f66c3cc0ebb99e224",
"affectsGlobalScope": false
},
"../node_modules/powerhooks/useGuaranteedMemo.d.ts": {
"version": "a1609ba49760a99181df574798ec5c12e65be48c9d5072232bf33ff9ab1fabd4",
"signature": "a1609ba49760a99181df574798ec5c12e65be48c9d5072232bf33ff9ab1fabd4",
"affectsGlobalScope": false
},
"../node_modules/powerhooks/useValueChangeEffect.d.ts": {
"version": "96146718aada42e6a73bb98b21c58c420042734c77e2d4e08853846554fa273b",
"signature": "96146718aada42e6a73bb98b21c58c420042734c77e2d4e08853846554fa273b",
"affectsGlobalScope": false
},
"../node_modules/powerhooks/useWindowInnerSize.d.ts": {
"version": "1a44e9b5632e2d6394d637187eda880cd403f108a11c6cd50daea1a22a8f1b73",
"signature": "1a44e9b5632e2d6394d637187eda880cd403f108a11c6cd50daea1a22a8f1b73",
"affectsGlobalScope": false
},
"../node_modules/powerhooks/withProps.d.ts": {
"version": "da436e89f43557a56bc1e2a1026a9ce226f9ababda73437247bcef01fce0068a",
"signature": "da436e89f43557a56bc1e2a1026a9ce226f9ababda73437247bcef01fce0068a",
"affectsGlobalScope": false
},
"../node_modules/powerhooks/useWithProps.d.ts": {
"version": "4d69e5f9655d459d1584da94fb589dfde228d72487648b27ca4375328d12cfa7",
"signature": "4d69e5f9655d459d1584da94fb589dfde228d72487648b27ca4375328d12cfa7",
"affectsGlobalScope": false
},
"../node_modules/powerhooks/index.d.ts": {
"version": "842cf60645647486885d3d7c146e23e976782458b50ade9116c01334132dbe60",
"signature": "842cf60645647486885d3d7c146e23e976782458b50ade9116c01334132dbe60",
"affectsGlobalScope": false
},
"../src/lib/i18n/messages.generated.ts": {
"version": "da9455e71ef20e2eb7e6820b2fcab96f7c46797379d0b6f83a08b877f34eca24",
"signature": "f19b5746522b2a2bde910bf29c7737d862b947c540525a1198ebae42dd819217",
"affectsGlobalScope": false
},
"../src/lib/i18n/getLanguageLabel.ts": {
"version": "ee36fe1507770f9b227839cd107746a4d65d5bb057b994d6b76f03b4308b87fd",
"signature": "2b6288ae572cb54ba4bb9306904c6c58a4b874f833829cb40eb12a3777c8ce28",
"affectsGlobalScope": false
},
"../src/lib/i18n/useKeycloakLanguage.ts": {
"version": "6708374323a7f2cbda1a1d4b49376fce4fc55700be3ae9e2c5d40bdf815244f6",
"signature": "334418f10932ba83a4a79a670fd437465cc7e19b1592851d9b6c7b10692322a0",
"affectsGlobalScope": false
},
"../src/lib/i18n/useKeycloakTranslation.ts": {
"version": "d5817676fded9ca42d0277276c209594ab723257a7c176c7b39196e762a8e5db",
"signature": "4a43081c111a5238a3a23b2761cc24310fde65d60a417f5c882b3ec50191c2a4",
"affectsGlobalScope": false
},
"../src/lib/index.ts": {
"version": "8baee7ac19e659661ccbfaa9447bf106bcca907c505ad6afdeab78e6b6846e5c",
"signature": "38e39be533e70bd563f6de8762c11f27d97a1162bb121ca7d2614703b38e15d7",
"affectsGlobalScope": false
},
"../node_modules/@types/node/globals.d.ts": {
"version": "829fcfff513ac68aae602034a6e0d2e30a2f4fa32881157ba6a3002bc949f685",
"signature": "829fcfff513ac68aae602034a6e0d2e30a2f4fa32881157ba6a3002bc949f685",
@ -502,22 +652,22 @@
"affectsGlobalScope": false
},
"../src/test/setupSampleReactProject.ts": {
"version": "4584f6388902ef725ef7af1a81689d594386fe475602650e1c3196e364565f9a",
"signature": "a2bc6a0c53ec1dd6388b62c6b3ae4df8e55c24889deb0cad6251f95cffa17da9",
"version": "40059d4f6b0d3fa391d96cae7358986a24e31478e82f791c1fa01308430422cf",
"signature": "2c0ddcdfefa535987300f17ab4be6b93e9dcc2583a80136eebb34671ff7cac00",
"affectsGlobalScope": false
},
"../src/test/build-keycloak-theme.ts": {
"version": "7a0945c27488e0c49134e54cf9363cd058cf07986ab1fa92b4382db235355628",
"version": "b74347756352fed56101aeba37a93238d129cb6884237b658f81feba9c76a69c",
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
"affectsGlobalScope": false
},
"../src/test/download-sample-keycloak-themes.ts": {
"version": "4bed46433028ade014a5ba87805452fcc3488f88bc78bde988e64d286b02aeec",
"version": "e7fa7d2db7862eb4da932925466b0cef7f97577a0fe10215b32a2f4c32f02ee7",
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
"affectsGlobalScope": false
},
"../src/test/generateKeycloakThemeResources.ts": {
"version": "8abf896388c9556edcc236b42c3f73a9c23f2a7f51fd40aea155f92473160eb0",
"version": "d6d7ad4c5158ffddb31c072d016c4a8d5925359c787548ffab0fd3adf6f58f2b",
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
"affectsGlobalScope": false
},
@ -695,6 +845,14 @@
"../node_modules/@types/node/zlib.d.ts": [
"../node_modules/@types/node/stream.d.ts"
],
"../node_modules/@types/react/index.d.ts": [
"../node_modules/@types/prop-types/index.d.ts",
"../node_modules/@types/react/global.d.ts",
"../node_modules/csstype/index.d.ts"
],
"../node_modules/@types/react/jsx-runtime.d.ts": [
"../node_modules/@types/react/index.d.ts"
],
"../node_modules/cheerio/types/index.d.ts": [
"../node_modules/domhandler/lib/index.d.ts",
"../node_modules/htmlparser2/lib/index.d.ts"
@ -755,6 +913,42 @@
"../node_modules/htmlparser2/lib/Parser.d.ts",
"../node_modules/htmlparser2/lib/Tokenizer.d.ts"
],
"../node_modules/powerhooks/index.d.ts": [
"../node_modules/powerhooks/useArrayDiff.d.ts",
"../node_modules/powerhooks/useCallbackFactory.d.ts",
"../node_modules/powerhooks/useClick.d.ts",
"../node_modules/powerhooks/useConstCallback.d.ts",
"../node_modules/powerhooks/useDomRect.d.ts",
"../node_modules/powerhooks/useEffectButSkipFirstRender.d.ts",
"../node_modules/powerhooks/useGlobalState.d.ts",
"../node_modules/powerhooks/useGuaranteedMemo.d.ts",
"../node_modules/powerhooks/useNamedState.d.ts",
"../node_modules/powerhooks/useValueChangeEffect.d.ts",
"../node_modules/powerhooks/useWindowInnerSize.d.ts",
"../node_modules/powerhooks/useWithProps.d.ts",
"../node_modules/powerhooks/withProps.d.ts"
],
"../node_modules/powerhooks/useClick.d.ts": [
"../node_modules/@types/react/index.d.ts"
],
"../node_modules/powerhooks/useDomRect.d.ts": [
"../node_modules/@types/react/index.d.ts"
],
"../node_modules/powerhooks/useEffectButSkipFirstRender.d.ts": [
"../node_modules/@types/react/index.d.ts"
],
"../node_modules/powerhooks/useGlobalState.d.ts": [
"../node_modules/powerhooks/useNamedState.d.ts"
],
"../node_modules/powerhooks/useNamedState.d.ts": [
"../node_modules/@types/react/index.d.ts"
],
"../node_modules/powerhooks/useWithProps.d.ts": [
"../node_modules/powerhooks/withProps.d.ts"
],
"../node_modules/powerhooks/withProps.d.ts": [
"../node_modules/@types/react/index.d.ts"
],
"../node_modules/scripting-tools/dist/lib/index.d.ts": [
"../node_modules/@types/node/child_process.d.ts",
"../node_modules/@types/node/index.d.ts",
@ -762,70 +956,148 @@
],
"../src/bin/build-keycloak-theme/generateDebugFiles/index.ts": [
"../node_modules/@types/node/fs.d.ts",
"../node_modules/@types/node/path.d.ts"
"../node_modules/@types/node/path.d.ts",
"../node_modules/@types/react/jsx-runtime.d.ts"
],
"../src/bin/build-keycloak-theme/generateFtl.ts": [
"../src/bin/build-keycloak-theme/generateFtl/index.ts": [
"../node_modules/@types/node/fs.d.ts",
"../node_modules/@types/node/path.d.ts",
"../node_modules/@types/react/jsx-runtime.d.ts",
"../node_modules/cheerio/types/index.d.ts",
"../node_modules/evt/tools/typeSafety/objectKeys.d.ts",
"../src/bin/build-keycloak-theme/replaceImportFromStatic.ts"
],
"../src/bin/build-keycloak-theme/generateJavaStackFiles.ts": [
"../node_modules/@types/node/fs.d.ts",
"../node_modules/@types/node/path.d.ts",
"../node_modules/@types/node/url.d.ts"
"../node_modules/@types/node/url.d.ts",
"../node_modules/@types/react/jsx-runtime.d.ts"
],
"../src/bin/build-keycloak-theme/generateKeycloakThemeResources.ts": [
"../node_modules/@types/node/fs.d.ts",
"../node_modules/@types/node/path.d.ts",
"../src/bin/build-keycloak-theme/generateFtl.ts",
"../node_modules/@types/react/jsx-runtime.d.ts",
"../src/bin/build-keycloak-theme/generateFtl/index.ts",
"../src/bin/build-keycloak-theme/replaceImportFromStatic.ts",
"../src/tools/transformCodebase.ts"
"../src/bin/tools/transformCodebase.ts"
],
"../src/bin/build-keycloak-theme/index.ts": [
"../node_modules/@types/node/child_process.d.ts",
"../node_modules/@types/node/path.d.ts",
"../node_modules/@types/react/jsx-runtime.d.ts",
"../src/bin/build-keycloak-theme/generateDebugFiles/index.ts",
"../src/bin/build-keycloak-theme/generateJavaStackFiles.ts",
"../src/bin/build-keycloak-theme/generateKeycloakThemeResources.ts"
],
"../src/bin/build-keycloak-theme/replaceImportFromStatic.ts": [
"../node_modules/@types/node/crypto.d.ts"
"../node_modules/@types/node/crypto.d.ts",
"../node_modules/@types/react/jsx-runtime.d.ts"
],
"../src/bin/download-sample-keycloak-themes.ts": [
"../node_modules/@types/react/jsx-runtime.d.ts",
"../src/bin/build-keycloak-theme/index.ts",
"../src/bin/tools/downloadAndUnzip.ts"
],
"../src/bin/generate-i18n-messages.ts": [
"../node_modules/@types/node/child_process.d.ts",
"../node_modules/@types/node/fs.d.ts",
"../node_modules/@types/node/path.d.ts",
"../src/bin/build-keycloak-theme/index.ts"
"../node_modules/@types/react/jsx-runtime.d.ts",
"../src/bin/download-sample-keycloak-themes.ts",
"../src/bin/tools/crawl.ts",
"../src/bin/tools/downloadAndUnzip.ts",
"../src/bin/tools/getProjectRoot.ts"
],
"../src/bin/tools/crawl.ts": [
"../node_modules/@types/node/fs.d.ts",
"../node_modules/@types/node/path.d.ts",
"../node_modules/@types/react/jsx-runtime.d.ts"
],
"../src/bin/tools/downloadAndUnzip.ts": [
"../node_modules/@types/node/child_process.d.ts",
"../node_modules/@types/node/fs.d.ts",
"../node_modules/@types/node/path.d.ts",
"../node_modules/@types/react/jsx-runtime.d.ts"
],
"../src/bin/tools/getProjectRoot.ts": [
"../node_modules/@types/node/fs.d.ts",
"../node_modules/@types/node/path.d.ts",
"../node_modules/@types/react/jsx-runtime.d.ts"
],
"../src/bin/tools/grant-exec-perms.ts": [
"../node_modules/@types/node/child_process.d.ts",
"../node_modules/@types/node/path.d.ts",
"../node_modules/@types/react/jsx-runtime.d.ts",
"../src/bin/tools/getProjectRoot.ts"
],
"../src/bin/tools/transformCodebase.ts": [
"../node_modules/@types/node/fs.d.ts",
"../node_modules/@types/node/path.d.ts",
"../node_modules/@types/react/jsx-runtime.d.ts",
"../src/bin/tools/crawl.ts"
],
"../src/lib/i18n/getLanguageLabel.ts": [
"../node_modules/@types/react/jsx-runtime.d.ts",
"../src/lib/i18n/useKeycloakLanguage.ts"
],
"../src/lib/i18n/messages.generated.ts": [
"../node_modules/@types/react/jsx-runtime.d.ts"
],
"../src/lib/i18n/useKeycloakLanguage.ts": [
"../node_modules/@types/react/jsx-runtime.d.ts",
"../node_modules/evt/tools/typeSafety/objectKeys.d.ts",
"../node_modules/powerhooks/index.d.ts",
"../src/lib/i18n/getLanguageLabel.ts",
"../src/lib/i18n/messages.generated.ts"
],
"../src/lib/i18n/useKeycloakTranslation.ts": [
"../node_modules/@types/react/jsx-runtime.d.ts",
"../node_modules/powerhooks/index.d.ts",
"../src/lib/i18n/messages.generated.ts",
"../src/lib/i18n/useKeycloakLanguage.ts"
],
"../src/lib/index.ts": [
"../node_modules/@types/react/jsx-runtime.d.ts",
"../src/lib/i18n/getLanguageLabel.ts",
"../src/lib/i18n/useKeycloakLanguage.ts",
"../src/lib/i18n/useKeycloakTranslation.ts",
"../src/lib/keycloakFtlValues.ts"
],
"../src/lib/keycloakFtlValues.ts": [
"../node_modules/@types/react/jsx-runtime.d.ts",
"../node_modules/evt/tools/typeSafety/id.d.ts",
"../src/bin/build-keycloak-theme/generateFtl/index.ts",
"../src/bin/build-keycloak-theme/generateKeycloakThemeResources.ts"
],
"../src/test/build-keycloak-theme.ts": [
"../node_modules/@types/node/path.d.ts",
"../node_modules/@types/react/jsx-runtime.d.ts",
"../node_modules/scripting-tools/dist/lib/index.d.ts",
"../src/bin/tools/getProjectRoot.ts",
"../src/test/setupSampleReactProject.ts"
],
"../src/test/download-sample-keycloak-themes.ts": [
"../node_modules/@types/node/path.d.ts",
"../node_modules/@types/react/jsx-runtime.d.ts",
"../node_modules/scripting-tools/dist/lib/index.d.ts",
"../src/bin/tools/getProjectRoot.ts",
"../src/test/setupSampleReactProject.ts"
],
"../src/test/generateKeycloakThemeResources.ts": [
"../node_modules/@types/node/path.d.ts",
"../node_modules/@types/react/jsx-runtime.d.ts",
"../src/bin/build-keycloak-theme/generateKeycloakThemeResources.ts",
"../src/test/setupSampleReactProject.ts"
],
"../src/test/replaceImportFromStatic.ts": [
"../node_modules/@types/react/jsx-runtime.d.ts",
"../src/bin/build-keycloak-theme/replaceImportFromStatic.ts"
],
"../src/test/setupSampleReactProject.ts": [
"../node_modules/@types/node/path.d.ts",
"../node_modules/scripting-tools/dist/lib/index.d.ts"
],
"../src/tools/crawl.ts": [
"../node_modules/@types/node/fs.d.ts",
"../node_modules/@types/node/path.d.ts"
],
"../src/tools/transformCodebase.ts": [
"../node_modules/@types/node/fs.d.ts",
"../node_modules/@types/node/path.d.ts",
"../src/tools/crawl.ts"
"../node_modules/@types/react/jsx-runtime.d.ts",
"../node_modules/scripting-tools/dist/lib/index.d.ts",
"../src/bin/tools/getProjectRoot.ts"
]
},
"exportedModulesMap": {
@ -970,6 +1242,14 @@
"../node_modules/@types/node/zlib.d.ts": [
"../node_modules/@types/node/stream.d.ts"
],
"../node_modules/@types/react/index.d.ts": [
"../node_modules/@types/prop-types/index.d.ts",
"../node_modules/@types/react/global.d.ts",
"../node_modules/csstype/index.d.ts"
],
"../node_modules/@types/react/jsx-runtime.d.ts": [
"../node_modules/@types/react/index.d.ts"
],
"../node_modules/cheerio/types/index.d.ts": [
"../node_modules/domhandler/lib/index.d.ts",
"../node_modules/htmlparser2/lib/index.d.ts"
@ -1030,10 +1310,64 @@
"../node_modules/htmlparser2/lib/Parser.d.ts",
"../node_modules/htmlparser2/lib/Tokenizer.d.ts"
],
"../node_modules/powerhooks/index.d.ts": [
"../node_modules/powerhooks/useArrayDiff.d.ts",
"../node_modules/powerhooks/useCallbackFactory.d.ts",
"../node_modules/powerhooks/useClick.d.ts",
"../node_modules/powerhooks/useConstCallback.d.ts",
"../node_modules/powerhooks/useDomRect.d.ts",
"../node_modules/powerhooks/useEffectButSkipFirstRender.d.ts",
"../node_modules/powerhooks/useGlobalState.d.ts",
"../node_modules/powerhooks/useGuaranteedMemo.d.ts",
"../node_modules/powerhooks/useNamedState.d.ts",
"../node_modules/powerhooks/useValueChangeEffect.d.ts",
"../node_modules/powerhooks/useWindowInnerSize.d.ts",
"../node_modules/powerhooks/useWithProps.d.ts",
"../node_modules/powerhooks/withProps.d.ts"
],
"../node_modules/powerhooks/useClick.d.ts": [
"../node_modules/@types/react/index.d.ts"
],
"../node_modules/powerhooks/useDomRect.d.ts": [
"../node_modules/@types/react/index.d.ts"
],
"../node_modules/powerhooks/useEffectButSkipFirstRender.d.ts": [
"../node_modules/@types/react/index.d.ts"
],
"../node_modules/powerhooks/useGlobalState.d.ts": [
"../node_modules/powerhooks/useNamedState.d.ts"
],
"../node_modules/powerhooks/useNamedState.d.ts": [
"../node_modules/@types/react/index.d.ts"
],
"../node_modules/powerhooks/useWithProps.d.ts": [
"../node_modules/powerhooks/withProps.d.ts"
],
"../node_modules/powerhooks/withProps.d.ts": [
"../node_modules/@types/react/index.d.ts"
],
"../node_modules/scripting-tools/dist/lib/index.d.ts": [
"../node_modules/@types/node/child_process.d.ts",
"../node_modules/@types/node/index.d.ts",
"../node_modules/scripting-tools/dist/lib/get_caller_file_path.d.ts"
],
"../src/lib/i18n/getLanguageLabel.ts": [
"../src/lib/i18n/useKeycloakLanguage.ts"
],
"../src/lib/i18n/useKeycloakLanguage.ts": [
"../node_modules/powerhooks/index.d.ts"
],
"../src/lib/i18n/useKeycloakTranslation.ts": [
"../src/lib/i18n/messages.generated.ts"
],
"../src/lib/index.ts": [
"../src/lib/i18n/getLanguageLabel.ts",
"../src/lib/i18n/useKeycloakLanguage.ts",
"../src/lib/i18n/useKeycloakTranslation.ts",
"../src/lib/keycloakFtlValues.ts"
],
"../src/lib/keycloakFtlValues.ts": [
"../src/bin/build-keycloak-theme/generateFtl/index.ts"
]
},
"semanticDiagnosticsPerFile": [
@ -1081,7 +1415,12 @@
"../node_modules/@types/node/vm.d.ts",
"../node_modules/@types/node/worker_threads.d.ts",
"../node_modules/@types/node/zlib.d.ts",
"../node_modules/@types/prop-types/index.d.ts",
"../node_modules/@types/react/global.d.ts",
"../node_modules/@types/react/index.d.ts",
"../node_modules/@types/react/jsx-runtime.d.ts",
"../node_modules/cheerio/types/index.d.ts",
"../node_modules/csstype/index.d.ts",
"../node_modules/dom-serializer/lib/index.d.ts",
"../node_modules/domelementtype/lib/index.d.ts",
"../node_modules/domhandler/lib/index.d.ts",
@ -1094,10 +1433,26 @@
"../node_modules/domutils/lib/stringify.d.ts",
"../node_modules/domutils/lib/tagtypes.d.ts",
"../node_modules/domutils/lib/traversal.d.ts",
"../node_modules/evt/tools/typeSafety/id.d.ts",
"../node_modules/evt/tools/typeSafety/objectKeys.d.ts",
"../node_modules/htmlparser2/lib/FeedHandler.d.ts",
"../node_modules/htmlparser2/lib/Parser.d.ts",
"../node_modules/htmlparser2/lib/Tokenizer.d.ts",
"../node_modules/htmlparser2/lib/index.d.ts",
"../node_modules/powerhooks/index.d.ts",
"../node_modules/powerhooks/useArrayDiff.d.ts",
"../node_modules/powerhooks/useCallbackFactory.d.ts",
"../node_modules/powerhooks/useClick.d.ts",
"../node_modules/powerhooks/useConstCallback.d.ts",
"../node_modules/powerhooks/useDomRect.d.ts",
"../node_modules/powerhooks/useEffectButSkipFirstRender.d.ts",
"../node_modules/powerhooks/useGlobalState.d.ts",
"../node_modules/powerhooks/useGuaranteedMemo.d.ts",
"../node_modules/powerhooks/useNamedState.d.ts",
"../node_modules/powerhooks/useValueChangeEffect.d.ts",
"../node_modules/powerhooks/useWindowInnerSize.d.ts",
"../node_modules/powerhooks/useWithProps.d.ts",
"../node_modules/powerhooks/withProps.d.ts",
"../node_modules/scripting-tools/dist/lib/get_caller_file_path.d.ts",
"../node_modules/scripting-tools/dist/lib/index.d.ts",
"../node_modules/typescript/lib/lib.dom.d.ts",
@ -1129,21 +1484,30 @@
"../node_modules/typescript/lib/lib.es5.d.ts",
"../node_modules/typescript/lib/lib.esnext.intl.d.ts",
"../src/bin/build-keycloak-theme/generateDebugFiles/index.ts",
"../src/bin/build-keycloak-theme/generateFtl.ts",
"../src/bin/build-keycloak-theme/generateFtl/index.ts",
"../src/bin/build-keycloak-theme/generateJavaStackFiles.ts",
"../src/bin/build-keycloak-theme/generateKeycloakThemeResources.ts",
"../src/bin/build-keycloak-theme/index.ts",
"../src/bin/build-keycloak-theme/replaceImportFromStatic.ts",
"../src/bin/download-sample-keycloak-themes.ts",
"../src/lib/inex.ts",
"../src/bin/generate-i18n-messages.ts",
"../src/bin/tools/crawl.ts",
"../src/bin/tools/downloadAndUnzip.ts",
"../src/bin/tools/getProjectRoot.ts",
"../src/bin/tools/grant-exec-perms.ts",
"../src/bin/tools/transformCodebase.ts",
"../src/lib/i18n/getLanguageLabel.ts",
"../src/lib/i18n/messages.generated.ts",
"../src/lib/i18n/useKeycloakLanguage.ts",
"../src/lib/i18n/useKeycloakTranslation.ts",
"../src/lib/index.ts",
"../src/lib/keycloakFtlValues.ts",
"../src/test/build-keycloak-theme.ts",
"../src/test/download-sample-keycloak-themes.ts",
"../src/test/generateKeycloakThemeResources.ts",
"../src/test/replaceImportFromStatic.ts",
"../src/test/setupSampleReactProject.ts",
"../src/tools/crawl.ts",
"../src/tools/transformCodebase.ts"
"../src/test/setupSampleReactProject.ts"
]
},
"version": "4.1.5"
"version": "4.2.2"
}

Some files were not shown because too many files have changed in this diff Show More