Skip to content

Commit a739e24

Browse files
committed
refactor: replaced console with cliux
1 parent 453b67f commit a739e24

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

packages/contentstack-export/src/utils/marketplace-app-helper.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
import { cliux, handleAndLogError, NodeCrypto, managementSDKClient, createDeveloperHubUrl } from '@contentstack/cli-utilities';
1+
import {
2+
cliux,
3+
handleAndLogError,
4+
NodeCrypto,
5+
managementSDKClient,
6+
createDeveloperHubUrl,
7+
} from '@contentstack/cli-utilities';
28

39
import { ExportConfig } from '../types';
410

@@ -12,7 +18,7 @@ export async function getOrgUid(config: ExportConfig): Promise<string> {
1218
.stack({ api_key: config.source_stack })
1319
.fetch()
1420
.catch((error: any) => {
15-
handleAndLogError(error, {...config.context});
21+
handleAndLogError(error, { ...config.context });
1622
});
1723

1824
return tempStackData?.org_uid;
@@ -24,9 +30,9 @@ export async function createNodeCryptoInstance(config: ExportConfig): Promise<No
2430
if (config.forceStopMarketplaceAppsPrompt) {
2531
cryptoArgs['encryptionKey'] = config.marketplaceAppEncryptionKey;
2632
} else {
27-
// Add spacing
28-
console.log('');
29-
33+
// Add spacing
34+
cliux.print('');
35+
3036
cryptoArgs['encryptionKey'] = await cliux.inquire({
3137
type: 'input',
3238
name: 'name',
@@ -38,7 +44,7 @@ export async function createNodeCryptoInstance(config: ExportConfig): Promise<No
3844
},
3945
message: 'Enter Marketplace app configurations encryption key',
4046
});
41-
console.log('');
47+
cliux.print('');
4248
}
4349

4450
return new NodeCrypto(cryptoArgs);

0 commit comments

Comments
 (0)