Skip to content

Commit 21adf59

Browse files
Merge pull request #245 from contentstack/feat/DX-662-install-command-api-call
DX | 662 | install command api call
2 parents d2068dd + b5390d9 commit 21adf59

File tree

7 files changed

+25
-27
lines changed

7 files changed

+25
-27
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,3 @@ dependabot.yml
1919
oclif.manifest.json
2020
*.env
2121
.vscode/
22-
/app-boilerplate
23-
/app-boilerplate+1

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ $ npm install -g @contentstack/apps-cli
2020
$ csdx COMMAND
2121
running command...
2222
$ csdx (--version|-v)
23-
@contentstack/apps-cli/1.1.0 darwin-arm64 node-v18.17.0
23+
@contentstack/apps-cli/1.2.0 darwin-arm64 node-v18.16.0
2424
$ csdx --help [COMMAND]
2525
USAGE
2626
$ csdx COMMAND
@@ -66,7 +66,7 @@ EXAMPLES
6666
$ csdx app:reinstall
6767
```
6868

69-
_See code: [src/commands/app/index.ts](https://github.com/contentstack/apps-cli/blob/v1.1.0/src/commands/app/index.ts)_
69+
_See code: [src/commands/app/index.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/src/commands/app/index.ts)_
7070

7171
## `csdx app:create`
7272

@@ -82,7 +82,7 @@ FLAGS
8282
-n, --name=<value> [default: app-boilerplate] Name of the app to be created
8383
--app-type=<option> [default: stack] Type of app
8484
<options: stack|organization>
85-
--org=<value> Provide the organization UID to fetch the app details for the desired operation.
85+
--org=<value> Provide the organization UID to fetch the app details for the operation.
8686
8787
DESCRIPTION
8888
Create a new app in Developer Hub and optionally clone a boilerplate locally.
@@ -97,7 +97,7 @@ EXAMPLES
9797
$ csdx app:create --name App-3 --app-type organization --org <UID> -d ./boilerplate -c ./external-config.json
9898
```
9999

