Files
Claude-Code-Compiled/shims/bun-bundle.ts
Roger 13b2e92dc8 fix: skip auth checks, add auto-execute to bundle
- assertMinVersion: always pass (skip remote version check)
- validateForceLoginOrg: skip in both interactive and non-interactive
- bundle.js: auto-invoke main() on load

Now 'bun dist/bundle.js --help' works without API key.
2026-04-01 01:01:20 +08:00

33 lines
974 B
TypeScript

// shims/bun-bundle.ts
// Shim for bun:bundle feature flags
// In real Bun builds, these are compile-time constants
export function feature(name: string): boolean {
const flags: Record<string, boolean> = {
WORKFLOW_SCRIPTS: false,
AGENT_TRIGGERS: false,
};
return flags[name] ?? false;
}
// Inject MACRO globals
declare global {
var MACRO: {
VERSION: string;
BUILD_TIME: string | undefined;
ISSUES_EXPLAINER: string;
FEEDBACK_CHANNEL: string;
NATIVE_PACKAGE_URL: string;
PACKAGE_URL: string;
VERSION_CHANGELOG: string;
};
}
(globalThis as any).MACRO = {
VERSION: '0.0.0-leaked',
BUILD_TIME: undefined,
ISSUES_EXPLAINER: 'https://github.com/anthropics/claude-code/issues',
FEEDBACK_CHANNEL: '#claude-code-feedback',
NATIVE_PACKAGE_URL: 'https://claude.ai/download',
PACKAGE_URL: 'https://www.npmjs.com/package/@anthropic-ai/claude-code',
VERSION_CHANGELOG: 'https://github.com/anthropics/claude-code/releases',
};