build(deps): 更新依赖并调整项目配置

- 更新 @arco-design/web-vue 到 2.57.0
- 更新 axios 到 1.8.4
- 更新 echarts 到 5.6.0
- 更新 pinia 到 2.3.1
- 更新 rollup 到 4.38.0
- 更新 TypeScript 相关依赖
- 更新 ESLint 和 Stylelint 相关依赖
- 更新 Vite 到 5.4.15
- 添加 pnpm-workspace.yaml 配置
- 调整 .gitignore 和 .husky/pre-commit
- 修改 tsconfig.json 和 stylelint.config.js
This commit is contained in:
danial
2025-03-30 15:31:53 +08:00
parent fe1c0d69ff
commit 0ef83a6e62
12 changed files with 1430 additions and 1309 deletions

View File

@@ -1,194 +0,0 @@
---
kind: pipeline
type: ssh
name: master-machine
server:
host: 121.37.253.228
user: www
password:
from_secret: www_password
clone:
depth: 1
steps:
- name: build new image
commands:
- VERSION=${DRONE_BRANCH}${DRONE_BUILD_NUMBER} docker compose -f ./deploy/docker-compose.yml build --build-arg USE_PROXY=1 --no-cache
- name: clean old container
commands:
- VERSION=${DRONE_BRANCH}${DRONE_BUILD_NUMBER} docker container inspect kami_frontend &> /dev/null && docker container rm -f kami_frontend
- name: start new container
commands:
- echo start build
- VERSION=${DRONE_BRANCH}${DRONE_BUILD_NUMBER} docker compose -f ./deploy/docker-compose.yml -p kami_frontend up -d
# - name: clean old image and container
# commands:
# - docker images --filter "dangling=true" -q | xargs -r docker rmi -f
# - docker images --filter "label=none" -q | xargs -r docker rmi -f
trigger:
branch:
- develop
- production
when:
event:
- push
---
kind: pipeline
type: ssh
name: 绝技服务器
server:
host: 43.133.200.219
user: ubuntu
password:
from_secret: flower
clone:
depth: 1
steps:
- name: build new image
commands:
- VERSION=${DRONE_BRANCH}${DRONE_BUILD_NUMBER} docker compose -f ./deploy/docker-compose.yml build --no-cache
- name: clean old continaer
commands:
- VERSION=${DRONE_BRANCH}${DRONE_BUILD_NUMBER} docker container inspect kami_frontend &> /dev/null && docker container rm -f kami_frontend
- name: start new container
commands:
- echo start build
- VERSION=${DRONE_BRANCH}${DRONE_BUILD_NUMBER} docker compose -f ./deploy/docker-compose.yml -p kami_frontend up -d
# - name: clean old image and container
# commands:
# - docker images --filter "dangling=true" -q | xargs -r docker rmi -f
# - docker images --filter "label=none" -q | xargs -r docker rmi -f
trigger:
status:
- success
- failure
branch:
- production
when:
event:
- push
---
kind: pipeline
type: ssh
name: 小L的服务器
server:
host: 43.130.238.110
user: ubuntu
password:
from_secret: ubuntu_L
clone:
depth: 1
steps:
- name: build new image
commands:
- VERSION=${DRONE_BRANCH}${DRONE_BUILD_NUMBER} docker compose -f ./deploy/docker-compose.yml build --no-cache
- name: clean old continaer
commands:
- VERSION=${DRONE_BRANCH}${DRONE_BUILD_NUMBER} docker container inspect kami_frontend &> /dev/null && docker container rm -f kami_frontend
- name: start new container
commands:
- echo start build
- VERSION=${DRONE_BRANCH}${DRONE_BUILD_NUMBER} docker compose -f ./deploy/docker-compose.yml -p kami_frontend up -d
# - name: clean old image and container
# commands:
# - docker images --filter "dangling=true" -q | xargs -r docker rmi -f
# - docker images --filter "label=none" -q | xargs -r docker rmi -f
trigger:
branch:
- production
status:
- success
- failure
when:
event:
- push
---
kind: pipeline
type: ssh
name: 泼兔的服务器
server:
host: 43.163.223.93
user: ubuntu
password:
from_secret: ubuntu-crazy_rabbit
clone:
depth: 1
steps:
- name: build new image
commands:
- VERSION=${DRONE_BRANCH}${DRONE_BUILD_NUMBER} docker compose -f ./deploy/docker-compose.yml build --no-cache
- name: clean old continaer
commands:
- VERSION=${DRONE_BRANCH}${DRONE_BUILD_NUMBER} docker container inspect kami_frontend &> /dev/null && docker container rm -f kami_frontend
- name: start new container
commands:
- echo start build
- VERSION=${DRONE_BRANCH}${DRONE_BUILD_NUMBER} docker compose -f ./deploy/docker-compose.yml -p kami_frontend up -d
# - name: clean old image and container
# commands:
# - docker images --filter "dangling=true" -q | xargs -r docker rmi -f
# - docker images --filter "label=none" -q | xargs -r docker rmi -f
trigger:
status:
- success
- failure
branch:
- production
when:
event:
- push
---
kind: pipeline
type: docker
name: server酱微信通知
depends_on:
- 泼兔的服务器
- 小L的服务器
- 绝技服务器
- master-machine
steps:
- name: send-wechat
image: plugins/webhook
pull: if-not-exists
settings:
urls: https://open.feishu.cn/open-apis/bot/v2/hook/1f4a9795-84a9-4cc5-b2c5-0bf05686336b
content_type: application/json
template: |
{
"msg_type":"text",
"content":
{
"text": "项目名称: ${DRONE_REPO_NAME}\n分支${DRONE_BRANCH}\n构建编号${DRONE_BUILD_NUMBER}\n项目构建状态{{ build.status }}"
}
}
trigger:
branch:
- develop
- production
status:
- success
- failure
when:
event:
- push

