Add Wireit to automatically build Keycloak JS (#3317)
This commit is contained in:
parent
581b1b039b
commit
54336b7aaf
8 changed files with 135 additions and 13 deletions
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
|
@ -29,7 +29,7 @@ jobs:
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Run build task
|
- name: Run build task
|
||||||
run: npm run build --workspace=keycloak-js --workspace=admin-ui
|
run: npm run build --workspace=admin-ui
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v2
|
uses: github/codeql-action/analyze@v2
|
||||||
|
|
3
.github/workflows/main.yml
vendored
3
.github/workflows/main.yml
vendored
|
@ -23,9 +23,6 @@ jobs:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Build Keycloak JS
|
|
||||||
run: npm run build --workspace=keycloak-js
|
|
||||||
|
|
||||||
- name: Cache setup
|
- name: Cache setup
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
|
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -31,3 +31,6 @@ assets
|
||||||
|
|
||||||
# Keycloak server
|
# Keycloak server
|
||||||
server
|
server
|
||||||
|
|
||||||
|
# Wireit
|
||||||
|
.wireit
|
||||||
|
|
|
@ -1,17 +1,49 @@
|
||||||
{
|
{
|
||||||
"name": "admin-ui",
|
"name": "admin-ui",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --host",
|
"dev": "wireit",
|
||||||
"build": "vite build",
|
"build": "wireit",
|
||||||
"preview": "vite preview",
|
"preview": "wireit",
|
||||||
"lint": "eslint . --ext js,jsx,mjs,ts,tsx",
|
"lint": "wireit",
|
||||||
"test": "vitest",
|
"test": "wireit",
|
||||||
"cy:open": "cypress open --e2e --browser chrome",
|
"cy:open": "cypress open --e2e --browser chrome",
|
||||||
"cy:run": "cypress run --browser chrome",
|
"cy:run": "cypress run --browser chrome",
|
||||||
"cy:check-types": "tsc --project cypress/tsconfig.json",
|
"cy:check-types": "tsc --project cypress/tsconfig.json",
|
||||||
"server:start": "./scripts/start-server.mjs",
|
"server:start": "./scripts/start-server.mjs",
|
||||||
"server:import-client": "./scripts/import-client.mjs"
|
"server:import-client": "./scripts/import-client.mjs"
|
||||||
},
|
},
|
||||||
|
"wireit": {
|
||||||
|
"dev": {
|
||||||
|
"command": "vite --host",
|
||||||
|
"dependencies": [
|
||||||
|
"../../libs/keycloak-js:build"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"preview": {
|
||||||
|
"command": "vite preview",
|
||||||
|
"dependencies": [
|
||||||
|
"../../libs/keycloak-js:build"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"build": {
|
||||||
|
"command": "vite build",
|
||||||
|
"dependencies": [
|
||||||
|
"../../libs/keycloak-js:build"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"command": "eslint . --ext js,jsx,mjs,ts,tsx",
|
||||||
|
"dependencies": [
|
||||||
|
"../../libs/keycloak-js:build"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"test": {
|
||||||
|
"command": "vitest",
|
||||||
|
"dependencies": [
|
||||||
|
"../../libs/keycloak-js:build"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@keycloak/keycloak-admin-client": "^19.0.1",
|
"@keycloak/keycloak-admin-client": "^19.0.1",
|
||||||
"@patternfly/patternfly": "^4.210.2",
|
"@patternfly/patternfly": "^4.210.2",
|
||||||
|
|
|
@ -271,7 +271,7 @@
|
||||||
<goal>npm</goal>
|
<goal>npm</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<arguments>run build --workspace=keycloak-js --workspace=admin-ui</arguments>
|
<arguments>run build --workspace=admin-ui</arguments>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
|
|
|
@ -9,9 +9,16 @@
|
||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rollup --config --configPlugin typescript",
|
"build": "wireit",
|
||||||
"prepublishOnly": "npm run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
|
"wireit": {
|
||||||
|
"build": {
|
||||||
|
"command": "rollup --config --configPlugin typescript",
|
||||||
|
"files": ["src/**", "rollup.config.ts", "tsconfig.json"],
|
||||||
|
"output": ["dist/**", "!dist/*.d.ts"]
|
||||||
|
}
|
||||||
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/keycloak/keycloak-ui"
|
"url": "https://github.com/keycloak/keycloak-ui"
|
||||||
|
|
84
package-lock.json
generated
84
package-lock.json
generated
|
@ -23,7 +23,8 @@
|
||||||
"husky": "^8.0.1",
|
"husky": "^8.0.1",
|
||||||
"lint-staged": "^13.0.3",
|
"lint-staged": "^13.0.3",
|
||||||
"prettier": "^2.7.1",
|
"prettier": "^2.7.1",
|
||||||
"typescript": "^4.8.3"
|
"typescript": "^4.8.3",
|
||||||
|
"wireit": "^0.7.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"apps/admin-ui": {
|
"apps/admin-ui": {
|
||||||
|
@ -10512,6 +10513,12 @@
|
||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/jsonc-parser": {
|
||||||
|
"version": "3.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz",
|
||||||
|
"integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/jsonfile": {
|
"node_modules/jsonfile": {
|
||||||
"version": "6.1.0",
|
"version": "6.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
|
||||||
|
@ -12255,6 +12262,17 @@
|
||||||
"react": ">=0.14.0"
|
"react": ">=0.14.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/proper-lockfile": {
|
||||||
|
"version": "4.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz",
|
||||||
|
"integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"graceful-fs": "^4.2.4",
|
||||||
|
"retry": "^0.12.0",
|
||||||
|
"signal-exit": "^3.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/proxy-from-env": {
|
"node_modules/proxy-from-env": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz",
|
||||||
|
@ -12968,6 +12986,15 @@
|
||||||
"node": ">=0.12"
|
"node": ">=0.12"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/retry": {
|
||||||
|
"version": "0.12.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz",
|
||||||
|
"integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/reusify": {
|
"node_modules/reusify": {
|
||||||
"version": "1.0.4",
|
"version": "1.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
|
||||||
|
@ -15822,6 +15849,25 @@
|
||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/wireit": {
|
||||||
|
"version": "0.7.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/wireit/-/wireit-0.7.1.tgz",
|
||||||
|
"integrity": "sha512-TwuKae0aHk06DZ2omLW6YF4Y74YxCyuRCcsjZMm+cUPRXhvxAU2JhYyuCvD9wIALWK+cQUpB9GjeRFPRAbKsdw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"braces": "^3.0.2",
|
||||||
|
"chokidar": "^3.5.3",
|
||||||
|
"fast-glob": "^3.2.11",
|
||||||
|
"jsonc-parser": "^3.0.0",
|
||||||
|
"proper-lockfile": "^4.1.2"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"wireit": "bin/wireit.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14.14.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/word-wrap": {
|
"node_modules/word-wrap": {
|
||||||
"version": "1.2.3",
|
"version": "1.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
|
||||||
|
@ -23915,6 +23961,12 @@
|
||||||
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
|
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"jsonc-parser": {
|
||||||
|
"version": "3.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz",
|
||||||
|
"integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"jsonfile": {
|
"jsonfile": {
|
||||||
"version": "6.1.0",
|
"version": "6.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
|
||||||
|
@ -25262,6 +25314,17 @@
|
||||||
"warning": "^4.0.0"
|
"warning": "^4.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"proper-lockfile": {
|
||||||
|
"version": "4.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz",
|
||||||
|
"integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"graceful-fs": "^4.2.4",
|
||||||
|
"retry": "^0.12.0",
|
||||||
|
"signal-exit": "^3.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"proxy-from-env": {
|
"proxy-from-env": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz",
|
||||||
|
@ -25808,6 +25871,12 @@
|
||||||
"integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
|
"integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"retry": {
|
||||||
|
"version": "0.12.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz",
|
||||||
|
"integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"reusify": {
|
"reusify": {
|
||||||
"version": "1.0.4",
|
"version": "1.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
|
||||||
|
@ -28005,6 +28074,19 @@
|
||||||
"is-symbol": "^1.0.3"
|
"is-symbol": "^1.0.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"wireit": {
|
||||||
|
"version": "0.7.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/wireit/-/wireit-0.7.1.tgz",
|
||||||
|
"integrity": "sha512-TwuKae0aHk06DZ2omLW6YF4Y74YxCyuRCcsjZMm+cUPRXhvxAU2JhYyuCvD9wIALWK+cQUpB9GjeRFPRAbKsdw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"braces": "^3.0.2",
|
||||||
|
"chokidar": "^3.5.3",
|
||||||
|
"fast-glob": "^3.2.11",
|
||||||
|
"jsonc-parser": "^3.0.0",
|
||||||
|
"proper-lockfile": "^4.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"word-wrap": {
|
"word-wrap": {
|
||||||
"version": "1.2.3",
|
"version": "1.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
|
||||||
|
|
|
@ -21,7 +21,8 @@
|
||||||
"husky": "^8.0.1",
|
"husky": "^8.0.1",
|
||||||
"lint-staged": "^13.0.3",
|
"lint-staged": "^13.0.3",
|
||||||
"prettier": "^2.7.1",
|
"prettier": "^2.7.1",
|
||||||
"typescript": "^4.8.3"
|
"typescript": "^4.8.3",
|
||||||
|
"wireit": "^0.7.1"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{js,jsx,mjs,ts,tsx}": "eslint --cache --fix"
|
"*.{js,jsx,mjs,ts,tsx}": "eslint --cache --fix"
|
||||||
|
|
Loading…
Reference in a new issue