Skip to content

Commit fabe102

Browse files
authored
Merge pull request #255 from contentstack/feat/app-deploy-command
Feat/app deploy command
2 parents 5335578 + 83b96dc commit fabe102

19 files changed

+6859
-1156
lines changed

README.md

Lines changed: 44 additions & 15 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.1 darwin-arm64 node-v18.16.0
23+
@contentstack/apps-cli/1.1.1 darwin-arm64 node-v18.20.2
2424
$ csdx --help [COMMAND]
2525
USAGE
2626
$ csdx COMMAND
@@ -33,6 +33,7 @@ USAGE
3333
* [`csdx app`](#csdx-app)
3434
* [`csdx app:create`](#csdx-appcreate)
3535
* [`csdx app:delete`](#csdx-appdelete)
36+
* [`csdx app:deploy`](#csdx-appdeploy)
3637
* [`csdx app:get`](#csdx-appget)
3738
* [`csdx app:install`](#csdx-appinstall)
3839
* [`csdx app:reinstall`](#csdx-appreinstall)
@@ -74,15 +75,14 @@ Create a new app in Developer Hub and optionally clone a boilerplate locally.
7475

7576
```
7677
USAGE
77-
$ csdx app:create [--org <value>] [-n <value>] [--app-type stack|organization] [-c <value>] [-d <value>]
78+
$ csdx app:create [-n <value>] [--app-type stack|organization] [-c <value>] [-d <value>]
7879
7980
FLAGS
8081
-c, --config=<value> Path of the external config
8182
-d, --data-dir=<value> Current working directory.
8283
-n, --name=<value> [default: app-boilerplate] Name of the app to be created
8384
--app-type=<option> [default: stack] Type of app
8485
<options: stack|organization>
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.
@@ -105,11 +105,10 @@ Delete app from marketplace
105105

106106
```
107107
USAGE
108-
$ csdx app:delete [--org <value>] [--app-uid <value>]
108+
$ csdx app:delete [--app-uid <value>]
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 operation.
113112
114113
DESCRIPTION
115114
Delete app from marketplace
@@ -124,20 +123,54 @@ EXAMPLES
124123

125124
_See code: [src/commands/app/delete.ts](https://github.com/contentstack/apps-cli/blob/v1.1.1/src/commands/app/delete.ts)_
126125

126+
## `csdx app:deploy`
127+
128+
Deploy an app
129+
130+
```
131+
USAGE
132+
$ csdx app:deploy [--app-uid <value>] [--hosting-type <value>] [--app-url <value>] [-y] [--launch-project-type
133+
existing-project|new-project] [-c <value>]
134+
135+
FLAGS
136+
-c, --config=<value> [optional] path of config file
137+
-y, --yes Force disconnect launch project by skipping the confirmation
138+
--app-uid=<value> Provide the app UID of an existing app.
139+
--app-url=<value> App URL
140+
--hosting-type=<value> Hosting Type
141+
--launch-project-type=<option> Launch Project Type
142+
<options: existing-project|new-project>
143+
144+
DESCRIPTION
145+
Deploy an app
146+
147+
EXAMPLES
148+
$ csdx app:deploy
149+
150+
$ csdx app:deploy --org <UID> --app-uid <APP-UID-1>
151+
152+
$ csdx app:deploy --org <UID> --app-uid <APP-UID-1> --hosting-type <Custom Hosting> --app-url <https://localhost:3000>
153+
154+
$ csdx app:deploy --org <UID> --app-uid <APP-UID-1> --hosting-type <Hosting with Launch> --launch-project-type <existing-project>
155+
156+
$ csdx app:deploy --org <UID> --app-uid <APP-UID-1> --hosting-type <Hosting with Launch> --launch-project-type <existing-project> --config <config-path>
157+
```
158+
159+
_See code: [src/commands/app/deploy.ts](https://github.com/contentstack/apps-cli/blob/v1.1.1/src/commands/app/deploy.ts)_
160+
127161
## `csdx app:get`
128162

129163
Get details of an app in developer hub
130164

131165
```
132166
USAGE
133-
$ csdx app:get [--org <value>] [--app-uid <value>] [--app-type stack|organization] [-d <value>]
167+
$ csdx app:get [--app-uid <value>] [--app-type stack|organization] [-d <value>]
134168
135169
FLAGS
136170
-d, --data-dir=<value> Current working directory.
137171
--app-type=<option> [default: stack] Type of app
138172
<options: stack|organization>
139173
--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 operation.
141174
142175
DESCRIPTION
143176
Get details of an app in developer hub
@@ -160,11 +193,10 @@ Install an app from the marketplace
160193

161194
```
162195
USAGE
163-
$ csdx app:install [--org <value>] [--app-uid <value>] [--stack-api-key <value>]
196+
$ csdx app:install [--app-uid <value>] [--stack-api-key <value>]
164197
165198
FLAGS
166199
--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 operation.
168200
--stack-api-key=<value> API key of the stack where the app operation is to be performed.
169201
170202
DESCRIPTION
@@ -186,11 +218,10 @@ Reinstall an app from the marketplace
186218

187219
```
188220
USAGE
189-
$ csdx app:reinstall [--org <value>] [--app-uid <value>] [--stack-api-key <value>]
221+
$ csdx app:reinstall [--app-uid <value>] [--stack-api-key <value>]
190222
191223
FLAGS
192224
--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 operation.
194225
--stack-api-key=<value> API key of the stack where the app operation is to be performed.
195226
196227
DESCRIPTION
@@ -212,12 +243,11 @@ Uninstall an app
212243

213244
```
214245
USAGE
215-
$ csdx app:uninstall [--org <value>] [--app-uid <value>] [--installation-uid <value>] [--uninstall-all]
246+
$ csdx app:uninstall [--app-uid <value>] [--installation-uid <value>] [--uninstall-all]
216247
217248
FLAGS
218249
--app-uid=<value> Provide the app UID of an existing app.
219250
--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 operation.
221251
--uninstall-all Please select stacks from where the app must be uninstalled.
222252
223253
DESCRIPTION
@@ -239,11 +269,10 @@ Update the existing app in developer hub
239269

240270
```
241271
USAGE
242-
$ csdx app:update [--org <value>] [--app-manifest <value>]
272+
$ csdx app:update [--app-manifest <value>]
243273
244274
FLAGS
245275
--app-manifest=<value> Path to the app manifest.json file:
246-
--org=<value> Provide the organization UID to fetch the app details for the operation.
247276
248277
DESCRIPTION
249278
Update the existing app in developer hub

examples/create-launch-project.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "app name",
3+
"type": "GitHub",
4+
"environment": "Default",
5+
"framework": "NextJs",
6+
"build-command": "npm run build",
7+
"out-dir": "./.next",
8+
"branch": "master"
9+
}

0 commit comments

Comments
 (0)