日志、样式小调整
parent
17b4b8d218
commit
93e09ed4b8
|
@ -14,15 +14,11 @@ module.exports = {
|
||||||
'yarnRegistry': 'default',
|
'yarnRegistry': 'default',
|
||||||
'registry': 'https://registry.npmjs.org', // 可以选择切换官方或者淘宝镜像
|
'registry': 'https://registry.npmjs.org', // 可以选择切换官方或者淘宝镜像
|
||||||
},
|
},
|
||||||
// intercepts: {
|
|
||||||
// 'cdn.cypress.io': [{ regexp: '/desktop/.*', proxy: 'http://npmmirror.com/mirrors/cypress/' }]
|
|
||||||
// },
|
|
||||||
variables: {
|
variables: {
|
||||||
phantomjs_cdnurl: 'https://npmmirror.com/mirrors/phantomjs',
|
phantomjs_cdnurl: 'https://npmmirror.com/mirrors/phantomjs',
|
||||||
chromedriver_cdnurl: 'https://npmmirror.com/mirrors/chromedriver',
|
chromedriver_cdnurl: 'https://npmmirror.com/mirrors/chromedriver',
|
||||||
sass_binary_site: 'https://npmmirror.com/mirrors/node-sass',
|
sass_binary_site: 'https://npmmirror.com/mirrors/node-sass',
|
||||||
ELECTRON_MIRROR: 'https://npmmirror.com/mirrors/electron/',
|
ELECTRON_MIRROR: 'https://npmmirror.com/mirrors/electron/',
|
||||||
// CYPRESS_DOWNLOAD_MIRROR: 'https://cdn.cypress.io',
|
|
||||||
NVM_NODEJS_ORG_MIRROR: 'https://npmmirror.com/mirrors/node',
|
NVM_NODEJS_ORG_MIRROR: 'https://npmmirror.com/mirrors/node',
|
||||||
CHROMEDRIVER_CDNURL: 'https://npmmirror.com/mirrors/chromedriver',
|
CHROMEDRIVER_CDNURL: 'https://npmmirror.com/mirrors/chromedriver',
|
||||||
OPERADRIVER: 'https://npmmirror.com/mirrors/operadriver',
|
OPERADRIVER: 'https://npmmirror.com/mirrors/operadriver',
|
||||||
|
|
|
@ -52,8 +52,7 @@ const PipPlugin = function (context) {
|
||||||
cmds.push(`${command} config unset global.${item.key}`)
|
cmds.push(`${command} config unset global.${item.key}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const ret = await shell.exec(cmds, { type: 'cmd' })
|
return await shell.exec(cmds, { type: 'cmd' })
|
||||||
return ret
|
|
||||||
},
|
},
|
||||||
|
|
||||||
async unsetPipEnv (list) {
|
async unsetPipEnv (list) {
|
||||||
|
@ -62,8 +61,7 @@ const PipPlugin = function (context) {
|
||||||
for (const item of list) {
|
for (const item of list) {
|
||||||
cmds.push(`${command} config unset global.${item} `)
|
cmds.push(`${command} config unset global.${item} `)
|
||||||
}
|
}
|
||||||
const ret = await shell.exec(cmds, { type: 'cmd' })
|
return await shell.exec(cmds, { type: 'cmd' })
|
||||||
return ret
|
|
||||||
},
|
},
|
||||||
|
|
||||||
async setRegistry ({ registry }) {
|
async setRegistry ({ registry }) {
|
||||||
|
|
|
@ -104,7 +104,7 @@ const serverApi = {
|
||||||
log.error('server process uncaughtException:', err)
|
log.error('server process uncaughtException:', err)
|
||||||
})
|
})
|
||||||
serverProcess.on('message', (msg) => {
|
serverProcess.on('message', (msg) => {
|
||||||
log.info('收到子进程消息:', JSON.stringify(msg))
|
log.debug('收到子进程消息:', JSON.stringify(msg))
|
||||||
if (msg.type === 'status') {
|
if (msg.type === 'status') {
|
||||||
fireStatus(msg.event)
|
fireStatus(msg.event)
|
||||||
} else if (msg.type === 'error') {
|
} else if (msg.type === 'error') {
|
||||||
|
|
|
@ -5,8 +5,7 @@ const execute = Shell.execute
|
||||||
const executor = {
|
const executor = {
|
||||||
async windows (exec, { port }) {
|
async windows (exec, { port }) {
|
||||||
const cmds = [`for /f "tokens=5" %a in ('netstat -aon ^| find ":${port}" ^| find "LISTENING"') do (taskkill /f /pid %a & exit /B) `]
|
const cmds = [`for /f "tokens=5" %a in ('netstat -aon ^| find ":${port}" ^| find "LISTENING"') do (taskkill /f /pid %a & exit /B) `]
|
||||||
// eslint-disable-next-line no-unused-vars
|
await exec(cmds, { type: 'cmd' })
|
||||||
const ret = await exec(cmds, { type: 'cmd' })
|
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
async linux (exec, { port }) {
|
async linux (exec, { port }) {
|
||||||
|
|
|
@ -11,8 +11,7 @@ const executor = {
|
||||||
for (const item of list) {
|
for (const item of list) {
|
||||||
cmds.push(`npm config set ${item.key} ${item.value}`)
|
cmds.push(`npm config set ${item.key} ${item.value}`)
|
||||||
}
|
}
|
||||||
const ret = await exec(cmds, { type: 'cmd' })
|
return await exec(cmds, { type: 'cmd' })
|
||||||
return ret
|
|
||||||
},
|
},
|
||||||
async linux (exec, { port }) {
|
async linux (exec, { port }) {
|
||||||
throw new Error('暂未实现此功能')
|
throw new Error('暂未实现此功能')
|
||||||
|
|
|
@ -19,8 +19,7 @@ const executor = {
|
||||||
// [Environment]::SetEnvironmentVariable('FOO', 'bar', 'Machine')
|
// [Environment]::SetEnvironmentVariable('FOO', 'bar', 'Machine')
|
||||||
cmds2.push(`set ${item.key}=""`)
|
cmds2.push(`set ${item.key}=""`)
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line no-unused-vars
|
await exec(cmds2, { type: 'cmd' })
|
||||||
const ret2 = await exec(cmds2, { type: 'cmd' })
|
|
||||||
return ret
|
return ret
|
||||||
},
|
},
|
||||||
async linux (exec, { port }) {
|
async linux (exec, { port }) {
|
||||||
|
|
|
@ -54,9 +54,7 @@ class WindowsSystemShell extends SystemShell {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const ret = await ps.invoke()
|
return await ps.invoke()
|
||||||
// log.info('ps complete', cmds)
|
|
||||||
return ret
|
|
||||||
} finally {
|
} finally {
|
||||||
ps.dispose()
|
ps.dispose()
|
||||||
}
|
}
|
||||||
|
@ -66,9 +64,7 @@ class WindowsSystemShell extends SystemShell {
|
||||||
compose += ` && ${cmd}`
|
compose += ` && ${cmd}`
|
||||||
}
|
}
|
||||||
// compose += '&& exit'
|
// compose += '&& exit'
|
||||||
const ret = await childExec(compose, args)
|
return await childExec(compose, args)
|
||||||
// log.info('cmd complete:', compose)
|
|
||||||
return ret
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,9 +18,8 @@ updaterCacheDirName: '@docmirrordev-sidecar-gui-updater'
|
||||||
fs.writeFileSync(filePath, fileContent)
|
fs.writeFileSync(filePath, fileContent)
|
||||||
}
|
}
|
||||||
exports.default = async function (context) {
|
exports.default = async function (context) {
|
||||||
// console.log('context', context)
|
|
||||||
let targetPath
|
let targetPath
|
||||||
let systemType = ''
|
let systemType
|
||||||
if (context.packager.platform.nodeName === 'darwin') {
|
if (context.packager.platform.nodeName === 'darwin') {
|
||||||
targetPath = path.join(context.appOutDir, `${context.packager.appInfo.productName}.app/Contents/Resources`)
|
targetPath = path.join(context.appOutDir, `${context.packager.appInfo.productName}.app/Contents/Resources`)
|
||||||
systemType = 'mac'
|
systemType = 'mac'
|
||||||
|
|
|
@ -148,7 +148,7 @@ export default {
|
||||||
style="inset:auto auto 53px 210px; background-color:#ddd"
|
style="inset:auto auto 53px 210px; background-color:#ddd"
|
||||||
/>
|
/>
|
||||||
<a-layout>
|
<a-layout>
|
||||||
<a-layout-sider :theme="theme">
|
<a-layout-sider :theme="theme" style="overflow-y: auto">
|
||||||
<div class="logo" />
|
<div class="logo" />
|
||||||
<div class="aside">
|
<div class="aside">
|
||||||
<a-menu
|
<a-menu
|
||||||
|
|
|
@ -198,13 +198,13 @@ export default {
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row v-for="(item, index) of servers" :key="index" :gutter="10">
|
<a-row v-for="(item, index) of servers" :key="index" :gutter="10">
|
||||||
<a-col :span="6">
|
<a-col :span="6">
|
||||||
<a-input v-model="item.key" addon-before="域名" placeholder="yourdomain.com" spellcheck="false" />
|
<a-input v-model="item.key" :title="item.key" addon-before="域名" placeholder="yourdomain.com" spellcheck="false" />
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="5">
|
<a-col :span="5">
|
||||||
<a-input v-model="item.value.port" addon-before="端口" placeholder="443" spellcheck="false" />
|
<a-input v-model="item.value.port" :title="item.value.port" addon-before="端口" placeholder="443" spellcheck="false" />
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="6">
|
<a-col :span="6">
|
||||||
<a-input v-model="item.value.path" addon-before="路径" placeholder="xxxxxx" spellcheck="false" />
|
<a-input v-model="item.value.path" :title="item.value.path" addon-before="路径" placeholder="xxxxxx" spellcheck="false" />
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="5">
|
<a-col :span="5">
|
||||||
<a-input v-model="item.value.password" addon-before="密码" type="password" placeholder="password" spellcheck="false" />
|
<a-input v-model="item.value.password" addon-before="密码" type="password" placeholder="password" spellcheck="false" />
|
||||||
|
@ -239,7 +239,7 @@ export default {
|
||||||
.fine-tuning2 .ant-btn-danger {
|
.fine-tuning2 .ant-btn-danger {
|
||||||
margin-top: 2px !important;
|
margin-top: 2px !important;
|
||||||
}
|
}
|
||||||
.ant-input-group-addon {
|
.ant-input-group-addon:first-child {
|
||||||
padding: 0 6px !important;
|
padding: 0 5px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -506,7 +506,7 @@ export default {
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
.ant-input-group-addon:first-child {
|
.ant-input-group-addon:first-child {
|
||||||
width: 50px;
|
width: 45px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -109,11 +109,19 @@ $dark-input: #777; //输入框:背景色
|
||||||
color: $dark-text;
|
color: $dark-text;
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus {
|
&:focus {
|
||||||
border-color: #fff;
|
border-color: #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
box-shadow: 0 0 0 2px rgb(255 255 255 / 50%);
|
box-shadow: 0 0 0 2px rgb(255 255 255 / 35%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 选中的下拉框 */
|
||||||
|
.ant-select-open,
|
||||||
|
.ant-select-focused {
|
||||||
|
.ant-select-selection {
|
||||||
|
box-shadow: 0 0 0 2px rgb(255 255 255 / 35%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,5 +80,5 @@ let ip
|
||||||
// console.log('ip:', ip)
|
// console.log('ip:', ip)
|
||||||
|
|
||||||
// console.log('test ipaddress')
|
// console.log('test ipaddress')
|
||||||
// ip = await dnsProviders.ipaddress.lookup(hostname0)
|
// ip = await dnsProviders.ipaddress.lookup(hostname1)
|
||||||
// console.log('ip:', ip)
|
// console.log('ip:', ip)
|
||||||
|
|
Loading…
Reference in New Issue