Configuration options for netsuite-related packages.
Set up authentication and custom parameters environment-wise or project-wise.
- node.js 0.10+ or io.js 1+ or node.js 4+
npm install nsconfigReads configuration parameters from the following sources (overriding each parameter on the same order):
-
overrideParamsargument; -
Searches up to 5 levels above cwd for a
nsconfig.jsonfile -
Searches for a
~/.ns/nsconfig.json(on windows~isX:/Users/<user>) -
Searches for environment variables. In this case, parameters are uppercased and prefixed with
NSCONF_.
projectParams
Set additional parameters that your module may want to look up.
The default parameters are:
[
{name: 'email', required: true},
{name: 'password', required: true},
{name: 'account', required: true},
{name: 'realm', def: 'system.netsuite.com'},
{name: 'role'}
]Currently accepted options for each custom parameter are:
interface ParamsDef {
name : string;
required? : boolean; //throws an error if this parameter is not defined
def? : boolean; //defaults to this value if this parameter is not defined
}See two configurations files:
-
Raw password: nsconfig.json
-
Hash password: nsconfig.json
var params = nsconfig()
{
"email": "email@suiteplus.com",
"password": "*****",
"account": "DDAA12321",
"realm": "system.netsuite.com",
"role": 3
}