- 在 .env.production 中新增 VITE_AUTH_COOKIE_NAME 配置项用于设置认证cookie名称 - 将 AcceptanceException.vue 中的表单标签宽度从固定90px改为自动适配 - 在 ActionDialog.vue 中将多个表单项标记为必填项并调整标签宽度为自动适配 - 重构 ActionHistory.vue 中的按钮布局结构并添加表格列样式类名 - 更新 api-contract-audit.cjs 添加生产任务和BOM相关接口的契约测试 - 修改 auth.js 使用动态认证cookie键名替换硬编码的Admin-Token - 调整系统角色授权用户页面的表单布局和表格样式类名 - 优化 ReceiptDialog Batch 组件的对话框尺寸、表单验证和分页功能
32 lines
2.7 KiB
PowerShell
32 lines
2.7 KiB
PowerShell
param([ValidateSet('Backend','Frontend','Both')][string]$Component='Both',[switch]$RealDataReplay,[switch]$HistoryEntry,[string]$HistorySource='')
|
|
$ErrorActionPreference='Stop'
|
|
$taskRoot=(Resolve-Path (Join-Path $PSScriptRoot '../..')).Path
|
|
$taskTemp=Join-Path $taskRoot '.codex-tmp'
|
|
New-Item -ItemType Directory -Path $taskTemp -Force | Out-Null
|
|
if ($Component -in @('Backend','Both')) {
|
|
if (!(Get-NetTCPConnection -State Listen -LocalPort 8080 -ErrorAction SilentlyContinue)) {
|
|
$taskJava=Join-Path $env:USERPROFILE '.jdks/ms-17.0.19/bin/java.exe'
|
|
if (!(Test-Path -LiteralPath $taskJava)) { throw 'Configure a Java 17 or newer runtime for this computer.' }
|
|
$env:RUOYI_PROFILE=Join-Path $taskTemp 'uploads'
|
|
$env:RUOYI_LOG_PATH=Join-Path $taskTemp 'logs'
|
|
$taskArgs=@("-Djdk.net.unixdomain.tmpdir=$($taskTemp.Replace('\','/'))",'-Dstdout.encoding=UTF-8','-Dstderr.encoding=UTF-8','-jar','ruoyi-admin/target/cmvr-wms.jar','--spring.quartz.auto-startup=false','--spring.devtools.restart.enabled=false')
|
|
if ($RealDataReplay) { $taskArgs += '--projectdev.real-data-replay-enabled=true' }
|
|
if ($HistoryEntry) { $taskArgs += '--projectdev.history-entry-enabled=true' }
|
|
if ($HistorySource) {
|
|
$taskSourceRoot=(Resolve-Path (Join-Path $taskRoot '.codex-tmp/real-data-replay')).Path
|
|
$taskSourceFile=(Resolve-Path -LiteralPath $HistorySource).Path
|
|
if (!$taskSourceFile.StartsWith($taskSourceRoot+[IO.Path]::DirectorySeparatorChar,[StringComparison]::OrdinalIgnoreCase)) { throw 'History source must be an inventoried file inside the replay directory.' }
|
|
$taskArgs += ('--projectdev.history-entry-source='+$taskSourceFile.Replace('\','/'))
|
|
}
|
|
Start-Process -FilePath $taskJava -ArgumentList $taskArgs -WorkingDirectory $taskRoot -WindowStyle Hidden -RedirectStandardOutput (Join-Path $taskTemp 'backend.out.log') -RedirectStandardError (Join-Path $taskTemp 'backend.err.log') | Out-Null
|
|
}
|
|
Write-Output 'Backend: http://localhost:8080 (copied scheduled jobs disabled)'
|
|
}
|
|
if ($Component -in @('Frontend','Both')) {
|
|
if (!(Get-NetTCPConnection -State Listen -LocalPort 8088 -ErrorAction SilentlyContinue)) {
|
|
$env:NODE_OPTIONS='--max-old-space-size=2048'
|
|
Start-Process -FilePath 'C:/Program Files/nodejs/node.exe' -ArgumentList @('node_modules/vite/bin/vite.js','--host','0.0.0.0','--port','8088') -WorkingDirectory (Join-Path $taskRoot 'ruoyi-ui-vue3') -WindowStyle Hidden -RedirectStandardOutput (Join-Path $taskTemp 'frontend.out.log') -RedirectStandardError (Join-Path $taskTemp 'frontend.err.log') | Out-Null
|
|
}
|
|
Write-Output 'Frontend Vue3: http://localhost:8088 (ruoyi-ui-vue3)'
|
|
}
|