node-sec-patterns
Advanced tools
Comparing version 2.0.7 to 2.0.8
{ | ||
"name": "node-sec-patterns", | ||
"description": "Allow projects control over which dependencies can create objects that encapsulate security guarantees.", | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"keywords": [ | ||
@@ -17,3 +17,3 @@ "design-patterns", | ||
"dependencies": { | ||
"module-keys": "^1.0.9" | ||
"module-keys": "^1.0.10" | ||
}, | ||
@@ -20,0 +20,0 @@ "scripts": { |
@@ -18,2 +18,3 @@ # Node security design patterns | ||
* [Getting Started](#getting-started) | ||
* [`.authorize(config, projectRoot)`](#authorizeconfig-projectroot) | ||
* [Configuration](#configuration) | ||
@@ -70,3 +71,3 @@ * [Suggesting grants](#suggesting-grants) | ||
```js | ||
require('node-sec-patterns').authorize(require('./package.json')) | ||
require('node-sec-patterns').authorize(require('./package.json'), '.') | ||
``` | ||
@@ -85,3 +86,15 @@ | ||
### `.authorize(config, projectRoot)` | ||
An application's main module should call the `authorize` function | ||
before loading modules that need to create mintable types. | ||
It takes two parameters: | ||
* A configuration object with a property named `"mintable"`. | ||
See [Configuration](#configuration). | ||
* A path to the project root. Relative paths in the configuration | ||
objects resolve relative to this path. | ||
Defaults to the `__dirname` of the module that loaded `.authorize`. | ||
## Configuration | ||
@@ -88,0 +101,0 @@ If you `authorize`d the package as above, then configuration happens |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41528
346
Updatedmodule-keys@^1.0.10