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

devlab

Package Overview
Dependencies
Maintainers
2
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

devlab - npm Package Compare versions

Comparing version 3.4.0 to 3.4.1

2

package.json
{
"name": "devlab",
"version": "3.4.0",
"version": "3.4.1",
"description": "Node utility for running containerized tasks",

@@ -5,0 +5,0 @@ "keywords": [

@@ -5,2 +5,3 @@ 'use strict'

const fs = require('fs')
const path = require('path')

@@ -14,10 +15,22 @@ const config = {

* Loads config from yaml, attempts to parse to object
* @param {string} (path) Path to config file or use defaultPath
* @param {string} (configPath) Path to config file or use defaultPath
* @returns {object}
*/
load: (path = config.defaultPath) => {
load: (configPath = config.defaultPath) => {
try {
return yaml.safeLoad(fs.readFileSync(path, 'utf8'))
fs.statSync(configPath)
} catch (err) {
throw new Error([
`No config found at ${configPath}.`,
'Please create a ./devlab.yml file or specify one with the `-c` flag.'
].join(' '))
}
try {
return yaml.safeLoad(fs.readFileSync(configPath, 'utf8'))
} catch (e) {
throw new Error('Cannot load config file. Please ensure you have a valid ./devlab.yml file or specify one with the `-c` flag')
const relPath = path.relative(process.cwd(), configPath)
const error = new Error(`Please fix the errors in ${relPath}`)
error.message = error.message + `:\n\n${e.message}`
throw error
}

@@ -24,0 +37,0 @@ }

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