Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/app deploy command #255

Merged
merged 11 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 44 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ $ npm install -g @contentstack/apps-cli
$ csdx COMMAND
running command...
$ csdx (--version|-v)
@contentstack/apps-cli/1.1.1 darwin-arm64 node-v18.16.0
@contentstack/apps-cli/1.1.1 darwin-arm64 node-v18.20.2
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand All @@ -33,6 +33,7 @@ USAGE
* [`csdx app`](#csdx-app)
* [`csdx app:create`](#csdx-appcreate)
* [`csdx app:delete`](#csdx-appdelete)
* [`csdx app:deploy`](#csdx-appdeploy)
* [`csdx app:get`](#csdx-appget)
* [`csdx app:install`](#csdx-appinstall)
* [`csdx app:reinstall`](#csdx-appreinstall)
Expand Down Expand Up @@ -74,15 +75,14 @@ Create a new app in Developer Hub and optionally clone a boilerplate locally.

```
USAGE
$ csdx app:create [--org <value>] [-n <value>] [--app-type stack|organization] [-c <value>] [-d <value>]
$ csdx app:create [-n <value>] [--app-type stack|organization] [-c <value>] [-d <value>]

FLAGS
-c, --config=<value> Path of the external config
-d, --data-dir=<value> Current working directory.
-n, --name=<value> [default: app-boilerplate] Name of the app to be created
--app-type=<option> [default: stack] Type of app
<options: stack|organization>
--org=<value> Provide the organization UID to fetch the app details for the operation.

DESCRIPTION
Create a new app in Developer Hub and optionally clone a boilerplate locally.
Expand All @@ -105,11 +105,10 @@ Delete app from marketplace

```
USAGE
$ csdx app:delete [--org <value>] [--app-uid <value>]
$ csdx app:delete [--app-uid <value>]

FLAGS
--app-uid=<value> Provide the app UID of an existing app.
--org=<value> Provide the organization UID to fetch the app details for the operation.

DESCRIPTION
Delete app from marketplace
Expand All @@ -124,20 +123,54 @@ EXAMPLES

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

## `csdx app:deploy`

Deploy an app

```
USAGE
$ csdx app:deploy [--app-uid <value>] [--hosting-type <value>] [--app-url <value>] [-y] [--launch-project-type
existing-project|new-project] [-c <value>]

FLAGS
-c, --config=<value> [optional] path of config file
-y, --yes Force disconnect launch project by skipping the confirmation
--app-uid=<value> Provide the app UID of an existing app.
--app-url=<value> App URL
--hosting-type=<value> Hosting Type
--launch-project-type=<option> Launch Project Type
<options: existing-project|new-project>

DESCRIPTION
Deploy an app

EXAMPLES
$ csdx app:deploy

$ csdx app:deploy --org <UID> --app-uid <APP-UID-1>

$ csdx app:deploy --org <UID> --app-uid <APP-UID-1> --hosting-type <Custom Hosting> --app-url <https://localhost:3000>

$ csdx app:deploy --org <UID> --app-uid <APP-UID-1> --hosting-type <Hosting with Launch> --launch-project-type <existing-project>

$ csdx app:deploy --org <UID> --app-uid <APP-UID-1> --hosting-type <Hosting with Launch> --launch-project-type <existing-project> --config <config-path>
```

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

## `csdx app:get`

Get details of an app in developer hub

```
USAGE
$ csdx app:get [--org <value>] [--app-uid <value>] [--app-type stack|organization] [-d <value>]
$ csdx app:get [--app-uid <value>] [--app-type stack|organization] [-d <value>]

FLAGS
-d, --data-dir=<value> Current working directory.
--app-type=<option> [default: stack] Type of app
<options: stack|organization>
--app-uid=<value> Provide the app UID of an existing app.
--org=<value> Provide the organization UID to fetch the app details for the operation.

DESCRIPTION
Get details of an app in developer hub
Expand All @@ -160,11 +193,10 @@ Install an app from the marketplace

```
USAGE
$ csdx app:install [--org <value>] [--app-uid <value>] [--stack-api-key <value>]
$ csdx app:install [--app-uid <value>] [--stack-api-key <value>]

FLAGS
--app-uid=<value> Provide the app UID of an existing app.
--org=<value> Provide the organization UID to fetch the app details for the operation.
--stack-api-key=<value> API key of the stack where the app operation is to be performed.

DESCRIPTION
Expand All @@ -186,11 +218,10 @@ Reinstall an app from the marketplace

```
USAGE
$ csdx app:reinstall [--org <value>] [--app-uid <value>] [--stack-api-key <value>]
$ csdx app:reinstall [--app-uid <value>] [--stack-api-key <value>]

FLAGS
--app-uid=<value> Provide the app UID of an existing app.
--org=<value> Provide the organization UID to fetch the app details for the operation.
--stack-api-key=<value> API key of the stack where the app operation is to be performed.

DESCRIPTION
Expand All @@ -212,12 +243,11 @@ Uninstall an app

```
USAGE
$ csdx app:uninstall [--org <value>] [--app-uid <value>] [--installation-uid <value>] [--uninstall-all]
$ csdx app:uninstall [--app-uid <value>] [--installation-uid <value>] [--uninstall-all]

FLAGS
--app-uid=<value> Provide the app UID of an existing app.
--installation-uid=<value> Provide the installation ID of the app that needs to be uninstalled.
--org=<value> Provide the organization UID to fetch the app details for the operation.
--uninstall-all Please select stacks from where the app must be uninstalled.

DESCRIPTION
Expand All @@ -239,11 +269,10 @@ Update the existing app in developer hub

```
USAGE
$ csdx app:update [--org <value>] [--app-manifest <value>]
$ csdx app:update [--app-manifest <value>]

FLAGS
--app-manifest=<value> Path to the app manifest.json file:
--org=<value> Provide the organization UID to fetch the app details for the operation.

DESCRIPTION
Update the existing app in developer hub
Expand Down
9 changes: 9 additions & 0 deletions examples/create-launch-project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "app name",
"type": "GitHub",
"environment": "Default",
"framework": "NextJs",
"build-command": "npm run build",
"out-dir": "./.next",
"branch": "master"
}
Loading
Loading