From 02764705492fb2c77da0958bad7dca018b6dcc0f Mon Sep 17 00:00:00 2001 From: annapostl Date: Fri, 1 Dec 2023 13:50:33 +0100 Subject: [PATCH] Update category-exporter.md We'd like to update the script for category exporter a bit, based on the issues the customer in this ticket https://commercetools.atlassian.net/browse/SUPPORT-24058 had. --- docs/cli/category-exporter.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/cli/category-exporter.md b/docs/cli/category-exporter.md index 13b39a438..160a27a95 100644 --- a/docs/cli/category-exporter.md +++ b/docs/cli/category-exporter.md @@ -61,10 +61,10 @@ const options = { apiConfig: { apiUrl: 'https://api.europe-west1.gcp.commercetools.com' host: 'https://auth.europe-west1.gcp.commercetools.com' - project_key: 'PROJECT_KEY', + project_key: '', credentials: { - clientId: '*********', - clientSecret: '*********' + clientId: '', + clientSecret: '' } }, accessToken: '123456yuhgfdwegh675412wefb4rgb', @@ -78,10 +78,12 @@ const logger = { debug: console.debug, } -const categoryExporter = new CategoryExporter(options, logger) +const categoryExporter = new CategoryExporter.default(options, logger) + +const outputStream = fs.createWriteStream('output.txt'); // Register error listener -outputStream.on('error', errorHandler) +outputStream.on('error', (e) => console.log(e)) outputStream.on('finish', () => console.log('done with export'))