
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
@apexdevtools/sfdx-auth-helper
Advanced tools
Authentication support library for sfdx.
To start, create an instance of the helper at the path of your sf project.
// dir containing sfdx-project.json
const workspacePath = '/path/to/my/project';
const helper = await AuthHelper.instance(workspacePath);
sf
config) // Connection.create(...) with default user auth info
const conn = helper.connect();
// Get an existing saved org by specific username or alias
helper.connect('user@mycompany.org');
helper.connect('MyOrg');
// new jsforce.Connection with default user auth info
const conn = helper.connectJsForce();
// Also supports alias / username
helper.connectJsForce('MyOrg');
// Provide fallback API version if none set in project
helper.connectJsForce('MyOrg', '57.0');
Connection
into a jsforce
one // Connection created by newer version of `@salesforce/core`
const conn = Connection.create({...});
// Use static to produce a jsforce.Connection
AuthHelper.toJsForceConnection(conn);
getDefaultUsername()
- This returns the default org username for a sfdx workspace. If no default username is set it returns undefined. If the default is an org alias that is translated to a username.reloadConfig()
- If the loaded config has changed due to some external action (e.g. org creation) the copy cached by the core library will be stale. Use this to reload, making a new helper instance will not be enough.This project uses the pnpm
package manager.
pnpm build
To run unit tests:
pnpm test
To test bundling using webpack:
pnpm test:pack
node test-bundle/bundle.js
This should execute without error.
If you encounter difficulties with the installed git hooks, they can be bypassed with --no-verify
/-n
flag on commit. To disable them completely (after install
) use npx husky uninstall
or the direct command git config --unset core.hooksPath
.
All the source code included uses a 3-clause BSD license, see LICENSE for details.
2.1.0 - 2023-10-13
@salesforce/core@^4
.FAQs
Salesforce authentication utilities
The npm package @apexdevtools/sfdx-auth-helper receives a total of 2 weekly downloads. As such, @apexdevtools/sfdx-auth-helper popularity was classified as not popular.
We found that @apexdevtools/sfdx-auth-helper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.