How to use the ern-core.config.getValue function in ern-core

To help you get started, we’ve selected a few ern-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github electrode-io / electrode-native / ern-local-cli / src / index.js View on Github external
function showVersion () {
  // get electrode-native local-cli version
  if (ernConfig.getValue('platformVersion')) {
    log.info(`ern-local-cli : ${ernConfig.getValue('platformVersion')}`)
  }
  // get electrode-native global-cli version
  const packageInfo = JSON.parse(execSync(`npm ls -g electrode-native --json`).toString())
  if (packageInfo && packageInfo.dependencies) {
    log.info(`electrode-native : ${packageInfo.dependencies['electrode-native'].version}`)
  }
}
github electrode-io / electrode-native / ern-local-cli / src / index.js View on Github external
function showInfo () {
  const currentCauldronRepo = ernConfig.getValue('cauldronRepoInUse') || '-NONE-'
  console.log(chalk.cyan(`[v${Platform.currentVersion}]`) + chalk.cyan(` [Cauldron: ${currentCauldronRepo}]`))
  console.log('')
}
github electrode-io / electrode-native / ern-local-cli / src / lib / publication.js View on Github external
export function getCodePushInitConfig (): CodePushInitConfig {
  const codePushConfigFilePath = path.join(process.env.LOCALAPPDATA || process.env.HOME || '', '.code-push.config')
  var codePushInitConfig: CodePushInitConfig
  if (fs.existsSync(codePushConfigFilePath)) {
    codePushInitConfig = JSON.parse(fs.readFileSync(codePushConfigFilePath, 'utf-8'))
  } else {
    codePushInitConfig = {
      'accessKey': config.getValue('codePushAccessKey'),
      'customHeaders': config.getValue('codePushCustomHeaders'),
      'customServerUrl': config.getValue('codePushCustomServerUrl'),
      'proxy': config.getValue('codePushproxy')
    }
  }
  return codePushInitConfig
}
github electrode-io / electrode-native / ern-container-gen / src / utils.ts View on Github external
async function runAfterJsCompositeGenerationScript(outDir: string) {
  const customScript = config.getValue('custom-script')
  if (customScript) {
    if (!fs.existsSync(customScript)) {
      throw new Error(`custom-script was not found in ${customScript}`)
    }
    await require(customScript).afterJsCompositeGeneration({ outDir, yarn })
  }
}
github electrode-io / electrode-native / ern-local-cli / src / lib / publication.js View on Github external
export function getCodePushInitConfig (): CodePushInitConfig {
  const codePushConfigFilePath = path.join(process.env.LOCALAPPDATA || process.env.HOME || '', '.code-push.config')
  var codePushInitConfig: CodePushInitConfig
  if (fs.existsSync(codePushConfigFilePath)) {
    codePushInitConfig = JSON.parse(fs.readFileSync(codePushConfigFilePath, 'utf-8'))
  } else {
    codePushInitConfig = {
      'accessKey': config.getValue('codePushAccessKey'),
      'customHeaders': config.getValue('codePushCustomHeaders'),
      'customServerUrl': config.getValue('codePushCustomServerUrl'),
      'proxy': config.getValue('codePushproxy')
    }
  }
  return codePushInitConfig
}
github electrode-io / electrode-native / ern-local-cli / src / lib / publication.js View on Github external
export function getCodePushInitConfig (): CodePushInitConfig {
  const codePushConfigFilePath = path.join(process.env.LOCALAPPDATA || process.env.HOME || '', '.code-push.config')
  var codePushInitConfig: CodePushInitConfig
  if (fs.existsSync(codePushConfigFilePath)) {
    codePushInitConfig = JSON.parse(fs.readFileSync(codePushConfigFilePath, 'utf-8'))
  } else {
    codePushInitConfig = {
      'accessKey': config.getValue('codePushAccessKey'),
      'customHeaders': config.getValue('codePushCustomHeaders'),
      'customServerUrl': config.getValue('codePushCustomServerUrl'),
      'proxy': config.getValue('codePushproxy')
    }
  }
  return codePushInitConfig
}
github electrode-io / electrode-native / ern-local-cli / src / lib / publication.js View on Github external
export function getCodePushInitConfig (): CodePushInitConfig {
  const codePushConfigFilePath = path.join(process.env.LOCALAPPDATA || process.env.HOME || '', '.code-push.config')
  var codePushInitConfig: CodePushInitConfig
  if (fs.existsSync(codePushConfigFilePath)) {
    codePushInitConfig = JSON.parse(fs.readFileSync(codePushConfigFilePath, 'utf-8'))
  } else {
    codePushInitConfig = {
      'accessKey': config.getValue('codePushAccessKey'),
      'customHeaders': config.getValue('codePushCustomHeaders'),
      'customServerUrl': config.getValue('codePushCustomServerUrl'),
      'proxy': config.getValue('codePushproxy')
    }
  }
  return codePushInitConfig
}