codeam-cli 2.26.13 → 2.26.14
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/CHANGELOG.md +6 -0
- package/dist/index.js +34 -8
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable changes to `codeam-cli` are documented here.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [2.26.13] — 2026-06-04
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **cli:** Pre-flight install for missing node_modules before preview (#250)
|
|
12
|
+
|
|
7
13
|
## [2.26.12] — 2026-06-04
|
|
8
14
|
|
|
9
15
|
### Fixed
|
package/dist/index.js
CHANGED
|
@@ -344,7 +344,7 @@ Return ONLY a JSON object on stdout (no prose, no markdown fences):
|
|
|
344
344
|
"port": <number>,
|
|
345
345
|
"ready_pattern": "<regex matching the server-ready stdout line>",
|
|
346
346
|
"env": { "HOST": "0.0.0.0" },
|
|
347
|
-
"setup_commands": [
|
|
347
|
+
"setup_commands": [],
|
|
348
348
|
"notes": "<one-line caveat or null>"
|
|
349
349
|
}
|
|
350
350
|
|
|
@@ -354,6 +354,20 @@ Rules:
|
|
|
354
354
|
- For Expo: framework="Expo", command="npx", args=["expo","start","--tunnel"], port=8081, notes="Scan QR with Expo Go".
|
|
355
355
|
- If no dev server applies (CLI library, lambda, batch script): {"framework":"unsupported","notes":"<reason>"}.
|
|
356
356
|
|
|
357
|
+
CRITICAL \u2014 setup_commands:
|
|
358
|
+
- DO NOT include an install command (npm install, pnpm install, yarn install,
|
|
359
|
+
yarn, bun install) in setup_commands. A lockfile-aware pre-flight installer
|
|
360
|
+
runs BEFORE setup_commands and picks the correct package manager from the
|
|
361
|
+
lockfile present (pnpm-lock.yaml -> pnpm, yarn.lock -> yarn, bun.lockb -> bun,
|
|
362
|
+
else npm). Emitting an install here either duplicates that work or, worse,
|
|
363
|
+
uses the WRONG package manager on top of node_modules just populated by the
|
|
364
|
+
pre-flight, which crashes (e.g. npm errors with "Cannot read properties of
|
|
365
|
+
null (reading 'matches')" when run over pnpm's .pnpm/ layout).
|
|
366
|
+
- ONLY include setup_commands for genuinely non-install work the project needs
|
|
367
|
+
before its dev server can boot: prisma generate, codegen, prebuild scripts,
|
|
368
|
+
database migrations against a local SQLite, etc.
|
|
369
|
+
- For most projects, setup_commands should be an empty array [].
|
|
370
|
+
|
|
357
371
|
OUTPUT JSON ONLY. NO MARKDOWN. NO COMMENTARY.
|
|
358
372
|
`.trim();
|
|
359
373
|
|
|
@@ -472,7 +486,7 @@ var import_qrcode_terminal = __toESM(require("qrcode-terminal"));
|
|
|
472
486
|
// package.json
|
|
473
487
|
var package_default = {
|
|
474
488
|
name: "codeam-cli",
|
|
475
|
-
version: "2.26.
|
|
489
|
+
version: "2.26.14",
|
|
476
490
|
description: "Workflow-continuity bridge for AI coding agents. Wrap Claude Code or Codex in a PTY and supervise, approve, and redirect the session from any device \u2014 async. The terminal companion for CodeAgent Mobile.",
|
|
477
491
|
type: "commonjs",
|
|
478
492
|
main: "dist/index.js",
|
|
@@ -546,7 +560,7 @@ var package_default = {
|
|
|
546
560
|
chokidar: "^3.6.0",
|
|
547
561
|
picocolors: "^1.1.0",
|
|
548
562
|
"qrcode-terminal": "^0.12.0",
|
|
549
|
-
which: "^
|
|
563
|
+
which: "^5.0.0",
|
|
550
564
|
ws: "^8.18.0",
|
|
551
565
|
zod: "^4.3.6"
|
|
552
566
|
},
|
|
@@ -5829,7 +5843,7 @@ function readAnonId() {
|
|
|
5829
5843
|
}
|
|
5830
5844
|
function superProperties() {
|
|
5831
5845
|
return {
|
|
5832
|
-
cliVersion: true ? "2.26.
|
|
5846
|
+
cliVersion: true ? "2.26.14" : "0.0.0-dev",
|
|
5833
5847
|
nodeVersion: process.version,
|
|
5834
5848
|
platform: process.platform,
|
|
5835
5849
|
arch: process.arch,
|
|
@@ -16298,6 +16312,13 @@ function detectMissingNodeDeps(cwd) {
|
|
|
16298
16312
|
}
|
|
16299
16313
|
return { cmd: "npm", args: ["install"] };
|
|
16300
16314
|
}
|
|
16315
|
+
function isJsInstallCommand(cmd, args2) {
|
|
16316
|
+
const known = ["npm", "pnpm", "yarn", "bun"];
|
|
16317
|
+
if (!known.includes(cmd)) return false;
|
|
16318
|
+
if (cmd === "yarn" && args2.length === 0) return true;
|
|
16319
|
+
const verb = args2[0];
|
|
16320
|
+
return verb === "install" || verb === "i" || verb === "ci";
|
|
16321
|
+
}
|
|
16301
16322
|
|
|
16302
16323
|
// src/services/preview/index.ts
|
|
16303
16324
|
var activePreviews = /* @__PURE__ */ new Map();
|
|
@@ -16940,6 +16961,7 @@ var previewStartH = (ctx, _cmd, parsed) => {
|
|
|
16940
16961
|
});
|
|
16941
16962
|
emitProgress("ENV_DETECTED", `${detection.framework}`);
|
|
16942
16963
|
const missingDeps = detectMissingNodeDeps(process.cwd());
|
|
16964
|
+
let preflightRan = false;
|
|
16943
16965
|
if (missingDeps) {
|
|
16944
16966
|
emitProgress(
|
|
16945
16967
|
"SETUP_RUN",
|
|
@@ -16964,8 +16986,12 @@ var previewStartH = (ctx, _cmd, parsed) => {
|
|
|
16964
16986
|
});
|
|
16965
16987
|
return;
|
|
16966
16988
|
}
|
|
16989
|
+
preflightRan = true;
|
|
16967
16990
|
}
|
|
16968
|
-
|
|
16991
|
+
const agentSetupCommands = preflightRan ? (detection.setup_commands ?? []).filter(
|
|
16992
|
+
(s) => !isJsInstallCommand(s.cmd, s.args)
|
|
16993
|
+
) : detection.setup_commands ?? [];
|
|
16994
|
+
for (const setup of agentSetupCommands) {
|
|
16969
16995
|
emitProgress("SETUP_RUN", `${setup.cmd} ${setup.args.join(" ")}`);
|
|
16970
16996
|
const exitCode = await runOnce(setup.cmd, setup.args, process.cwd(), detection.env);
|
|
16971
16997
|
if (exitCode !== 0) {
|
|
@@ -20231,7 +20257,7 @@ function checkChokidar() {
|
|
|
20231
20257
|
}
|
|
20232
20258
|
async function doctor(args2 = []) {
|
|
20233
20259
|
const json = args2.includes("--json");
|
|
20234
|
-
const cliVersion = true ? "2.26.
|
|
20260
|
+
const cliVersion = true ? "2.26.14" : "0.0.0-dev";
|
|
20235
20261
|
const apiBase = resolveApiBaseUrl();
|
|
20236
20262
|
const diagnosticId = (0, import_node_crypto6.randomUUID)();
|
|
20237
20263
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -20430,7 +20456,7 @@ async function completion(args2) {
|
|
|
20430
20456
|
// src/commands/version.ts
|
|
20431
20457
|
var import_picocolors13 = __toESM(require("picocolors"));
|
|
20432
20458
|
function version2() {
|
|
20433
|
-
const v = true ? "2.26.
|
|
20459
|
+
const v = true ? "2.26.14" : "unknown";
|
|
20434
20460
|
console.log(`${import_picocolors13.default.bold("codeam-cli")} ${import_picocolors13.default.cyan(v)}`);
|
|
20435
20461
|
}
|
|
20436
20462
|
|
|
@@ -20658,7 +20684,7 @@ function checkForUpdates() {
|
|
|
20658
20684
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
20659
20685
|
if (process.env.CI) return;
|
|
20660
20686
|
if (!process.stdout.isTTY) return;
|
|
20661
|
-
const current = true ? "2.26.
|
|
20687
|
+
const current = true ? "2.26.14" : null;
|
|
20662
20688
|
if (!current) return;
|
|
20663
20689
|
const cache = readCache();
|
|
20664
20690
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.26.
|
|
3
|
+
"version": "2.26.14",
|
|
4
4
|
"description": "Workflow-continuity bridge for AI coding agents. Wrap Claude Code or Codex in a PTY and supervise, approve, and redirect the session from any device — async. The terminal companion for CodeAgent Mobile.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"chokidar": "^3.6.0",
|
|
75
75
|
"picocolors": "^1.1.0",
|
|
76
76
|
"qrcode-terminal": "^0.12.0",
|
|
77
|
-
"which": "^
|
|
77
|
+
"which": "^5.0.0",
|
|
78
78
|
"ws": "^8.18.0",
|
|
79
79
|
"zod": "^4.3.6"
|
|
80
80
|
},
|