Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update @salesforce/core to latest #332

Open
lcottercertinia opened this issue Aug 3, 2023 · 1 comment
Open

chore: update @salesforce/core to latest #332

lcottercertinia opened this issue Aug 3, 2023 · 1 comment
Assignees
Labels

Comments

@lcottercertinia
Copy link
Collaborator

lcottercertinia commented Aug 3, 2023

Is your feature request related to a problem?

Update @salesforce/core to latest.
This version of @salesforce/core removes the bunyan dependency which means we can remove the patched version in this repo.
https://github.com/certinia/debug-log-analyzer/tree/main/patches
https://github.com/forcedotcom/sfdx-core

There is a version available which handles some of the bundling steps
https://www.npmjs.com/package/@salesforce/core-bundle

Edit: seems like we can also remove sfdx auth help. [Org.create) in sfdx core defaults to the default org in current repo.

We can then just throw if no org returned.

try {
return await Org.create({ aliasOrUsername: orgName });
} catch (e) {
if (!orgNamee) {
Throw new error("no default set");
} else {
throw e;
}
}

Check out the deploy start or org open commands for example usage.

If that does not work due to where the code in vscode is executed from we can just replicate the logic in sfdx auth helper to keep the deps down.

https://github.com/forcedotcom/sfdx-core/blob/main/src/org/org.ts

https://github.com/salesforcecli/sf-plugins-core/blob/401832321da60f36d3f98658a6fdf56a5e0d4311/src/flags/orgFlags.ts#L142

https://github.com/salesforcecli/plugin-deploy-retrieve/blob/main/src/commands/project/deploy/start.ts

@lcottercertinia lcottercertinia added this to the v1.14.0 milestone Dec 4, 2023
@lcottercertinia lcottercertinia self-assigned this Dec 5, 2023
@lcottercertinia lcottercertinia removed this from the v1.14.0 milestone Feb 12, 2024
@lcottercertinia lcottercertinia changed the title chore: update @salesforce/core to ^5.0.0 chore: update @salesforce/core to latest Apr 3, 2024
@lcottercertinia lcottercertinia added this to the v1.16.0 milestone Apr 3, 2024
@lcottercertinia lcottercertinia modified the milestones: v1.16.0, v1.18.0 Jul 24, 2024
@lcottercertinia
Copy link
Collaborator Author

lcottercertinia commented Jan 3, 2025

Some resources that may help

vitejs/vite#788

nonara/ts-patch#106

https://github.com/nonara/ts-patch?tab=readme-ov-file#usage

There are also apex-node-bundle and core-bundle and we may need to copy sfdx-auth-helper logic.

Another option is to handle the messages in the 2 sf pages so they do not need to be inline.

@lcottercertinia lcottercertinia removed this from the v1.18.0 milestone Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant