Upgrade build system base versions
This commit is contained in:
parent
5922c28fa7
commit
ace3d53a2e
|
@ -54,6 +54,7 @@ db.sqlite3-journal
|
||||||
# React
|
# React
|
||||||
.DS_*
|
.DS_*
|
||||||
*.log
|
*.log
|
||||||
|
*.tsbuildinfo
|
||||||
logs
|
logs
|
||||||
**/*.backup.*
|
**/*.backup.*
|
||||||
**/*.back.*
|
**/*.back.*
|
||||||
|
|
36
.github/workflows/frontend.yml
vendored
36
.github/workflows/frontend.yml
vendored
|
@ -9,35 +9,35 @@ defaults:
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
branches: ["main"]
|
||||||
paths:
|
paths:
|
||||||
- rsconcept/frontend/**
|
- rsconcept/frontend/**
|
||||||
- .github/workflows/frontend.yml
|
- .github/workflows/frontend.yml
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "main" ]
|
branches: ["main"]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [18.x]
|
node-version: [22.x]
|
||||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
cache-dependency-path: rsconcept/frontend/package-lock.json
|
cache-dependency-path: rsconcept/frontend/package-lock.json
|
||||||
cache: 'npm'
|
cache: "npm"
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
npm install -g typescript vite jest
|
||||||
npm run build --if-present
|
npm ci
|
||||||
- name: Test
|
npm run build --if-present
|
||||||
run: |
|
- name: Test
|
||||||
npm test
|
run: |
|
||||||
|
npm test
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -47,6 +47,7 @@ db.sqlite3-journal
|
||||||
# React
|
# React
|
||||||
.DS_*
|
.DS_*
|
||||||
*.log
|
*.log
|
||||||
|
*.tsbuildinfo
|
||||||
logs
|
logs
|
||||||
**/*.backup.*
|
**/*.backup.*
|
||||||
**/*.back.*
|
**/*.back.*
|
||||||
|
|
|
@ -2,4 +2,3 @@
|
||||||
|
|
||||||
VITE_PORTAL_BACKEND=http://localhost:8000
|
VITE_PORTAL_BACKEND=http://localhost:8000
|
||||||
VITE_PORTAL_FRONT_PORT=3000
|
VITE_PORTAL_FRONT_PORT=3000
|
||||||
VITE_PORTAL_FRONT_HTTPS=false
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# ======== Multi-stage base ==========
|
# ======== Multi-stage base ==========
|
||||||
FROM node:20-bullseye-slim AS node-base
|
FROM node:22-bookworm-slim AS node-base
|
||||||
RUN apt-get update -qq && \
|
RUN apt-get update -qq && \
|
||||||
apt-get upgrade -y && \
|
apt-get upgrade -y && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
@ -10,10 +10,14 @@ FROM node-base AS builder
|
||||||
|
|
||||||
WORKDIR /result
|
WORKDIR /result
|
||||||
|
|
||||||
|
RUN npm install -g typescript vite
|
||||||
|
|
||||||
COPY ./ ./
|
COPY ./ ./
|
||||||
COPY ./env/.env.$BUILD_TYPE ./
|
COPY ./env/.env.$BUILD_TYPE ./
|
||||||
RUN rm -rf ./env
|
RUN rm -rf ./env
|
||||||
|
|
||||||
RUN npm ci
|
RUN npm ci
|
||||||
|
|
||||||
ENV NODE_ENV production
|
ENV NODE_ENV production
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
|
|
1
rsconcept/frontend/env/.env.development
vendored
1
rsconcept/frontend/env/.env.development
vendored
|
@ -2,4 +2,3 @@
|
||||||
|
|
||||||
VITE_PORTAL_BACKEND=http://localhost:8002
|
VITE_PORTAL_BACKEND=http://localhost:8002
|
||||||
VITE_PORTAL_FRONT_PORT=3002
|
VITE_PORTAL_FRONT_PORT=3002
|
||||||
VITE_PORTAL_FRONT_HTTPS=false
|
|
||||||
|
|
1
rsconcept/frontend/env/.env.production
vendored
1
rsconcept/frontend/env/.env.production
vendored
|
@ -2,4 +2,3 @@
|
||||||
|
|
||||||
VITE_PORTAL_BACKEND=https://api.portal.acconcept.ru
|
VITE_PORTAL_BACKEND=https://api.portal.acconcept.ru
|
||||||
VITE_PORTAL_FRONT_PORT=443
|
VITE_PORTAL_FRONT_PORT=443
|
||||||
VITE_PORTAL_FRONT_HTTPS=true
|
|
||||||
|
|
1
rsconcept/frontend/env/.env.production.local
vendored
1
rsconcept/frontend/env/.env.production.local
vendored
|
@ -2,5 +2,4 @@
|
||||||
|
|
||||||
VITE_PORTAL_BACKEND=https://localhost:8001
|
VITE_PORTAL_BACKEND=https://localhost:8001
|
||||||
VITE_PORTAL_FRONT_PORT=3001
|
VITE_PORTAL_FRONT_PORT=3001
|
||||||
VITE_PORTAL_FRONT_HTTPS=true
|
|
||||||
|
|
||||||
|
|
1305
rsconcept/frontend/package-lock.json
generated
1305
rsconcept/frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -11,7 +11,7 @@ import { OssLoader } from '@/models/OssLoader';
|
||||||
function useOssDetails({ target }: { target?: string }) {
|
function useOssDetails({ target }: { target?: string }) {
|
||||||
const { loading: userLoading } = useAuth();
|
const { loading: userLoading } = useAuth();
|
||||||
const [schema, setInner] = useState<IOperationSchema | undefined>(undefined);
|
const [schema, setInner] = useState<IOperationSchema | undefined>(undefined);
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(target != undefined);
|
||||||
const [error, setError] = useState<ErrorData>(undefined);
|
const [error, setError] = useState<ErrorData>(undefined);
|
||||||
|
|
||||||
function setSchema(data?: IOperationSchemaData) {
|
function setSchema(data?: IOperationSchemaData) {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es6",
|
"target": "ES2022",
|
||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
"lib": ["ES2020", "dom", "dom.iterable"],
|
"lib": ["ES2022", "dom", "dom.iterable"],
|
||||||
"module": "esnext",
|
"module": "ES2022",
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
|
|
||||||
|
|
|
@ -16,13 +16,11 @@ export default ({ mode }: { mode: string }) => {
|
||||||
...process.env,
|
...process.env,
|
||||||
...loadEnv(mode, process.cwd())
|
...loadEnv(mode, process.cwd())
|
||||||
};
|
};
|
||||||
const enableHttps = process.env.VITE_PORTAL_FRONT_HTTPS === 'true';
|
|
||||||
return defineConfig({
|
return defineConfig({
|
||||||
appType: 'spa',
|
appType: 'spa',
|
||||||
plugins: [react(), muteWarningsPlugin(warningsToIgnore)],
|
plugins: [react(), muteWarningsPlugin(warningsToIgnore)],
|
||||||
server: {
|
server: {
|
||||||
port: Number(process.env.VITE_PORTAL_FRONT_PORT),
|
port: Number(process.env.VITE_PORTAL_FRONT_PORT)
|
||||||
https: enableHttps
|
|
||||||
},
|
},
|
||||||
publicDir: 'public',
|
publicDir: 'public',
|
||||||
build: {
|
build: {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user