How to use the ern-container-publisher.getPublisher function in ern-container-publisher

To help you get started, we’ve selected a few ern-container-publisher 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 / add / publisher.ts View on Github external
extraObj = extra
    } else {
      // Local file path to json file or json string.
      // In that case, the extra property set for this publisher
      // in Cauldron, will be the the json string, or the
      // content of the json file, as such
      // For example :
      // "extra": {
      //   "artifactId": "app-container",
      //   "groupId": "com.company.app"
      // }
      extraObj = await parseJsonFromStringOrFile(extra)
    }
  }

  const p: ContainerPublisher = await getPublisher(publisher)

  if (descriptor && !p.platforms.includes(descriptor.platform!)) {
    throw new Error(
      `The ${p.name} publisher does not support ${descriptor.platform} platform`
    )
  }

  await cauldron.addPublisher(publisher, p.platforms, descriptor, url, extraObj)
  log.info(`${publisher} publisher successfully added to ${descriptor}`)
}

ern-container-publisher

Electrode Native Container Publisher

Apache-2.0
Latest version published 3 months ago

Package Health Score

64 / 100
Full package analysis