/*
import configureContext from 'redux-addons/context'
const context = configureContext(libOpts)(appOpts)
const {  } = context
969065
function configureContext(libOpts) {
  if (isDev) validateLibOpts(libOpts);
  var libName = libOpts.libName;
  var validateContext = libOpts.validateContext;
  var configureAppContext = libOpts.configureAppContext;
  var configureInitialState = libOpts.configureInitialState;

  return function (appOpts) {
    if (isDev) validateAppOpts(appOpts);
    var appName = appOpts.appName;
    var level = appOpts.level;


    var translateBlueprintType = function translateBlueprintType(blueprintType) {
      return cleanActionName(libName) + '_' + cleanActionName(appName) + '_' + cleanActionName(blueprintType);
    };
    var translateBlueprintTypes = (0, _reduxBlueprint.translateBlueprintTypesWith)(translateBlueprintType);
    var translateBlueprints = (0, _reduxBlueprint.translateBlueprintsWith)(translateBlueprintType);

    var libContext = { log: (0, _log.createLogger)({ libName: libName, level: level }),
      libName: libName,
      appName: appName,
      translateBlueprintTypes: translateBlueprintTypes,
      translateBlueprints: translateBlueprints
    };

    var appContext = configureAppContext(libContext)(appOpts);
    if (isDev) validateContext(libContext, appContext);

    return Object.assign(appContext, libContext, { get initialState() {
        return configureInitialState(libContext)(appContext);
      }
    });
  };
}
528204
async function install (context) {
  const {
    filesystem,
    parameters,
    ignite,
    reactNative,
    print,
    system,
    prompt,
    template
  } = context

  const perfStart = (new Date()).getTime()

  const name = parameters.first
  const spinner = print
    .spin(`Generating a React Native client for JHipster apps`)
    .succeed()

  let props = {
    jhipsterDirectory: parameters.options['jh-dir'] || '',
    detox: parameters.options.detox,
    disableInsight: parameters.options['disable-insight'] || false
  }
  let jhipsterConfig
  let jhipsterDirectory

  // if the user is passing in JDL
  if (parameters.options.jdl) {
    print.info('Importing JDL')
    const results = importJDL([`../${parameters.options.jdl}`], null, null, null, print)
    if (results.exportedApplications.length === 0) {
      print.error('No JHipster Applications found in the JDL file')
      return
    }
    // remove the files generated by import-jdl
    await rimraf.sync('.yo-rc.json')
    await rimraf.sync('.jhipster')
    jhipsterConfig = results.exportedApplications[0]
    jhipsterDirectory = ''
  // if the user is passing in a directory
  } else if (props.jhipsterDirectory) {
    if (!fs.existsSync(`../${props.jhipsterDirectory}/.yo-rc.json`)) {
      print.error(`No JHipster configuration file found at ${props.jhipsterDirectory}/.yo-rc.json`)
      return
    }
    print.success(`Found the JHipster config at ${props.jhipsterDirectory}/.yo-rc.json`)
    const pathPrefix = props.jhipsterDirectory.startsWith('/') ? '' : '../'
    jhipsterConfig = await fs.readJson(`${pathPrefix}${props.jhipsterDirectory}/.yo-rc.json`)
    jhipsterDirectory = props.jhipsterDirectory
  // the user didn't pass in JDL or a path, prompt them for a path
  } else {
    // prompt the user until an JHipster configuration file is found
    while (true) {
      let jhipsterPathAnswer = await prompt.ask(prompts.jhipsterPath)
      // strip the trailing slash from the directory
      jhipsterDirectory = `${jhipsterPathAnswer.filePath}`.replace(/\/$/, ``)
      let jhipsterConfigPath = `${jhipsterDirectory}/.yo-rc.json`
      const pathPrefix = jhipsterDirectory.startsWith('/') ? '' : '../'
      print.info(`Looking for ${pathPrefix}${jhipsterConfigPath}`)
      if (fs.existsSync(`${pathPrefix}${jhipsterConfigPath}`)) {
        print.success(`Found JHipster config file at ${jhipsterConfigPath}`)
        jhipsterConfig = await fs.readJson(`${pathPrefix}${jhipsterConfigPath}`)
        break
      } else {
        print.error(`Could not find JHipster config file, please try again.`)
      }
    }
    props.jhipsterDirectory = jhipsterDirectory
  }

  if (!props.disableInsight && Insight.insight.optOut === undefined) {
    Insight.insight.optOut = !((await prompt.ask(prompts.insight)).insight)
  }

  if (!props.detox && props.detox !== false) {
    props.detox = (await prompt.ask(prompts.detox)).detox
  }

  props.skipGit = parameters.options['skip-git']
  props.skipLint = parameters.options['skip-lint']

  // very hacky but correctly handles both strings and booleans and converts to boolean
  props.detox = JSON.parse(props.detox)
  props.disableInsight = JSON.parse(props.disableInsight)

  // attempt to install React Native or die trying
  const rnInstall = await reactNative.install({
    name,
    version: getReactNativeVersion(context)
  })
  if (rnInstall.exitCode > 0) process.exit(rnInstall.exitCode)

  // remove the __tests__ directory that come with React Native
  filesystem.remove('__tests__')
  filesystem.remove('App.js')

  props.name = name
  props.igniteVersion = ignite.version
  props.reactNativeVersion = rnInstall.version
  props.jhipsterDirectory = `../${props.jhipsterDirectory}`
  props.authType = jhipsterConfig['generator-jhipster'].authenticationType
  props.searchEngine = !!jhipsterConfig['generator-jhipster'].searchEngine
  props.websockets = !!jhipsterConfig['generator-jhipster'].websocket
  props.packageVersion = pkg.version
  await generateFiles(context, props, jhipsterConfig)

  /**
   * Merge the package.json from our template into the one provided from react-native init.
   */
  async function mergePackageJsons () {
    // transform our package.json incase we need to replace variables
    const rawJson = await template.generate({
      directory: `${ignite.ignitePluginPath()}/boilerplate`,
      template: 'package.json.ejs',
      props: props
    })
    const newPackageJson = JSON.parse(rawJson)

    // read in the react-native created package.json
    const currentPackage = filesystem.read('package.json', 'json')

    // deep merge, lol
    const newPackage = pipe(
      assoc(
        'dependencies',
        merge(currentPackage.dependencies, newPackageJson.dependencies)
      ),
      assoc(
        'devDependencies',
        merge(currentPackage.devDependencies, newPackageJson.devDependencies)
      ),
      assoc('scripts', merge(currentPackage.scripts, newPackageJson.scripts)),
      merge(
        __,
        omit(['dependencies', 'devDependencies', 'scripts'], newPackageJson)
      )
    )(currentPackage)

    // write this out
    filesystem.write('package.json', newPackage, { jsonIndent: 2 })
  }
  await mergePackageJsons()
  spinner.stop()
  spinner.succeed(`project generated`)

  await patchReactNativeNavigation(context, props)

  if (!parameters.options.skipInstall) {
    spinner.text = `▸ installing dependencies`
    spinner.start()
    // install any missing dependencies
    await system.run('yarn', { stdio: 'ignore' })
    spinner.succeed(`dependencies installed`)
  }
  // pass long the debug flag if we're running in that mode
  // const debugFlag = parameters.options.debug ? '--debug' : ''

  /**
   * Append to files
   */
  // https://github.com/facebook/react-native/issues/12724
  filesystem.appendAsync('.gitattributes', '*.bat text eol=crlf')
  filesystem.append('.gitignore', 'coverage/')
  filesystem.append('.gitignore', '\n# Misc\n#')
  filesystem.append('.gitignore', '.env\n')
  filesystem.append('.gitignore', 'ios/Index/DataStore\n')
  filesystem.append('.gitignore', 'ios/Carthage\n')
  filesystem.append('.gitignore', 'ios/Pods\n')

  try {
    fs.mkdirSync(`.jhipster`)
    fs.writeJsonSync('.jhipster/yo-rc.json', jhipsterConfig, { spaces: '\t' })
    print.success(`JHipster config saved to your app's .jhipster folder.`)
  } catch (e) {
    print.error(e)
    throw e
  }

  // react native link -- must use spawn & stdio: ignore
  spinner.text = `▸ linking native libraries`
  spinner.start()
  await system.spawn('react-native link', { stdio: 'ignore' })
  let showCocoapodsInstructions = false
  if (props.authType === 'oauth2') {
    await system.spawn('react-native link react-native-app-auth', { stdio: 'ignore' })
    // if it's a mac
    if (process.platform === 'darwin') {
      // if cocoapods is installed, install the oauth dependencies
      const podVersionCommandResult = await system.spawn('pod --version', { stdio: 'ignore' })
      if (podVersionCommandResult.status === 0) {
        spinner.text = `▸ running pod install`
        await system.run('cd ios && pod install && cd ..', { stdio: 'ignore' })
        spinner.succeed(`pod install succeeded`)
      } else {
        showCocoapodsInstructions = true
      }
    }
  }
  spinner.succeed(`linked native libraries`)
  spinner.stop()

  // if JDL was passed to generate the app, generate any entities
  if (parameters.options.jdl) {
    await importEntityJdl.run(context)
  }

  // git configuration
  const gitExists = await filesystem.exists('./.git')
  if (!gitExists && !props.skipGit) {
    // initial git
    const spinner = print.spin('configuring git')

    try {
      await system.run(`git init . && git add . && git commit -m "Initial commit."`)
      spinner.succeed(`created a git repository and an initial commit`)
    } catch (e) {
      spinner.fail(`failed to create a git repository`)
    }
  }

  const perfDuration = parseInt(((new Date()).getTime() - perfStart) / 10) / 100
  spinner.succeed(`ignited ${print.colors.yellow(name)} in ${perfDuration}s`)

  Insight.trackAppOptions(context, props)

  // Wrap it up with our success message.
  print.info('')
  print.info('🍽 Time to get cooking!')
  print.info('')
  if (props.websockets) {
    print.info('To enable the websockets example, see https://github.com/ruddell/ignite-jhipster/blob/master/docs/websockets.md')
    print.info('')
  }
  if (props.authType === 'oauth2') {
    print.info(print.colors.bold(`Before iOS apps can be run, there are steps that must be complete manually`))
    if (showCocoapodsInstructions) {
      print.info(print.colors.blue(`Cocoapods not found, please install Cocooapods and run 'pod install' from your app's ios directory.`))
    }
    print.info('For more info on configuring OAuth2 OIDC Login, see https://github.com/ruddell/ignite-jhipster/blob/master/docs/oauth2-oidc.md')
    print.info('')
  }
  print.info('To run in iOS:')
  print.info(print.colors.bold(`  cd ${name}`))
  print.info(print.colors.bold('  react-native run-ios'))
  print.info('')
  if (isAndroidInstalled(context)) {
    print.info('To run in Android:')
  } else {
    print.info(`To run in Android, make sure you've followed the latest react-native setup instructions at https://facebook.github.io/react-native/docs/getting-started.html before using ignite.\nYou won't be able to run ${print.colors.bold('react-native run-android')} successfully until you have. Then:`)
  }
  print.info(print.colors.bold(`  cd ${name}`))
  print.info(print.colors.bold('  react-native run-android'))
  print.info('')
  print.info('To see what JHipster generators are available:')
  print.info(print.colors.bold(`  cd ${name}`))
  print.info(print.colors.bold('  ignite generate'))
  print.info('')
}
688674
async function compileContext(target, contextOptions) {
	const context = await getContext(target, contextOptions)

	return async function (data/** @param {object} */) {
		return context.map(data)
	}
}
1023941
function(context) {
    var maskedContext = this._maskContext(context);
    if ("production" !== process.env.NODE_ENV) {
      var Component = ReactNativeComponent.getComponentClassForElement(
        this._currentElement
      );
      if (Component.contextTypes) {
        this._checkPropTypes(
          Component.contextTypes,
          maskedContext,
          ReactPropTypeLocations.context
        );
      }
    }
    return maskedContext;
  }
299243
function (context) {
    if (!context || !_.isObject(context)) {
      var err = new Error('Please inject a valid context object!');
      debug(err);
      throw err;
    }

    this.context = context;

    for (var r in this.snapshotConversionRegistrations) {
      var reg = this.snapshotConversionRegistrations[r];
      var meta = reg.meta;
      var fn = reg.fn;

      meta.context = meta.context || this.context.name;
      meta.aggregate = meta.aggregate || this.name;

      this.snapshotConversions[meta.context + '.' + meta.aggregate + '.' + meta.version] = fn;
    }

    for (var r in this.loadingSnapshotTransformerRegistrations) {
      var reg = this.loadingSnapshotTransformerRegistrations[r];
      var meta = reg.meta;
      var fn = reg.fn;

      meta.context = meta.context || this.context.name;
      meta.aggregate = meta.aggregate || this.name;

      this.loadingSnapshotTransformers[meta.context + '.' + meta.aggregate + '.' + meta.version] = fn;
    }

    for (var r in this.committingSnapshotTransformerRegistrations) {
      var reg = this.committingSnapshotTransformerRegistrations[r];
      var meta = reg.meta;
      var fn = reg.fn;

      meta.context = meta.context || this.context.name;
      meta.aggregate = meta.aggregate || this.name;

      this.committingSnapshotTransformers[meta.context + '.' + meta.aggregate + '.' + meta.version] = fn;
    }
  }
