billion-context 0.1.74-pr.481.299 → 0.1.74-pr.482.300

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/dist/index.js CHANGED
@@ -63169,14 +63169,10 @@ async function ensureProxyRunning(opts, deps = {}) {
63169
63169
  }
63170
63170
  let childExit;
63171
63171
  child.on?.("exit", (...rest) => {
63172
- childExit = {
63173
- code: typeof rest[0] === "number" ? rest[0] : null,
63174
- signal: typeof rest[1] === "string" ? rest[1] : null
63175
- };
63172
+ childExit = [rest[0], rest[1]];
63176
63173
  });
63177
63174
  const deadline = now() + SPAWN_WAIT_MS;
63178
- while (now() < deadline) {
63179
- if (childExit) break;
63175
+ while (!childExit && now() < deadline) {
63180
63176
  await sleepImpl(HEALTH_POLL_INTERVAL_MS);
63181
63177
  const inst = readInstance();
63182
63178
  if (isProxyInstanceFile(inst) && inst.launchToken === launchToken) {
@@ -63191,7 +63187,10 @@ async function ensureProxyRunning(opts, deps = {}) {
63191
63187
  }
63192
63188
  }
63193
63189
  if (childExit) {
63194
- const detail = childExit.code !== null ? `code ${childExit.code}` : childExit.signal ? `signal ${childExit.signal}` : "unknown reason";
63190
+ const parts = [];
63191
+ if (typeof childExit[0] === "number") parts.push(`code ${childExit[0]}`);
63192
+ if (typeof childExit[1] === "string") parts.push(`signal ${childExit[1]}`);
63193
+ const detail = parts.length > 0 ? parts.join(", ") : "unknown";
63195
63194
  throw new Error(`bili: proxy child exited before becoming healthy (${detail}) (log: ${logPath2})`);
63196
63195
  }
63197
63196
  throw new Error(`bili: proxy did not become healthy within ${SPAWN_WAIT_MS}ms (log: ${logPath2})`);