codiedev 0.9.76 → 0.9.77
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/commands/doctor.js +4 -2
- package/dist/selfUpdate.d.ts +8 -0
- package/dist/selfUpdate.js +22 -0
- package/package.json +1 -1
package/dist/commands/doctor.js
CHANGED
|
@@ -310,10 +310,12 @@ async function runDoctor(_args) {
|
|
|
310
310
|
const workspaceMode = workspaceScan.repoCount > 0;
|
|
311
311
|
checks.push({
|
|
312
312
|
name: "git on PATH",
|
|
313
|
-
|
|
313
|
+
// A warning, not a failure: sessions still capture without git, they just
|
|
314
|
+
// aren't tagged to a repo. Non-engineer installs often skip git entirely.
|
|
315
|
+
status: readiness.gitOnPath ? "pass" : "warn",
|
|
314
316
|
detail: readiness.gitOnPath
|
|
315
317
|
? undefined
|
|
316
|
-
: "not found — capture can't
|
|
318
|
+
: "not found — sessions still capture but can't be tagged to a repo (install git if you work in repos)",
|
|
317
319
|
});
|
|
318
320
|
checks.push({
|
|
319
321
|
name: "Inside a git work tree (current dir)",
|
package/dist/selfUpdate.d.ts
CHANGED
|
@@ -45,6 +45,14 @@ export declare function maybeSpawnSelfUpdate(hookEntry: string | undefined): voi
|
|
|
45
45
|
* one small file read. Honors the same opt-outs as the self-update.
|
|
46
46
|
*/
|
|
47
47
|
export declare function maybeRefreshInstructions(refresh?: () => string[]): void;
|
|
48
|
+
export declare const BIN_NAMES: readonly ["codiedev", "codiedev-hook", "codie"];
|
|
49
|
+
/**
|
|
50
|
+
* The .ps1 shims missing from a Windows npm prefix. The IT kit deletes them so
|
|
51
|
+
* PowerShell falls back to the .cmd shims, which run under the Restricted
|
|
52
|
+
* execution policy Windows client machines default to; `npm i -g` puts them
|
|
53
|
+
* back, so an update must delete again exactly the ones that were gone.
|
|
54
|
+
*/
|
|
55
|
+
export declare function missingPs1Shims(prefix: string, exists?: (p: string) => boolean): string[];
|
|
48
56
|
/**
|
|
49
57
|
* Where the just-installed copy lives. npm/bun reinstall in place. pnpm's
|
|
50
58
|
* `root -g` is <root>/node_modules up to v10 but the bare global/v11 parent
|
package/dist/selfUpdate.js
CHANGED
|
@@ -44,11 +44,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
44
44
|
};
|
|
45
45
|
})();
|
|
46
46
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
+
exports.BIN_NAMES = void 0;
|
|
47
48
|
exports.planSelfUpdate = planSelfUpdate;
|
|
48
49
|
exports.isSelfUpdateDue = isSelfUpdateDue;
|
|
49
50
|
exports.readSelfUpdateState = readSelfUpdateState;
|
|
50
51
|
exports.maybeSpawnSelfUpdate = maybeSpawnSelfUpdate;
|
|
51
52
|
exports.maybeRefreshInstructions = maybeRefreshInstructions;
|
|
53
|
+
exports.missingPs1Shims = missingPs1Shims;
|
|
52
54
|
exports.findInstalledHookScript = findInstalledHookScript;
|
|
53
55
|
exports.runSelfUpdate = runSelfUpdate;
|
|
54
56
|
const fs = __importStar(require("fs"));
|
|
@@ -290,6 +292,17 @@ function installCommand(plan, version, env) {
|
|
|
290
292
|
return null;
|
|
291
293
|
}
|
|
292
294
|
}
|
|
295
|
+
// package.json "bin" names. npm writes a .cmd, a .ps1 and a bare shim for each.
|
|
296
|
+
exports.BIN_NAMES = ["codiedev", "codiedev-hook", "codie"];
|
|
297
|
+
/**
|
|
298
|
+
* The .ps1 shims missing from a Windows npm prefix. The IT kit deletes them so
|
|
299
|
+
* PowerShell falls back to the .cmd shims, which run under the Restricted
|
|
300
|
+
* execution policy Windows client machines default to; `npm i -g` puts them
|
|
301
|
+
* back, so an update must delete again exactly the ones that were gone.
|
|
302
|
+
*/
|
|
303
|
+
function missingPs1Shims(prefix, exists = fs.existsSync) {
|
|
304
|
+
return exports.BIN_NAMES.map((name) => path.join(prefix, `${name}.ps1`)).filter((p) => !exists(p));
|
|
305
|
+
}
|
|
293
306
|
function readVersionAt(hookScript) {
|
|
294
307
|
try {
|
|
295
308
|
const pkg = JSON.parse(fs.readFileSync(path.join(path.dirname(path.dirname(hookScript)), "package.json"), "utf8"));
|
|
@@ -397,6 +410,7 @@ async function runSelfUpdate(hookEntry) {
|
|
|
397
410
|
const install = installCommand(plan, latest, env);
|
|
398
411
|
if (!install)
|
|
399
412
|
return finish("skip:no-installer");
|
|
413
|
+
const droppedShims = plan.kind === "npm" && process.platform === "win32" ? missingPs1Shims(plan.prefix) : [];
|
|
400
414
|
const result = (0, child_process_1.spawnSync)(install.cmd, install.args, {
|
|
401
415
|
stdio: "ignore",
|
|
402
416
|
timeout: INSTALL_TIMEOUT_MS,
|
|
@@ -407,6 +421,14 @@ async function runSelfUpdate(hookEntry) {
|
|
|
407
421
|
if (result.error || result.status !== 0) {
|
|
408
422
|
return finish(`error:install-exit-${result.status ?? "spawn"}`, { toVersion: latest });
|
|
409
423
|
}
|
|
424
|
+
for (const shim of droppedShims) {
|
|
425
|
+
try {
|
|
426
|
+
fs.rmSync(shim, { force: true });
|
|
427
|
+
}
|
|
428
|
+
catch {
|
|
429
|
+
// Best-effort: a leftover .ps1 only matters under a Restricted policy.
|
|
430
|
+
}
|
|
431
|
+
}
|
|
410
432
|
// Re-point the launcher. npm/bun reinstall in place; pnpm lands in a new
|
|
411
433
|
// hashed dir. Only switch once the new copy is on disk at the new version,
|
|
412
434
|
// so a half-finished install can never strand the hooks.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codiedev",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.77",
|
|
4
4
|
"description": "Connect Claude Code, Codex, Cursor, OpenCode, or VS Code Copilot to Codiedev for team session capture and artifact collaboration — and run the governed Codie harness",
|
|
5
5
|
"bin": {
|
|
6
6
|
"codiedev": "dist/cli.js",
|