Skip to content

@W-21332566 - Use getConnection instead of axios#398

Open
ad-shreya wants to merge 5 commits intomainfrom
ashreya/remove-axios
Open

@W-21332566 - Use getConnection instead of axios#398
ad-shreya wants to merge 5 commits intomainfrom
ashreya/remove-axios

Conversation

@ad-shreya
Copy link
Contributor

What does this PR do?

Uses getOrgService instead of axios.
Benefits of using getOrgService-

  • getOrgService().getConnection(username) uses the Salesforce CLI’s stored auth (e.g. from sf login). You don’t manage access or refresh tokens yourself.
  • getConnection() only returns a connection for orgs that are in the MCP allowlist (allowedOrgs). Unlisted orgs are rejected with a clear error.
  • All tools use the same pattern: getOrgService().getConnection(usernameOrAlias) then call connection.

What issues does this PR fix or reference?

@W-21332566@

@ad-shreya ad-shreya changed the title @W-21332566 - Use connection instead of axios @W-21332566 - Use getConnection instead of axios Feb 23, 2026
@ad-shreya ad-shreya marked this pull request as ready for review February 23, 2026 16:05
@ad-shreya ad-shreya requested a review from a team as a code owner February 23, 2026 16:05
@iowillhoit
Copy link
Collaborator

Is this still used?

if (gitFolder === deployFolder && gitFile === deployFile) {

I am seeing some old connection logic

@ad-shreya ad-shreya force-pushed the ashreya/remove-axios branch from efd009d to 047fb88 Compare March 2, 2026 14:48
@iowillhoit
Copy link
Collaborator

Looks like axios is still in your package.json can you remove it and rebuild your yarn.lock?

@iowillhoit
Copy link
Collaborator

I am still seeing a few places that are using import { getConnection } from "./shared/auth.js" instead of getting the connection off of the services. Is there a reason for these?

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.

3 participants