@heroku/functions-core
This is a shared library for interacting with Salesforce Functions from the following:
Currently, this library exposes:
generateProject
generateFunction
- a custom error class (
FunctionsError
). Benny
a class for interacting with github.com/heroku/benny and running
functions in a local container.LocalRun
a class for running functions on the local host.runFunction
for sending data to a running function.
Build
$ yarn build
Run Validations
$ yarn test
$ yarn lint
Publishing
- Open a PR to bump the
version
field in package.json
- Merge the PR once the Languages Team approves
- Run
npm publish
to publish the library (this step must be performed using npm
and not yarn
) - Run
git tag -a v{VERSION} -m "Released v{VERSION}" && git push --tags
to tag the release
Note:
All occurrences of{VERSION}
in the command above should be replaced with the value of version
set in package.json
Next Steps
For changes made to this library to make it into the Salesforce CLI and Visual Studio Code plugins it is necessary to
create PRs against those projects. Steps for each related project are detailed below.
@salesforce/plugin-functions
- Git clone the Functions CLI plugin project at
https://github.com/salesforcecli/plugin-functions
- Update this project's package.json with the latest version for
@heroku/functions-core
Note:
Due to path length constraints for Windows machines the @heroku/functions-core
package is aliased as @hk/functions-core
- Regenerate the
yarn.lock
by running yarn install
- Create a PR for these changes with
fix:
in the title and be sure to include in the description a reference to a work item using @GUS-W-12345678@
Note:
The Languages Team has permission to merge and approve PRs which only bump this dependency
- Once the PR is merged a bot service should:
- bump the version
- auto-publish the release to npm
- tag the release in GitHub
- Verify the bot has performed the tasks above before moving on
- Git clone the Salesforce CLI project at
https://github.com/salesforcecli/cli
- Update this project's package.json with the latest version of
@salesforce/plugin-functions
Note:
Due to path length constraints for Windows machines the @salesforce/plugin-functions
package is aliased as @sf/functions
- Regenerate the
yarn.lock
by running yarn install
- Create a PR with the title
chore: bump plugin-function from {OLD_VERSION} to {NEW_VERSION}
- The PR must be approved by CLI team before merging
salesforcedx-vscode-core
- Git clone the VSCode plugin project at
https://github.com/forcedotcom/salesforcedx-vscode
- Update this project's package.json with the latest version of
@heroku/functions-core
- Regenerate the
yarn.lock
by running yarn install
from the project root - Create a PR with the title
chore: bump functions-core from {OLD_VERSION} to {NEW_VERSION}
- Wait for the PR to be approved and merged