mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-09 23:12:06 -03:30
Move themes PNPM build into js directory (#35413)
Closes #35411 Signed-off-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
parent
20e68ffb15
commit
7f0983a48c
@ -21,6 +21,7 @@
|
||||
<module>libs/keycloak-admin-client</module>
|
||||
<module>libs/ui-shared</module>
|
||||
<module>libs/keycloak-js</module>
|
||||
<module>themes-vendor</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
{
|
||||
"name": "keycloak-npm-dependencies",
|
||||
"name": "themes-vendor",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "pnpm build:clean && rollup --config && pnpm build:rewrite-import",
|
||||
"build:rewrite-import": "node scripts/rewrite-imports.js",
|
||||
"build:clean": "shx rm -rf vendor"
|
||||
"build": "rollup --config && pnpm build:rewrite-import",
|
||||
"build:rewrite-import": "node scripts/rewrite-imports.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@noble/hashes": "^1.6.1",
|
||||
@ -22,7 +21,6 @@
|
||||
"@rollup/plugin-node-resolve": "^15.3.0",
|
||||
"@rollup/plugin-replace": "^6.0.1",
|
||||
"@rollup/plugin-terser": "^0.4.4",
|
||||
"rollup": "^4.27.4",
|
||||
"shx": "^0.3.4"
|
||||
"rollup": "^4.27.4"
|
||||
}
|
||||
}
|
||||
111
js/themes-vendor/pom.xml
Executable file
111
js/themes-vendor/pom.xml
Executable file
@ -0,0 +1,111 @@
|
||||
<?xml version="1.0"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<parent>
|
||||
<artifactId>keycloak-js-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>999.0.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>keycloak-themes-vendor</artifactId>
|
||||
<name>Keycloak Themes Vendor</name>
|
||||
<description>Vendored artifacts needed as shared theme resources such as NPM libraries</description>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<dir.vendor>theme/keycloak/common/resources/vendor</dir.vendor>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.github.eirslett</groupId>
|
||||
<artifactId>frontend-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-rfc4648</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.outputDirectory}/${dir.vendor}/rfc4648</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>node_modules/rfc4648/lib</directory>
|
||||
<includes>
|
||||
<include>rfc4648.js</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-patternfly-v3</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.outputDirectory}/${dir.vendor}/patternfly-v3</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>node_modules/patternfly/dist</directory>
|
||||
<includes>
|
||||
<include>css/patternfly.min.css</include>
|
||||
<include>css/patternfly-additions.min.css</include>
|
||||
<include>fonts/**</include>
|
||||
<include>img/**</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-patternfly-v4</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.outputDirectory}/${dir.vendor}/patternfly-v4</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>node_modules/@patternfly/patternfly</directory>
|
||||
<includes>
|
||||
<include>patternfly.min.css</include>
|
||||
<include>assets/**</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-patternfly-v5</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.outputDirectory}/${dir.vendor}/patternfly-v5</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>node_modules/@patternfly-v5/patternfly</directory>
|
||||
<includes>
|
||||
<include>patternfly.min.css</include>
|
||||
<include>patternfly-addons.css</include>
|
||||
<include>assets/**</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@ -1,5 +1,5 @@
|
||||
import { sha256 } from '@noble/hashes/sha256';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { sha256 } from "@noble/hashes/sha256";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
|
||||
// Shim for Web Crypto API specifically for Keycloak JS, as this API can sometimes be missing, for example in an insecure context:
|
||||
// https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts
|
||||
@ -17,8 +17,8 @@ if (typeof crypto.subtle === "undefined") {
|
||||
}
|
||||
|
||||
throw new Error("Unsupported algorithm");
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ if (typeof crypto.getRandomValues === "undefined") {
|
||||
}
|
||||
|
||||
return array;
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@ -38,6 +38,6 @@ if (typeof crypto.randomUUID === "undefined") {
|
||||
Object.defineProperty(crypto, "randomUUID", {
|
||||
value: () => {
|
||||
return uuidv4();
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
15
pnpm-lock.yaml
generated
15
pnpm-lock.yaml
generated
@ -447,7 +447,7 @@ importers:
|
||||
specifier: ^2.1.6
|
||||
version: 2.1.6(@types/node@22.10.0)(jsdom@25.0.1)(lightningcss@1.28.2)(terser@5.36.0)
|
||||
|
||||
themes:
|
||||
js/themes-vendor:
|
||||
dependencies:
|
||||
'@noble/hashes':
|
||||
specifier: ^1.6.1
|
||||
@ -489,9 +489,6 @@ importers:
|
||||
rollup:
|
||||
specifier: ^4.27.4
|
||||
version: 4.27.4
|
||||
shx:
|
||||
specifier: ^0.3.4
|
||||
version: 0.3.4
|
||||
|
||||
packages:
|
||||
|
||||
@ -4378,11 +4375,6 @@ packages:
|
||||
engines: {node: '>=4'}
|
||||
hasBin: true
|
||||
|
||||
shx@0.3.4:
|
||||
resolution: {integrity: sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==}
|
||||
engines: {node: '>=6'}
|
||||
hasBin: true
|
||||
|
||||
side-channel@1.0.6:
|
||||
resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@ -9322,11 +9314,6 @@ snapshots:
|
||||
interpret: 1.4.0
|
||||
rechoir: 0.6.2
|
||||
|
||||
shx@0.3.4:
|
||||
dependencies:
|
||||
minimist: 1.2.8
|
||||
shelljs: 0.8.5
|
||||
|
||||
side-channel@1.0.6:
|
||||
dependencies:
|
||||
call-bind: 1.0.7
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
packages:
|
||||
- js/apps/*
|
||||
- js/libs/*
|
||||
- themes
|
||||
- js/themes-vendor
|
||||
|
||||
5
pom.xml
5
pom.xml
@ -946,6 +946,11 @@
|
||||
<artifactId>keycloak-themes</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-themes-vendor</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-adapter-spi</artifactId>
|
||||
|
||||
@ -214,6 +214,16 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-themes-vendor</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>*</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-core-public</artifactId>
|
||||
|
||||
@ -12,10 +12,6 @@
|
||||
<description />
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<dir.vendor>theme/keycloak/common/resources/vendor</dir.vendor>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
@ -25,6 +21,10 @@
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-account-ui</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-themes-vendor</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@ -33,96 +33,6 @@
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.github.eirslett</groupId>
|
||||
<artifactId>frontend-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-rfc4648</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.outputDirectory}/${dir.vendor}/rfc4648</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>node_modules/rfc4648/lib</directory>
|
||||
<includes>
|
||||
<include>rfc4648.js</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-patternfly-v3</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.outputDirectory}/${dir.vendor}/patternfly-v3</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>node_modules/patternfly/dist</directory>
|
||||
<includes>
|
||||
<include>css/patternfly.min.css</include>
|
||||
<include>css/patternfly-additions.min.css</include>
|
||||
<include>fonts/**</include>
|
||||
<include>img/**</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-patternfly-v4</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.outputDirectory}/${dir.vendor}/patternfly-v4</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>node_modules/@patternfly/patternfly</directory>
|
||||
<includes>
|
||||
<include>patternfly.min.css</include>
|
||||
<include>assets/**</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-patternfly-v5</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.outputDirectory}/${dir.vendor}/patternfly-v5</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>node_modules/@patternfly-v5/patternfly</directory>
|
||||
<includes>
|
||||
<include>patternfly.min.css</include>
|
||||
<include>patternfly-addons.css</include>
|
||||
<include>assets/**</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
@ -142,5 +52,4 @@
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user