Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
5357626317 | |||
552c95c59e | |||
50590697ca | |||
e261736fa3 | |||
263f55fdd3 | |||
2b7f8a24a3 |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "keycloakify",
|
"name": "keycloakify",
|
||||||
"version": "11.3.12",
|
"version": "11.3.15",
|
||||||
"description": "Framework to create custom Keycloak UIs",
|
"description": "Framework to create custom Keycloak UIs",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -51,7 +51,7 @@ export async function command(params: { buildContext: BuildContext }) {
|
|||||||
2
|
2
|
||||||
)};`,
|
)};`,
|
||||||
``,
|
``,
|
||||||
`export type KcContext =`,
|
`type KcContext =`,
|
||||||
hasLoginTheme && ` | import("./login/KcContext").KcContext`,
|
hasLoginTheme && ` | import("./login/KcContext").KcContext`,
|
||||||
hasAccountTheme && ` | import("./account/KcContext").KcContext`,
|
hasAccountTheme && ` | import("./account/KcContext").KcContext`,
|
||||||
` ;`,
|
` ;`,
|
||||||
|
@ -102,7 +102,7 @@ export declare namespace KcContext {
|
|||||||
showTryAnotherWayLink?: boolean;
|
showTryAnotherWayLink?: boolean;
|
||||||
attemptedUsername?: string;
|
attemptedUsername?: string;
|
||||||
};
|
};
|
||||||
scripts: string[];
|
scripts?: string[];
|
||||||
message?: {
|
message?: {
|
||||||
type: "success" | "warning" | "error" | "info";
|
type: "success" | "warning" | "error" | "info";
|
||||||
summary: string;
|
summary: string;
|
||||||
|
@ -10,7 +10,7 @@ export type KcContextLike = {
|
|||||||
resourcesPath: string;
|
resourcesPath: string;
|
||||||
ssoLoginInOtherTabsUrl: string;
|
ssoLoginInOtherTabsUrl: string;
|
||||||
};
|
};
|
||||||
scripts: string[];
|
scripts?: string[];
|
||||||
};
|
};
|
||||||
|
|
||||||
assert<keyof KcContextLike extends keyof KcContext ? true : false>();
|
assert<keyof KcContextLike extends keyof KcContext ? true : false>();
|
||||||
@ -45,10 +45,12 @@ export function useInitialize(params: {
|
|||||||
type: "module",
|
type: "module",
|
||||||
src: `${url.resourcesPath}/js/menu-button-links.js`
|
src: `${url.resourcesPath}/js/menu-button-links.js`
|
||||||
},
|
},
|
||||||
...scripts.map(src => ({
|
...(scripts === undefined
|
||||||
type: "text/javascript" as const,
|
? []
|
||||||
src
|
: scripts.map(src => ({
|
||||||
})),
|
type: "text/javascript" as const,
|
||||||
|
src
|
||||||
|
}))),
|
||||||
{
|
{
|
||||||
type: "module",
|
type: "module",
|
||||||
textContent: `
|
textContent: `
|
||||||
|
@ -16,6 +16,7 @@ import {
|
|||||||
} from "../bin/shared/buildContext";
|
} from "../bin/shared/buildContext";
|
||||||
import MagicString from "magic-string";
|
import MagicString from "magic-string";
|
||||||
import { command as updateKcGenCommand } from "../bin/update-kc-gen";
|
import { command as updateKcGenCommand } from "../bin/update-kc-gen";
|
||||||
|
import { replaceAll } from "../bin/tools/String.prototype.replaceAll";
|
||||||
|
|
||||||
export namespace keycloakify {
|
export namespace keycloakify {
|
||||||
export type Params = BuildOptions & {
|
export type Params = BuildOptions & {
|
||||||
@ -130,6 +131,8 @@ export function keycloakify(params: keycloakify.Params) {
|
|||||||
await updateKcGenCommand({ buildContext });
|
await updateKcGenCommand({ buildContext });
|
||||||
},
|
},
|
||||||
transform: (code, id) => {
|
transform: (code, id) => {
|
||||||
|
id = replaceAll(id, "/", pathSep);
|
||||||
|
|
||||||
assert(command !== undefined);
|
assert(command !== undefined);
|
||||||
assert(shouldGenerateSourcemap !== undefined);
|
assert(shouldGenerateSourcemap !== undefined);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user