@yeaft/webchat-agent 1.0.374 → 1.0.376
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/index.js +2 -1
- package/local-runtime/server/handlers/agent-sync.js +1 -1
- package/local-runtime/server/handlers/client-misc.js +9 -19
- package/local-runtime/version.json +1 -1
- package/local-runtime/web/app.bundle.js +92 -92
- package/local-runtime/web/app.bundle.js.gz +0 -0
- package/local-runtime/web/index.html +1 -1
- package/package.json +1 -1
- package/upgrade-command.js +4 -0
- package/windows-upgrade-bootstrap.js +4 -2
- package/windows-upgrade-runner.js +0 -2
|
Binary file
|
package/package.json
CHANGED
package/upgrade-command.js
CHANGED
|
@@ -4,6 +4,7 @@ import { delimiter, dirname, join, win32 } from 'node:path';
|
|
|
4
4
|
import { setTimeout as delay } from 'node:timers/promises';
|
|
5
5
|
|
|
6
6
|
export const DEFAULT_UPGRADE_REGISTRY = 'https://pkg.yeaft.com/';
|
|
7
|
+
export const SAFE_REMOTE_UPGRADE_CAPABILITY = 'remote_upgrade_safe';
|
|
7
8
|
|
|
8
9
|
const WINDOWS_UPGRADE_LOCK_NAME = 'active.lock';
|
|
9
10
|
|
|
@@ -141,6 +142,9 @@ export function buildWindowsUpgradeInvocation({ nodePath, bootstrapPath, runnerP
|
|
|
141
142
|
command: nodePath,
|
|
142
143
|
args: [bootstrapPath, runnerPath, payloadPath],
|
|
143
144
|
options: {
|
|
145
|
+
// PM2 starts the Agent inside the installed package. A child that inherits
|
|
146
|
+
// that cwd keeps the package directory locked against npm's rename step.
|
|
147
|
+
cwd: dirname(bootstrapPath),
|
|
144
148
|
stdio: 'ignore',
|
|
145
149
|
windowsHide: true,
|
|
146
150
|
env: { ...process.env, YEAFT_UPGRADE_LOG: logPath },
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
1
|
import { appendFileSync } from 'node:fs';
|
|
4
2
|
import { spawn } from 'node:child_process';
|
|
3
|
+
import { dirname } from 'node:path';
|
|
5
4
|
import { pathToFileURL } from 'node:url';
|
|
6
5
|
|
|
7
6
|
function appendLog(logPath, message) {
|
|
@@ -26,6 +25,9 @@ export function spawnWindowsUpgradeRunner({
|
|
|
26
25
|
let child;
|
|
27
26
|
try {
|
|
28
27
|
child = spawnProcess(nodePath, [runnerPath, payloadPath], {
|
|
28
|
+
// Never inherit the Agent's package cwd. Windows will otherwise keep
|
|
29
|
+
// that directory locked while npm tries to replace it.
|
|
30
|
+
cwd: dirname(runnerPath),
|
|
29
31
|
detached: true,
|
|
30
32
|
stdio: 'ignore',
|
|
31
33
|
windowsHide: true,
|