clay-server 2.34.0-beta.6 → 2.34.0-beta.7

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.
@@ -16,6 +16,7 @@ try { require("fs").writeSync(2, "[sdk-worker] BOOT pid=" + process.pid + " uid=
16
16
  var net = require("net");
17
17
  var crypto = require("crypto");
18
18
  var path = require("path");
19
+ var fs = require("fs");
19
20
 
20
21
  var socketPath = process.argv[2];
21
22
  if (!socketPath) {
@@ -355,8 +356,11 @@ async function handleQueryStart(msg) {
355
356
  // This is needed because the CLI's Axios-based HTTP client ignores
356
357
  // NODE_OPTIONS dns flags and still attempts IPv6 connections via its
357
358
  // custom TLS agent, causing 5-10s timeouts on IPv6-less servers.
358
- var preloadScript = require("path").join(__dirname, "ipv4-only.js");
359
- var extraOpts = " --require " + JSON.stringify(preloadScript);
359
+ var preloadScript = path.join(__dirname, "..", "..", "ipv4-only.js");
360
+ var extraOpts = "";
361
+ if (fs.existsSync(preloadScript)) {
362
+ extraOpts += " --require " + JSON.stringify(preloadScript);
363
+ }
360
364
  extraOpts += " --dns-result-order=ipv4first --no-network-family-autoselection";
361
365
  spawnOpts.env.NODE_OPTIONS = (spawnOpts.env.NODE_OPTIONS || "") + extraOpts;
362
366
  console.log("[sdk-worker] spawnClaudeCodeProcess called, command=" + spawnOpts.command);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clay-server",
3
- "version": "2.34.0-beta.6",
3
+ "version": "2.34.0-beta.7",
4
4
  "description": "Self-hosted Claude Code in your browser. Multi-session, multi-user, push notifications.",
5
5
  "bin": {
6
6
  "clay-server": "./bin/cli.js",