keycloakify 10.0.0-rc.59 → 10.0.0-rc.60

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
@@ -122,6 +122,9 @@ function getBuildContext(params) {
122
122
  return { resolvedViteConfig };
123
123
  })();
124
124
  const parsedPackageJson = (() => {
125
+ {
126
+ (0,tsafe.assert)();
127
+ }
125
128
  const zParsedPackageJson = lib.z.object({
126
129
  name: lib.z.string(),
127
130
  version: lib.z.string().optional(),
@@ -133,13 +136,18 @@ function getBuildContext(params) {
133
136
  loginThemeResourcesFromKeycloakVersion: lib.z.string().optional(),
134
137
  projectBuildDirPath: lib.z.string().optional(),
135
138
  keycloakifyBuildDirPath: lib.z.string().optional(),
139
+ kcContextExclusionsFtl: lib.z.string().optional(),
140
+ environmentVariables: lib.z.array(lib.z.object({
141
+ name: lib.z.string(),
142
+ default: lib.z.string()
143
+ }))
144
+ .optional(),
136
145
  themeName: lib.z.union([lib.z.string(), lib.z.array(lib.z.string())]).optional()
137
146
  })
138
147
  .optional()
139
148
  });
140
149
  {
141
150
  (0,tsafe.assert)();
142
- (0,tsafe.assert)();
143
151
  }
144
152
  return zParsedPackageJson.parse(JSON.parse(external_fs_.readFileSync((0,external_path_.join)(projectDirPath, "package.json")).toString("utf8")));
145
153
  })();
package/bin/98.index.js CHANGED
@@ -122,6 +122,9 @@ function getBuildContext(params) {
122
122
  return { resolvedViteConfig };
123
123
  })();
124
124
  const parsedPackageJson = (() => {
125
+ {
126
+ (0,tsafe.assert)();
127
+ }
125
128
  const zParsedPackageJson = lib.z.object({
126
129
  name: lib.z.string(),
127
130
  version: lib.z.string().optional(),
@@ -133,13 +136,18 @@ function getBuildContext(params) {
133
136
  loginThemeResourcesFromKeycloakVersion: lib.z.string().optional(),
134
137
  projectBuildDirPath: lib.z.string().optional(),
135
138
  keycloakifyBuildDirPath: lib.z.string().optional(),
139
+ kcContextExclusionsFtl: lib.z.string().optional(),
140
+ environmentVariables: lib.z.array(lib.z.object({
141
+ name: lib.z.string(),
142
+ default: lib.z.string()
143
+ }))
144
+ .optional(),
136
145
  themeName: lib.z.union([lib.z.string(), lib.z.array(lib.z.string())]).optional()
137
146
  })
138
147
  .optional()
139
148
  });
140
149
  {
141
150
  (0,tsafe.assert)();
142
- (0,tsafe.assert)();
143
151
  }
144
152
  return zParsedPackageJson.parse(JSON.parse(external_fs_.readFileSync((0,external_path_.join)(projectDirPath, "package.json")).toString("utf8")));
145
153
  })();
package/bin/991.index.js CHANGED
@@ -122,6 +122,9 @@ function getBuildContext(params) {
122
122
  return { resolvedViteConfig };
123
123
  })();
