Skip to content

fix: copy .mjs files to dist in build script#19

Merged
htafolla merged 1 commit intomasterfrom
fix/mjs-copy-build
Mar 30, 2026
Merged

fix: copy .mjs files to dist in build script#19
htafolla merged 1 commit intomasterfrom
fix/mjs-copy-build

Conversation

@htafolla
Copy link
Copy Markdown
Owner

Problem

tsc skips .mjs files entirely. The build script only ran tsc && cp public/*, so src/core/bridge.mjs and src/integrations/hermes-agent/bridge.mjs were never copied to dist/. Published packages shipped a broken Hermes bridge (MODULE_NOT_FOUND at dist/integrations/hermes-agent/bridge.mjs).

Fix

Added a find+copy step to the build script that copies all non-test .mjs files from src/ to dist/ (stripping the src/ prefix via ${f#src/}).

Verification

  • Build compiles clean (0 errors)
  • 127 test files / 2399 tests -- all pass
  • dist/core/bridge.mjs and dist/integrations/hermes-agent/bridge.mjs now present
  • Dist bridge health check returns {"status":"ok","version":"1.15.26"}

Hermes bridge (bridge.mjs) and core bridge were missing from dist
because tsc skips .mjs files entirely. Published packages had a
broken Hermes integration as a result.

Uses parameter expansion  to strip the src/ prefix and place
files at the correct dist/ path (not dist/src/).
@htafolla htafolla merged commit 400bf6d into master Mar 30, 2026
7 checks passed
@htafolla htafolla deleted the fix/mjs-copy-build branch March 30, 2026 03:09
htafolla added a commit that referenced this pull request Apr 2, 2026
- Add validators for terms #12, #19, #16, #3, #13 (early returns, small functions, DRY, over-engineering, error boundaries)
- Wire processor-pipeline MCP to use CodexLoader for richer validation
- Fix orchestrator config loading and conflict resolution wiring
- Total 16 active validators now (was 11)
htafolla added a commit that referenced this pull request Apr 2, 2026
- Add skipped tests for validators #12, #19, #16, #3, #13 (need real codex.json)
- Add MCP integration tests for codex-loader wiring
- Tests validate CodexLoader and processor-pipeline use the same rules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant