Skip to content
Merged
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
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ updates:
update-types: ["version-update:semver-major"]
versioning-strategy: increase
target-branch: dev
- package-ecosystem: "npm"
directory: "/client-v3"
schedule:
interval: "daily"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
versioning-strategy: increase
target-branch: dev
- package-ecosystem: "npm"
directory: "/electron"
schedule:
Expand Down
3 changes: 3 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ labels:
- label: "client"
files:
- "electron/.*"
- label: "client-v3"
files:
- "client-v3/.*"
- label: "server"
files:
- "server/.*"
17 changes: 17 additions & 0 deletions .github/workflows/build-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,23 @@ jobs:
cd client
npm run build

- name: Setup Node.js (V3)
uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'npm'
cache-dependency-path: 'client-v3/package-lock.json'

- name: Install dependencies (V3)
run: |
cd client-v3
npm ci

- name: Build frontend (V3)
run: |
cd client-v3
npm run build

- name: Upload frontend build
uses: actions/upload-artifact@v4
with:
Expand Down
22 changes: 21 additions & 1 deletion .github/workflows/client-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
on: [pull_request]

permissions:
checks: write

Check warning on line 6 in .github/workflows/client-test.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Move this write permission from workflow level to job level.

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZ5Xc-MBqJQ-O8gWI1As&open=AZ5Xc-MBqJQ-O8gWI1As&pullRequest=1078
pull-requests: write

Check warning on line 7 in .github/workflows/client-test.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Move this write permission from workflow level to job level.

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZ5Xc-MBqJQ-O8gWI1At&open=AZ5Xc-MBqJQ-O8gWI1At&pullRequest=1078

jobs:
run-client-tests:
Expand All @@ -26,4 +26,24 @@
if: always()
with:
check_name: 'Client Test Results'
junit_files: '**/client/junit/*.xml'
junit_files: '**/client/junit/*.xml'
run-client-v3-tests:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./client-v3
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 24
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test:run
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
check_name: 'Client V3 Test Results'
junit_files: '**/client-v3/junit/*.xml'
25 changes: 25 additions & 0 deletions .github/workflows/nodelint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,28 @@ jobs:
node-version: 24
- run: npm ci
- run: npm run typecheck
run-node-lint-client-v3:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./client-v3
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
- run: npm ci
- run: npm run ci-lint
run-typecheck-client-v3:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./client-v3
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
- run: npm ci
- run: npm run typecheck

20 changes: 14 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
FROM node:24-bookworm AS node_build
FROM node:24-bookworm AS build_v2

# npm 11 bundled with Node 24, no separate install needed
RUN mkdir -p /server/static

COPY /client/package.json /client/package.json
COPY /client/package-lock.json /client/package-lock.json
COPY /client/.npmrc /client/.npmrc
Expand All @@ -12,7 +10,15 @@ COPY /client /client
COPY /docs /docs
RUN npm run build

COPY /server /server
FROM node:24-bookworm AS build_v3

RUN mkdir -p /server/static/ui-new
COPY /client-v3/package.json /client-v3/package.json
COPY /client-v3/package-lock.json /client-v3/package-lock.json
WORKDIR /client-v3
RUN npm ci
COPY /client-v3 /client-v3
RUN npm run build

FROM python:3.13-bookworm

Expand All @@ -22,8 +28,10 @@ RUN pip install -r requirements.txt
RUN apt update
RUN apt install -y nano

COPY --from=node_build /server /server
COPY /server /server
COPY --from=build_v2 /server/static /server/static
COPY --from=build_v3 /server/static/ui-new /server/static/ui-new
WORKDIR /server
RUN mkdir conf
EXPOSE 8080
ENTRYPOINT ["python3", "main.py"]
ENTRYPOINT ["python3", "main.py"]
7 changes: 7 additions & 0 deletions client-v3/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules/
dist/
dist-electron/
junit/
coverage/
*.backup
components.d.ts
13 changes: 13 additions & 0 deletions client-v3/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Dependencies
node_modules/

# Build outputs
dist/
../server/static/

# Test outputs
coverage/
junit/

# Backups
*.backup
97 changes: 97 additions & 0 deletions client-v3/eslint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import js from '@eslint/js';
import pluginVue from 'eslint-plugin-vue';
import vueParser from 'vue-eslint-parser';
import globals from 'globals';
import tsParser from '@typescript-eslint/parser';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import prettierConfig from 'eslint-config-prettier';
import prettierPlugin from 'eslint-plugin-prettier';
import tseslint from 'typescript-eslint';

const sharedRules = {
'prettier/prettier': 'error',
...prettierConfig.rules,
'max-len': 'off',
'no-unused-vars': 'off',
'vue/no-unused-vars': 'off',
'no-plusplus': 'off',
'no-param-reassign': [
'error',
{
props: true,
ignorePropertyModificationsFor: ['state', 'acc', 'e'],
},
],
};

const tsRules = {
...Object.assign({}, ...tseslint.configs.recommended.map((c) => c.rules ?? {})),
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
};

const sharedGlobals = {
...globals.browser,
...globals.node,
...globals.es2021,
};

export default [
{
ignores: [
'**/node_modules/**',
'**/dist/**',
'../server/static/**',
'junit/**',
'*.backup',
],
},
js.configs.recommended,
...pluginVue.configs['flat/recommended'],
// TypeScript source files
{
files: ['**/*.ts'],
plugins: {
'@typescript-eslint': tsPlugin,
prettier: prettierPlugin,
},
languageOptions: {
parser: tsParser,
parserOptions: { ecmaVersion: 2022, sourceType: 'module' },
globals: sharedGlobals,
},
rules: { ...tsRules, ...sharedRules },
},
// Vue SFCs — all use <script lang="ts">
{
files: ['**/*.vue'],
plugins: {
'@typescript-eslint': tsPlugin,
prettier: prettierPlugin,
},
languageOptions: {
parser: vueParser,
parserOptions: {
parser: tsParser,
ecmaVersion: 2022,
sourceType: 'module',
},
globals: sharedGlobals,
},
rules: { ...tsRules, ...sharedRules },
},
// Test files — declare vitest globals
{
files: ['**/*.test.ts'],
languageOptions: {
globals: {
describe: 'readonly',
it: 'readonly',
expect: 'readonly',
vi: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly',
},
},
},
];
12 changes: 12 additions & 0 deletions client-v3/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>DigiScript</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="./src/main.ts"></script>
</body>
</html>
Loading
Loading