208536
function getContext(i) {
  if (context) {
    return context
  } else {
    const path = getCallsite(i || 2).getFileName()
    const file = files[path]
    if (file) return file.group
    throw Error(`Test module was not loaded properly: "${path}"`)
  }
}
1204164
public B importContext(AbstractContext context, boolean overwriteDuplicates){
        for (Map.Entry<String, Object> en : context.data.entrySet()) {
            if (overwriteDuplicates) {
                this.data.put(en.getKey(), en.getValue());
            }else{
                this.data.putIfAbsent(en.getKey(), en.getValue());
            }
        }
        return (B) this;
    }
880455
function getContextPlugin(options) {
  var seneca = this;
  var plugin = 'get-context';

  seneca.wrap(options.pin, function (message, done) {
    var seneca = this;
    message.context$ = getContext(seneca);
    seneca.prior(message, done);
  });

  return {name: plugin};
}
1343580
private Map<String, ImportConfiguration> loadNewConfigAndBundles(CatalogContext catalogContext) {
        Map<String, ImportConfiguration> newProcessorConfig;

        ImportType importElement = catalogContext.getDeployment().getImport();
        if (importElement == null || importElement.getConfiguration().isEmpty()) {
            newProcessorConfig = new HashMap<>();
        } else {
            newProcessorConfig = CatalogUtil.getImportProcessorConfig(importElement);
        }

        Iterator<Map.Entry<String, ImportConfiguration>> iter = newProcessorConfig.entrySet().iterator();
        while (iter.hasNext()) {
            String configName = iter.next().getKey();
            ImportConfiguration importConfig = newProcessorConfig.get(configName);
            Properties properties = importConfig.getmoduleProperties();

            String importBundleJar = properties.getProperty(ImportDataProcessor.IMPORT_MODULE);
            Preconditions.checkNotNull(importBundleJar,
                    "Import source is undefined or custom import plugin class missing.");
            if (!importConfig.checkProcedures(catalogContext, importLog, configName)) {
                iter.remove();
                continue;
            }
            // NOTE: if bundle is already loaded, loadImporterBundle does nothing and returns true
            boolean bundlePresent = loadImporterBundle(properties);
            if (!bundlePresent) {
                iter.remove();
            }
        }
        m_formatterFactories.clear();
        for (ImportConfiguration config : newProcessorConfig.values()) {
            Map<String, FormatterBuilder> formatters = config.getFormatterBuilders();
            if (formatters != null) {
                try {
                    for (FormatterBuilder builder : formatters.values()) {
                        String module = builder.getFormatterProperties().getProperty(ImportDataProcessor.IMPORT_FORMATTER);
                        AbstractFormatterFactory formatterFactory = m_formatterFactories.get(module);
                        if (formatterFactory == null) {
                            URI moduleURI = URI.create(module);
                            formatterFactory = m_moduleManager.getService(moduleURI, AbstractFormatterFactory.class);
                            if (formatterFactory == null) {
                                VoltDB.crashLocalVoltDB("Failed to initialize formatter from: " + module);
                            }
                            m_formatterFactories.put(module, formatterFactory);
                        }
                        builder.setFormatterFactory(formatterFactory);
                    }
                } catch(Throwable t) {
                    VoltDB.crashLocalVoltDB("Failed to initialize formatter.");
                }
            }
        }

        importLog.info("Final importer count:" + newProcessorConfig.size());
        return newProcessorConfig;
    }
