fix(package): emit CJS as .cjs, add exports map, expose control classes in bundles
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s

- type:module + CJS .js main broke import/require in Node; main now dist/testdrive-jsui.cjs
- exports map: types, import->esm, require->cjs, browser->min, ./style.css, ./dist/*
- dist bundles failed on load (ControlBase is not defined): bundler shims module, so the
  window.X else-branch never ran; controls now always set window globals
- npm pkg fix applied (repository url normalised)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: sonnet
Assistant-Process: 299063@bnt-lap001
Assistant-Session: 53eb1e1c-c13a-4277-9ce2-3702960d93f7
This commit is contained in:
tegwick 2026-10-02 22:44:04 +02:00
parent f17363c491
commit a9a27b86bb
8 changed files with 43 additions and 11 deletions

View file

@ -478,6 +478,8 @@ class DebugControl extends ControlBase {
// Export for module systems or attach to global for direct usage
if (typeof module !== 'undefined' && module.exports) {
module.exports = DebugControl;
} else {
}
// Also expose globally: bundlers shim `module`, so the else-branch never ran in dist builds
if (typeof window !== 'undefined') {
window.DebugControl = DebugControl;
}