Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { getConfig, getUser } from './base'
import * as logger from './logger'
import {
createGlobalConfig,
getGlobalPackageJson,
getUserHomePath,
addPluginConfig,
} from './configs'
import { prepend, safeReaddir, safeImport, safeRealpath, safeWhich } from './fp'
import * as git from './git'
import { getGitHubInstance } from './github'
const testing = process.env.NODE_ENV === 'testing'
// Make Fluture Play nicely with Sanctuary
const S = create({ checkTypes: true, env: env.concat(flutureEnv) })
// Allow mutation of options when not testing
// https://immerjs.github.io/immer/docs/freezing
setAutoFreeze(testing)
Future.debugMode(testing)
interface CommandInterface {
name: string
isPlugin?: boolean
DETAILS: {
alias: string
description: string
commands: string
options: object
shorthands: object
import { create, env } from 'sanctuary'
import * as updateNotifier from 'update-notifier'
import { getConfig, getUser } from './base'
import { createGlobalConfig, getGlobalPackageJson, getUserHomePath } from './configs'
import { prepend, safeReaddir, safeImport, safeRealpath, safeWhich } from './fp'
import * as git from './git'
import { getGitHubInstance } from './github'
import { spawnSync, execSyncInteractiveStream } from './exec'
import { readFileSync, writeFileSync } from 'fs'
import * as userhome from 'userhome'
const testing = process.env.NODE_ENV === 'testing'
// Make Fluture Play nicely with Sanctuary
const S = create({ checkTypes: true, env: env.concat(flutureEnv) })
// Allow mutation of options when not testing
// https://immerjs.github.io/immer/docs/freezing
setAutoFreeze(testing)
Future.debugMode(testing)
interface CommandInterface {
name: string
isPlugin?: boolean
DETAILS: {
alias: string
description: string
commands: string
options: object
shorthands: object
const checkProps = R.allPass([
propIsString('module'),
optionalPropIsString('name'),
optionalPropIsString('type'),
])
const isDepObject = R.both(isObject, checkProps)
const isDep = R.either(isString, isDepObject)
const chimiDependency = NullaryType('chimi/Dependency', '#', isDep)
const S = create({
checkTypes: true,
env: env.concat([chimiDependency]),
})
module.exports = S