@yeaft/webchat-agent 0.0.152 → 0.0.153
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/connection.js +5 -6
- package/package.json +1 -1
package/connection.js
CHANGED
|
@@ -470,11 +470,13 @@ async function handleMessage(msg) {
|
|
|
470
470
|
`${npmBatCmd} >> "%LOGFILE%" 2>&1`,
|
|
471
471
|
'if errorlevel 1 (',
|
|
472
472
|
' echo [Upgrade] npm install failed with exit code %errorlevel% >> "%LOGFILE%"',
|
|
473
|
-
'
|
|
473
|
+
') else (',
|
|
474
|
+
' echo [Upgrade] Successfully installed %PKG% >> "%LOGFILE%"',
|
|
474
475
|
')',
|
|
475
|
-
'echo [Upgrade] Successfully installed %PKG% >> "%LOGFILE%"',
|
|
476
476
|
);
|
|
477
477
|
|
|
478
|
+
batLines.push(':CLEANUP');
|
|
479
|
+
|
|
478
480
|
if (isPm2) {
|
|
479
481
|
batLines.push(
|
|
480
482
|
'echo [Upgrade] Starting agent via pm2... >> "%LOGFILE%"',
|
|
@@ -482,10 +484,7 @@ async function handleMessage(msg) {
|
|
|
482
484
|
);
|
|
483
485
|
}
|
|
484
486
|
|
|
485
|
-
batLines.push(
|
|
486
|
-
':CLEANUP',
|
|
487
|
-
`del /F /Q "${batPath}"`,
|
|
488
|
-
);
|
|
487
|
+
batLines.push(`del /F /Q "${batPath}"`);
|
|
489
488
|
|
|
490
489
|
writeFileSync(batPath, batLines.join('\r\n'));
|
|
491
490
|
const child = spawn('cmd.exe', ['/c', batPath], {
|