Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
13 changes: 7 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ services:
entrypoint: >
bash -c "
sleep 10;
echo yes | redis-cli --user openvsx --cluster create
redis-node-1:7000 redis-node-2:7000 redis-node-3:7000
redis-node-4:7000 redis-node-5:7000 redis-node-6:7000
echo yes | redis-cli --user openvsx --cluster create
redis-node-1:7000 redis-node-2:7000 redis-node-3:7000
redis-node-4:7000 redis-node-5:7000 redis-node-6:7000
--cluster-replicas 1"
profiles:
- redis
Expand Down Expand Up @@ -218,13 +218,14 @@ services:
profiles:
- openvsx
- backend

webui:
image: node:18
image: node:22
working_dir: /app
command: sh -c 'yarn && yarn build && yarn build:default && yarn watch & yarn watch:default & yarn start:default'
command: sh -c 'yarn install && yarn watch:default'
volumes:
- ./webui:/app
- /app/node_modules
ports:
- 3000:3000
depends_on:
Expand Down
1 change: 1 addition & 0 deletions webui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
!.yarn/releases
!.yarn/sdks
!.yarn/versions
/dist/
/lib/
/static/bundle.*
/static/*-report.html
Expand Down
10 changes: 5 additions & 5 deletions webui/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM node:20-alpine3.17 AS builder
FROM node:22-alpine3.22 AS builder

# Copy sources
COPY --chown=node:node package.json tsconfig.json yarn.lock .yarnrc.yml /home/node/builder/
COPY --chown=node:node package.json tsconfig.json vite.config.ts yarn.lock .yarnrc.yml /home/node/builder/
WORKDIR /home/node/builder
COPY --chown=node:node .yarn ./.yarn/
COPY --chown=node:node configs ./configs/
COPY --chown=node:node index.html ./
COPY --chown=node:node src ./src/
COPY --chown=node:node static ./static/
COPY --chown=node:node test ./test/
Expand All @@ -14,14 +15,13 @@ RUN corepack enable
RUN corepack prepare yarn@stable --activate
RUN yarn install --immutable
RUN yarn test
RUN yarn build
RUN yarn build:default


FROM node:20-alpine3.17
FROM node:22-alpine3.22

# Copy build result to runtime directory
COPY --chown=node:node --from=builder /home/node/builder/static /home/node/webui/static/
COPY --chown=node:node --from=builder /home/node/builder/dist /home/node/webui/dist/
COPY --chown=node:node --from=builder /home/node/builder/lib/default/server.js /home/node/webui/lib/default/
WORKDIR /home/node/webui

Expand Down
12 changes: 12 additions & 0 deletions webui/configs/app.tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "./base.tsconfig.json",
"compilerOptions": {
"noEmit": true
},
"include": [
"../src/**/*"
],
"exclude": [
"../src/default/server.ts"
]
}
44 changes: 22 additions & 22 deletions webui/configs/base.tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
"compilerOptions": {
"target": "es6",
"module": "es6",
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"lib": [
"es6", "es2020.string", "dom"
],
"typeRoots": [
"node_modules/@types", "typings"
],
"sourceMap": true,
"declaration": true,
"declarationMap": true,
"noImplicitAny": true,
"noImplicitThis": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"strictNullChecks": true,
"jsx": "react",
"baseUrl": "./src"
}
"compilerOptions": {
"target": "es6",
"module": "es6",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true,
"lib": [
"es6", "es2020.string", "dom"
],
"typeRoots": [
"node_modules/@types", "typings"
],
"sourceMap": true,
"declaration": true,
"declarationMap": true,
"noImplicitAny": true,
"noImplicitThis": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"strictNullChecks": true,
"jsx": "react-jsx",
"baseUrl": "./src"
}
}
1 change: 1 addition & 0 deletions webui/configs/eslintrc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export default [...compat.extends(
"@/semi": ["error", "always"],
"@stylistic/type-annotation-spacing": "warn",
"react/prop-types": "off",
"react/react-in-jsx-scope": ["off"],
"array-bracket-spacing": ["warn", "never"],

"arrow-spacing": ["warn", {
Expand Down
12 changes: 12 additions & 0 deletions webui/configs/lib.tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "./base.tsconfig.json",
"compilerOptions": {
"outDir": "../lib"
},
"include": [
"../src/**/*"
],
"exclude": [
"../src/default/server.ts"
]
}
27 changes: 27 additions & 0 deletions webui/configs/node.tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"compilerOptions": {
"target": "ESNext",

"lib": [
"ESNext"
],

"module": "ESNext",
"skipLibCheck": true,

"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"moduleDetection": "force",
"noEmit": true,

"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},

"include": [
"../vite.config.ts",
"../configs/**.ts"
]
}
19 changes: 10 additions & 9 deletions webui/configs/server.tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"extends": "./base.tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"outDir": "../lib/default"
},
"files": [
"../src/default/server.ts"
]
"extends": "./base.tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"lib": ["es6"],
"outDir": "../lib/default"
},
"files": [
"../src/default/server.ts"
]
}
3 changes: 2 additions & 1 deletion webui/configs/test.tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "./base.tsconfig.json",
"compilerOptions": {
"module": "commonjs"
"module": "commonjs",
"moduleResolution": "node"
},
"include": [
"src", "test", "typings"
Expand Down
45 changes: 45 additions & 0 deletions webui/configs/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"compilerOptions": {
"target": "es6",
"module": "es6",

"lib": [
"es6", "es2020.string", "dom"
],
"typeRoots": [
"node_modules/@types", "typings"
],

"sourceMap": true,
"declaration": true,
"declarationMap": true,
"esModuleInterop": true,

"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"allowSyntheticDefaultImports": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",

"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": false,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitThis": true,
"noImplicitReturns": true,
"strictNullChecks": true,

"baseUrl": "./src"
},

"include": [
"../src", "../typings"
],

"exclude": [
"**/*.spec.ts", "**/*.spec.tsx", "**/server.ts"
]
}
42 changes: 0 additions & 42 deletions webui/configs/webpack.config.js

This file was deleted.

15 changes: 15 additions & 0 deletions webui/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
</head>

<body>
<div id="main"></div>
<script type='module' src='/src/default/default-app.tsx'></script>
</body>

</html>
Loading