@scalequality/cli 0.4.16 → 0.4.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.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "sdkVersion": "0.3.281",
3
- "sha256": "f193c9c33f5ba3df1f4b540ec31d32f577124bf5fb6dae120aa2fa657ab5bd1d",
4
- "sourceCommit": "0bc9b626f0260087edaae9787e851dbfe23491e8"
3
+ "sha256": "fe49d1a8b41bb6191aefbfeeb63afc6b3b10357776b9358f654a0882b22e4524",
4
+ "sourceCommit": "31bb504c079043ba44af43413ef65d982bd111ed"
5
5
  }
package/dist/connect.cjs CHANGED
@@ -12838,7 +12838,7 @@ ${text3}`;
12838
12838
  const key = JSON.stringify([id, files]);
12839
12839
  if (key === repo2.lastDiff) continue;
12840
12840
  repo2.lastDiff = key;
12841
- this.emit({ type: "diff", data: { repoFullName: id, files } });
12841
+ this.emit({ type: "diff", data: { repoFullName: id, files, ...this.local ? { root: repo2.root } : {} } });
12842
12842
  } catch (e) {
12843
12843
  this.deps.log.warn("diff failed", { error: e.message });
12844
12844
  }
@@ -13596,6 +13596,7 @@ var REGISTRY_LATEST = "https://registry.npmjs.org/@scalequality%2fcli/latest";
13596
13596
  var UPDATE_FIRST_CHECK_MS = 2 * 6e4;
13597
13597
  var UPDATE_INTERVAL_MS = 6 * 36e5;
13598
13598
  var UPDATE_IDLE_POLL_MS = 6e4;
13599
+ var UPDATE_RETRY_MS = 15 * 6e4;
13599
13600
  var CONFIRM_AFTER_MS = 9e4;
13600
13601
  var RESTART_EXIT_CODE = 75;
13601
13602
  var MAX_START_ATTEMPTS = 3;
@@ -13739,6 +13740,11 @@ var UpdateError = class extends Error {
13739
13740
  }
13740
13741
  code;
13741
13742
  };
13743
+ function npmReason(output) {
13744
+ const lines2 = output.split("\n").map((l) => l.trim()).filter(Boolean);
13745
+ const errors = lines2.filter((l) => /^npm (error|ERR!)/.test(l) && !/complete log of this run/i.test(l));
13746
+ return (errors.length ? errors.slice(0, 2).join(" ") : lines2.slice(-1)[0] ?? "").slice(0, 240);
13747
+ }
13742
13748
  async function installVersion(o) {
13743
13749
  const npm = o.npm === void 0 ? npmCli(o.nodePath) : o.npm;
13744
13750
  if (!npm) throw new UpdateError("NPM_NOT_FOUND", `npm was not found next to ${o.nodePath}.`);
@@ -13756,10 +13762,11 @@ async function installVersion(o) {
13756
13762
  "--no-fund",
13757
13763
  "--ignore-scripts",
13758
13764
  "--omit=dev",
13765
+ "--prefer-online",
13759
13766
  "--registry=https://registry.npmjs.org/",
13760
13767
  `@scalequality/cli@${o.version}`
13761
13768
  ]);
13762
- if (r.code !== 0) throw new UpdateError("NPM_INSTALL_FAILED", `npm could not install @scalequality/cli@${o.version}: ${`${r.stderr || r.stdout}`.trim().split("\n").slice(-1)[0]?.slice(0, 200) ?? r.code}`);
13769
+ if (r.code !== 0) throw new UpdateError("NPM_INSTALL_FAILED", `npm could not install @scalequality/cli@${o.version}: ${npmReason(`${r.stderr || r.stdout}`) || r.code}`);
13763
13770
  const root = (0, import_path16.join)(staging, "node_modules", "@scalequality", "cli");
13764
13771
  const pkg = readJson2((0, import_path16.join)(root, "package.json"));
13765
13772
  if (pkg?.name !== "@scalequality/cli" || pkg?.version !== o.version) throw new UpdateError("WRONG_PACKAGE", `npm installed ${String(pkg?.name)}@${String(pkg?.version)} instead of ${o.version}.`);
@@ -14243,7 +14250,7 @@ function startSelfUpdate(api, busy, restart) {
14243
14250
  if (checking) return;
14244
14251
  checking = true;
14245
14252
  try {
14246
- await checkForUpdate({
14253
+ const result = await checkForUpdate({
14247
14254
  home: HOME,
14248
14255
  env: process.env,
14249
14256
  version: cliVersion,
@@ -14254,6 +14261,7 @@ function startSelfUpdate(api, busy, restart) {
14254
14261
  launched: () => process.env.SCALEQUALITY_LAUNCHER === "1",
14255
14262
  restart
14256
14263
  });
14264
+ if (result === "SKIPPED") setTimeout(() => void check(), UPDATE_RETRY_MS).unref();
14257
14265
  } catch (e) {
14258
14266
  say(`[warn] update check failed: ${e.message}`);
14259
14267
  } finally {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalequality/cli",
3
- "version": "0.4.16",
3
+ "version": "0.4.18",
4
4
  "description": "ScaleQuality CLI. Connect your computer to the ScaleQuality AI Workspace (`scalequality login`), run its coding engine in any folder of your computer, and import your Claude Code and Codex conversations.",
5
5
  "type": "module",
6
6
  "bin": {