Unify package files for JS adapter (#9789)
This commit is contained in:
parent
2c238b9f04
commit
90fe97133c
17 changed files with 103 additions and 85 deletions
2
adapters/oidc/js/.gitignore
vendored
2
adapters/oidc/js/.gitignore
vendored
|
@ -1,2 +1,4 @@
|
|||
node
|
||||
node_modules
|
||||
dist/*
|
||||
!dist/*.d.ts
|
||||
|
|
85
adapters/oidc/js/package-lock.json
generated
85
adapters/oidc/js/package-lock.json
generated
|
@ -1,24 +1,27 @@
|
|||
{
|
||||
"name": "keycloak-js-adapter",
|
||||
"name": "keycloak-js",
|
||||
"version": "${project.version}",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "keycloak-js-adapter",
|
||||
"name": "keycloak-js",
|
||||
"version": "${project.version}",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"base64-js": "^1.5.1",
|
||||
"es6-promise": "^4.2.8",
|
||||
"js-sha256": "^0.9.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-commonjs": "^21.0.1",
|
||||
"@rollup/plugin-inject": "^4.0.3",
|
||||
"@rollup/plugin-node-resolve": "^13.1.1",
|
||||
"@rollup/plugin-inject": "^4.0.4",
|
||||
"@rollup/plugin-node-resolve": "^13.1.3",
|
||||
"@rollup/plugin-typescript": "^8.3.0",
|
||||
"@types/node": "^17.0.5",
|
||||
"rollup": "^2.62.0",
|
||||
"@types/node": "^17.0.16",
|
||||
"es6-promise": "^4.2.8",
|
||||
"rollup": "^2.67.1",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"typescript": "^4.5.4"
|
||||
"typescript": "^4.5.5"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
|
@ -84,9 +87,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/@rollup/plugin-inject": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-inject/-/plugin-inject-4.0.3.tgz",
|
||||
"integrity": "sha512-lzMXmj0LZjd67MI+M8H9dk/oCxR0TYqYAdZ6ZOejWQLSUtud+FUPu4NCMAO8KyWWAalFo8ean7yFHCMvCNsCZw==",
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-inject/-/plugin-inject-4.0.4.tgz",
|
||||
"integrity": "sha512-4pbcU4J/nS+zuHk+c+OL3WtmEQhqxlZ9uqfjQMQDOHOPld7PsCd8k5LWs8h5wjwJN7MgnAn768F2sDxEP4eNFQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@rollup/pluginutils": "^3.1.0",
|
||||
|
@ -104,9 +107,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/@rollup/plugin-node-resolve": {
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.1.tgz",
|
||||
"integrity": "sha512-6QKtRevXLrmEig9UiMYt2fSvee9TyltGRfw+qSs6xjUnxwjOzTOqy+/Lpxsgjb8mJn1EQNbCDAvt89O4uzL5kw==",
|
||||
"version": "13.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.3.tgz",
|
||||
"integrity": "sha512-BdxNk+LtmElRo5d06MGY4zoepyrXX1tkzX2hrnPEZ53k78GuOMWLqmJDGIIOPwVRIFZrLQOo+Yr6KtCuLIA0AQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@rollup/pluginutils": "^3.1.0",
|
||||
|
@ -165,9 +168,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "17.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.5.tgz",
|
||||
"integrity": "sha512-w3mrvNXLeDYV1GKTZorGJQivK6XLCoGwpnyJFbJVK/aTBQUxOCaa/GlFAAN3OTDFcb7h5tiFG+YXCO2By+riZw==",
|
||||
"version": "17.0.16",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.16.tgz",
|
||||
"integrity": "sha512-ydLaGVfQOQ6hI1xK2A5nVh8bl0OGoIfYMxPWHqqYe9bTkWCfqiVvZoh2I/QF2sNSkZzZyROBoTefIEI+PB6iIA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/resolve": {
|
||||
|
@ -303,7 +306,8 @@
|
|||
"node_modules/es6-promise": {
|
||||
"version": "4.2.8",
|
||||
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz",
|
||||
"integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w=="
|
||||
"integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/escape-string-regexp": {
|
||||
"version": "1.0.5",
|
||||
|
@ -548,9 +552,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/rollup": {
|
||||
"version": "2.62.0",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.62.0.tgz",
|
||||
"integrity": "sha512-cJEQq2gwB0GWMD3rYImefQTSjrPYaC6s4J9pYqnstVLJ1CHa/aZNVkD4Epuvg4iLeMA4KRiq7UM7awKK6j7jcw==",
|
||||
"version": "2.67.1",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.67.1.tgz",
|
||||
"integrity": "sha512-1Sbcs4OuW+aD+hhqpIRl+RqooIpF6uQcfzU/QSI7vGkwADY6cM4iLsBGRM2CGLXDTDN5y/yShohFmnKegSPWzg==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"rollup": "dist/bin/rollup"
|
||||
|
@ -685,9 +689,9 @@
|
|||
"peer": true
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "4.5.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz",
|
||||
"integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==",
|
||||
"version": "4.5.5",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz",
|
||||
"integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
|
@ -755,9 +759,9 @@
|
|||
}
|
||||
},
|
||||
"@rollup/plugin-inject": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-inject/-/plugin-inject-4.0.3.tgz",
|
||||
"integrity": "sha512-lzMXmj0LZjd67MI+M8H9dk/oCxR0TYqYAdZ6ZOejWQLSUtud+FUPu4NCMAO8KyWWAalFo8ean7yFHCMvCNsCZw==",
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-inject/-/plugin-inject-4.0.4.tgz",
|
||||
"integrity": "sha512-4pbcU4J/nS+zuHk+c+OL3WtmEQhqxlZ9uqfjQMQDOHOPld7PsCd8k5LWs8h5wjwJN7MgnAn768F2sDxEP4eNFQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@rollup/pluginutils": "^3.1.0",
|
||||
|
@ -774,9 +778,9 @@
|
|||
}
|
||||
},
|
||||
"@rollup/plugin-node-resolve": {
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.1.tgz",
|
||||
"integrity": "sha512-6QKtRevXLrmEig9UiMYt2fSvee9TyltGRfw+qSs6xjUnxwjOzTOqy+/Lpxsgjb8mJn1EQNbCDAvt89O4uzL5kw==",
|
||||
"version": "13.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.3.tgz",
|
||||
"integrity": "sha512-BdxNk+LtmElRo5d06MGY4zoepyrXX1tkzX2hrnPEZ53k78GuOMWLqmJDGIIOPwVRIFZrLQOo+Yr6KtCuLIA0AQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@rollup/pluginutils": "^3.1.0",
|
||||
|
@ -815,9 +819,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "17.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.5.tgz",
|
||||
"integrity": "sha512-w3mrvNXLeDYV1GKTZorGJQivK6XLCoGwpnyJFbJVK/aTBQUxOCaa/GlFAAN3OTDFcb7h5tiFG+YXCO2By+riZw==",
|
||||
"version": "17.0.16",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.16.tgz",
|
||||
"integrity": "sha512-ydLaGVfQOQ6hI1xK2A5nVh8bl0OGoIfYMxPWHqqYe9bTkWCfqiVvZoh2I/QF2sNSkZzZyROBoTefIEI+PB6iIA==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/resolve": {
|
||||
|
@ -924,7 +928,8 @@
|
|||
"es6-promise": {
|
||||
"version": "4.2.8",
|
||||
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz",
|
||||
"integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w=="
|
||||
"integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==",
|
||||
"dev": true
|
||||
},
|
||||
"escape-string-regexp": {
|
||||
"version": "1.0.5",
|
||||
|
@ -1129,9 +1134,9 @@
|
|||
}
|
||||
},
|
||||
"rollup": {
|
||||
"version": "2.62.0",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.62.0.tgz",
|
||||
"integrity": "sha512-cJEQq2gwB0GWMD3rYImefQTSjrPYaC6s4J9pYqnstVLJ1CHa/aZNVkD4Epuvg4iLeMA4KRiq7UM7awKK6j7jcw==",
|
||||
"version": "2.67.1",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.67.1.tgz",
|
||||
"integrity": "sha512-1Sbcs4OuW+aD+hhqpIRl+RqooIpF6uQcfzU/QSI7vGkwADY6cM4iLsBGRM2CGLXDTDN5y/yShohFmnKegSPWzg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fsevents": "~2.3.2"
|
||||
|
@ -1222,9 +1227,9 @@
|
|||
"peer": true
|
||||
},
|
||||
"typescript": {
|
||||
"version": "4.5.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz",
|
||||
"integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==",
|
||||
"version": "4.5.5",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz",
|
||||
"integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==",
|
||||
"dev": true
|
||||
},
|
||||
"wrappy": {
|
||||
|
|
|
@ -1,22 +1,43 @@
|
|||
{
|
||||
"name": "keycloak-js-adapter",
|
||||
"private": true,
|
||||
"name": "keycloak-js",
|
||||
"version": "${project.version}",
|
||||
"description": "Keycloak Adapter",
|
||||
"main": "dist/keycloak.js",
|
||||
"module": "dist/keycloak.mjs",
|
||||
"types": "dist/keycloak.d.ts",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "rollup --config --configPlugin typescript"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/keycloak/keycloak"
|
||||
},
|
||||
"author": "Keycloak",
|
||||
"license": "Apache-2.0",
|
||||
"homepage": "https://www.keycloak.org",
|
||||
"keywords": [
|
||||
"keycloak",
|
||||
"sso",
|
||||
"oauth",
|
||||
"oauth2",
|
||||
"authentication"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-commonjs": "^21.0.1",
|
||||
"@rollup/plugin-inject": "^4.0.3",
|
||||
"@rollup/plugin-node-resolve": "^13.1.1",
|
||||
"@rollup/plugin-inject": "^4.0.4",
|
||||
"@rollup/plugin-node-resolve": "^13.1.3",
|
||||
"@rollup/plugin-typescript": "^8.3.0",
|
||||
"@types/node": "^17.0.5",
|
||||
"rollup": "^2.62.0",
|
||||
"@types/node": "^17.0.16",
|
||||
"es6-promise": "^4.2.8",
|
||||
"rollup": "^2.67.1",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"typescript": "^4.5.4"
|
||||
"typescript": "^4.5.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"base64-js": "^1.5.1",
|
||||
"es6-promise": "^4.2.8",
|
||||
"js-sha256": "^0.9.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,29 @@
|
|||
<name>Keycloak JS Integration</name>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>static</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>dist</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<configuration>
|
||||
<filesets>
|
||||
<fileset>
|
||||
<directory>dist</directory>
|
||||
<excludes>
|
||||
<exclude>*.d.ts</exclude>
|
||||
</excludes>
|
||||
</fileset>
|
||||
</filesets>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.github.eirslett</groupId>
|
||||
<artifactId>frontend-maven-plugin</artifactId>
|
||||
|
|
|
@ -17,8 +17,8 @@ function defineOptions({
|
|||
name,
|
||||
amdId,
|
||||
}: DefineOptionsArgs): RollupOptions[] {
|
||||
const sourceDir = "src/main/js";
|
||||
const targetDir = "target/classes";
|
||||
const sourceDir = "src";
|
||||
const targetDir = "dist";
|
||||
const commonOptions: RollupOptions = {
|
||||
input: path.join(sourceDir, `${file}.js`),
|
||||
plugins: [commonjs(), nodeResolve()],
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
<files>
|
||||
<file>
|
||||
<source>src/main/resources/package.json</source>
|
||||
<source>../../../adapters/oidc/js/package.json</source>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<filtered>true</filtered>
|
||||
</file>
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
"name": "keycloak-js",
|
||||
"version": "${project.version}",
|
||||
"description": "Keycloak Adapter",
|
||||
"main": "dist/keycloak.js",
|
||||
"module": "dist/keycloak.mjs",
|
||||
"typings": "dist/keycloak.d.ts",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/keycloak/keycloak"
|
||||
},
|
||||
"author": "Keycloak",
|
||||
"license": "Apache-2.0",
|
||||
"homepage": "https://www.keycloak.org",
|
||||
"keywords": [
|
||||
"keycloak",
|
||||
"sso",
|
||||
"oauth",
|
||||
"oauth2",
|
||||
"authentication"
|
||||
],
|
||||
"dependencies": {
|
||||
"base64-js": "^1.5.1",
|
||||
"js-sha256": "^0.9.0"
|
||||
}
|
||||
}
|
2
pom.xml
2
pom.xml
|
@ -215,7 +215,7 @@
|
|||
<server.output.dir.version>${project.version}</server.output.dir.version>
|
||||
|
||||
<!-- Frontend -->
|
||||
<node.version>v16.13.1</node.version>
|
||||
<node.version>v16.13.2</node.version>
|
||||
</properties>
|
||||
|
||||
<url>http://keycloak.org</url>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {KeycloakLoginOptions} from "../../../../../../../../../../adapters/oidc/js/src/main/resources/keycloak";
|
||||
import {KeycloakLoginOptions} from "../../../../../../../../../../adapters/oidc/js";
|
||||
|
||||
declare const baseUrl: string;
|
||||
export type KeycloakClient = Keycloak.KeycloakInstance;
|
||||
|
|
|
@ -15,8 +15,5 @@
|
|||
},
|
||||
"include": [
|
||||
"./app/**/*.ts?"
|
||||
],
|
||||
"files": [
|
||||
"../../../../../../../../adapters/oidc/js/src/main/resources/keycloak.d.ts"
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue