@abuaboud/box 0.7.16 → 0.7.18

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/dist/cbox.mjs +15 -5
  2. package/package.json +1 -1
package/dist/cbox.mjs CHANGED
@@ -560,7 +560,12 @@ async function ensureClone(env) {
560
560
  rmSync(partial, { recursive: true, force: true });
561
561
  mkdirSync4(dirname(clone), { recursive: true });
562
562
  const bar = progress([[0, `Cloning ${env.repo} once for every ${env.name} agent`]], { pace: 6e4 });
563
- const cloned = await git([...auth, "clone", "-q", "--no-checkout", "--filter=blob:none", token ? `https://github.com/${env.repo}.git` : `git@github.com:${env.repo}.git`, partial]);
563
+ let cloned = { ok: false, out: "", err: "" };
564
+ for (const url of token ? [`https://github.com/${env.repo}.git`] : [`https://github.com/${env.repo}.git`, `git@github.com:${env.repo}.git`]) {
565
+ rmSync(partial, { recursive: true, force: true });
566
+ cloned = await git([...auth, "clone", "-q", "--no-checkout", "--filter=blob:none", url, partial]);
567
+ if (cloned.ok) break;
568
+ }
564
569
  if (!cloned.ok) {
565
570
  bar();
566
571
  fail(`Couldn't clone ${env.repo}: ${cloned.err.split("\n").at(-1)}. Run gh auth login and try again.`);
@@ -1097,7 +1102,7 @@ Detached. ${boxName} sleeps once Claude is done. ${brand.command} ${boxName} to
1097
1102
  echo = process.env.CBOX_PREDICT === "0" ? void 0 : predictor((s) => process.stdout.write(s), cols, rows);
1098
1103
  const stream = await new Promise((resolve, reject) => conn.exec(
1099
1104
  "dtach -A ~/.cb/claude.sock -E -r winch bash -l ~/.cb/start.sh",
1100
- { pty: { term: process.env.TERM || "xterm-256color", cols, rows } },
1105
+ { pty: { term: process.env.TERM || "xterm-256color", cols: cols - 1, rows } },
1101
1106
  (err, s) => err ? reject(err) : resolve(s)
1102
1107
  ));
1103
1108
  let exited = false;
@@ -1114,8 +1119,12 @@ Detached. ${boxName} sleeps once Claude is done. ${brand.command} ${boxName} to
1114
1119
  session?.write(Buffer.concat(keys.splice(0)));
1115
1120
  }, 800);
1116
1121
  });
1117
- stream.setWindow(rows, cols - 1, 0, 0);
1118
- setTimeout(() => stream.setWindow(rows, cols, 0, 0), 100);
1122
+ const widen = () => {
1123
+ clearTimeout(redrawn);
1124
+ stream.setWindow(process.stdout.rows || rows, process.stdout.columns || cols, 0, 0);
1125
+ };
1126
+ const redrawn = setTimeout(widen, 1500);
1127
+ stream.once("data", widen);
1119
1128
  const resize = () => {
1120
1129
  echo?.resize(process.stdout.columns, process.stdout.rows);
1121
1130
  stream.setWindow(process.stdout.rows, process.stdout.columns, 0, 0);
@@ -1125,6 +1134,7 @@ Detached. ${boxName} sleeps once Claude is done. ${brand.command} ${boxName} to
1125
1134
  typed = false;
1126
1135
  void api(`/api/boxes/${boxName}/heartbeat`, { method: "POST", body: JSON.stringify({ typed: false }) }).catch(() => void 0);
1127
1136
  await closed;
1137
+ clearTimeout(redrawn);
1128
1138
  session = void 0;
1129
1139
  process.stdout.off("resize", resize);
1130
1140
  if (exited) leave();
@@ -1173,7 +1183,7 @@ import { mkdirSync as mkdirSync5, readFileSync as readFileSync6, writeFileSync a
1173
1183
  import { basename as basename2, dirname as dirname2, join as join6 } from "node:path";
1174
1184
  import { fileURLToPath } from "node:url";
1175
1185
  var PACKAGE = "@abuaboud/box";
1176
- var LATEST = `https://registry.npmjs.org/${PACKAGE.replace("/", "%2f")}/latest`;
1186
+ var LATEST = `${(process.env.npm_config_registry ?? "https://registry.npmjs.org").replace(/\/$/, "")}/${PACKAGE.replace("/", "%2f")}/latest`;
1177
1187
  var VERSION = JSON.parse(readFileSync6(new URL("../package.json", import.meta.url), "utf8")).version;
1178
1188
  function npmPrefix() {
1179
1189
  const pkgDir = dirname2(dirname2(fileURLToPath(import.meta.url)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abuaboud/box",
3
- "version": "0.7.16",
3
+ "version": "0.7.18",
4
4
  "description": "skyfleet: Claude Code on your laptop, the work on a cloud dev machine (a ship) you reach as <name>.skyfleet, with your team databases through MCP.",
5
5
  "type": "module",
6
6
  "bin": {