CloudCode Dependencies
Defaults
A few Node.js packages are included by default in every CloudCode task. This includes:
aws-sdk
node-fetch
(exposed as a fetch global function)
Additional Node.js dependencies can be added to a task or managed via OXIDE. See the following section for details:
Manage External DependenciesPrivate NPM Packages
CloudCode supports the addition of private NPM packages to be used in tasks. To do this, you need to:
Update the task's
package.json
file with the relevant details for the private package you are using.Add an access token for your org in the task's
.npmrc
file. To do this, open the task's.npmrc
file and add this line://registry.npmjs.org/:_authToken=$NPM_TOKEN
- where $NPM_TOKEN is your NPM user's access token.Update the
yarn.lock
file (right-click on the CloudCode task in OXIDE or use the command palette).
Using dependencies
Once dependencies are added to the task, they can be imported and used in the task:
Last updated