instar 0.19.3 → 0.19.6
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/README.md +3 -3
- package/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +24 -0
- package/dist/commands/server.js.map +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +8 -4
- package/dist/commands/setup.js.map +1 -1
- package/dist/core/AutoUpdater.d.ts.map +1 -1
- package/dist/core/AutoUpdater.js +12 -0
- package/dist/core/AutoUpdater.js.map +1 -1
- package/dist/core/GlobalInstallCleanup.d.ts +23 -0
- package/dist/core/GlobalInstallCleanup.d.ts.map +1 -0
- package/dist/core/GlobalInstallCleanup.js +130 -0
- package/dist/core/GlobalInstallCleanup.js.map +1 -0
- package/dist/core/UpdateChecker.js +3 -3
- package/dist/core/UpdateChecker.js.map +1 -1
- package/dist/threadline/relay/ConnectionManager.d.ts.map +1 -1
- package/dist/threadline/relay/ConnectionManager.js +14 -0
- package/dist/threadline/relay/ConnectionManager.js.map +1 -1
- package/package.json +3 -3
- package/src/data/builtin-manifest.json +3 -3
- package/upgrades/0.19.4.md +19 -0
- package/upgrades/0.19.6.md +17 -0
package/README.md
CHANGED
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
<p align="center">
|
|
12
12
|
<a href="https://www.npmjs.com/package/instar"><img src="https://img.shields.io/npm/v/instar?style=flat-square" alt="npm version"></a>
|
|
13
13
|
<a href="https://www.npmjs.com/package/instar"><img src="https://img.shields.io/npm/dw/instar?style=flat-square" alt="npm downloads"></a>
|
|
14
|
-
<a href="https://github.com/
|
|
15
|
-
<a href="https://github.com/
|
|
14
|
+
<a href="https://github.com/JKHeadley/instar/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/JKHeadley/instar/ci.yml?branch=main&style=flat-square&label=CI" alt="CI"></a>
|
|
15
|
+
<a href="https://github.com/JKHeadley/instar/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-green?style=flat-square" alt="License"></a>
|
|
16
16
|
<img src="https://img.shields.io/badge/TypeScript-100%25-blue?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript">
|
|
17
17
|
<a href="https://instar.sh/introduction/"><img src="https://img.shields.io/badge/Docs-instar.sh-teal?style=flat-square" alt="Docs"></a>
|
|
18
18
|
</p>
|
|
19
19
|
|
|
20
20
|
<p align="center">
|
|
21
|
-
<a href="https://www.npmjs.com/package/instar">npm</a> · <a href="https://github.com/
|
|
21
|
+
<a href="https://www.npmjs.com/package/instar">npm</a> · <a href="https://github.com/JKHeadley/instar">GitHub</a> · <a href="https://instar.sh">instar.sh</a> · <a href="https://instar.sh/introduction/">Docs</a>
|
|
22
22
|
</p>
|
|
23
23
|
|
|
24
24
|
---
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAqPH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAw+BD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA6wEtE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
|
package/dist/commands/server.js
CHANGED
|
@@ -70,6 +70,7 @@ import { LiveConfig } from '../config/LiveConfig.js';
|
|
|
70
70
|
import { CoherenceMonitor } from '../monitoring/CoherenceMonitor.js';
|
|
71
71
|
import { ProcessIntegrity } from '../core/ProcessIntegrity.js';
|
|
72
72
|
import { StaleProcessGuard } from '../core/StaleProcessGuard.js';
|
|
73
|
+
import { cleanupGlobalInstalls } from '../core/GlobalInstallCleanup.js';
|
|
73
74
|
import { ForegroundRestartWatcher } from '../core/ForegroundRestartWatcher.js';
|
|
74
75
|
import { NotificationBatcher } from '../messaging/NotificationBatcher.js';
|
|
75
76
|
import { MessageStore } from '../messaging/MessageStore.js';
|
|
@@ -1218,6 +1219,29 @@ export async function startServer(options) {
|
|
|
1218
1219
|
console.warn(pc.red(` rm -rf ${path.join(process.cwd(), 'node_modules')} ${path.join(process.cwd(), 'package.json')} ${path.join(process.cwd(), 'package-lock.json')}`));
|
|
1219
1220
|
console.warn();
|
|
1220
1221
|
}
|
|
1222
|
+
// ── Global install cleanup ─────────────────────────────────────────
|
|
1223
|
+
// Shadow installs are the sole source of truth. Global installs cause
|
|
1224
|
+
// version confusion — agents report stale versions when CLI commands
|
|
1225
|
+
// resolve to a global binary instead of the shadow install.
|
|
1226
|
+
// Clean up any lingering globals at startup (idempotent, safe to run every time).
|
|
1227
|
+
try {
|
|
1228
|
+
const cleanup = cleanupGlobalInstalls();
|
|
1229
|
+
if (cleanup.removed.length > 0) {
|
|
1230
|
+
console.log(pc.green(` ✓ Cleaned up ${cleanup.removed.length} stale global instar install(s):`));
|
|
1231
|
+
for (const r of cleanup.removed) {
|
|
1232
|
+
console.log(pc.green(` - ${r}`));
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
if (cleanup.failed.length > 0) {
|
|
1236
|
+
for (const f of cleanup.failed) {
|
|
1237
|
+
console.warn(pc.yellow(` ⚠ Failed to remove global install at ${f.path}: ${f.error}`));
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
catch (err) {
|
|
1242
|
+
// Non-fatal — log and continue
|
|
1243
|
+
console.warn(`[server] Global install cleanup error: ${err instanceof Error ? err.message : String(err)}`);
|
|
1244
|
+
}
|
|
1221
1245
|
// ── ProcessIntegrity: freeze the running version at startup ────────
|
|
1222
1246
|
// This MUST happen before any version reporting. The version is captured
|
|
1223
1247
|
// from the code loaded into memory, NOT from disk (which changes after
|