124
124
  const parsedPackageJson = (() => {
125
+ {
126
+ (0,tsafe.assert)();
127
+ }
125
128
  const zParsedPackageJson = lib.z.object({
126
129
  name: lib.z.string(),
127
130
  version: lib.z.string().optional(),
@@ -133,13 +136,18 @@ function getBuildContext(params) {
133
136
  loginThemeResourcesFromKeycloakVersion: lib.z.string().optional(),
134
137
  projectBuildDirPath: lib.z.string().optional(),
135
138
  keycloakifyBuildDirPath: lib.z.string().optional(),
139
+ kcContextExclusionsFtl: lib.z.string().optional(),
140
+ environmentVariables: lib.z.array(lib.z.object({
141
+ name: lib.z.string(),
142
+ default: lib.z.string()
143
+ }))
144
+ .optional(),
136
145
  themeName: lib.z.union([lib.z.string(), lib.z.array(lib.z.string())]).optional()
137
146
  })
138
147
  .optional()
139
148
  });
140
149
  {
141
150
  (0,tsafe.assert)();
142
- (0,tsafe.assert)();
143
151
  }
144
152
  return zParsedPackageJson.parse(JSON.parse(external_fs_.readFileSync((0,external_path_.join)(projectDirPath, "package.json")).toString("utf8")));
145
153
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keycloakify",
3
- "version": "10.0.0-rc.59",
3
+ "version": "10.0.0-rc.60",
4
4
  "description": "Create Keycloak themes using React",
5
5
  "repository": {
6
6
  "type": "git",
@@ -5,7 +5,7 @@ import { getNpmWorkspaceRootDirPath } from "../tools/getNpmWorkspaceRootDirPath"
5
5
  import type { CliCommandOptions } from "../main";
6
6
  import { z } from "zod";
7
7
  import * as fs from "fs";
8
- import { assert } from "tsafe";
8
+ import { assert, type Equals } from "tsafe";
9
9
  import * as child_process from "child_process";
10
10
  import { vitePluginSubScriptEnvNames } from "./constants";
11
11
 
@@ -102,15 +102,33 @@ export function getBuildContext(params: {
102
102
  })();
103
103
 
104
104
  const parsedPackageJson = (() => {
105
+ type WebpackSpecificBuildOptions = {
106
+ projectBuildDirPath?: string;
107
+ };
108
+
105
109
  type ParsedPackageJson = {
106
110
  name: string;
107
111
  version?: string;
108
112
  homepage?: string;
109
- keycloakify?: BuildOptions & {
113
+ keycloakify?: {
114
+ themeName?: string | string[];
115
+ environmentVariables?: { name: string; default: string }[];
116
+ extraThemeProperties?: string[];
117
+ artifactId?: string;
118
+ groupId?: string;
119
+ loginThemeResourcesFromKeycloakVersion?: string;
120
+ keycloakifyBuildDirPath?: string;
121
+ kcContextExclusionsFtl?: string;
110
122
  projectBuildDirPath?: string;
111
123
  };
112
124
  };
113
125
 
126
+ {
127
+ type Got = NonNullable<ParsedPackageJson["keycloakify"]>;
128
+ type Expected = BuildOptions & WebpackSpecificBuildOptions;
129
+ assert<Equals<Got, Expected>>();
130
+ }
131
+
114
132
  const zParsedPackageJson = z.object({
115
133
  name: z.string(),
116
134
  version: z.string().optional(),
@@ -123,16 +141,24 @@ export function getBuildContext(params: {
123
141
  loginThemeResourcesFromKeycloakVersion: z.string().optional(),
124
142
  projectBuildDirPath: z.string().optional(),
125
143
  keycloakifyBuildDirPath: z.string().optional(),
144
+ kcContextExclusionsFtl: z.string().optional(),
145
+ environmentVariables: z
146
+ .array(
147
+ z.object({
148
+ name: z.string(),
149
+ default: z.string()
150
+ })
151
+ )
152
+ .optional(),
126
153
  themeName: z.union([z.string(), z.array(z.string())]).optional()
127
154
  })
128
155
  .optional()
129
156
  });
130
157
 
131
158
  {
132
- type Got = ReturnType<(typeof zParsedPackageJson)["parse"]>;
159
+ type Got = z.infer<typeof zParsedPackageJson>;
133
160
  type Expected = ParsedPackageJson;
134
- assert<Got extends Expected ? true : false>();
135
- assert<Expected extends Got ? true : false>();
161
+ assert<Equals<Got, Expected>>();
136
162
  }
137
163
 
138
164
  return zParsedPackageJson.parse(
@@ -21,10 +21,6 @@ export const WithInvalidCredential: Story = {
21
21
  render: () => (
22
22
  <KcPageStory
23
23
  kcContext={{
24
- message: {
25
- summary: "Invalid username or password.",
26
- type: "error"
27
- },
28
24
  login: {
29
25
  username: "johndoe"
30
26
  },
@@ -216,7 +212,7 @@ export const WithErrorMessage: Story = {
216
212
  <KcPageStory
217
213
  kcContext={{
218
214
  message: {
219
- summary: "Please restart the login process.",
215
+ summary: "The time allotted for the connection has elapsed. The login process will restart from the beginning.",
220
216
  type: "error"
221
217
  }
222
218
  }}
@@ -14,5 +14,17 @@ export default meta;
14
14
  type Story = StoryObj<typeof meta>;
15
15
 
16
16
  export const Default: Story = {
17
- render: () => <KcPageStory />
17
+ render: () => (
18
+ <KcPageStory
19
+ kcContext={{
20
+ message: {
21
+ summary: "You need to verify your email to activate your account.",
22
+ type: "warning"
23
+ },
24
+ user: {
25
+ email: "john.doe@gmail.com"
26
+ }
27
+ }}
28
+ />
29
+ )
18
30
  };
@@ -121,3 +121,15 @@ export const WithPresets: Story = {
121
121
  />
122
122
  )
123
123
  };
124
+
125
+ export const WithPasswordMinLength8: Story = {
126
+ render: () => (
127
+ <KcPageStory
128
+ kcContext={{
129
+ passwordPolicies: {
130
+ length: 8
131
+ }
132
+ }}
133
+ />
134
+ )
135
+ };
@@ -4094,6 +4094,9 @@ function getBuildContext(params) {
4094
4094
  return { resolvedViteConfig };
4095
4095
  })();
4096
4096
  const parsedPackageJson = (() => {
4097
+ {
4098
+ (0,tsafe.assert)();
4099
+ }
4097
4100
  const zParsedPackageJson = z.object({
4098
4101
  name: z.string(),
4099
4102
  version: z.string().optional(),
@@ -4105,13 +4108,18 @@ function getBuildContext(params) {
4105
4108
  loginThemeResourcesFromKeycloakVersion: z.string().optional(),
4106
4109
  projectBuildDirPath: z.string().optional(),
4107
4110
  keycloakifyBuildDirPath: z.string().optional(),
4111
+ kcContextExclusionsFtl: z.string().optional(),
4112
+ environmentVariables: z.array(z.object({
4113
+ name: z.string(),
4114
+ default: z.string()
4115
+ }))
4116
+ .optional(),
4108
4117
  themeName: z.union([z.string(), z.array(z.string())]).optional()
4109
4118
  })
4110
4119
  .optional()
4111
4120
  });
4112
4121
  {
4113
4122
  (0,tsafe.assert)();
4114
- (0,tsafe.assert)();
4115
4123
  }
4116
4124
  return zParsedPackageJson.parse(JSON.parse(external_fs_.readFileSync((0,external_path_.join)(projectDirPath, "package.json")).toString("utf8")));
4117
4125
  })();