codebyplan 1.10.1 → 1.10.2
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/cli.js +28 -8
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -14,7 +14,7 @@ var VERSION, PACKAGE_NAME;
|
|
|
14
14
|
var init_version = __esm({
|
|
15
15
|
"src/lib/version.ts"() {
|
|
16
16
|
"use strict";
|
|
17
|
-
VERSION = "1.10.
|
|
17
|
+
VERSION = "1.10.2";
|
|
18
18
|
PACKAGE_NAME = "codebyplan";
|
|
19
19
|
}
|
|
20
20
|
});
|
|
@@ -516,8 +516,8 @@ async function resolveAndCacheWorktreeId(repoId, projectPath, options) {
|
|
|
516
516
|
});
|
|
517
517
|
if (match) worktreeId = match.id;
|
|
518
518
|
} catch (err) {
|
|
519
|
-
console.
|
|
520
|
-
`Worktree lookup failed: ${err instanceof Error ? err.message : String(err)}
|
|
519
|
+
console.warn(
|
|
520
|
+
`Worktree self-heal skipped (non-fatal): worktree lookup failed: ${err instanceof Error ? err.message : String(err)}. Continuing.`
|
|
521
521
|
);
|
|
522
522
|
return void 0;
|
|
523
523
|
}
|
|
@@ -585,8 +585,8 @@ async function resolveWorktreeByBranch({
|
|
|
585
585
|
}
|
|
586
586
|
return match?.id ?? null;
|
|
587
587
|
} catch (err) {
|
|
588
|
-
console.
|
|
589
|
-
`
|
|
588
|
+
console.warn(
|
|
589
|
+
`Worktree self-heal skipped (non-fatal): branch worktree resolve failed: ${err instanceof Error ? err.message : String(err)}. Continuing.`
|
|
590
590
|
);
|
|
591
591
|
return null;
|
|
592
592
|
}
|
|
@@ -604,8 +604,8 @@ async function resolveWorktreeId({
|
|
|
604
604
|
);
|
|
605
605
|
return res.worktree_id ?? null;
|
|
606
606
|
} catch (err) {
|
|
607
|
-
console.
|
|
608
|
-
`
|
|
607
|
+
console.warn(
|
|
608
|
+
`Worktree self-heal skipped (non-fatal): ${err instanceof Error ? err.message : String(err)}. Continuing \u2014 run \`codebyplan config\` again later to retry.`
|
|
609
609
|
);
|
|
610
610
|
return null;
|
|
611
611
|
}
|
|
@@ -4153,7 +4153,27 @@ async function syncConfigToFile(repoId, projectPath, dryRun) {
|
|
|
4153
4153
|
` Warning: failed to cache worktree_id (self-heal skipped): ${msg}`
|
|
4154
4154
|
);
|
|
4155
4155
|
}
|
|
4156
|
-
|
|
4156
|
+
let repoRes;
|
|
4157
|
+
try {
|
|
4158
|
+
repoRes = await apiGet(`/repos/${repoId}`);
|
|
4159
|
+
} catch (err) {
|
|
4160
|
+
let message;
|
|
4161
|
+
if (err instanceof ApiError) {
|
|
4162
|
+
if (err.status === 401) {
|
|
4163
|
+
message = "Session expired. Run `codebyplan login` and try again.";
|
|
4164
|
+
} else if (err.status === 403 || err.status === 404) {
|
|
4165
|
+
message = "Repo not found or not accessible to your account. Confirm the repo_id in .codebyplan/repo.json and that you are logged in as the right user.";
|
|
4166
|
+
} else if (err.status >= 500) {
|
|
4167
|
+
message = `CodeByPlan server error (status ${err.status}). Please try again shortly.`;
|
|
4168
|
+
} else {
|
|
4169
|
+
message = `Unexpected API error (status ${err.status}). Please try again.`;
|
|
4170
|
+
}
|
|
4171
|
+
} else {
|
|
4172
|
+
message = "Failed to reach the CodeByPlan API. Check your network connection and try again.";
|
|
4173
|
+
}
|
|
4174
|
+
process.stderr.write(message + "\n");
|
|
4175
|
+
process.exit(1);
|
|
4176
|
+
}
|
|
4157
4177
|
const repo = repoRes.data;
|
|
4158
4178
|
let portAllocations = [];
|
|
4159
4179
|
try {
|