Skip to content

fix(cli): add executionReporter.error to the local engine - #72

Open
helenkwok wants to merge 1 commit into
ThatOpen:mainfrom
helenkwok:fix/local-reporter-error
Open

helenkwok wants to merge 1 commit into
ThatOpen:mainfrom
helenkwok:fix/local-reporter-error

Conversation

@helenkwok

Copy link
Copy Markdown

Closes #70.

  • src/cli/lib/engine-script.ts: the local executionReporter gains error(message), sent as an ERROR message, so it matches the cloud-component README and the cloud worker.
  • thatopen run prints it as [error] and keeps running (it is a log line, not a failure; FAIL still ends the run).
  • local-server records it like a message, with level: "error", as the platform's execution messages do.
  • docs/cli/run.md lists the new output type; patch changeset.

Tests: new src/cli/lib/engine-script.test.ts forks a generated engine script whose main() calls executionReporter.error and checks the IPC messages (ERROR, then SUCCESS); it fails on main with the TypeError. yarn lint, tsc --noEmit and vitest run pass (152 tests).

This touches the same switch in run.ts and execution-manager.ts as #61, so whichever lands second needs a trivial rebase.

The cloud-component README documents executionReporter.error(msg) and the
cloud worker provides it, but the local engine script did not, so calling it
threw under thatopen run and local-server. Send it as an ERROR message, print it
as [error], and record level "error" in local-server messages as the platform
does.
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.

thatopen run / local-server: executionReporter.error() is undefined locally

1 participant