keycloakify 10.0.0-rc.42 → 10.0.0-rc.44

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/bin/538.index.js CHANGED
@@ -572,7 +572,8 @@ async function generateKcGenTs(params) {
572
572
  ``,
573
573
  `export const kcEnvDefaults: Record<KcEnvName, string> = ${JSON.stringify(Object.fromEntries(buildContext.environmentVariables.map(({ name, default: defaultValue }) => [name, defaultValue])), null, 2)};`,
574
574
  ``,
575
- `/* prettier-ignore-end */`
575
+ `/* prettier-ignore-end */`,
576
+ ``
576
577
  ].join("\n"), "utf8");
577
578
  if (currentContent !== undefined && currentContent.equals(newContent)) {
578
579
  return;
@@ -0,0 +1,49 @@
1
+ import type { CliCommandOptions } from "../main";
2
+ export type BuildContext = {
3
+ bundler: "vite" | "webpack";
4
+ themeVersion: string;
5
+ themeNames: string[];
6
+ extraThemeProperties: string[] | undefined;
7
+ groupId: string;
8
+ artifactId: string;
9
+ loginThemeResourcesFromKeycloakVersion: string;
10
+ projectDirPath: string;
11
+ projectBuildDirPath: string;
12
+ /** Directory that keycloakify outputs to. Defaults to {cwd}/build_keycloak */
13
+ keycloakifyBuildDirPath: string;
14
+ publicDirPath: string;
15
+ cacheDirPath: string;
16
+ /** If your app is hosted under a subpath, it's the case in CRA if you have "homepage": "https://example.com/my-app" in your package.json
17
+ * In this case the urlPathname will be "/my-app/" */
18
+ urlPathname: string | undefined;
19
+ assetsDirPath: string;
20
+ npmWorkspaceRootDirPath: string;
21
+ kcContextExclusionsFtlCode: string | undefined;
22
+ environmentVariables: {
23
+ name: string;
24
+ default: string;
25
+ }[];
26
+ };
27
+ export type BuildOptions = {
28
+ themeName?: string | string[];
29
+ environmentVariables?: {
30
+ name: string;
31
+ default: string;
32
+ }[];
33
+ extraThemeProperties?: string[];
34
+ artifactId?: string;
35
+ groupId?: string;
36
+ loginThemeResourcesFromKeycloakVersion?: string;
37
+ keycloakifyBuildDirPath?: string;
38
+ kcContextExclusionsFtl?: string;
39
+ };
40
+ export type ResolvedViteConfig = {
41
+ buildDir: string;
42
+ publicDir: string;
43
+ assetsDir: string;
44
+ urlPathname: string | undefined;
45
+ buildOptions: BuildOptions;
46
+ };
47
+ export declare function getBuildContext(params: {
48
+ cliCommandOptions: CliCommandOptions;
49
+ }): BuildContext;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keycloakify",
3
- "version": "10.0.0-rc.42",
3
+ "version": "10.0.0-rc.44",
4
4
  "description": "Create Keycloak themes using React",
5
5
  "repository": {
6
6
  "type": "git",
@@ -788,6 +788,7 @@
788
788
  "bin/shared/constants.js",
789
789
  "bin/shared/constants.d.ts",
790
790
  "bin/shared/constants.js.map",
791
+ "bin/shared/buildContext.d.ts",
791
792
  "vite-plugin/index.d.ts",
792
793
  "vite-plugin/vite-plugin.d.ts",
793
794
  "vite-plugin/index.js"
@@ -58,7 +58,8 @@ export async function generateKcGenTs(params: {
58
58
  2
59
59
  )};`,
60
60
  ``,
61
- `/* prettier-ignore-end */`
61
+ `/* prettier-ignore-end */`,
62
+ ``
62
63
  ].join("\n"),
63
64
  "utf8"
64
65
  );
@@ -33,7 +33,7 @@ export function keycloakify(params?: Params) {
33
33
  let shouldGenerateSourcemap: boolean | undefined = undefined;
34
34
 
35
35
  const plugin = {
36
- name: "keycloakify" as const,
36
+ name: "keycloakify",
37
37
  configResolved: async resolvedConfig => {
38
38
  shouldGenerateSourcemap = resolvedConfig.build.sourcemap !== false;
39
39
 
@@ -5154,7 +5154,8 @@ async function generateKcGenTs(params) {
5154
5154
  ``,
5155
5155
  `export const kcEnvDefaults: Record<KcEnvName, string> = ${JSON.stringify(Object.fromEntries(buildContext.environmentVariables.map(({ name, default: defaultValue }) => [name, defaultValue])), null, 2)};`,
5156
5156
  ``,
5157
- `/* prettier-ignore-end */`
5157
+ `/* prettier-ignore-end */`,
5158
+ ``
5158
5159
  ].join("\n"), "utf8");
5159
5160
  if (currentContent !== undefined && currentContent.equals(newContent)) {
5160
5161
  return;