Skip to content

fix(task): resolve sf executable reliably on Windows and add Playwright task commands#59

Open
NerioVillalobos wants to merge 10 commits intomasterfrom
codex/add-metadelta-task-record-and-play-commands-0jbna7
Open

fix(task): resolve sf executable reliably on Windows and add Playwright task commands#59
NerioVillalobos wants to merge 10 commits intomasterfrom
codex/add-metadelta-task-record-and-play-commands-0jbna7

Conversation

@NerioVillalobos
Copy link
Owner

Motivation

  • Make org lookup resilient when the Salesforce CLI on Windows returns non-JSON/atypical output or when the sf binary is not resolved by spawnSync.
  • Surface process-level spawn errors (e.g. ENOENT) into diagnostic output so users receive actionable messages instead of a generic fallback.
  • Provide end-to-end task support (record/play) using Playwright including safe test patching and orchestration helpers to improve UX for recording and reproducing manual flows.

Description

  • Added robust SF execution helpers: getSfCommandCandidates, executeSfCommand, and enhanced runSfJsonCommand to try SF_BINPATH, sf, and sf.cmd and enable shell on win32, capturing spawn errors into combinedOutput for diagnostics (in src/utils/task/orchestrator.js).
  • Improved org resolution in buildFrontdoorUrlFromOrgDisplay to attempt org display --verbose --json, org open --url-only --json, and org display --json and throw a consolidated, user-friendly error via extractSfErrorMessage when none succeed.
  • Introduced task commands and orchestration utilities: new metadelta task record and metadelta task play commands, TaskOrchestrator (error/solutions persistence), Playwright readiness/install helpers, test injection/patching (injectBaseUrlInTest, test normalization), and route helpers (added tests/metadelta-task-orchestrator-routes.js and JSON data fixture).
  • Regenerated compiled artifacts and CLI manifest: updated lib/ outputs, added oclif.manifest.json entries for the new commands, updated README.md with a linked-ESM build note, and added a prepare script in package.json to run npm run build.

Testing

  • Ran npm run build, which completed successfully and regenerated compiled lib/ artifacts and the updated oclif.manifest.json (build passed).
  • Verified that the new buildFrontdoorUrlFromOrgDisplay and SF execution helpers are present in both src/ and lib/ outputs by inspecting the generated files (inspection passed).

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant