Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
#! /usr/bin/env node
/* @flow */
import 'babel-polyfill'
import _ from 'lodash'
import chalk from 'chalk'
import path from 'path'
import program from 'commander'
import cliui from 'cliui'
import { Ouroboros, File } from './main'
const ui = cliui({ width: 80 })
function parseStrings (value) {
return value.split(/\s*,\s*/)
}
function parseNumber (value) {
return parseInt(value, 10)
}
function parseNumbers (value) {
return parseStrings(value).map(x => parseNumber(x))
}
function cloneOptions (options) {
const newOptions = {}
import path from 'path'
import requireProject from '../util/require-project'
import * as load from '../util/load'
import build from '../util/build-functions'
import Promise from 'bluebird'
import chalk from 'chalk'
import ctx from '../util/context'
import cliui from 'cliui'
const ui = cliui({ width: 80 })
const results = { success: 'SUCCESS', error: 'ERROR', exception: 'EXCEPTION' }
const awsNodeVersion = ['4.3.2', '6.10.2']
export default async function (opts) {
const logger = opts.logger || (() => {})
const processVersion = process.versions.node
if (awsNodeVersion.indexOf(processVersion) === -1) {
logger(`Warning: Lambda currently runs node v${awsNodeVersion} but you are using v${processVersion}`)
}
const loggingFunction = logFunction(opts.t)
const funcRunner = runFunction(opts)
const names = await load.funcs(opts.pattern)