- Move private package stubs to stubs/ (tracked), reference via file: in package.json
Stubs: color-diff-napi, modifiers-napi, @ant/claude-for-chrome-mcp,
@anthropic-ai/mcpb, @anthropic-ai/sandbox-runtime
- Add patches/commander@14.0.3.patch via pnpm patch:
Allow multi-char short flags (/^-[^-]+$/) so -d2e works with commander v14
- Pin all dependency versions to exact versions from original cli.js bundle
(extracted from node_modules package.json files in source map)
- Add @anthropic-ai/bedrock-sdk, foundry-sdk, vertex-sdk to dependencies
- Update .gitignore: node_modules/ fully ignored (regenerated by pnpm install)
- Update scripts to use plain `bun` instead of hardcoded path
- Verified: rm -rf node_modules && pnpm install && bun run build.ts succeeds
Output: dist/cli.js (22.1MB), `bun dist/cli.js --version` → 2.1.88 (Claude Code)
25 lines
825 B
JavaScript
25 lines
825 B
JavaScript
/**
|
|
* Simple debug logging for standalone sandbox
|
|
*/
|
|
export function logForDebugging(message, options) {
|
|
// Only log if SRT_DEBUG environment variable is set
|
|
// Using SRT_DEBUG instead of DEBUG to avoid conflicts with other tools
|
|
// (DEBUG is commonly used by Node.js debug libraries and VS Code)
|
|
if (!process.env.SRT_DEBUG) {
|
|
return;
|
|
}
|
|
const level = options?.level || 'info';
|
|
const prefix = '[SandboxDebug]';
|
|
// Always use stderr to avoid corrupting stdout JSON streams
|
|
switch (level) {
|
|
case 'error':
|
|
console.error(`${prefix} ${message}`);
|
|
break;
|
|
case 'warn':
|
|
console.warn(`${prefix} ${message}`);
|
|
break;
|
|
default:
|
|
console.error(`${prefix} ${message}`);
|
|
}
|
|
}
|
|
//# sourceMappingURL=debug.js.map
|