sf-env-vars
TypeScript icon, indicating that this package has built-in type declarations

2.1.2 • Public • Published

sf-env-vars

A simple npm package for accessing Salesforce-Env-Vars.

Usage

  1. Install

npm install sf-env-vars

  1. Define an ENV Class. The property names should match the ENV_VAR DeveloperName and must be assigned to null:
    export class Env {
        public FOO: string = null; 
        public BAR: number = null;
    }
  1. Load & Use
    import {load} from 'sf-env-vars';
    const vars = await load(Env);
    console.log(vars.FOO, vars.BAR);

Note: Currently uses ts-force as a peer dependency to connect & query salesforce. Will likely refactor in the future to accept a connection (and use more lightwieght client like axios).

Dependents (0)

Package Sidebar

Install

npm i sf-env-vars

Weekly Downloads

6

Version

2.1.2

License

ISC

Unpacked Size

37.7 kB

Total Files

11

Last publish

Collaborators

  • cjonas