Move all JavaScript projects into single PNPM workspace (#24537)

Closes #24571

Signed-off-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
Jon Koops 2024-04-02 16:14:58 +02:00 committed by GitHub
parent b44252fde9
commit ab1d1ae3d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 727 additions and 1918 deletions

3
.github/CODEOWNERS vendored
View file

@ -40,6 +40,9 @@
# UI (@keycloak/ui-maintainers) # UI (@keycloak/ui-maintainers)
################################################################################################### ###################################################################################################
/package.json @keycloak/ui-maintainers
/pnpm-lock.yaml @keycloak/ui-maintainers
/pnpm-workspace.yaml @keycloak/ui-maintainers
/js/ @keycloak/ui-maintainers /js/ @keycloak/ui-maintainers
/adapters/oidc/js/ @keycloak/ui-maintainers /adapters/oidc/js/ @keycloak/ui-maintainers
/rest/admin-ui-ext/ @keycloak/ui-maintainers /rest/admin-ui-ext/ @keycloak/ui-maintainers

View file

@ -5,7 +5,7 @@ inputs:
node-version: node-version:
description: Node.js version description: Node.js version
required: false required: false
default: "18" default: "20"
working-directory: working-directory:
description: The working directory where the `pnpm-lock.yaml` file is located. description: The working directory where the `pnpm-lock.yaml` file is located.

View file

@ -12,7 +12,7 @@ updates:
- area/dependencies - area/dependencies
- area/ci - area/ci
- package-ecosystem: npm - package-ecosystem: npm
directory: /themes/src/main/resources/theme/keycloak/common/resources directory: /
schedule: schedule:
interval: daily interval: daily
time: "00:00" time: "00:00"
@ -22,15 +22,3 @@ updates:
labels: labels:
- area/dependencies - area/dependencies
- team/ui - team/ui
- package-ecosystem: npm
directory: js
open-pull-requests-limit: 999
rebase-strategy: disabled
versioning-strategy: increase
schedule:
interval: daily
time: "00:00"
timezone: Etc/GMT
labels:
- area/dependencies
- team/ui

View file

@ -73,14 +73,10 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: ./.github/actions/pnpm-setup - uses: ./.github/actions/pnpm-setup
with:
working-directory: js
- run: pnpm --filter ${{ env.WORKSPACE }} run lint - run: pnpm --filter ${{ env.WORKSPACE }} lint
working-directory: js
- run: pnpm --filter ${{ env.WORKSPACE }} run build - run: pnpm --filter ${{ env.WORKSPACE }} build
working-directory: js
keycloak-js: keycloak-js:
name: Keycloak JS name: Keycloak JS
@ -93,11 +89,8 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: ./.github/actions/pnpm-setup - uses: ./.github/actions/pnpm-setup
with:
working-directory: js
- run: pnpm --filter ${{ env.WORKSPACE }} run build - run: pnpm --filter ${{ env.WORKSPACE }} build
working-directory: js
keycloak-masthead: keycloak-masthead:
name: Keycloak Masthead name: Keycloak Masthead
@ -110,14 +103,10 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: ./.github/actions/pnpm-setup - uses: ./.github/actions/pnpm-setup
with:
working-directory: js
- run: pnpm --filter ${{ env.WORKSPACE }} run lint - run: pnpm --filter ${{ env.WORKSPACE }} lint
working-directory: js
- run: pnpm --filter ${{ env.WORKSPACE }} run build - run: pnpm --filter ${{ env.WORKSPACE }} build
working-directory: js
ui-shared: ui-shared:
name: UI Shared name: UI Shared
@ -130,14 +119,10 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: ./.github/actions/pnpm-setup - uses: ./.github/actions/pnpm-setup
with:
working-directory: js
- run: pnpm --filter ${{ env.WORKSPACE }} run lint - run: pnpm --filter ${{ env.WORKSPACE }} lint
working-directory: js
- run: pnpm --filter ${{ env.WORKSPACE }} run build - run: pnpm --filter ${{ env.WORKSPACE }} build
working-directory: js
account-ui: account-ui:
name: Account UI name: Account UI
@ -150,14 +135,10 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: ./.github/actions/pnpm-setup - uses: ./.github/actions/pnpm-setup
with:
working-directory: js
- run: pnpm --filter ${{ env.WORKSPACE }} run lint - run: pnpm --filter ${{ env.WORKSPACE }} lint
working-directory: js
- run: pnpm --filter ${{ env.WORKSPACE }} run build - run: pnpm --filter ${{ env.WORKSPACE }} build
working-directory: js
admin-ui: admin-ui:
name: Admin UI name: Admin UI
@ -170,20 +151,14 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: ./.github/actions/pnpm-setup - uses: ./.github/actions/pnpm-setup
with:
working-directory: js
- run: pnpm --filter ${{ env.WORKSPACE }} run lint - run: pnpm --filter ${{ env.WORKSPACE }} lint
working-directory: js
- run: pnpm --filter ${{ env.WORKSPACE }} run test - run: pnpm --filter ${{ env.WORKSPACE }} test
working-directory: js
- run: pnpm --filter ${{ env.WORKSPACE }} run build - run: pnpm --filter ${{ env.WORKSPACE }} build
working-directory: js
- run: pnpm --filter ${{ env.WORKSPACE }} run cy:check-types - run: pnpm --filter ${{ env.WORKSPACE }} cy:check-types
working-directory: js
account-ui-e2e: account-ui-e2e:
name: Account UI E2E name: Account UI E2E
@ -198,8 +173,6 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: ./.github/actions/pnpm-setup - uses: ./.github/actions/pnpm-setup
with:
working-directory: js
- name: Download Keycloak server - name: Download Keycloak server
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
@ -222,11 +195,9 @@ jobs:
- name: Install Playwright browsers - name: Install Playwright browsers
run: pnpm --filter ${{ env.WORKSPACE }} exec playwright install --with-deps run: pnpm --filter ${{ env.WORKSPACE }} exec playwright install --with-deps
working-directory: js
- name: Run Playwright tests - name: Run Playwright tests
run: pnpm --filter ${{ env.WORKSPACE }} run test run: pnpm --filter ${{ env.WORKSPACE }} test
working-directory: js
env: env:
KEYCLOAK_SERVER: http://localhost:8080 KEYCLOAK_SERVER: http://localhost:8080
@ -277,12 +248,9 @@ jobs:
firefox-version: latest firefox-version: latest
- uses: ./.github/actions/pnpm-setup - uses: ./.github/actions/pnpm-setup
with:
working-directory: js
- name: Compile Admin Client - name: Compile Admin Client
run: pnpm --filter @keycloak/keycloak-admin-client run build run: pnpm --filter @keycloak/keycloak-admin-client build
working-directory: js
- name: Download Keycloak server - name: Download Keycloak server
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
@ -304,8 +272,7 @@ jobs:
KEYCLOAK_ADMIN_PASSWORD: admin KEYCLOAK_ADMIN_PASSWORD: admin
- name: Start LDAP server - name: Start LDAP server
run: pnpm --filter ${{ env.WORKSPACE }} run cy:ldap-server & run: pnpm --filter ${{ env.WORKSPACE }} cy:ldap-server &
working-directory: js
- name: Run Cypress - name: Run Cypress
uses: cypress-io/github-action@v6 uses: cypress-io/github-action@v6

11
.gitignore vendored
View file

@ -92,9 +92,18 @@ quarkus/data/*.db
# Git ephemeral files # Git ephemeral files
*.versionsBackup *.versionsBackup
# Node.js for frontend-maven-plugin # # frontend-maven-plugin
node node
# Wireit
.wireit
# Vite
dist
# ESLint
.eslintcache
# NPM # NPM
node_modules node_modules

View file

@ -51,31 +51,6 @@
<plugin> <plugin>
<groupId>com.github.eirslett</groupId> <groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId> <artifactId>frontend-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>install-node-and-pnpm</goal>
</goals>
</execution>
<execution>
<id>pnpm-install</id>
<goals>
<goal>pnpm</goal>
</goals>
<configuration>
<arguments>${pnpm.args.install}</arguments>
</configuration>
</execution>
<execution>
<id>run-build</id>
<goals>
<goal>pnpm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
</executions>
<configuration> <configuration>
<workingDirectory>${js.projectDir}/libs/keycloak-js</workingDirectory> <workingDirectory>${js.projectDir}/libs/keycloak-js</workingDirectory>
</configuration> </configuration>

37
js/.gitignore vendored
View file

@ -1,37 +0,0 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# Optional eslint cache
.eslintcache
# Keycloak server
server
# Wireit
.wireit
# Vite
dist
dist-ssr
*.local
# Distribution
*.tgz
npm-dist

View file

@ -69,31 +69,6 @@
<plugin> <plugin>
<groupId>com.github.eirslett</groupId> <groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId> <artifactId>frontend-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>install-node-and-pnpm</goal>
</goals>
</execution>
<execution>
<id>pnpm-install</id>
<goals>
<goal>pnpm</goal>
</goals>
<configuration>
<arguments>${pnpm.args.install}</arguments>
</configuration>
</execution>
<execution>
<id>run-build</id>
<goals>
<goal>pnpm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
</executions>
</plugin> </plugin>
<plugin> <plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId> <groupId>com.google.code.maven-replacer-plugin</groupId>

View file

@ -27,7 +27,7 @@ Now that the Keycloak sever is running it's time to run the development server f
To start the development server run the following command: To start the development server run the following command:
```bash ```bash
pnpm run dev pnpm dev
``` ```
Once the process of optimization is done your browser will automatically open your local host on port `8080`. From here you will be redirected to the Keycloak server to authenticate, which you can do with the default credentials (`admin`/`admin`). Once the process of optimization is done your browser will automatically open your local host on port `8080`. From here you will be redirected to the Keycloak server to authenticate, which you can do with the default credentials (`admin`/`admin`).
@ -43,7 +43,7 @@ If you want to build the application using Maven and produce a JAR that can be i
Every time you create a commit it should be automatically linted and formatted for you. It is also possible to trigger the linting manually: Every time you create a commit it should be automatically linted and formatted for you. It is also possible to trigger the linting manually:
```bash ```bash
pnpm run lint pnpm lint
``` ```
## Integration testing with Cypress ## Integration testing with Cypress
@ -59,13 +59,13 @@ Ensure the Keycloak and development server are running as [outlined previously](
You can run the tests using the interactive graphical user interface using the following command: You can run the tests using the interactive graphical user interface using the following command:
```bash ```bash
pnpm run cy:open pnpm cy:open
``` ```
Alternatively the tests can also run headless as follows: Alternatively the tests can also run headless as follows:
``` ```
pnpm run cy:run pnpm cy:run
``` ```
For more information about the Cypress command-line interface consult [the documentation](https://docs.cypress.io/guides/guides/command-line). For more information about the Cypress command-line interface consult [the documentation](https://docs.cypress.io/guides/guides/command-line).

View file

@ -61,7 +61,6 @@
<targetPath>theme/keycloak.v2/admin/resources</targetPath> <targetPath>theme/keycloak.v2/admin/resources</targetPath>
<excludes> <excludes>
<exclude>index.html</exclude> <exclude>index.html</exclude>
<exclude>locales/**</exclude>
</excludes> </excludes>
</resource> </resource>
</resources> </resources>
@ -70,31 +69,6 @@
<plugin> <plugin>
<groupId>com.github.eirslett</groupId> <groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId> <artifactId>frontend-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>install-node-and-pnpm</goal>
</goals>
</execution>
<execution>
<id>pnpm-install</id>
<goals>
<goal>pnpm</goal>
</goals>
<configuration>
<arguments>${pnpm.args.install}</arguments>
</configuration>
</execution>
<execution>
<id>run-build</id>
<goals>
<goal>pnpm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
</executions>
</plugin> </plugin>
<plugin> <plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId> <groupId>com.google.code.maven-replacer-plugin</groupId>

2
js/apps/keycloak-server/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
# Keycloak server
server

View file

@ -13,7 +13,7 @@ pnpm install
After the dependencies are installed we can start the Keycloak server by running the following command: After the dependencies are installed we can start the Keycloak server by running the following command:
```bash ```bash
pnpm run start pnpm start
``` ```
This will download the [Nightly version](https://github.com/keycloak/keycloak/releases/tag/nightly) of the Keycloak server and run it locally on port `8180`. If a previously downloaded version was found in the `server/` directory then that one will be used instead. If you want to download the latest Nightly version you can remove the server directory before running the command to start the server. This will download the [Nightly version](https://github.com/keycloak/keycloak/releases/tag/nightly) of the Keycloak server and run it locally on port `8180`. If a previously downloaded version was found in the `server/` directory then that one will be used instead. If you want to download the latest Nightly version you can remove the server directory before running the command to start the server.
@ -21,7 +21,7 @@ This will download the [Nightly version](https://github.com/keycloak/keycloak/re
If you want to run with a local Quarkus distribution of Keycloak for development purposes, you can do so by running this command instead: If you want to run with a local Quarkus distribution of Keycloak for development purposes, you can do so by running this command instead:
```bash ```bash
pnpm run start -- --local pnpm start -- --local
``` ```
**All other arguments will be passed through to the underlying Keycloak server.** **All other arguments will be passed through to the underlying Keycloak server.**

View file

@ -107,13 +107,13 @@ setInterval(() => kcAdminClient.auth(credentials), 58 * 1000); // 58 seconds
To build the source do a build: To build the source do a build:
```bash ```bash
pnpm run build pnpm build
``` ```
Start the Keycloak server: Start the Keycloak server:
```bash ```bash
pnpm run server:start pnpm server:start
``` ```
If you started your container manually make sure there is an admin user named 'admin' with password 'admin'. If you started your container manually make sure there is an admin user named 'admin' with password 'admin'.

View file

@ -15,7 +15,7 @@
"build": "wireit", "build": "wireit",
"lint": "wireit", "lint": "wireit",
"test": "wireit", "test": "wireit",
"prepublishOnly": "pnpm run build" "prepublishOnly": "pnpm build"
}, },
"wireit": { "wireit": {
"build": { "build": {

View file

@ -46,29 +46,6 @@
<groupId>com.github.eirslett</groupId> <groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId> <artifactId>frontend-maven-plugin</artifactId>
<executions> <executions>
<execution>
<goals>
<goal>install-node-and-pnpm</goal>
</goals>
</execution>
<execution>
<id>pnpm-install</id>
<goals>
<goal>pnpm</goal>
</goals>
<configuration>
<arguments>${pnpm.args.install}</arguments>
</configuration>
</execution>
<execution>
<id>run-build</id>
<goals>
<goal>pnpm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
<execution> <execution>
<id>pack</id> <id>pack</id>
<phase>package</phase> <phase>package</phase>
@ -77,7 +54,6 @@
</goals> </goals>
<configuration> <configuration>
<arguments>pack --pack-destination=target</arguments> <arguments>pack --pack-destination=target</arguments>
<pnpmInheritsProxyConfigFromMaven>false</pnpmInheritsProxyConfigFromMaven>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>

View file

@ -33,11 +33,11 @@
"scripts": { "scripts": {
"build": "wireit", "build": "wireit",
"duplicate-types": "shx cp dist/keycloak.d.ts dist/keycloak.d.mts && shx cp dist/keycloak-authz.d.ts dist/keycloak-authz.d.mts", "duplicate-types": "shx cp dist/keycloak.d.ts dist/keycloak.d.mts && shx cp dist/keycloak-authz.d.ts dist/keycloak-authz.d.mts",
"prepublishOnly": "pnpm run build" "prepublishOnly": "pnpm build"
}, },
"wireit": { "wireit": {
"build": { "build": {
"command": "rollup --config --configPlugin typescript && pnpm run duplicate-types", "command": "rollup --config --configPlugin typescript && pnpm duplicate-types",
"files": [ "files": [
"src/**", "src/**",
"package.json", "package.json",

View file

@ -46,29 +46,6 @@
<groupId>com.github.eirslett</groupId> <groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId> <artifactId>frontend-maven-plugin</artifactId>
<executions> <executions>
<execution>
<goals>
<goal>install-node-and-pnpm</goal>
</goals>
</execution>
<execution>
<id>pnpm-install</id>
<goals>
<goal>pnpm</goal>
</goals>
<configuration>
<arguments>${pnpm.args.install}</arguments>
</configuration>
</execution>
<execution>
<id>run-build</id>
<goals>
<goal>pnpm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
<execution> <execution>
<id>pack</id> <id>pack</id>
<phase>package</phase> <phase>package</phase>
@ -77,7 +54,6 @@
</goals> </goals>
<configuration> <configuration>
<arguments>pack --pack-destination=target</arguments> <arguments>pack --pack-destination=target</arguments>
<pnpmInheritsProxyConfigFromMaven>false</pnpmInheritsProxyConfigFromMaven>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>

View file

@ -1,3 +0,0 @@
packages:
- 'apps/*'
- 'libs/*'

View file

@ -27,71 +27,5 @@
<maven.build.cache.input.1>src</maven.build.cache.input.1> <maven.build.cache.input.1>src</maven.build.cache.input.1>
<!-- The child projects will package from the 'dist' folder, which is listed as a resource, but isn't a source folder --> <!-- The child projects will package from the 'dist' folder, which is listed as a resource, but isn't a source folder -->
<maven.build.cache.exclude.value.1>${project.basedir}/dist</maven.build.cache.exclude.value.1> <maven.build.cache.exclude.value.1>${project.basedir}/dist</maven.build.cache.exclude.value.1>
<!-- The clean step is skipped on Windows -->
<js.skip.clean>false</js.skip.clean>
</properties> </properties>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>install-node-and-pnpm</goal>
</goals>
</execution>
<execution>
<id>pnpm-install</id>
<goals>
<goal>pnpm</goal>
</goals>
<configuration>
<arguments>${pnpm.args.install}</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<followSymLinks>false</followSymLinks>
<!-- Skip this step if on windows -->
<skip>${js.skip.clean}</skip>
<filesets>
<fileset>
<directory>${basedir}</directory>
<includes>
<include>**/.wireit/**</include>
<include>**/node_modules/**</include>
</includes>
</fileset>
<!-- include all non-maven projects here as well -->
<fileset>
<directory>apps/keycloak-server</directory>
<includes>
<include>server/**</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>clean-when-not-on-windows</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<properties>
<js.skip.clean>true</js.skip.clean>
</properties>
</profile>
</profiles>
</project> </project>

View file

@ -25,7 +25,7 @@
"typescript": "^5.4.3", "typescript": "^5.4.3",
"wireit": "^0.14.4" "wireit": "^0.14.4"
}, },
"packageManager": "pnpm@8.10.0", "packageManager": "pnpm@8.15.5",
"lint-staged": { "lint-staged": {
"*.{js,jsx,mjs,ts,tsx}": "eslint --cache --fix" "*.{js,jsx,mjs,ts,tsx}": "eslint --cache --fix"
} }

File diff suppressed because it is too large Load diff

4
pnpm-workspace.yaml Normal file
View file

@ -0,0 +1,4 @@
packages:
- js/apps/*
- js/libs/*
- themes/src/main/resources/theme/keycloak/common/resources

72
pom.xml
View file

@ -198,7 +198,7 @@
<osgi.bundle.plugin.version>5.1.8</osgi.bundle.plugin.version> <osgi.bundle.plugin.version>5.1.8</osgi.bundle.plugin.version>
<wildfly.plugin.version>2.0.1.Final</wildfly.plugin.version> <wildfly.plugin.version>2.0.1.Final</wildfly.plugin.version>
<nexus.staging.plugin.version>1.6.13</nexus.staging.plugin.version> <nexus.staging.plugin.version>1.6.13</nexus.staging.plugin.version>
<frontend.plugin.version>1.14.2</frontend.plugin.version> <frontend.plugin.version>1.15.0</frontend.plugin.version>
<docker.maven.plugin.version>0.40.3</docker.maven.plugin.version> <docker.maven.plugin.version>0.40.3</docker.maven.plugin.version>
<verifier.plugin.version>1.1</verifier.plugin.version> <verifier.plugin.version>1.1</verifier.plugin.version>
<shade.plugin.version>3.4.1</shade.plugin.version> <shade.plugin.version>3.4.1</shade.plugin.version>
@ -244,9 +244,11 @@
<server.output.dir.version>${project.version}</server.output.dir.version> <server.output.dir.version>${project.version}</server.output.dir.version>
<!-- Frontend --> <!-- Frontend -->
<node.version>v18.18.2</node.version> <node.version>v20.12.0</node.version>
<pnpm.version>8.10.0</pnpm.version> <pnpm.version>8.15.5</pnpm.version>
<pnpm.args.install>install --prefer-offline --frozen-lockfile --ignore-scripts</pnpm.args.install> <pnpm.args.install>install --prefer-offline --frozen-lockfile --ignore-scripts</pnpm.args.install>
<!-- The clean step is skipped on Windows -->
<js.skip.clean>false</js.skip.clean>
</properties> </properties>
<url>http://keycloak.org</url> <url>http://keycloak.org</url>
@ -1850,15 +1852,66 @@
<artifactId>maven-bundle-plugin</artifactId> <artifactId>maven-bundle-plugin</artifactId>
<version>${osgi.bundle.plugin.version}</version> <version>${osgi.bundle.plugin.version}</version>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<followSymLinks>false</followSymLinks>
<!-- Skip this step if on windows -->
<skip>${js.skip.clean}</skip>
<filesets>
<fileset>
<directory>${basedir}</directory>
<includes>
<include>**/.wireit/**</include>
<include>**/node_modules/**</include>
</includes>
</fileset>
<!-- include all non-maven projects here as well -->
<fileset>
<directory>js/apps/keycloak-server</directory>
<includes>
<include>server/**</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin> <plugin>
<groupId>com.github.eirslett</groupId> <groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId> <artifactId>frontend-maven-plugin</artifactId>
<version>${frontend.plugin.version}</version> <version>${frontend.plugin.version}</version>
<executions>
<execution>
<goals>
<goal>install-node-and-pnpm</goal>
</goals>
</execution>
<execution>
<id>pnpm-install</id>
<goals>
<goal>pnpm</goal>
</goals>
<configuration>
<arguments>install --prefer-offline --frozen-lockfile --ignore-scripts</arguments>
<workingDirectory>${maven.multiModuleProjectDirectory}</workingDirectory>
</configuration>
</execution>
<execution>
<id>pnpm-build</id>
<goals>
<goal>pnpm</goal>
</goals>
<configuration>
<arguments>build</arguments>
</configuration>
</execution>
</executions>
<configuration> <configuration>
<nodeVersion>${node.version}</nodeVersion> <nodeVersion>${node.version}</nodeVersion>
<pnpmVersion>${pnpm.version}</pnpmVersion> <pnpmVersion>${pnpm.version}</pnpmVersion>
<!-- Warning, this is an undocumented property https://issues.apache.org/jira/browse/MNG-6589. But there is nothing better. -->
<installDirectory>${maven.multiModuleProjectDirectory}</installDirectory> <installDirectory>${maven.multiModuleProjectDirectory}</installDirectory>
<pnpmInheritsProxyConfigFromMaven>false</pnpmInheritsProxyConfigFromMaven>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
@ -2089,5 +2142,16 @@
</properties> </properties>
</profile> </profile>
<profile>
<id>clean-when-not-on-windows</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<properties>
<js.skip.clean>true</js.skip.clean>
</properties>
</profile>
</profiles> </profiles>
</project> </project>

View file

@ -1,16 +0,0 @@
# Updating dependencies
The dependencies will be downloaded at build time, based on the contents of `package.json` and `pnpm-lock.yaml`. You should verify the new set of packages don't break anything before committing.
## For the login
```bash
cd src/main/resources/theme/keycloak/common/resources
pnpm update --latest --interactive
git add package.json pnpm-lock.yaml
cd -
```
## License Information
Make sure to enter license information for new dependencies, as specified in `docs/dependency-license-information.md`. Javascript dependencies are included as `other` elements.

View file

@ -36,62 +36,25 @@
<resources> <resources>
<resource> <resource>
<directory>src/main/resources</directory> <directory>src/main/resources</directory>
<excludes>
<exclude>**/node_modules/**/node_modules/**</exclude>
<exclude>**/minimist/**</exclude>
<exclude>**/mkdirp/**</exclude>
<exclude>**/package.json</exclude>
<exclude>**/package-lock.json</exclude>
<exclude>**/pnpm-lock.yaml</exclude>
<exclude>**/pnpm-workspace.yaml</exclude>
<exclude>**/component.json</exclude>
<exclude>**/composer.json</exclude>
<exclude>**/npm-shrinkwrap.json</exclude>
<exclude>**/select2.jquery.json</exclude>
<exclude>**/*.markdown</exclude>
<exclude>**/*.swf</exclude>
<exclude>**/*.sh</exclude>
<exclude>**/.bin/**</exclude>
<exclude>**/bin/**</exclude>
<exclude>**/build/**</exclude>
<exclude>**/docs/**</exclude>
<exclude>**/demo/**</exclude>
<exclude>**/devtools/**</exclude>
<exclude>**/example/**</exclude>
<exclude>**/examples/**</exclude>
<exclude>**/grunt/**</exclude>
<exclude>**/less/**</exclude>
<exclude>**/sass/**</exclude>
<exclude>**/scss/**</exclude>
<exclude>**/jquery/src/**</exclude>
<exclude>**/angular-treeview/src/**</exclude>
<exclude>**/test/**</exclude>
<exclude>**/tests/**</exclude>
<exclude>**/_config.yml</exclude>
<exclude>**/api.md</exclude>
<exclude>**/AUTHORS.txt</exclude>
<exclude>**/CHANGELOG.md</exclude>
<exclude>**/CONTRIBUTING.md</exclude>
<exclude>**/HELP-US-OUT.txt</exclude>
<exclude>**/README.md</exclude>
<exclude>**/Gruntfile.js</exclude>
<exclude>**/Gemfile*</exclude>
<exclude>**/.*</exclude>
</excludes>
</resource> </resource>
</resources> </resources>
<plugins> <plugins>
<plugin> <plugin>
<artifactId>maven-source-plugin</artifactId> <artifactId>maven-source-plugin</artifactId>
<configuration> <configuration>
<excludes> <excludes>
<exclude>**/node_modules/**/*</exclude> <exclude>**/node_modules/**</exclude>
<exclude>**/web_modules/**/*</exclude>
<exclude>**/*.js.map</exclude>
<exclude>**/account/resources/*.js</exclude>
</excludes> </excludes>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<configuration>
<workingDirectory>src/main/resources/theme/keycloak/common/resources</workingDirectory>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>
@ -111,61 +74,6 @@
</resources> </resources>
</build> </build>
</profile> </profile>
<profile>
<id>common</id>
<activation>
<property>
<name>!skipCommon</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${dir.common}/web_modules</directory>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<executions>
<execution>
<id>install-node-and-pnpm-common</id>
<goals>
<goal>install-node-and-pnpm</goal>
</goals>
</execution>
<execution>
<id>pnpm-install-common</id>
<goals>
<goal>pnpm</goal>
</goals>
<configuration>
<arguments>${pnpm.args.install}</arguments>
<workingDirectory>${dir.common}</workingDirectory>
</configuration>
</execution>
<execution>
<id>pnpm-build-common</id>
<goals>
<goal>pnpm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
<workingDirectory>${dir.common}</workingDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles> </profiles>
</project> </project>

View file

@ -16,7 +16,6 @@
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"rfc4648": "^1.5.3" "rfc4648": "^1.5.3"
}, },
"packageManager": "pnpm@8.10.0",
"devDependencies": { "devDependencies": {
"@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-node-resolve": "^15.2.3",