@adobe/aio-lib-core-config
Advanced tools
Comparing version 1.0.15 to 1.1.0
{ | ||
"name": "@adobe/aio-lib-core-config", | ||
"version": "1.0.15", | ||
"version": "1.1.0", | ||
"description": "Adobe I/O Configuration Module", | ||
"main": "./src", | ||
"main": "./src/index.js", | ||
"repository": "https://github.com/adobe/aio-lib-core-config", | ||
@@ -10,3 +10,3 @@ "author": "Adobe Inc.", | ||
"engines": { | ||
"node": ">=8.10.0" | ||
"node": ">=10.0" | ||
}, | ||
@@ -17,3 +17,5 @@ "files": [ | ||
"scripts": { | ||
"test": "eslint . && jest --coverage" | ||
"lint": "eslint .", | ||
"test": "npm run lint && jest --coverage", | ||
"docs": "jsdoc2md -f 'src/index.js' > doc/api.md" | ||
}, | ||
@@ -33,4 +35,4 @@ "dependencies": { | ||
"eslint-plugin-import": "^2.16.0", | ||
"eslint-plugin-jest": "22.17.0", | ||
"eslint-plugin-node": "^10.0.0", | ||
"eslint-plugin-jest": "23.2.0", | ||
"eslint-plugin-node": "^11.0.0", | ||
"eslint-plugin-promise": "^4.0.1", | ||
@@ -40,4 +42,5 @@ "eslint-plugin-standard": "^4.0.0", | ||
"jest-plugin-fs": "^2.9.0", | ||
"mock-stdin": "^0.3.1" | ||
"jsdoc-to-markdown": "^5.0.1", | ||
"mock-stdin": "^1.0.0" | ||
} | ||
} |
@@ -22,12 +22,9 @@ <!-- | ||
This is a nodejs module to allow management of persistant and environment variable configuration. | ||
This is a nodejs module to allow management of persistent and environment variable configuration. | ||
The module can be added to your project with: | ||
```javascript | ||
> yarn add @adobe/aio-lib-core-config | ||
or | ||
> npm install @adobe/aio-lib-core-config --save | ||
npm install @adobe/aio-lib-core-config --save | ||
``` | ||
@@ -98,5 +95,8 @@ | ||
``` | ||
## Explore | ||
`goto` [API](./doc/api.md) | ||
## Contributing | ||
Contributions are welcomed! Read the [Contributing Guide](CONTRIBUTING.md) for more information. | ||
Contributions are welcomed! Read the [Contributing Guide](./.github/CONTRIBUTING.md) for more information. | ||
@@ -103,0 +103,0 @@ ## Licensing |
@@ -19,9 +19,57 @@ /* | ||
module.exports = (() => { | ||
this.get = (key, local) => config.get(key, local) | ||
/** | ||
* Gets the value for a key in the Config. | ||
* If no parameters are specified, it will return all keys and values of the consolidated Config. | ||
* | ||
* @global | ||
* @param {string} [key=''] the key to get the value from | ||
* @param {string} [source] 'global', 'local', or 'env'. Defaults to searching the consolidated config. | ||
*/ | ||
this.get = (key, source) => config.get(key, source) | ||
/** | ||
* Set the value for a key in the Config. | ||
* | ||
* @global | ||
* @param {string} key the key to set the value to | ||
* @param {string} value the value to save for the key | ||
* @param {string} [local=false] Set to true to save the value in the local config. Defaults to false (save to global config). | ||
*/ | ||
this.set = (key, value, local) => config.set(key, value, local) && this | ||
/** | ||
* Delete a key and its value in the Config. | ||
* | ||
* @global | ||
* @param {string} key the key to delete the value from | ||
* @param {string} [local=false] Set to true to delete the value in the local config. Defaults to false (save to global config). | ||
*/ | ||
this.delete = (key, local) => config.set(key, null, local) && this | ||
/** | ||
* Reload the Config from all the config file(s) | ||
* @global | ||
*/ | ||
this.reload = () => config.reload() && this | ||
/** | ||
* Pipe data from stdin. | ||
* | ||
* @global | ||
* @function | ||
* @return {Promise} | ||
*/ | ||
this.getPipedData = pipe | ||
/** | ||
* Hoists variables in the ./.env file to process.env | ||
* | ||
* @global | ||
* @function | ||
* @param {boolean} [force=false] force reload of the .env file | ||
*/ | ||
this.dotenv = dotenv | ||
return this | ||
})() |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
28715
400
13
1