How to use the @s-ui/helpers/packages.resolveLazyNPMBin function in @s-ui/helpers

To help you get started, we’ve selected a few @s-ui/helpers 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 SUI-Components / sui / packages / sui-test / bin / sui-test-e2e.js View on Github external
if (fs.existsSync(supportFilesFolderPath)) {
  cypressConfig.supportFile = supportFilesFolderPath
}

if (userAgent) {
  cypressConfig.userAgent = `"${userAgent}"`
} else if (userAgentAppend) {
  cypressConfig.userAgent = `"${DEFAULT_USER_AGENT} ${userAgentAppend}"`
}

if (screenshotsOnError) {
  cypressConfig.screenshotOnHeadlessFailure = true
  cypressConfig.screenshotsFolder = SCREENSHOTS_FOLDER
}

resolveLazyNPMBin('cypress/bin/cypress', `cypress@${CYPRESS_VERSION}`)
  .then(cypressBinPath =>
    getSpawnPromise(cypressBinPath, [
      gui ? 'open' : 'run',
      '--config=' + objectToCommaString(cypressConfig),
      '--project=' + CYPRESS_FOLDER_PATH
    ])
  )
  .catch(showError)
github SUI-Components / sui / packages / sui-deploy / src / client / now.js View on Github external
async deploy(dir = DEFAULT_DIR, {auth, environmentVars} = {}) {
    const {deployName: name, nowToken: token} = this
    const nowBinPath = await resolveLazyNPMBin('.bin/now', `now@${NOW_VERSION}`)
    await getSpawnPromise(
      nowBinPath,
      getNowCommandArgs({name, token, dir, auth, environmentVars})
    )
    await this.deletePreviousDeployments(1)
    return setAliasToLastDeploy(this.now, this.deployName)
  }