Fix some bugs in start-keycloak
This commit is contained in:
parent
ee5f73519a
commit
b34f86d2f0
2142
src/bin/start-keycloak/myrealm-realm-23.json
Normal file
2142
src/bin/start-keycloak/myrealm-realm-23.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -598,7 +598,9 @@
|
|||||||
"publicClient": true,
|
"publicClient": true,
|
||||||
"frontchannelLogout": false,
|
"frontchannelLogout": false,
|
||||||
"protocol": "openid-connect",
|
"protocol": "openid-connect",
|
||||||
"attributes": {},
|
"attributes": {
|
||||||
|
"post.logout.redirect.uris": "+"
|
||||||
|
},
|
||||||
"authenticationFlowBindingOverrides": {},
|
"authenticationFlowBindingOverrides": {},
|
||||||
"fullScopeAllowed": false,
|
"fullScopeAllowed": false,
|
||||||
"nodeReRegistrationTimeout": 0,
|
"nodeReRegistrationTimeout": 0,
|
||||||
@ -630,7 +632,9 @@
|
|||||||
"publicClient": false,
|
"publicClient": false,
|
||||||
"frontchannelLogout": false,
|
"frontchannelLogout": false,
|
||||||
"protocol": "openid-connect",
|
"protocol": "openid-connect",
|
||||||
"attributes": {},
|
"attributes": {
|
||||||
|
"post.logout.redirect.uris": "+"
|
||||||
|
},
|
||||||
"authenticationFlowBindingOverrides": {},
|
"authenticationFlowBindingOverrides": {},
|
||||||
"fullScopeAllowed": false,
|
"fullScopeAllowed": false,
|
||||||
"nodeReRegistrationTimeout": 0,
|
"nodeReRegistrationTimeout": 0,
|
||||||
@ -812,7 +816,9 @@
|
|||||||
"publicClient": false,
|
"publicClient": false,
|
||||||
"frontchannelLogout": false,
|
"frontchannelLogout": false,
|
||||||
"protocol": "openid-connect",
|
"protocol": "openid-connect",
|
||||||
"attributes": {},
|
"attributes": {
|
||||||
|
"post.logout.redirect.uris": "+"
|
||||||
|
},
|
||||||
"authenticationFlowBindingOverrides": {},
|
"authenticationFlowBindingOverrides": {},
|
||||||
"fullScopeAllowed": false,
|
"fullScopeAllowed": false,
|
||||||
"nodeReRegistrationTimeout": 0,
|
"nodeReRegistrationTimeout": 0,
|
||||||
@ -955,7 +961,8 @@
|
|||||||
"config": {
|
"config": {
|
||||||
"id.token.claim": "true",
|
"id.token.claim": "true",
|
||||||
"introspection.token.claim": "true",
|
"introspection.token.claim": "true",
|
||||||
"access.token.claim": "true"
|
"access.token.claim": "true",
|
||||||
|
"userinfo.token.claim": "true"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -995,6 +1002,7 @@
|
|||||||
"config": {
|
"config": {
|
||||||
"introspection.token.claim": "true",
|
"introspection.token.claim": "true",
|
||||||
"multivalued": "true",
|
"multivalued": "true",
|
||||||
|
"userinfo.token.claim": "true",
|
||||||
"user.attribute": "foo",
|
"user.attribute": "foo",
|
||||||
"id.token.claim": "true",
|
"id.token.claim": "true",
|
||||||
"access.token.claim": "true",
|
"access.token.claim": "true",
|
||||||
@ -1444,7 +1452,7 @@
|
|||||||
},
|
},
|
||||||
"smtpServer": {},
|
"smtpServer": {},
|
||||||
"loginTheme": "keycloak",
|
"loginTheme": "keycloak",
|
||||||
"accountTheme": "account-v1",
|
"accountTheme": "keycloakify-starter",
|
||||||
"adminTheme": "",
|
"adminTheme": "",
|
||||||
"emailTheme": "",
|
"emailTheme": "",
|
||||||
"eventsEnabled": false,
|
"eventsEnabled": false,
|
||||||
@ -1493,14 +1501,14 @@
|
|||||||
"subComponents": {},
|
"subComponents": {},
|
||||||
"config": {
|
"config": {
|
||||||
"allowed-protocol-mapper-types": [
|
"allowed-protocol-mapper-types": [
|
||||||
"oidc-address-mapper",
|
|
||||||
"oidc-full-name-mapper",
|
|
||||||
"oidc-usermodel-attribute-mapper",
|
|
||||||
"saml-user-attribute-mapper",
|
|
||||||
"oidc-sha256-pairwise-sub-mapper",
|
"oidc-sha256-pairwise-sub-mapper",
|
||||||
"saml-role-list-mapper",
|
"saml-role-list-mapper",
|
||||||
|
"oidc-address-mapper",
|
||||||
|
"oidc-usermodel-property-mapper",
|
||||||
|
"saml-user-attribute-mapper",
|
||||||
|
"oidc-full-name-mapper",
|
||||||
"saml-user-property-mapper",
|
"saml-user-property-mapper",
|
||||||
"oidc-usermodel-property-mapper"
|
"oidc-usermodel-attribute-mapper"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1532,13 +1540,13 @@
|
|||||||
"subComponents": {},
|
"subComponents": {},
|
||||||
"config": {
|
"config": {
|
||||||
"allowed-protocol-mapper-types": [
|
"allowed-protocol-mapper-types": [
|
||||||
"oidc-usermodel-attribute-mapper",
|
|
||||||
"saml-user-property-mapper",
|
|
||||||
"oidc-address-mapper",
|
|
||||||
"saml-role-list-mapper",
|
|
||||||
"oidc-sha256-pairwise-sub-mapper",
|
"oidc-sha256-pairwise-sub-mapper",
|
||||||
"saml-user-attribute-mapper",
|
"saml-user-property-mapper",
|
||||||
|
"oidc-usermodel-attribute-mapper",
|
||||||
|
"oidc-address-mapper",
|
||||||
"oidc-usermodel-property-mapper",
|
"oidc-usermodel-property-mapper",
|
||||||
|
"saml-role-list-mapper",
|
||||||
|
"saml-user-attribute-mapper",
|
||||||
"oidc-full-name-mapper"
|
"oidc-full-name-mapper"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -2290,8 +2298,8 @@
|
|||||||
"cibaExpiresIn": "120",
|
"cibaExpiresIn": "120",
|
||||||
"cibaAuthRequestedUserHint": "login_hint",
|
"cibaAuthRequestedUserHint": "login_hint",
|
||||||
"oauth2DeviceCodeLifespan": "600",
|
"oauth2DeviceCodeLifespan": "600",
|
||||||
"oauth2DevicePollingInterval": "5",
|
|
||||||
"clientOfflineSessionMaxLifespan": "0",
|
"clientOfflineSessionMaxLifespan": "0",
|
||||||
|
"oauth2DevicePollingInterval": "5",
|
||||||
"clientSessionIdleTimeout": "0",
|
"clientSessionIdleTimeout": "0",
|
||||||
"parRequestUriLifespan": "60",
|
"parRequestUriLifespan": "60",
|
||||||
"clientSessionMaxLifespan": "0",
|
"clientSessionMaxLifespan": "0",
|
||||||
|
@ -27,6 +27,7 @@ import { Deferred } from "evt/tools/Deferred";
|
|||||||
import { getAbsoluteAndInOsFormatPath } from "../tools/getAbsoluteAndInOsFormatPath";
|
import { getAbsoluteAndInOsFormatPath } from "../tools/getAbsoluteAndInOsFormatPath";
|
||||||
import cliSelect from "cli-select";
|
import cliSelect from "cli-select";
|
||||||
import { isInside } from "../tools/isInside";
|
import { isInside } from "../tools/isInside";
|
||||||
|
import * as runExclusive from "run-exclusive";
|
||||||
|
|
||||||
export type CliCommandOptions = CliCommandOptions_common & {
|
export type CliCommandOptions = CliCommandOptions_common & {
|
||||||
port: number;
|
port: number;
|
||||||
@ -396,33 +397,12 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
const { waitForDebounce } = waitForDebounceFactory({ delay: 400 });
|
const runBuildKeycloakTheme = runExclusive.build(async () => {
|
||||||
|
|
||||||
chokidar
|
|
||||||
.watch([srcDirPath, getThisCodebaseRootDirPath()], {
|
|
||||||
ignoreInitial: true
|
|
||||||
})
|
|
||||||
.on("all", async (...[, filePath]) => {
|
|
||||||
if (
|
|
||||||
isInside({
|
|
||||||
dirPath: pathJoin(getThisCodebaseRootDirPath(), "src", "bin"),
|
|
||||||
filePath
|
|
||||||
}) ||
|
|
||||||
isInside({
|
|
||||||
dirPath: pathJoin(getThisCodebaseRootDirPath(), "bin"),
|
|
||||||
filePath
|
|
||||||
})
|
|
||||||
) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
await waitForDebounce();
|
|
||||||
|
|
||||||
console.log(chalk.cyan("Detected changes in the theme. Rebuilding ..."));
|
console.log(chalk.cyan("Detected changes in the theme. Rebuilding ..."));
|
||||||
|
|
||||||
const dViteBuildDone = new Deferred<void>();
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
const dResult = new Deferred<{ isSuccess: boolean }>();
|
||||||
|
|
||||||
const child = child_process.spawn("npx", ["vite", "build"], {
|
const child = child_process.spawn("npx", ["vite", "build"], {
|
||||||
cwd: buildOptions.reactAppRootDirPath,
|
cwd: buildOptions.reactAppRootDirPath,
|
||||||
env: process.env
|
env: process.env
|
||||||
@ -438,16 +418,18 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
|
|||||||
|
|
||||||
child.stderr.on("data", data => process.stderr.write(data));
|
child.stderr.on("data", data => process.stderr.write(data));
|
||||||
|
|
||||||
child.on("exit", code => {
|
child.on("exit", code => dResult.resolve({ isSuccess: code === 0 }));
|
||||||
if (code === 0) {
|
|
||||||
dViteBuildDone.resolve();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
await dViteBuildDone.pr;
|
const { isSuccess } = await dResult.pr;
|
||||||
|
|
||||||
|
if (!isSuccess) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
const dResult = new Deferred<{ isSuccess: boolean }>();
|
||||||
|
|
||||||
const child = child_process.spawn("npx", ["keycloakify", "build"], {
|
const child = child_process.spawn("npx", ["keycloakify", "build"], {
|
||||||
cwd: buildOptions.reactAppRootDirPath,
|
cwd: buildOptions.reactAppRootDirPath,
|
||||||
env: {
|
env: {
|
||||||
@ -468,7 +450,44 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
|
|||||||
|
|
||||||
console.log(chalk.green("Rebuild done"));
|
console.log(chalk.green("Rebuild done"));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
child.on("exit", code => dResult.resolve({ isSuccess: code === 0 }));
|
||||||
|
|
||||||
|
const { isSuccess } = await dResult.pr;
|
||||||
|
|
||||||
|
if (!isSuccess) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const { waitForDebounce } = waitForDebounceFactory({ delay: 400 });
|
||||||
|
|
||||||
|
chokidar
|
||||||
|
.watch([srcDirPath, getThisCodebaseRootDirPath()], {
|
||||||
|
ignoreInitial: true
|
||||||
|
})
|
||||||
|
.on("all", async (...[, filePath]) => {
|
||||||
|
for (const dir1 of ["src", "."]) {
|
||||||
|
for (const dir2 of ["bin", "vite-plugin"]) {
|
||||||
|
if (
|
||||||
|
isInside({
|
||||||
|
dirPath: pathJoin(
|
||||||
|
getThisCodebaseRootDirPath(),
|
||||||
|
dir1,
|
||||||
|
dir2
|
||||||
|
),
|
||||||
|
filePath
|
||||||
|
})
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
await waitForDebounce();
|
||||||
|
|
||||||
|
runBuildKeycloakTheme();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user