Skip to content

feat(services): add PlainServicesApi facade - W-22419571#7309

Open
peternhale wants to merge 1 commit into
developfrom
phale/W-22419571/plain-services-api-facade
Open

feat(services): add PlainServicesApi facade - W-22419571#7309
peternhale wants to merge 1 commit into
developfrom
phale/W-22419571/plain-services-api-facade

Conversation

@peternhale
Copy link
Copy Markdown
Contributor

@peternhale peternhale commented May 8, 2026

Summary

  • Adds a Promise-based PlainServicesApi facade to salesforcedx-vscode-services that allows external consumers to use all services without importing or depending on effect
  • Exposes connection, workspace, project, settings, config, aliases, file system, editor, channel, metadata, source tracking, templates, trace flags, terminal, and component set operations as simple Promise-returning methods
  • Bridges reactive state (SubscriptionRef, PubSub) to standard vscode.Event<T> patterns
  • Existing Effect-based services property remains unchanged (non-breaking addition)
  • Updates READMEs for both salesforcedx-vscode-services and salesforcedx-vscode-services-types to document the new plain API as the recommended consumption pattern

Test plan

  • 42 unit tests covering all facade methods, error handling, and reactive event bridging
  • Full monorepo compilation passes (38 packages)
  • Full monorepo lint passes (77 scripts)
  • Full monorepo test suite passes (159 tests in services package)
  • Manual verification: consumer extension can call api.getConnection() without any effect imports

@W-22419571@

🤖 Generated with Claude Code

External consumers must currently depend on effect and learn Effect-TS patterns
just to call getConnection(). This adds a PlainServicesApi that wraps all services
as Promise-returning methods plus vscode.Event<T> for reactive state, eliminating
the framework dependency for consumers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@peternhale peternhale requested a review from a team as a code owner May 8, 2026 20:40
@peternhale peternhale requested review from gbockus-sf and madhur310 and removed request for madhur310 May 8, 2026 20:40
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