@@ -13,8 +13,10 @@ import {
13
13
InquirePayload ,
14
14
cliux ,
15
15
isAuthenticated ,
16
+ ContentstackMarketplaceClient ,
17
+ marketplaceSDKInitiator ,
18
+ marketplaceSDKClient ,
16
19
} from "@contentstack/cli-utilities" ;
17
- import { ContentstackClient as MarketplaceContentstackClient } from "@contentstack/marketplace-sdk" ;
18
20
19
21
import config from "./config" ;
20
22
import { ConfigType , LogFn } from "./types" ;
@@ -40,7 +42,7 @@ export abstract class BaseCommand<T extends typeof Command> extends Command {
40
42
} ;
41
43
protected managementSdk ! : ContentstackClient ;
42
44
protected managementAppSdk ! : ContentstackClient ;
43
- protected marketplaceAppSdk ! : MarketplaceContentstackClient ;
45
+ protected marketplaceAppSdk ! : ContentstackMarketplaceClient ;
44
46
45
47
protected flags ! : Flags < T > ;
46
48
protected args ! : Args < T > ;
@@ -74,6 +76,7 @@ export abstract class BaseCommand<T extends typeof Command> extends Command {
74
76
this . developerHubBaseUrl =
75
77
this . sharedConfig . developerHubBaseUrl || getDeveloperHubUrl ( ) ;
76
78
await this . initCmaSDK ( ) ;
79
+ await this . initMarketplaceSDK ( ) ;
77
80
78
81
// Init logger
79
82
const logger = new Logger ( this . sharedConfig ) ;
@@ -128,6 +131,13 @@ export abstract class BaseCommand<T extends typeof Command> extends Command {
128
131
host : this . developerHubBaseUrl ,
129
132
} ) ;
130
133
}
134
+
135
+ async initMarketplaceSDK ( ) {
136
+ marketplaceSDKInitiator . init ( this . context ) ;
137
+ this . marketplaceAppSdk = await marketplaceSDKClient ( {
138
+ host : this . developerHubBaseUrl ,
139
+ } ) ;
140
+ }
131
141
132
142
/**
133
143
* @method getValPrompt
0 commit comments