maxpool 1.24.96 → 1.24.97

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/updater.js +7 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maxpool",
3
- "version": "1.24.96",
3
+ "version": "1.24.97",
4
4
  "description": "Multi-account Claude Code proxy with adaptive, rate-aware load balancing across Claude accounts",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/updater.js CHANGED
@@ -3,6 +3,7 @@ import { promisify } from 'node:util';
3
3
  import { readFile } from 'node:fs/promises';
4
4
  import { fileURLToPath } from 'node:url';
5
5
  import { dirname, join } from 'node:path';
6
+ import { homedir } from 'node:os';
6
7
 
7
8
  const execFileAsync = promisify(execFile);
8
9
  const PACKAGE = 'maxpool';
@@ -58,10 +59,14 @@ export async function checkForUpdate(currentVersion, { timeoutMs = 4000, registr
58
59
  }
59
60
  }
60
61
 
61
- /** Run `npm install -g maxpool@latest`. Returns {ok, output|error}. */
62
+ /** Run `npm install -g maxpool@latest`. Returns {ok, output|error}.
63
+ * npm runs from the home directory, never the inherited cwd: the pool lives for days,
64
+ * and a launch directory deleted under it (2026-11-16 workspace wipe+restore) made
65
+ * every `npm i -g` die at startup with ENOENT uv_cwd — a global install never needs
66
+ * the caller's cwd. */
62
67
  export async function selfUpdate({ timeoutMs = 120_000 } = {}) {
63
68
  try {
64
- const { stdout, stderr } = await execFileAsync('npm', ['install', '-g', `${PACKAGE}@latest`], { timeout: timeoutMs });
69
+ const { stdout, stderr } = await execFileAsync('npm', ['install', '-g', `${PACKAGE}@latest`], { timeout: timeoutMs, cwd: homedir() });
65
70
  return { ok: true, output: (stdout || stderr || '').trim() };
66
71
  } catch (err) {
67
72
  return { ok: false, error: err.message };