Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@travetto/config

Package Overview
Dependencies
Maintainers
1
Versions
297
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@travetto/config - npm Package Compare versions

Comparing version 0.0.13 to 0.0.14

2

package.json

@@ -21,3 +21,3 @@ {

"scripts": {},
"version": "0.0.13"
"version": "0.0.14"
}

@@ -1,5 +0,6 @@

import { bulkRead, bulkReadSync, AppEnv, deepMerge, isPlainObject } from '@travetto/base';
import { bulkRead, bulkReadSync, AppEnv, deepMerge, isPlainObject, bulkFindSync } from '@travetto/base';
import * as flatten from 'flat';
import * as yaml from 'js-yaml';
import { EventEmitter } from 'events';
import { readdirSync } from 'fs';

@@ -124,6 +125,6 @@ const unflatten = flatten.unflatten;

// Load all namespaces from core
let files = bulkReadSync('node_modules/@travetto/*/config/*.yml');
let files = bulkReadSync([/^node_modules\/@travetto\/.*\/config\/.*[.]yml$/]);
// Load all configs, exclude env configs
files = files.concat(bulkReadSync('config/*.yml'));
files = files.concat(bulkReadSync([/^config\/.*[.]yml$/]));

@@ -140,10 +141,11 @@ for (const file of files) {

const loaded: string[] = [];
const envFiles = bulkReadSync(`env/*.yml`, undefined, x => {
const tested = x.split('/').pop()!.split('.yml')[0];
const found = AppEnv.is(tested)
const envFiles = bulkReadSync([/^env\/.*[.]yml$/]).reduce((acc, x) => {
const tested = x.name.split('/').pop()!.split('.yml')[0];
const found = AppEnv.is(tested);
if (found) {
acc.push(x.data);
loaded.push(tested);
}
return !found;
});
return acc;
}, [] as string[]);

@@ -153,3 +155,3 @@ console.debug('Found configurations for', loaded);

for (const file of envFiles) {
yaml.safeLoadAll(file.data, doc => {
yaml.safeLoadAll(file, doc => {
this.merge(this.data, doc);

@@ -156,0 +158,0 @@ });

@@ -0,2 +1,4 @@

process.env.ENV = 'test';
require('@travetto/base/bootstrap').run()
.then(x => require('./simple-config'));
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