How to use the code-push.ERROR_CONFLICT function in code-push

To help you get started, we’ve selected a few code-push 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-core / src / CodePushSdk.ts View on Github external
): Promise {
    if (updateMetadata.rollout === 100) {
      // If rollout is 100% we shouldn't pass it in the HTTP request
      delete updateMetadata.rollout
    }
    try {
      return this.codePush.promote(
        appName,
        sourceDeploymentName,
        destinationDeploymentName,
        updateMetadata
      )
    } catch (error) {
      if (
        disableDuplicateReleaseError &&
        error.statusCode === CodePush.ERROR_CONFLICT
      ) {
        log.warn(error.message)
      } else {
        throw new Error(error)
      }
    }
  }

code-push

Management SDK for the CodePush service

MIT
Latest version published 2 months ago

Package Health Score

89 / 100
Full package analysis

Similar packages