From 3d689590b89fe610da68190d6ef2bda15236363c Mon Sep 17 00:00:00 2001 From: Antony Date: Tue, 12 Dec 2023 18:57:26 +0530 Subject: [PATCH] Fix: Missing marketplace apps configuration export functionality added --- .../src/export/modules/marketplace-apps.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/contentstack-export/src/export/modules/marketplace-apps.ts b/packages/contentstack-export/src/export/modules/marketplace-apps.ts index 6f377614a8..42f845f870 100644 --- a/packages/contentstack-export/src/export/modules/marketplace-apps.ts +++ b/packages/contentstack-export/src/export/modules/marketplace-apps.ts @@ -144,11 +144,16 @@ export default class ExportMarketplaceApps { .installationData() .then(async (result: any) => { const { data, error } = result; - if (has(data, 'server_configuration')) { - if (!this.nodeCrypto && has(data, 'server_configuration')) { + + if (has(data, 'server_configuration') || has(data, 'configuration')) { + if (!this.nodeCrypto && (has(data, 'server_configuration') || has(data, 'configuration'))) { this.nodeCrypto = await createNodeCryptoInstance(this.exportConfig); } + if (!isEmpty(data?.configuration)) { + this.installedApps[index]['configuration'] = this.nodeCrypto.encrypt(data.configuration); + } + if (!isEmpty(data?.server_configuration)) { this.installedApps[index]['server_configuration'] = this.nodeCrypto.encrypt(data.server_configuration); log(this.exportConfig, `Exported ${appName} app and it's config.`, 'success');