How to use @commercetools/sync-actions - 2 common examples

To help you get started, we’ve selected a few @commercetools/sync-actions 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 / packages / discount-code-importer / src / main.js View on Github external
createAuthMiddlewareForClientCredentialsFlow({
          ...this.apiConfig,
          fetch,
        }),
        createUserAgentMiddleware({
          libraryName: pkg.name,
          libraryVersion: pkg.version,
        }),
        createHttpMiddleware({
          host: this.apiConfig.apiUrl,
          fetch,
        }),
      ],
    })

    this.syncDiscountCodes = createSyncDiscountCodes()

    this.logger = logger || {
      error: npmlog.error.bind(this, ''),
      warn: npmlog.warn.bind(this, ''),
      info: npmlog.info.bind(this, ''),
      verbose: npmlog.verbose.bind(this, ''),
    }
    this._resetSummary()
  }
github commercetools / nodejs / packages / state-importer / src / main.js View on Github external
createAuthMiddlewareForClientCredentialsFlow({
          ...this.apiConfig,
          fetch,
        }),
        createUserAgentMiddleware({
          libraryName: pkg.name,
          libraryVersion: pkg.version,
        }),
        createHttpMiddleware({
          host: this.apiConfig.apiUrl,
          fetch,
        }),
      ],
    })

    this.syncStates = createSyncStates()

    this.logger = logger || {
      error: () => {},
      warn: () => {},
      info: () => {},
      debug: () => {},
    }
    this._resetSummary()
  }

@commercetools/sync-actions

Build API update actions for the commercetools platform.

MIT
Latest version published 8 months ago

Package Health Score

73 / 100
Full package analysis