1003850
function(config) {

        this.config = config;
        this.appContext = null;

        this.injectAppContext = this.config.injectAppContext === true ? true : false;

        //cache of loaded dependencies
        this.moduleMap = {};
    }
1321756
async function install(context) {
  const { filesystem, parameters, ignite, reactNative, print, system, prompt, template } = context
  const { colors } = print
  const { red, yellow, bold, gray, blue } = colors

  const perfStart = new Date().getTime()

  const name = parameters.first
  const spinner = print.spin(`using the ${red('Infinite Red')} boilerplate v2 (code name 'Andross')`).succeed()

  // attempt to install React Native or die trying
  const useNpm = !ignite.useYarn
  const rnInstall = await reactNative.install({
    name,
    version: getReactNativeVersion(context),
    useNpm,
  })
  if (rnInstall.exitCode > 0) process.exit(rnInstall.exitCode)

  // remove the __tests__ directory and App.js that come with React Native
  filesystem.remove('__tests__')
  filesystem.remove('App.js')

  // copy our App, Tests & storybook directories
  spinner.text = '▸ copying files'
  spinner.start()
  filesystem.copy(`${__dirname}/boilerplate/App`, `${process.cwd()}/App`, {
    overwrite: true,
    matching: '!*.ejs'
  })
  filesystem.copy(`${__dirname}/boilerplate/Tests`, `${process.cwd()}/Tests`, {
    overwrite: true,
    matching: '!*.ejs'
  })
  filesystem.copy(`${__dirname}/boilerplate/storybook`, `${process.cwd()}/storybook`, {
    overwrite: true,
    matching: '!*.ejs'
  })
  filesystem.dir(`${process.cwd()}/ignite`)
  spinner.stop()

  // --max, --min, interactive
  let answers
  if (parameters.options.max) {
    answers = options.answers.max
  } else if (parameters.options.min) {
    answers = options.answers.min
  } else {
    answers = await prompt.ask(options.questions)
  }

  // generate some templates
  spinner.text = '▸ generating files'
  const templates = [
    { template: 'index.js.ejs', target: 'index.js' },
    { template: 'README.md', target: 'README.md' },
    { template: 'ignite.json.ejs', target: 'ignite/ignite.json' },
    { template: '.editorconfig', target: '.editorconfig' },
    { template: '.babelrc', target: '.babelrc' },
    { template: 'Tests/Setup.js.ejs', target: 'Tests/Setup.js' },
    { template: 'storybook/storybook.ejs', target: 'storybook/storybook.js' },
    { template: '.env.example', target: '.env.example' }
  ]
  const templateProps = {
    name,
    igniteVersion: ignite.version,
    reactNativeVersion: rnInstall.version,
    vectorIcons: answers['vector-icons'],
    animatable: answers['animatable'],
    i18n: answers['i18n']
  }
  await ignite.copyBatch(context, templates, templateProps, {
    quiet: !parameters.options.debug,
    directory: `${ignite.ignitePluginPath()}/boilerplate`
  })

  /**
   * Append to files
   */
  // https://github.com/facebook/react-native/issues/12724
  await filesystem.appendAsync('.gitattributes', '*.bat text eol=crlf')
  filesystem.append('.gitignore', '\n# Misc\n#')
  filesystem.append('.gitignore', '\n.env\n')

  // transform our package.json in case we need to replace variables
  const rawJson = await template.generate({
    directory: `${ignite.ignitePluginPath()}/boilerplate`,
    template: 'package.json.ejs',
    props: templateProps
  })
  const newPackageJson = JSON.parse(rawJson)

  // read in the react-native created package.json
  const currentPackage = filesystem.read('package.json', 'json')

  // deep merge, lol
  const newPackage = pipe(
    assoc('dependencies', mergeDeepRight(currentPackage.dependencies, newPackageJson.dependencies)),
    assoc('devDependencies', mergeDeepRight(currentPackage.devDependencies, newPackageJson.devDependencies)),
    assoc('scripts', mergeDeepRight(currentPackage.scripts, newPackageJson.scripts)),
    mergeDeepRight(__, omit(['dependencies', 'devDependencies', 'scripts'], newPackageJson))
  )(currentPackage)

  // write this out
  filesystem.write('package.json', newPackage, { jsonIndent: 2 })

  spinner.stop()

  // react native link -- must use spawn & stdio: ignore or it hangs!! :(
  spinner.text = `▸ linking native libraries`
  spinner.start()
  await system.spawn('react-native link', { stdio: 'ignore' })
  spinner.stop()

  // pass long the debug flag if we're running in that mode
  const debugFlag = parameters.options.debug ? '--debug' : ''

  // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  // NOTE(steve): I'm re-adding this here because boilerplates now hold permanent files
  // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  try {
    // boilerplate adds itself to get plugin.js/generators etc
    // Could be directory, npm@version, or just npm name.  Default to passed in values
    const boilerplate = parameters.options.b || parameters.options.boilerplate || 'ignite-andross'

    await system.spawn(`ignite add ${boilerplate} ${debugFlag}`, { stdio: 'inherit' })

    // now run install of Ignite Plugins
    await ignite.addModule('react-navigation', { version: '3.0.0' })
    await ignite.addModule('react-native-gesture-handler', { version: '1.0.9', link: true })

    ignite.patchInFile(`${process.cwd()}/android/app/src/main/java/com/${name.toLowerCase()}/MainActivity.java`, {
      after: 'import com.facebook.react.ReactActivity;',
      insert: `
      import com.facebook.react.ReactActivityDelegate;
      import com.facebook.react.ReactRootView;
      import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;`
    })

    ignite.patchInFile(`${process.cwd()}/android/app/src/main/java/com/${name.toLowerCase()}/MainActivity.java`, {
      after: `public class MainActivity extends ReactActivity {`,
      insert:
        '\n  @Override\n' +
        '  protected ReactActivityDelegate createReactActivityDelegate() {\n' +
        '    return new ReactActivityDelegate(this, getMainComponentName()) {\n' +
        '      @Override\n' +
        '      protected ReactRootView createRootView() {\n' +
        '       return new RNGestureHandlerEnabledRootView(MainActivity.this);\n' +
        '      }\n' +
        '    };\n' +
        '  }'
    })
    if (answers['vector-icons'] === 'react-native-vector-icons') {
      await system.spawn(`ignite add vector-icons@1.1.1 ${debugFlag}`, {
        stdio: 'inherit'
      })
    }

    if (answers['i18n'] === 'react-native-i18n') {
      await system.spawn(`ignite add i18n@1.2.0 ${debugFlag}`, { stdio: 'inherit' })
    }

    if (answers['animatable'] === 'react-native-animatable') {
      await system.spawn(`ignite add animatable@1.0.2 ${debugFlag}`, {
        stdio: 'inherit'
      })
    }

    // dev-screens be installed after vector-icons and animatable so that it can
    // conditionally patch its PluginExamplesScreen
    if (answers['dev-screens'] === 'Yes') {
      await system.spawn(`ignite add dev-screens@"2.4.5" ${debugFlag}`, {
        stdio: 'inherit'
      })
    }

    if (answers['redux-persist'] === 'Yes') {
      await system.spawn(`ignite add redux-persist@1.1.2 ${debugFlag}`, {
        stdio: 'inherit'
      })
    }

    if (parameters.options.lint !== false) {
      await system.spawn(`ignite add standard@1.0.0 ${debugFlag}`, {
        stdio: 'inherit'
      })
    }
  } catch (e) {
    ignite.log(e)
    throw e
  }

  // git configuration
  const gitExists = await filesystem.exists('./.git')
  if (!gitExists && !parameters.options['skip-git'] && system.which('git')) {
    // initial git
    const spinner = print.spin('configuring git')

    // TODO: Make husky hooks optional
    const huskyCmd = '' // `&& node node_modules/husky/bin/install .`
    await system.run(`git init . && git add . && git commit -m "Initial commit." ${huskyCmd}`)

    spinner.succeed(`configured git`)
  }

  const perfDuration = parseInt((new Date().getTime() - perfStart) / 10) / 100
  spinner.succeed(`ignited ${yellow(name)} in ${perfDuration}s`)

  const androidInfo = isAndroidInstalled(context)
    ? ''
    : `\n\nTo run in Android, make sure you've followed the latest react-native setup instructions at https://facebook.github.io/react-native/docs/getting-started.html before using ignite.\nYou won't be able to run ${bold(
        'react-native run-android'
      )} successfully until you have.`

  const successMessage = `
    ${red('Ignite CLI')} ignited ${yellow(name)} in ${gray(`${perfDuration}s`)}

    To get started:

      cd ${name}
      react-native run-ios
      react-native run-android${androidInfo}
      ignite --help

    ${gray(
      'Read the walkthrough at https://github.com/infinitered/ignite-andross/blob/master/readme.md#boilerplate-walkthrough'
    )}

    ${blue('Need additional help? Join our Slack community at http://community.infinite.red.')}

    ${bold('Now get cooking! 🍽')}
  `

  print.info(successMessage)
}
931263
function emitContext (env, scope, context) {
    var shared = env.shared
    var CONTEXT = shared.context

    var contextEnter = env.scope()

    Object.keys(context).forEach(function (name) {
      scope.save(CONTEXT, '.' + name)
      var defn = context[name]
      contextEnter(CONTEXT, '.', name, '=', defn.append(env, scope), ';')
    })

    scope(contextEnter)
  }
