fix: address 10 unresolved PR review threads
- README: add language specifier to fenced code block - paths.ts: guard npmPackageRootDirectory() against bundle structure drift - OpenCodeInstaller: resolve bundle from import.meta.url, not process.cwd() - OpenCodeInstaller: log warnings on AGENTS.md injection failures - WindsurfHooksInstaller: key registry by full workspace path, not basename - uninstall.ts: poll health endpoint to wait for worker exit before file deletion - uninstall.ts: call IDE-specific uninstallers (Gemini, Windsurf, OpenCode, OpenClaw, Codex) - opencode-plugin: cap session tracking Map at 1000 entries with LRU eviction - GeminiCliHooksInstaller: document intentional JSON double-escaping Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -73,7 +73,14 @@ export function claudeMemDataDirectory(): string {
|
||||
export function npmPackageRootDirectory(): string {
|
||||
const currentFilePath = fileURLToPath(import.meta.url);
|
||||
// <pkg>/dist/npx-cli/index.js -> up 2 levels -> <pkg>
|
||||
return join(dirname(currentFilePath), '..', '..');
|
||||
const root = join(dirname(currentFilePath), '..', '..');
|
||||
if (!existsSync(join(root, 'package.json'))) {
|
||||
throw new Error(
|
||||
`npmPackageRootDirectory: expected package.json at ${root}. ` +
|
||||
`Bundle structure may have changed — update the path walk.`,
|
||||
);
|
||||
}
|
||||
return root;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user