100-
_See code: [src/commands/app/create.ts](https://github.com/contentstack/apps-cli/blob/v1.1.0/src/commands/app/create.ts)_
100+
_See code: [src/commands/app/create.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/src/commands/app/create.ts)_
101101

102102
## `csdx app:delete`
103103

@@ -109,7 +109,7 @@ USAGE
109109
110110
FLAGS
111111
--app-uid=<value> Provide the app UID of an existing app.
112-
--org=<value> Provide the organization UID to fetch the app details for the desired operation.
112+
--org=<value> Provide the organization UID to fetch the app details for the operation.
113113
114114
DESCRIPTION
115115
Delete app from marketplace
@@ -122,7 +122,7 @@ EXAMPLES
122122
$ csdx app:delete --app-uid <value> --org <value> -d ./boilerplate
123123
```
124124

125-
_See code: [src/commands/app/delete.ts](https://github.com/contentstack/apps-cli/blob/v1.1.0/src/commands/app/delete.ts)_
125+
_See code: [src/commands/app/delete.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/src/commands/app/delete.ts)_
126126

127127
## `csdx app:get`
128128

@@ -137,7 +137,7 @@ FLAGS
137137
--app-type=<option> [default: stack] Type of app
138138
<options: stack|organization>
139139
--app-uid=<value> Provide the app UID of an existing app.
140-
--org=<value> Provide the organization UID to fetch the app details for the desired operation.
140+
--org=<value> Provide the organization UID to fetch the app details for the operation.
141141
142142
DESCRIPTION
143143
Get details of an app in developer hub
@@ -152,7 +152,7 @@ EXAMPLES
152152
$ csdx app:get --org <value> --app-uid <value> --app-type organization
153153
```
154154

155-
_See code: [src/commands/app/get.ts](https://github.com/contentstack/apps-cli/blob/v1.1.0/src/commands/app/get.ts)_
155+
_See code: [src/commands/app/get.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/src/commands/app/get.ts)_
156156

157157
## `csdx app:install`
158158

@@ -164,7 +164,7 @@ USAGE
164164
165165
FLAGS
166166
--app-uid=<value> Provide the app UID of an existing app.
167-
--org=<value> Provide the organization UID to fetch the app details for the desired operation.
167+
--org=<value> Provide the organization UID to fetch the app details for the operation.
168168
--stack-api-key=<value> API key of the stack where the app operation is to be performed.
169169
170170
DESCRIPTION
@@ -178,7 +178,7 @@ EXAMPLES
178178
$ csdx app:install --org <UID> --app-uid <APP-UID-1> --stack-api-key <STACK-API-KEY-1>
179179
```
180180

181-
_See code: [src/commands/app/install.ts](https://github.com/contentstack/apps-cli/blob/v1.1.0/src/commands/app/install.ts)_
181+
_See code: [src/commands/app/install.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/src/commands/app/install.ts)_
182182

183183
## `csdx app:reinstall`
184184

@@ -190,7 +190,7 @@ USAGE
190190
191191
FLAGS
192192
--app-uid=<value> Provide the app UID of an existing app.
193-
--org=<value> Provide the organization UID to fetch the app details for the desired operation.
193+
--org=<value> Provide the organization UID to fetch the app details for the operation.
194194
--stack-api-key=<value> API key of the stack where the app operation is to be performed.
195195
196196
DESCRIPTION
@@ -204,7 +204,7 @@ EXAMPLES
204204
$ csdx app:reinstall --org <UID> --app-uid <APP-UID-1> --stack-api-key <STACK-API-KEY-1>
205205
```
206206

207-
_See code: [src/commands/app/reinstall.ts](https://github.com/contentstack/apps-cli/blob/v1.1.0/src/commands/app/reinstall.ts)_
207+
_See code: [src/commands/app/reinstall.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/src/commands/app/reinstall.ts)_
208208

209209
## `csdx app:uninstall`
210210

@@ -217,7 +217,7 @@ USAGE
217217
FLAGS
218218
--app-uid=<value> Provide the app UID of an existing app.
219219
--installation-uid=<value> Provide the installation ID of the app that needs to be uninstalled.
220-
--org=<value> Provide the organization UID to fetch the app details for the desired operation.
220+
--org=<value> Provide the organization UID to fetch the app details for the operation.
221221
--uninstall-all Please select stacks from where the app must be uninstalled.
222222
223223
DESCRIPTION
@@ -231,7 +231,7 @@ EXAMPLES
231231
$ csdx app:uninstall --org <UID> --app-uid <APP-UID-1> --installation-uid <INSTALLATION-UID-1>
232232
```
233233

234-
_See code: [src/commands/app/uninstall.ts](https://github.com/contentstack/apps-cli/blob/v1.1.0/src/commands/app/uninstall.ts)_
234+
_See code: [src/commands/app/uninstall.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/src/commands/app/uninstall.ts)_
235235

236236
## `csdx app:update`
237237

@@ -243,7 +243,7 @@ USAGE
243243
244244
FLAGS
245245
--app-manifest=<value> Path to the app manifest.json file:
246-
--org=<value> Provide the organization UID to fetch the app details for the desired operation.
246+
--org=<value> Provide the organization UID to fetch the app details for the operation.
247247
248248
DESCRIPTION
249249
Update the existing app in developer hub
@@ -254,5 +254,5 @@ EXAMPLES
254254
$ csdx app:update --app-manifest ./boilerplate/manifest.json
255255
```
256256

257-
_See code: [src/commands/app/update.ts](https://github.com/contentstack/apps-cli/blob/v1.1.0/src/commands/app/update.ts)_
257+
_See code: [src/commands/app/update.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/src/commands/app/update.ts)_
258258
<!-- commandsstop -->

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@contentstack/apps-cli",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"description": "App ClI",
55
"author": "Contentstack CLI",
66
"homepage": "https://github.com/contentstack/contentstack-apps-cli",

src/commands/app/install.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export default class Install extends AppCLIBaseCommand {
108108
"info"
109109
);
110110
await installApp(this.flags, this.sharedConfig.org, appType, {
111-
managementSdk: this.managementAppSdk,
111+
marketplaceSdk: this.marketplaceAppSdk,
112112
log: this.log,
113113
});
114114
this.log(

src/messages/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const errors = {
2525
const commonMsg = {
2626
CONFIG: "Path of the external config",
2727
MAX_RETRY_LIMIT: "Maximum retry limit reached.",
28-
PROVIDE_ORG_UID: "Provide the organization UID to fetch the app details for the desired operation.",
28+
PROVIDE_ORG_UID: "Provide the organization UID to fetch the app details for the operation.",
2929
CURRENT_WORKING_DIR: "Current working directory.",
3030
SKIP_CONFIRMATION: "Use this flag to skip the confirmation.",
3131
DEVELOPER_HUB_URL_PROMPT:

src/util/common-utils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,11 @@ function installApp(
127127
flags: FlagInput,
128128
orgUid: string,
129129
type: string,
130-
options: CommonOptions
130+
options: MarketPlaceOptions
131131
) {
132-
const { managementSdk } = options;
133-
return managementSdk
134-
.organization(orgUid)
132+
const { marketplaceSdk } = options;
133+
return marketplaceSdk
134+
.marketplace(orgUid)
135135
.app(flags["app-uid"] as any)
136136
.install({
137137
targetUid: (flags["stack-api-key"] as any) || orgUid,

0 commit comments

Comments
 (0)