adc62957a7
CI / Multi-repo Path Gate (AST-grep) (windows-latest) (push) Has been cancelled
CI / Version Consistency Check (push) Has been cancelled
CI / npm pack + install test (push) Has been cancelled
CI / Lint & Type Check (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Test (Windows path suite) (push) Has been cancelled
CI / Build (push) Has been cancelled
CI / No Committed Build Artifacts (push) Has been cancelled
CI / Multi-repo Path Gate (AST-grep) (ubuntu-latest) (push) Has been cancelled
Upgrade Test / omc update + session-start hook (push) Has been cancelled
24 lines
796 B
JavaScript
24 lines
796 B
JavaScript
/**
|
|
* HUD wrapper template reader (JS mirror).
|
|
*
|
|
* This is the JS mirror of src/lib/hud-wrapper-template.ts. Both must
|
|
* read the same .txt file. Keep them in sync — enforced by
|
|
* src/__tests__/hud-wrapper-template-sync.test.ts.
|
|
*
|
|
* Used by scripts/plugin-setup.mjs (Path B: Claude Code plugin marketplace).
|
|
* The TS module is used by src/installer/index.ts (Path A: `omc setup` / npm).
|
|
*/
|
|
|
|
import { readFileSync } from 'node:fs';
|
|
import { dirname, join } from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
const TEMPLATE_PATH = join(__dirname, 'hud-wrapper-template.txt');
|
|
|
|
export function buildHudWrapper() {
|
|
return readFileSync(TEMPLATE_PATH, 'utf8');
|
|
}
|
|
|
|
export const HUD_WRAPPER_TEMPLATE_PATH = TEMPLATE_PATH;
|