Rename scripts
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import { join as pathJoin, relative as pathRelative, sep as pathSep } from "path";
|
||||
import { promptKeycloakVersion } from "./shared/promptKeycloakVersion";
|
||||
import { readBuildOptions } from "./shared/buildOptions";
|
||||
import { downloadBuiltinKeycloakTheme } from "./shared/downloadBuiltinKeycloakTheme";
|
||||
import { downloadKeycloakDefaultTheme } from "./shared/downloadKeycloakDefaultTheme";
|
||||
import type { CliCommandOptions } from "./main";
|
||||
import chalk from "chalk";
|
||||
|
||||
@ -27,7 +27,7 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
|
||||
`Downloading builtins theme of Keycloak ${keycloakVersion} here ${chalk.bold(`.${pathSep}${pathRelative(process.cwd(), destDirPath)}`)}`
|
||||
);
|
||||
|
||||
await downloadBuiltinKeycloakTheme({
|
||||
await downloadKeycloakDefaultTheme({
|
||||
keycloakVersion,
|
||||
destDirPath,
|
||||
buildOptions
|
@ -1,4 +1,4 @@
|
||||
import { downloadBuiltinKeycloakTheme } from "./shared/downloadBuiltinKeycloakTheme";
|
||||
import { downloadKeycloakDefaultTheme } from "./shared/downloadKeycloakDefaultTheme";
|
||||
import { join as pathJoin, relative as pathRelative } from "path";
|
||||
import { transformCodebase } from "./tools/transformCodebase";
|
||||
import { promptKeycloakVersion } from "./shared/promptKeycloakVersion";
|
||||
@ -37,7 +37,7 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
|
||||
|
||||
rmSync(builtinKeycloakThemeTmpDirPath, { "recursive": true, "force": true });
|
||||
|
||||
await downloadBuiltinKeycloakTheme({
|
||||
await downloadKeycloakDefaultTheme({
|
||||
keycloakVersion,
|
||||
"destDirPath": builtinKeycloakThemeTmpDirPath,
|
||||
buildOptions
|
||||
|
@ -3,7 +3,7 @@ import { join as pathJoin } from "path";
|
||||
import { assert } from "tsafe/assert";
|
||||
import type { BuildOptions } from "../../shared/buildOptions";
|
||||
import { resources_common, lastKeycloakVersionWithAccountV1, accountV1ThemeName } from "../../shared/constants";
|
||||
import { downloadBuiltinKeycloakTheme } from "../../shared/downloadBuiltinKeycloakTheme";
|
||||
import { downloadKeycloakDefaultTheme } from "../../shared/downloadKeycloakDefaultTheme";
|
||||
import { transformCodebase } from "../../tools/transformCodebase";
|
||||
import { rmSync } from "../../tools/fs.rmSync";
|
||||
|
||||
@ -20,7 +20,7 @@ export async function bringInAccountV1(params: { buildOptions: BuildOptionsLike
|
||||
|
||||
const builtinKeycloakThemeTmpDirPath = pathJoin(buildOptions.cacheDirPath, "bringInAccountV1_tmp");
|
||||
|
||||
await downloadBuiltinKeycloakTheme({
|
||||
await downloadKeycloakDefaultTheme({
|
||||
"destDirPath": builtinKeycloakThemeTmpDirPath,
|
||||
"keycloakVersion": lastKeycloakVersionWithAccountV1,
|
||||
buildOptions
|
||||
|
@ -107,13 +107,13 @@ program
|
||||
|
||||
program
|
||||
.command({
|
||||
"name": "download-builtin-keycloak-theme",
|
||||
"name": "download-keycloak-default-theme",
|
||||
"description": "Download the built-in Keycloak theme."
|
||||
})
|
||||
.task({
|
||||
skip,
|
||||
"handler": async cliCommandOptions => {
|
||||
const { command } = await import("./download-builtin-keycloak-theme");
|
||||
const { command } = await import("./download-keycloak-default-theme");
|
||||
|
||||
await command({ cliCommandOptions });
|
||||
}
|
||||
@ -121,13 +121,13 @@ program
|
||||
|
||||
program
|
||||
.command({
|
||||
"name": "eject-keycloak-page",
|
||||
"name": "eject-page",
|
||||
"description": "Eject a Keycloak page."
|
||||
})
|
||||
.task({
|
||||
skip,
|
||||
"handler": async cliCommandOptions => {
|
||||
const { command } = await import("./eject-keycloak-page");
|
||||
const { command } = await import("./eject-page");
|
||||
|
||||
await command({ cliCommandOptions });
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ import { assert } from "tsafe/assert";
|
||||
import * as child_process from "child_process";
|
||||
import * as fs from "fs";
|
||||
import { rmSync } from "../tools/fs.rmSync";
|
||||
import { lastKeycloakVersionWithAccountV1 } from "../shared/constants";
|
||||
import { lastKeycloakVersionWithAccountV1 } from "./constants";
|
||||
import { transformCodebase } from "../tools/transformCodebase";
|
||||
|
||||
export type BuildOptionsLike = {
|
||||
@ -15,7 +15,7 @@ export type BuildOptionsLike = {
|
||||
|
||||
assert<BuildOptions extends BuildOptionsLike ? true : false>();
|
||||
|
||||
export async function downloadBuiltinKeycloakTheme(params: { keycloakVersion: string; destDirPath: string; buildOptions: BuildOptionsLike }) {
|
||||
export async function downloadKeycloakDefaultTheme(params: { keycloakVersion: string; destDirPath: string; buildOptions: BuildOptionsLike }) {
|
||||
const { keycloakVersion, destDirPath, buildOptions } = params;
|
||||
|
||||
await downloadAndUnzip({
|
@ -1,6 +1,6 @@
|
||||
import { transformCodebase } from "../tools/transformCodebase";
|
||||
import { join as pathJoin } from "path";
|
||||
import { downloadBuiltinKeycloakTheme } from "./downloadBuiltinKeycloakTheme";
|
||||
import { downloadKeycloakDefaultTheme } from "./downloadKeycloakDefaultTheme";
|
||||
import { resources_common, type ThemeType } from "./constants";
|
||||
import type { BuildOptions } from "./buildOptions";
|
||||
import { assert } from "tsafe/assert";
|
||||
@ -27,7 +27,7 @@ export async function downloadKeycloakStaticResources(params: {
|
||||
`downloadKeycloakStaticResources_tmp_${crypto.createHash("sha256").update(`${themeType}-${keycloakVersion}`).digest("hex").slice(0, 8)}`
|
||||
);
|
||||
|
||||
await downloadBuiltinKeycloakTheme({
|
||||
await downloadKeycloakDefaultTheme({
|
||||
keycloakVersion,
|
||||
"destDirPath": tmpDirPath,
|
||||
buildOptions
|
||||
|
Reference in New Issue
Block a user