keycloakify 10.0.0-rc.97 → 10.0.0-rc.99
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/account/pages/Applications.js +1 -1
- package/account/pages/Applications.js.map +1 -1
- package/bin/{456.index.js → 966.index.js} +3 -1971
- package/bin/main.js +1981 -7
- package/package.json +4 -2
- package/src/account/pages/Applications.tsx +0 -1
- package/src/bin/main.ts +3 -0
- package/src/bin/tools/assertNoPnpmDlx.ts +15 -0
- package/stories/account/pages/Applications.stories.tsx +80 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "keycloakify",
|
3
|
-
"version": "10.0.0-rc.
|
3
|
+
"version": "10.0.0-rc.99",
|
4
4
|
"description": "Create Keycloak themes using React",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -510,6 +510,7 @@
|
|
510
510
|
"src/bin/tools/OptionalIfCanBeUndefined.ts",
|
511
511
|
"src/bin/tools/SemVer.ts",
|
512
512
|
"src/bin/tools/String.prototype.replaceAll.ts",
|
513
|
+
"src/bin/tools/assertNoPnpmDlx.ts",
|
513
514
|
"src/bin/tools/crawl.ts",
|
514
515
|
"src/bin/tools/crc32.ts",
|
515
516
|
"src/bin/tools/deflate.ts",
|
@@ -645,6 +646,7 @@
|
|
645
646
|
"src/vite-plugin/tsconfig.json",
|
646
647
|
"src/vite-plugin/vite-plugin.ts",
|
647
648
|
"stories/account/pages/Account.stories.tsx",
|
649
|
+
"stories/account/pages/Applications.stories.tsx",
|
648
650
|
"stories/account/pages/FederatedIdentity.stories.tsx",
|
649
651
|
"stories/account/pages/Log.stories.tsx",
|
650
652
|
"stories/account/pages/Password.stories.tsx",
|
@@ -773,7 +775,6 @@
|
|
773
775
|
"bin/430.index.js",
|
774
776
|
"bin/440.index.js",
|
775
777
|
"bin/453.index.js",
|
776
|
-
"bin/456.index.js",
|
777
778
|
"bin/490.index.js",
|
778
779
|
"bin/525.index.js",
|
779
780
|
"bin/526.index.js",
|
@@ -782,6 +783,7 @@
|
|
782
783
|
"bin/877.index.js",
|
783
784
|
"bin/893.index.js",
|
784
785
|
"bin/932.index.js",
|
786
|
+
"bin/966.index.js",
|
785
787
|
"bin/97.index.js",
|
786
788
|
"bin/shared/constants.js",
|
787
789
|
"bin/shared/buildContext.d.ts",
|
@@ -62,7 +62,6 @@ export default function Applications(props: PageProps<Extract<KcContext, { pageI
|
|
62
62
|
{index < application.realmRolesAvailable.length - 1 && ", "}
|
63
63
|
</span>
|
64
64
|
))}
|
65
|
-
{!isArrayWithEmptyObject(application.realmRolesAvailable) && application.resourceRolesAvailable && ", "}
|
66
65
|
{application.resourceRolesAvailable &&
|
67
66
|
Object.keys(application.resourceRolesAvailable).map(resource => (
|
68
67
|
<span key={resource}>
|
package/src/bin/main.ts
CHANGED
@@ -3,11 +3,14 @@
|
|
3
3
|
import { termost } from "termost";
|
4
4
|
import { readThisNpmPackageVersion } from "./tools/readThisNpmPackageVersion";
|
5
5
|
import * as child_process from "child_process";
|
6
|
+
import { assertNoPnpmDlx } from "./tools/assertNoPnpmDlx";
|
6
7
|
|
7
8
|
export type CliCommandOptions = {
|
8
9
|
projectDirPath: string | undefined;
|
9
10
|
};
|
10
11
|
|
12
|
+
assertNoPnpmDlx();
|
13
|
+
|
11
14
|
const program = termost<CliCommandOptions>(
|
12
15
|
{
|
13
16
|
name: "keycloakify",
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { sep as pathSep } from "path";
|
2
|
+
import chalk from "chalk";
|
3
|
+
|
4
|
+
export function assertNoPnpmDlx() {
|
5
|
+
if (__dirname.includes(`${pathSep}pnpm${pathSep}dlx${pathSep}`)) {
|
6
|
+
console.log(
|
7
|
+
[
|
8
|
+
chalk.red("Please don't use `pnpm dlx keycloakify`"),
|
9
|
+
"\nUse `npx keycloakify` or `pnpm exec keycloakify` instead since you want to use the keycloakify",
|
10
|
+
"version that is installed in your project and not the latest version on NPM."
|
11
|
+
].join(" ")
|
12
|
+
);
|
13
|
+
process.exit(1);
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
3
|
+
import { createKcPageStory } from "../KcPageStory";
|
4
|
+
|
5
|
+
const { KcPageStory } = createKcPageStory({ pageId: "applications.ftl" });
|
6
|
+
|
7
|
+
const meta = {
|
8
|
+
title: "account/applications.ftl",
|
9
|
+
component: KcPageStory
|
10
|
+
} satisfies Meta<typeof KcPageStory>;
|
11
|
+
|
12
|
+
export default meta;
|
13
|
+
|
14
|
+
type Story = StoryObj<typeof meta>;
|
15
|
+
|
16
|
+
export const Default: Story = {
|
17
|
+
render: () => (
|
18
|
+
<KcPageStory
|
19
|
+
kcContext={{
|
20
|
+
pageId: "applications.ftl",
|
21
|
+
applications: {
|
22
|
+
applications: [
|
23
|
+
{
|
24
|
+
realmRolesAvailable: [
|
25
|
+
{
|
26
|
+
name: "realmRoleName1",
|
27
|
+
description: "realm role description 1"
|
28
|
+
},
|
29
|
+
{
|
30
|
+
name: "realmRoleName2",
|
31
|
+
description: "realm role description 2"
|
32
|
+
}
|
33
|
+
],
|
34
|
+
resourceRolesAvailable: {
|
35
|
+
resource1: [
|
36
|
+
{
|
37
|
+
roleName: "Resource Role Name 1",
|
38
|
+
roleDescription: "Resource role 1 description",
|
39
|
+
clientName: "Client Name 1",
|
40
|
+
clientId: "client1"
|
41
|
+
}
|
42
|
+
],
|
43
|
+
resource2: [
|
44
|
+
{
|
45
|
+
roleName: "Resource Role Name 2",
|
46
|
+
clientName: "Client Name 1",
|
47
|
+
clientId: "client1"
|
48
|
+
}
|
49
|
+
]
|
50
|
+
},
|
51
|
+
additionalGrants: ["grant1", "grant2"],
|
52
|
+
clientScopesGranted: ["scope1", "scope2"],
|
53
|
+
effectiveUrl: "#",
|
54
|
+
client: {
|
55
|
+
clientId: "application1",
|
56
|
+
name: "Application 1",
|
57
|
+
consentRequired: true
|
58
|
+
}
|
59
|
+
},
|
60
|
+
{
|
61
|
+
realmRolesAvailable: [
|
62
|
+
{
|
63
|
+
name: "Realm Role Name 1"
|
64
|
+
}
|
65
|
+
],
|
66
|
+
resourceRolesAvailable: {},
|
67
|
+
additionalGrants: [],
|
68
|
+
clientScopesGranted: [],
|
69
|
+
effectiveUrl: "#",
|
70
|
+
client: {
|
71
|
+
clientId: "application2",
|
72
|
+
name: "Application 2"
|
73
|
+
}
|
74
|
+
}
|
75
|
+
]
|
76
|
+
}
|
77
|
+
}}
|
78
|
+
/>
|
79
|
+
)
|
80
|
+
};
|