2
.gitignore vendored
View File

@@ -4,4 +4,4 @@ dist
dist-ssr
*.local
/.vscode/
.idea
/.idea/

View File

@@ -1 +0,0 @@
pnpm commitlint --edit $1

View File

@@ -1 +1 @@
npm run lint-staged
pnpm lint-staged

View File

@@ -1,5 +1,5 @@
{
"typescript.tsdk": "node_modules\\typescript\\lib",
"typescript.tsdk": "node_modules/typescript/lib",
"vue3snippets.enable-compile-vue-file-on-did-save-code": true,
"terminal.integrated.enableImages": true,
"diffEditor.codeLens": true

27
Jenkinsfile vendored
View File

@@ -1,27 +0,0 @@
pipeline {
agent none
stages {
stage('Build Image With localhost') {
agent { label 'LocalHost' } // 在标签为'linux-build'的节点上执行
steps {
script {
try {
echo 'Start Build'
sh "docker ps -a --format '{{.ID}} {{.Names}}' | awk '{if (\$2 !~ /^1Panel-jenkins/) print \$1}' | xargs -r docker stop"
sh 'docker compose -f ./deploy/docker-compose.yml up -d --build'
sh 'docker start \$(docker ps -a -q)'
sh "docker restart \$(docker ps -a | grep kami_ | awk '{print \$1}')"
echo 'Build success'
} catch (err) {
echo err.getMessage()
}
}
}
post { // 添加post指令处理阶段完成后的情况
failure {
echo 'Build failed, but continuing to the next stage...'
}
}
}
}
}

View File

@@ -40,29 +40,29 @@
]
},
"dependencies": {
"@arco-design/web-vue": "^2.56.3",
"@arco-design/web-vue": "^2.57.0",
"@codemirror/commands": "^6.8.0",
"@codemirror/lang-css": "^6.3.1",
"@codemirror/lang-javascript": "^6.2.2",
"@codemirror/language": "^6.10.8",
"@codemirror/lang-javascript": "^6.2.3",
"@codemirror/language": "^6.11.0",
"@codemirror/language-data": "^6.5.1",
"@codemirror/theme-one-dark": "^6.1.2",
"@codemirror/view": "^6.36.2",
"@milkdown/kit": "^7.6.1",
"@milkdown/theme-nord": "^7.6.1",
"@milkdown/vue": "^7.6.1",
"@codemirror/view": "^6.36.5",
"@milkdown/kit": "^7.7.0",
"@milkdown/theme-nord": "^7.7.0",
"@milkdown/vue": "^7.7.0",
"@vueuse/core": "^10.11.1",
"axios": "^1.7.9",
"axios": "^1.8.4",
"codemirror": "^6.0.1",
"crypto-js": "^4.2.0",
"dayjs": "^1.11.13",
"echarts": "^5.5.1",
"echarts": "^5.6.0",
"lodash": "^4.17.21",
"mitt": "^3.0.1",
"nprogress": "^0.2.0",
"pinia": "^2.3.0",
"pinia": "^2.3.1",
"query-string": "^9.1.1",
"rollup": "^4.28.1",
"rollup": "^4.38.0",
"sortablejs": "^1.15.6",
"vue": "^3.5.13",
"vue-echarts": "^6.7.3",
@@ -70,48 +70,50 @@
},
"devDependencies": {
"@arco-plugins/vite-vue": "^1.4.5",
"@commitlint/cli": "^19.6.1",
"@commitlint/config-conventional": "^19.6.0",
"@commitlint/types": "^19.5.0",
"@eslint/js": "^9.17.0",
"@commitlint/cli": "^19.8.0",
"@commitlint/config-conventional": "^19.8.0",
"@commitlint/types": "^19.8.0",
"@eslint/js": "^9.23.0",
"@types/crypto-js": "^4.2.2",
"@types/lodash": "^4.17.13",
"@types/lodash": "^4.17.16",
"@types/mockjs": "^1.0.10",
"@types/node": "^22.10.7",
"@types/node": "^22.13.14",
"@types/nprogress": "^0.2.3",
"@types/sortablejs": "^1.15.8",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/parser": "^8.18.1",
"@vitejs/plugin-vue": "^5.2.1",
"@vitejs/plugin-vue-jsx": "^4.1.1",
"autoprefixer": "^10.4.20",
"consola": "^3.2.3",
"@typescript-eslint/eslint-plugin": "^8.28.0",
"@typescript-eslint/parser": "^8.28.0",
"@vitejs/plugin-vue": "^5.2.3",
"@vitejs/plugin-vue-jsx": "^4.1.2",
"autoprefixer": "^10.4.21",
"consola": "^3.4.2",
"cross-env": "^7.0.3",
"eslint": "^9.17.0",
"eslint": "^9.23.0",
"eslint-config-prettier": "^9.1.0",
"eslint-define-config": "^2.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-vue": "^9.32.0",
"eslint-plugin-prettier": "^5.2.5",
"eslint-plugin-vue": "^9.33.0",
"husky": "^9.1.7",
"less": "^4.2.1",
"lint-staged": "^15.2.11",
"less": "^4.2.2",
"lint-staged": "^15.5.0",
"mockjs": "^1.1.0",
"postcss-html": "^1.7.0",
"prettier": "^3.4.2",
"postcss-html": "^1.8.0",
"prettier": "^3.5.3",
"rollup-plugin-visualizer": "^5.12.0",
"stylelint": "^16.12.0",
"stylelint": "^16.17.0",
"stylelint-config-recess-order": "^5.1.1",
"stylelint-config-recommended-vue": "^1.5.0",
"stylelint-config-recommended-vue": "^1.6.0",
"stylelint-config-standard": "^37.0.0",
"stylelint-config-standard-less": "^3.0.1",
"stylelint-prettier": "^5.0.2",
"typescript": "^5.7.2",
"stylelint-config-standard-vue": "^1.0.0",
"stylelint-prettier": "^5.0.3",
"typescript": "^5.8.2",
"unplugin-vue-components": "^0.27.5",
"vite": "^5.4.11",
"vite": "^5.4.15",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-imagemin": "^0.6.1",
"vite-svg-loader": "^5.1.0",
"vue-eslint-parser": "^9.4.3",
"vue-tsc": "^2.1.10"
"vue-tsc": "^2.2.8"
},
"engines": {
"node": "^18.0.0 || >=20.0.0",
@@ -120,5 +122,6 @@
"resolutions": {
"bin-wrapper": "npm:bin-wrapper-china",
"gifsicle": "5.2.0"
}
},
"packageManager": "pnpm@10.7.0+sha512.6b865ad4b62a1d9842b61d674a393903b871d9244954f652b8842c2b553c72176b278f64c463e52d40fff8aba385c235c8c9ecf5cc7de4fd78b8bb6d49633ab6"
}

