chore: 解决 jenkins 报错问题

develop
时启龙 2024-08-24 17:04:54 +08:00
parent d29909f6ab
commit f64fb71c66
5 changed files with 5 additions and 5 deletions

View File

@ -13,6 +13,6 @@ const codeMap = new Map([
])
const vueFiles = require.context('./', true, /\.vue$/)
export const components = getModules(vueFiles)
export function getCurrentComponent(type: string) {
export function getCurrentComponent(type) {
return codeMap.get(type) || `${type.toLowerCase()}-module`
}

View File

@ -13,6 +13,6 @@ const codeMap = new Map([
])
const vueFiles = require.context('./', true, /\.vue$/)
export const optionComponents = getModules(vueFiles)
export function getCurrentOptionComponent(type: string) {
export function getCurrentOptionComponent(type) {
return codeMap.get(type) || `${type.toLowerCase()}-option`
}

View File

@ -7,7 +7,7 @@ const vueFiles = require.context('./', true, /\.vue$/)
export const components = getModules(vueFiles)
// 优先在map里取值 组件命名规范 task.software.nginx => NginxNode task.software.iscsi.client=>IscsiClient
export function getCurrentComponent(code: string) {
export function getCurrentComponent(code) {
const [f, s = 'Node'] = code.split('task.maintain.')[1].split('.')
// 自定义组件
if (code.includes('task.maintain.custom')) return 'CustomNode'

View File

@ -17,7 +17,7 @@ const vueFiles = require.context('./', true, /\.vue$/)
export const components = getModules(vueFiles)
// 优先在map里取值 组件命名规范 task.software.nginx => NginxItem task.software.iscsi.client=>IscsiClient
export function getCurrentComponent(code: string) {
export function getCurrentComponent(code) {
const [f, s = 'Item'] = code.split('task.software.')[1].split('.')
return codeMap.get(code) || `${upperFirst(f)}${upperFirst(s)}`
}

View File

@ -27,6 +27,6 @@
},
"lib": ["esnext", "dom", "dom.iterable", "scripthost"]
},
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "tests/**/*.ts", "tests/**/*.tsx"],
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "tests/**/*.ts", "tests/**/*.tsx", "src/views/task/graph/maintain/components/index.js", "src/views/task/graph/software/components/index.js", "src/views/config/component-manage/create/options/index.js"],
"exclude": ["node_modules"]
}