New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

app-spec

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

app-spec - npm Package Compare versions

Comparing version 0.10.2 to 0.10.3

42

index.js

@@ -107,24 +107,24 @@

);
assert(typeof spec.defaults === 'object', 'spec.defaults object');
assert(process.env.NODE_ENV, 'NODE_ENV');
assert(spec.env, 'spec.env');
spec.env = mapMetas(spec.env);
if (process.env.mode === 'help') {
console.error(clc.green.bold(spec.description));
console.error(clc.white.bold('Options:'));
console.error(formatMetas(spec.env).join('\n'));
console.error();
}
const envDefaults = spec.defaults[process.env.NODE_ENV];
const env = reduceMetas(spec.env, process.env, envDefaults);
if (!spec.config) {
return env;
}
assert(typeof spec.config === 'function', 'spec.config function of env');
const configMetas = mapMetas(spec.config(env));
if (process.env.mode === 'help') {
console.error(formatMetas(configMetas).join('\n'));
}
try {
return reduceMetas(configMetas, process.env, env);
assert(typeof spec.defaults === 'object', 'spec.defaults object');
assert(process.env.NODE_ENV, 'NODE_ENV');
assert(spec.env, 'spec.env');
spec.env = mapMetas(spec.env);
if (process.env.mode === 'help') {
console.error(clc.green.bold(spec.description));
console.error(clc.white.bold('Options:'));
console.error(formatMetas(spec.env).join('\n'));
console.error();
}
const envDefaults = spec.defaults[process.env.NODE_ENV];
const env = reduceMetas(spec.env, process.env, envDefaults);
if (!spec.config) {
return env;
}
assert(typeof spec.config === 'function', 'spec.config function of env');
const configMetas = mapMetas(spec.config(env));
if (process.env.mode === 'help') {
console.error(formatMetas(configMetas).join('\n'));
}
return reduceMetas(configMetas, process.env, env);
} catch (err) {

@@ -131,0 +131,0 @@ console.error(clc.green.bold(spec.description));

{
"name": "app-spec",
"version": "0.10.2",
"version": "0.10.3",
"description": "Get application configuration from spec of required environment variables.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc