Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions core/trino-web-ui/src/main/resources/allowed-licenses.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"0BSD"
"Apache-2.0"
"BSD-2-Clause"
"BSD-3-Clause"
"CC-BY-4.0"
"ISC"
"MIT"
"MIT AND ISC"
"OFL-1.1"
"Python-2.0"
"Unlicense"

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
"preview": "vite preview",
"prettier:format": "prettier --write \"./src/**/*.{ts,tsx}\"",
"prettier:check": "prettier --check \"./src/**/*.{ts,tsx}\"",
"check": "npm install && npm run lint && npm run prettier:check",
"check:clean": "npm clean-install && npm run lint && npm run prettier:check"
"check": "npm install && npm run lint && npm run prettier:check && npm run check:licenses",
"check:clean": "npm clean-install && npm run lint && npm run prettier:check && npm run check:licenses",
"check:licenses": "USED_LICENSES=$(mktemp); jq '.packages | to_entries | map(select(.key != \"\") | .value.license)[]' package-lock.json | sort -u > $USED_LICENSES; if DIFFERENCES=$(grep -Fvxf ../allowed-licenses.txt $USED_LICENSES); then echo '\\033[0;31mLicense found in package-lock.json that is not in allowed-licenses.txt' >&2; echo $DIFFERENCES; exit 1; fi"
},
"dependencies": {
"@dagrejs/dagre": "^1.1.5",
Expand All @@ -36,6 +37,7 @@
"zustand": "^5.0.8"
},
"devDependencies": {
"@bithero/monaco-editor-vite-plugin": "^1.0.2",
"@eslint/js": "^9.36.0",
"@types/lodash": "^4.17.20",
"@types/lodash.merge": "^4.6.9",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ConfigEnv, defineConfig, loadEnv } from 'vite'
import { monaco } from '@bithero/monaco-editor-vite-plugin';
import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
Expand All @@ -9,7 +10,7 @@ export default defineConfig((mode: ConfigEnv) => {
const baseUrl = env.VITE_BASE_URL
return {
base: '/ui/preview',
plugins: [react()],
plugins: [react(), monaco({features: [], languages: ['java', 'json', 'sql']})], // stacktrace, query/task plans, sql
server: {
proxy: {
['/ui/preview/auth']: {
Expand Down
5 changes: 3 additions & 2 deletions core/trino-web-ui/src/main/resources/webapp/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@
"package:clean": "npm clean-install && webpack --config webpack.config.js",
"watch": "npm clean-install && webpack --config webpack.config.js --watch",
"flow": "flow",
"check": "npm install && flow && prettier --check **/*.js **/*.jsx *.js *.jsx",
"check:clean": "npm clean-install && flow && prettier --check **/*.js **/*.jsx *.js *.jsx",
"check": "npm install && flow && prettier --check **/*.js **/*.jsx *.js *.jsx && npm run check:licenses",
"check:clean": "npm clean-install && flow && prettier --check **/*.js **/*.jsx *.js *.jsx && npm run check:licenses",
"check:licenses": "TEMP=$(mktemp); jq .packages[].license package-lock.json | grep -v 'null' | sort -u > $TEMP; if DIFFERENCES=$(grep -vxfF ../../allowed-licenses.txt $TEMP); then echo '\\033[0;31mLicense found in package-lock.json that is not in allowed-licenses.txt' >&2; echo $DIFFERENCES; exit 1; fi",
"format": "prettier --write **/*.js **/*.jsx *.js *.jsx",
"lint": "prettier --check **/*.js **/*.jsx"
}
Expand Down
Loading