@heroku/salesforce-sdk
v0.0.1-develop.10
Published
Salesforce Function SDK for Node.js
Downloads
79
Maintainers
Keywords
Readme
Salesforce Function SDK for Node.js
Usage
import * as sdk from 'salesforce-sdk';
export default class HelloFunction {
private readonly logger: sdk.Logger;
constructor(private readonly event: any,
private readonly context: sdk.Context) {
this.logger = context.logger;
this.logger.shout(`${this.getName()}.init()`);
}
public getName(): string {
return this.constructor.name;
}
public async invoke(): Promise<any> {
this.logger.shout(`${this.getName()}.invoke()`);
const results = await this.context.forceApi.query('SELECT Name FROM Account');
this.logger.info(JSON.stringify(query));
return results;
}
}
Publish salesforce-sdk
salesforce-sdk
is published to https://www.npmjs.com/package/@heroku/salesforce-sdk.
Note: Requires access to @heroku/salesforce-sdk
.
To publish to @heroku/salesforce-sdk
:
- Ensure you have latest source locally.
git pull
...
- Build & test.
npm run build
...
npm run test
...
Ensure that code coverage meets standards.
- Increment version in
package.json
.
If applicable, can use npm version
.
TODO: Decide when to git-tag
version.
- Publish to
npmjs.com
.
npm publish
...
May use np
, eg:
np 0.0.18-develop.1 --no-release-draft --tag=develop.1 --any-branch
- Test and push to repo.
npm install
...
git commit -a -m "<updated-version>"
...
git push
...
TODO: Decide when to git-tag
version.