How to use the ern-cauldron-api.cauldronRepositories.add function in ern-cauldron-api

To help you get started, we’ve selected a few ern-cauldron-api 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 / commands / cauldron / repo / add.ts View on Github external
export const commandHandler = async ({
  alias,
  current,
  url,
}: {
  alias: string
  current: boolean
  url: string
}) => {
  if (current === undefined) {
    current = await askUserConfirmation(
      `Set ${alias} as current Cauldron repository ?`
    )
  }

  cauldronRepositories.add(alias, url, { activate: current })

  log.info(`Added Cauldron repository ${url} with alias ${alias}`)
}