keycloakify 7.7.2 → 7.9.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/account/kcContext/createGetKcContext.js +3 -6
- package/account/kcContext/createGetKcContext.js.map +1 -1
- package/account/kcContext/kcContextMocks.js +3 -3
- package/account/kcContext/kcContextMocks.js.map +1 -1
- package/bin/copy-keycloak-resources-to-public.d.ts +2 -0
- package/bin/copy-keycloak-resources-to-public.js +140 -0
- package/bin/copy-keycloak-resources-to-public.js.map +1 -0
- package/bin/download-builtin-keycloak-theme.js +8 -10
- package/bin/download-builtin-keycloak-theme.js.map +1 -1
- package/bin/initialize-email-theme.js +5 -2
- package/bin/initialize-email-theme.js.map +1 -1
- package/bin/keycloakify/BuildOptions.d.ts +1 -3
- package/bin/keycloakify/BuildOptions.js +15 -5
- package/bin/keycloakify/BuildOptions.js.map +1 -1
- package/bin/keycloakify/generateTheme/downloadKeycloakStaticResources.js +4 -3
- package/bin/keycloakify/generateTheme/downloadKeycloakStaticResources.js.map +1 -1
- package/bin/keycloakify/generateTheme/generateTheme.js +8 -28
- package/bin/keycloakify/generateTheme/generateTheme.js.map +1 -1
- package/bin/keycloakify/keycloakify.js +11 -14
- package/bin/keycloakify/keycloakify.js.map +1 -1
- package/bin/keycloakify/parsedPackageJson.d.ts +5 -5
- package/bin/mockTestingResourcesPath.d.ts +3 -3
- package/bin/mockTestingResourcesPath.js +4 -4
- package/bin/mockTestingResourcesPath.js.map +1 -1
- package/login/kcContext/createGetKcContext.js +3 -6
- package/login/kcContext/createGetKcContext.js.map +1 -1
- package/login/kcContext/kcContextMocks.js +3 -3
- package/login/kcContext/kcContextMocks.js.map +1 -1
- package/package.json +6 -5
- package/src/account/kcContext/createGetKcContext.ts +3 -9
- package/src/account/kcContext/kcContextMocks.ts +3 -3
- package/src/bin/copy-keycloak-resources-to-public.ts +48 -0
- package/src/bin/download-builtin-keycloak-theme.ts +8 -15
- package/src/bin/initialize-email-theme.ts +6 -2
- package/src/bin/keycloakify/BuildOptions.ts +13 -5
- package/src/bin/keycloakify/generateTheme/downloadKeycloakStaticResources.ts +13 -4
- package/src/bin/keycloakify/generateTheme/generateTheme.ts +8 -30
- package/src/bin/keycloakify/keycloakify.ts +4 -7
- package/src/bin/mockTestingResourcesPath.ts +3 -3
- package/src/login/kcContext/createGetKcContext.ts +3 -9
- package/src/login/kcContext/kcContextMocks.ts +3 -3
- package/bin/tools/cliOptions.d.ts +0 -5
- package/bin/tools/cliOptions.js +0 -16
- package/bin/tools/cliOptions.js.map +0 -1
- package/src/bin/tools/cliOptions.ts +0 -15
@@ -9,7 +9,7 @@ import type { ExtendKcContext } from "./getKcContextFromWindow";
|
|
9
9
|
import { getKcContextFromWindow } from "./getKcContextFromWindow";
|
10
10
|
import { pathJoin } from "keycloakify/bin/tools/pathJoin";
|
11
11
|
import { pathBasename } from "keycloakify/tools/pathBasename";
|
12
|
-
import {
|
12
|
+
import { resourcesCommonDirPathRelativeToPublicDir } from "keycloakify/bin/mockTestingResourcesPath";
|
13
13
|
import { symToStr } from "tsafe/symToStr";
|
14
14
|
import { loginThemePageIds } from "keycloakify/bin/keycloakify/generateFtl/pageId";
|
15
15
|
|
@@ -33,13 +33,7 @@ export function createGetKcContext<KcContextExtension extends { pageId: string }
|
|
33
33
|
if (mockPageId !== undefined && realKcContext === undefined) {
|
34
34
|
//TODO maybe trow if no mock fo custom page
|
35
35
|
|
36
|
-
console.log(
|
37
|
-
[
|
38
|
-
`%cKeycloakify: ${symToStr({ mockPageId })} set to ${mockPageId}.`,
|
39
|
-
`If assets are missing make sure you have built your Keycloak theme at least once.`
|
40
|
-
].join(" "),
|
41
|
-
"background: red; color: yellow; font-size: medium"
|
42
|
-
);
|
36
|
+
console.log(`%cKeycloakify: ${symToStr({ mockPageId })} set to ${mockPageId}.`, "background: red; color: yellow; font-size: medium");
|
43
37
|
|
44
38
|
const kcContextDefaultMock = kcContextMocks.find(({ pageId }) => pageId === mockPageId);
|
45
39
|
|
@@ -158,7 +152,7 @@ export function createGetKcContext<KcContextExtension extends { pageId: string }
|
|
158
152
|
{
|
159
153
|
const { url } = realKcContext;
|
160
154
|
|
161
|
-
url.resourcesCommonPath = pathJoin(url.resourcesPath, pathBasename(
|
155
|
+
url.resourcesCommonPath = pathJoin(url.resourcesPath, pathBasename(resourcesCommonDirPathRelativeToPublicDir));
|
162
156
|
}
|
163
157
|
|
164
158
|
return { "kcContext": realKcContext as any };
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import "minimal-polyfills/Object.fromEntries";
|
2
2
|
import type { KcContext, Attribute } from "./KcContext";
|
3
|
-
import {
|
3
|
+
import { resourcesCommonDirPathRelativeToPublicDir, resourcesDirPathRelativeToPublicDir } from "keycloakify/bin/mockTestingResourcesPath";
|
4
4
|
import { pathJoin } from "keycloakify/bin/tools/pathJoin";
|
5
5
|
import { id } from "tsafe/id";
|
6
6
|
|
@@ -104,8 +104,8 @@ export const kcContextCommonMock: KcContext.Common = {
|
|
104
104
|
"keycloakifyVersion": "0.0.0",
|
105
105
|
"url": {
|
106
106
|
"loginAction": "#",
|
107
|
-
"resourcesPath": pathJoin(PUBLIC_URL,
|
108
|
-
"resourcesCommonPath": pathJoin(PUBLIC_URL,
|
107
|
+
"resourcesPath": pathJoin(PUBLIC_URL, resourcesDirPathRelativeToPublicDir),
|
108
|
+
"resourcesCommonPath": pathJoin(PUBLIC_URL, resourcesCommonDirPathRelativeToPublicDir),
|
109
109
|
"loginRestartFlowUrl": "/auth/realms/myrealm/login-actions/restart?client_id=account&tab_id=HoAx28ja4xg",
|
110
110
|
"loginUrl": "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg"
|
111
111
|
},
|
package/bin/tools/cliOptions.js
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.getCliOptions = void 0;
|
7
|
-
var minimist_1 = __importDefault(require("minimist"));
|
8
|
-
var getCliOptions = function (processArgv) {
|
9
|
-
var argv = (0, minimist_1.default)(processArgv);
|
10
|
-
return {
|
11
|
-
isSilent: typeof argv["silent"] === "boolean" ? argv["silent"] : false,
|
12
|
-
hasExternalAssets: typeof argv["external-assets"] === "boolean" ? argv["external-assets"] : false
|
13
|
-
};
|
14
|
-
};
|
15
|
-
exports.getCliOptions = getCliOptions;
|
16
|
-
//# sourceMappingURL=cliOptions.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"cliOptions.js","sourceRoot":"","sources":["../../src/bin/tools/cliOptions.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAiC;AAO1B,IAAM,aAAa,GAAG,UAAC,WAAqB;IAC/C,IAAM,IAAI,GAAG,IAAA,kBAAS,EAAC,WAAW,CAAC,CAAC;IAEpC,OAAO;QACH,QAAQ,EAAE,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK;QACtE,iBAAiB,EAAE,OAAO,IAAI,CAAC,iBAAiB,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,KAAK;KACpG,CAAC;AACN,CAAC,CAAC;AAPW,QAAA,aAAa,iBAOxB"}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import parseArgv from "minimist";
|
2
|
-
|
3
|
-
export type CliOptions = {
|
4
|
-
isSilent: boolean;
|
5
|
-
hasExternalAssets: boolean;
|
6
|
-
};
|
7
|
-
|
8
|
-
export const getCliOptions = (processArgv: string[]): CliOptions => {
|
9
|
-
const argv = parseArgv(processArgv);
|
10
|
-
|
11
|
-
return {
|
12
|
-
isSilent: typeof argv["silent"] === "boolean" ? argv["silent"] : false,
|
13
|
-
hasExternalAssets: typeof argv["external-assets"] === "boolean" ? argv["external-assets"] : false
|
14
|
-
};
|
15
|
-
};
|