Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"build": "npm run clean-dist && tsc && npm run copy-yaml && npm run build-manifest",
"build-manifest": "node dist/src/build-manifest.js",
"clean-dist": "node scripts/clean-dist.cjs",
"clean-yaml": "node scripts/clean-yaml.cjs",
"copy-yaml": "node scripts/copy-yaml.cjs",
"start": "node dist/src/main.js",
"start:bun": "bun dist/src/main.js",
Expand Down
19 changes: 0 additions & 19 deletions scripts/clean-yaml.cjs

This file was deleted.

16 changes: 0 additions & 16 deletions src/diagnostic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ function withTimeout<T>(promise: Promise<T>, ms: number, fallback: T): Promise<T
* 1. cmd.source (set for FS-scanned JS and manifest lazy-loaded JS)
* 2. cmd._modulePath (set for manifest lazy-loaded JS)
*
* For legacy dist/ paths, attempt to map back to source clis/.
* Skip manifest: prefixed pseudo-paths (YAML commands inlined in manifest).
*/
export function resolveAdapterSourcePath(cmd: InternalCliCommand): string | undefined {
Expand All @@ -233,27 +232,12 @@ export function resolveAdapterSourcePath(cmd: InternalCliCommand): string | unde
}

for (const candidate of candidates) {
// Try to map dist/ path back to source clis/ (legacy compat)
const sourceJs = mapDistToSource(candidate);
if (sourceJs && fs.existsSync(sourceJs)) return sourceJs;

// Try the candidate directly (YAML files, user clis, etc.)
if (fs.existsSync(candidate)) return candidate;
}

return candidates[0]; // Return best guess even if file doesn't exist
}

/** Map a dist/clis/xxx.js path back to clis/xxx.js source (legacy compat). */
function mapDistToSource(filePath: string): string | null {
const normalized = filePath.replace(/\\/g, '/');
const distClisMatch = normalized.match(/^(.*)\/dist\/clis\/(.+)\.js$/);
if (distClisMatch) {
return path.join(distClisMatch[1], 'clis', distClisMatch[2] + '.js');
}
return null;
}

// ── Diagnostic collection ────────────────────────────────────────────────────

/** Whether diagnostic mode is enabled. */
Expand Down
Loading