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

frack-settings

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

frack-settings - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

2

package.json
{
"name": "frack-settings",
"version": "0.0.9",
"version": "0.0.10",
"description": "Settings defaults and runtime loader from rc file",

@@ -5,0 +5,0 @@ "license": "MIT",

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

// @flow
import deepMerge from 'deepmerge'

@@ -5,33 +6,38 @@ import defaultSettings from './defaultSettings'

import has from 'lodash/fp/has'
import { resolve } from 'path'
import { join } from 'path'
const frackRcPath = resolve(process.cwd(), '.frackrc.js')
function getFrackRc () {
const frackRcPath = join(process.cwd(), '.frackrc.js')
let frackSettings = {
common: defaultSettings,
development: defaultSettings,
production: defaultSettings,
}
let frackSettings = {
common: defaultSettings,
development: defaultSettings,
production: defaultSettings,
}
if (existsSync(frackRcPath)) {
const frackRc = require(frackRcPath)
const hasCommon = has('common')
const hasDevelopment = has('development')
const hasProduction = has('production')
if (
typeof frackRc === 'object' &&
hasCommon(frackRc) &&
hasDevelopment(frackRc) &&
hasProduction(frackRc)
) {
frackSettings = deepMerge(frackSettings, frackRc)
if (existsSync(frackRcPath)) {
const frackRc = require(frackRcPath)
const hasCommon = has('common')
const hasDevelopment = has('development')
const hasProduction = has('production')
if (
typeof frackRc === 'object' &&
hasCommon(frackRc) &&
hasDevelopment(frackRc) &&
hasProduction(frackRc)
) {
frackSettings = deepMerge(frackSettings, frackRc)
} else {
throw new Error('File .frackrc.js containing application settings was not found.')
}
} else {
throw new Error('File .frackrc.js containing application settings was not found.')
throw new Error('File .frackrc.js not found on path ' + frackRcPath)
}
} else {
throw new Error('File .frackrc.js not found on path ' + frackRcPath)
return frackSettings
}
let frackSettings = getFrackRc()
const currentEnv = process.env.NODE_ENV || 'development'
export default deepMerge(frackSettings[currentEnv], frackSettings['common'])

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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