Extends
- AbstractModule
Members
configFilePath :String
- Description:
- Path to the user configuration file
- Source:
Path to the user configuration file
Type:
- String
publicAttributes :Array.<String>
- Description:
- The keys for all attributes marked as public
- Source:
The keys for all attributes marked as public
Type:
- Array.<String>
Methods
envVarToConfigKey(envVar) → {String}
- Description:
- Parses an environment variable key into a format expected by this module
- Source:
Parameters:
Name | Type | Description |
---|---|---|
envVar |
String |
Returns:
The formatted key
- Type
- String
get(attr) → {*}
- Description:
- Returns a value for a given attribute
- Source:
Parameters:
Name | Type | Description |
---|---|---|
attr |
String | Attribute key name |
Returns:
The attribute's value
- Type
- *
getPublicConfig() → {Object}
- Description:
- Retrieves all config options marked as 'public'
- Source:
Returns:
- Type
- Object
has(attr) → {Boolean}
- Description:
- Determines whether an attribute has a set value
- Source:
Parameters:
Name | Type | Description |
---|---|---|
attr |
String | Attribute key name |
Returns:
Whether the value exists
- Type
- Boolean
(async) init()
(async) initRouter() → {Promise}
- Description:
- Adds routing functionality
- Source:
Returns:
- Type
- Promise
(async) processModuleSchema(pkg, jsonschema) → {Promise}
- Description:
- Processes and validates a single module config schema (checks the user config specifies any required fields, and that they are the expected type)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
pkg |
Object | Package.json data |
jsonschema |
JsonSchemaModule | Module instance for validation |
Returns:
- Type
- Promise
set(attr, val)
- Description:
- Stores a value for the passed attribute
- Source:
Parameters:
Name | Type | Description |
---|---|---|
attr |
String | Attribute key name |
val |
* | Value to set |
(async) storeEnvSettings() → {Promise}
- Description:
- Copy env values to config
- Source:
Returns:
- Type
- Promise
(async) storeSchemaSettings() → {Promise}
- Description:
- Processes all module config schema files
- Source:
Returns:
- Type
- Promise
(async) storeUserSettings() → {Promise}
- Description:
- Loads the relevant config file into memory
- Source:
Returns:
- Type
- Promise