How to use the @commercetools/get-credentials.getCredentials function in @commercetools/get-credentials

To help you get started, we’ve selected a few @commercetools/get-credentials 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 commercetools / nodejs / integration-tests / cli / personal-data-erasure.it.js View on Github external
const setupProject = async () => {
      const credentials = await getCredentials(projectKey)
      apiConfig = {
        host: 'https://auth.sphere.io',
        apiUrl: 'https://api.sphere.io',
        projectKey,
        credentials,
      }
      // Clear all existing data
      await Promise.all([
        clearData(apiConfig, 'customers'),
        clearData(apiConfig, 'orders'),
        clearData(apiConfig, 'carts'),
        clearData(apiConfig, 'payments'),
        clearData(apiConfig, 'shoppingLists'),
        clearData(apiConfig, 'reviews'),
      ])
github commercetools / nodejs / integration-tests / cli / product-export.it.js View on Github external
beforeAll(async () => {
      const credentials = await getCredentials(projectKey)
      apiConfig = {
        host: 'https://auth.sphere.io',
        apiUrl: 'https://api.sphere.io',
        projectKey,
        credentials,
      }
      await clearData(apiConfig, 'products')

      await Promise.all([
        clearData(apiConfig, 'productTypes'),
        clearData(apiConfig, 'taxCategories'),
      ])

      const createdProductType = await createData(apiConfig, 'productTypes', [
        sampleProductType,
      ])
github commercetools / nodejs / packages / product-exporter / src / cli.js View on Github external
const resolveCredentials = _args => {
  if (_args.accessToken) return Promise.resolve({})
  return getCredentials(_args.projectKey)
}
github commercetools / nodejs / packages / customer-groups-exporter / src / cli.js View on Github external
const resolveCredentials = _args => {
  if (_args.accessToken) return Promise.resolve({})
  return getCredentials(_args.projectKey)
}
github commercetools / nodejs / packages / product-json-to-xlsx / src / cli.js View on Github external
const resolveCredentials = _args => {
  if (_args.accessToken) return Promise.resolve({})
  return getCredentials(_args.projectKey)
}
github commercetools / nodejs / packages / product-json-to-csv / src / cli.js View on Github external
const resolveCredentials = _args => {
  if (_args.accessToken) return Promise.resolve({})
  return getCredentials(_args.projectKey)
}
github commercetools / nodejs / packages / custom-objects-exporter / src / cli.js View on Github external
const resolveCredentials = _args => {
  if (_args.accessToken) return Promise.resolve({})
  return getCredentials(_args.projectKey)
}
github commercetools / nodejs / packages / csv-parser-price / src / cli.js View on Github external
const resolveCredentials = _args => {
  if (_args.accessToken) return Promise.resolve({})
  return getCredentials(_args.projectKey)
}
github commercetools / nodejs / packages / discount-code-exporter / src / cli.js View on Github external
const resolveCredentials = _args => {
  if (_args.accessToken) return Promise.resolve({})
  return getCredentials(_args.projectKey)
}

@commercetools/get-credentials

Get CT credentials from the system environment.

MIT
Latest version published 2 years ago

Package Health Score

64 / 100
Full package analysis

Popular @commercetools/get-credentials functions