
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
read-cortex-json
Advanced tools
The thing cortex uses to read cortex.json files or fallback to read cortex configurations from package.json
The thing cortex uses to read cortex.json files or fallback to read cortex configurations from package.json.
Cortex supports both cortex.json
and the 'cortex'
field of package.json
. But with read-cortex-json
, you don't have to care about all this, and you should ALWAYS use this module to read and save cortex.json
.
npm install read-cortex-json --save
var cortexJson = require('read-cortex-json');
path
current working directoryfunction(err, json)
Error
Object
Reads and returns the information of a cortex package.
cortexJson.read('/path/to/your/repo', function(err, json){
if (err) {
console.error('There was an error', e);
return;
}
console.log('The package data is:', json);
});
This method is different from cortexJson.read()
that it will validate some stuff and flavors the object with some default values which cortex registry needs.
For most situations, you need not use this.
function(err)
Validates the json
data for a specified cwd
. This method will validate directories and entries.
function(err)
Save the json to the file.
function(root)
Traverses up from the cwd
and gets the first directory that contains a package file of cortex.
Sometimes user might run cortex commands inside the subtle directories of the current repo, and we must make sure cortex commands always run at the root directory.
String
package namepath
cache directory of the current profilefunction(err, document)
json
Gets the cached document.
FAQs
The thing cortex uses to read cortex.json files or fallback to read cortex configurations from package.json
The npm package read-cortex-json receives a total of 11 weekly downloads. As such, read-cortex-json popularity was classified as not popular.
We found that read-cortex-json demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.