
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
@mutable/meta
Advanced tools
This package is a wrapper to the background service Mutable Meta
. Mutable Meta is responsible for service discovery and service configuration.
const Meta = require('@mutable/meta')
All methods are asynchronous, and take a node-style error-first callback as last argument. If no callback is supplied, a promise is returned instead.
Returns all the currently known service names.
Example:
Meta.services()
.then((_services) => {
// returns an object {}
})
Returns a particular service.
Example:
Meta.service("email")
.then((service) => {
request.post(`http://${service}/api/v1/demo/email`,
{json:req.body},
(error, response, body) => {
if(error){
console.error('can not reach email service')
return res.send(500,{error:error,result:'can not reach email service'})
}
res.send({result:"email sent"})
})
})
or
Meta.service("email", (config) => {
// returns a object
// {"hostname":"127.0.0.1", "port":3001, toString(): "127.0.0.1:3001" }
// in a string it prints concat host and port
request.post(`http://${service}/api/v1/demo/email`,
{json:req.body},
(error, response, body) => {
if(error){
console.error('can not reach email service')
return res.send(500,{error:error,result:'can not reach email service'})
}
res.send({result:"email sent"})
})
})
Fetches the JSON configuration for the current service.
Example:
Meta.config()
.then((_config) => {
// returns an object {}
})
For non-mutable deployments set USE_SECRETS=true
environment variable to set secrets in the config.
Use CONFIG
environment variable to store configs when using secrets.
Use SECRET_
prefix to set secrets as object in the config.
Example:
USE_SECRETS=true CONFIG={"key":"value"} SECRET_SENDGRID_KEY='your_key' SECRET_REDIS='{"db":00}' node app.js
Resulting in this config object:
{
"key": "value",
sendgrid_key: "your_key",
redis: {
"db": 00
}
}
SECRET_
prefix gets removed when setting the key in the config object.
For non-mutable deployments set DNS
environment variable to true and use DNS_POSTFIX
variable to modify the service url
Example:
DNS=true DNS_POSTFIX='.default.csv.cluster.local' node app.js
Result target: http://your-web-service.default.scv.cluster.local/
FAQs
Meta client for node
We found that @mutable/meta demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.