2410
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

2
pnpm-workspace.yaml Normal file
View File

@@ -0,0 +1,2 @@
ignoredBuiltDependencies:
- vue-echarts

View File

@@ -154,9 +154,13 @@
<template #operation="{ record }">
<a-space size="small">
<a-tooltip content="刷新调度">
<a-button size="small" @click="resetStatus(record.orderNo)">
<a-button
size="small"
status="warning"
@click="resetStatus(record.orderNo)"
>
<template #icon>
<icon-list />
<icon-refresh />
</template>
</a-button>
</a-tooltip>
@@ -313,8 +317,8 @@ const generateFormModel = () => {
};
};
const resetStatus = async (orderNo: string) => {
await apiClient
const resetStatus = (orderNo: string) => {
apiClient
.apiCardInfoWalmartAccountStatusResetPut({ id: orderNo })
.then(() => {
Message.success('重置成功');

View File

@@ -1,14 +1,12 @@
/** @type {import("stylelint").Config} */
export default {
defaultSeverity: 'warning',
extends: [
'stylelint-config-standard',
'stylelint-config-html/vue',
'stylelint-config-recess-order'
],
extends: ['stylelint-config-standard', 'stylelint-config-standard-vue'],
plugins: ['stylelint-order', 'stylelint-less', 'stylelint-prettier'],
rules: {
// 禁止空代码
'at-rule-no-unknown': null,
'no-descending-specificity': null,
'no-empty-source': null,
// 禁止在覆盖高特异性选择器之后出现低特异性选择器
'no-descending-specificity': null,

View File

@@ -29,7 +29,7 @@
"@/*": ["src/*"],
"@config/*": ["config/*"]
},
"types": ["vite/client", "node"]
"types": ["vite/client", "node"]
},
"include": ["src/**/*", "src/**/*.vue", "vite.config.ts"],
"exclude": ["node_modules", "dist", "**/*.js"]