1270751
function augmentConfigBasic(
  stylelint /*: stylelint$internalApi*/,
  config /*: stylelint$config*/,
  configDir /*: string*/,
  allowOverrides /*:: ?: boolean*/
) /*: Promise<stylelint$config>*/ {
  return Promise.resolve()
    .then(() => {
      if (!allowOverrides) return config;

      return _.merge(config, stylelint._options.configOverrides);
    })
    .then(augmentedConfig => {
      return extendConfig(stylelint, augmentedConfig, configDir);
    })
    .then(augmentedConfig => {
      return absolutizePaths(augmentedConfig, configDir);
    });
}
723211
function create(context) {
    const settings = Object.assign({}, defaults, context.options[0]);

    function check(setting, node, list, format) {
        const val = settings[setting];
        const lines = list.map(line);

        if ((isLongerThan(val, lines) || isAlways(val)) && hasDuplicates(lines)) {
            const message = messages.always[setting];
            const fix = (f) => f.replaceTextRange(node.range, format(node));
            context.report({ node, message, fix });
        }

        if (isNever(val) && hasMultiple(lines)) {
            const message = messages.never[setting];
            context.report({ node, message });
        }
    }

    return {
        CallExpression(node) {
            if (!isAmdCall(node) || node.arguments.length < 2) return;

            const args = withoutModuleId(node.arguments);
            const deps = args[0];
            const func = args[1];

            if (!isArrayExpr(deps) || !isFunctionExpr(func)) return;

            const indent = indentation(func);

            check("paths", deps, deps.elements, formatPaths(indent));
            check("names", func, func.params, formatNames(indent, context));
        }
    };
}
358468
function getAppContextFromCwdConfig(/*apps*/) {
  return Promise.try(function() {
    var cwd = process.cwd();
    var configFilepath = path.join(cwd, 'kalabox.yml');
    if (fs.existsSync(configFilepath)) {
      var config = kbox.core.config.getAppConfig(cwd);
      if (config.name) {
        return kbox.app.create(config.name, config);
      }
    }
  });
}
1232247
function OperativeContext(module, dependencies, getBaseURL, getSelfURL) {

		var _self = this;

		module.get = module.get || function(prop) {
			return this[prop];
		};

		module.set = module.set || function(prop, value) {
			return this[prop] = value;
		};

		this._curToken = 0;
		this._queue = [];

		this._getBaseURL = getBaseURL;
		this._getSelfURL = getSelfURL;

		this.isDestroyed = false;
		this.isContextReady = false;

		this.module = module;
		this.dependencies = dependencies || [];

		this.dataProperties = {};
		this.api = {};
		this.callbacks = {};
		this.deferreds = {};

		this._fixDependencyURLs();
		this._setup();

		for (var methodName in module) {
			if (hasOwn.call(module, methodName)) {
				this._createExposedMethod(methodName);
			}
		}

		this.api.__operative__ = this;

		// Provide the instance's destroy method on the exposed API:
		this.api.destroy = this.api.terminate = function() {
			return _self.destroy();
		};

	}
112493
function createDefaultContext(options, req) {
  var context = {
    requestId: req.headers[options.contextHeader] || req.seneca.fixedargs.tx$
  };

  debug('created default context', context);
  return context;
}