Skip to content

Commit

Permalink
Merge pull request #1212 from contentstack/fix/CS-43077
Browse files Browse the repository at this point in the history
Fix: Missing marketplace apps configuration export functionality added
  • Loading branch information
antonyagustine authored Dec 12, 2023
2 parents 85629d2 + 63fc5a7 commit 7cf5efb
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 7cf5efb

Please sign in to comment.