Skip to content

Commit

Permalink
Merge pull request #289 from contentstack/fix/DX-1031
Browse files Browse the repository at this point in the history
fix: handle undefined issue & org flag missing in help command
  • Loading branch information
aman19K authored Aug 1, 2024
2 parents cab02f5 + 517fb70 commit 107d6b1
Show file tree
Hide file tree
Showing 14 changed files with 255 additions and 48 deletions.
57 changes: 34 additions & 23 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.3.0 darwin-arm64 node-v18.16.0
@contentstack/apps-cli/1.3.1 darwin-arm64 node-v18.20.2
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down Expand Up @@ -54,20 +54,22 @@ DESCRIPTION
EXAMPLES
$ csdx app:create
$ csdx app:get
$ csdx app:delete
$ csdx app:update
$ csdx app:deploy
$ csdx app:delete
$ csdx app:get
$ csdx app:install
$ csdx app:reinstall
$ csdx app:uninstall
$ csdx app:reinstall
$ csdx app:update
```

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

## `csdx app:create`

Expand All @@ -76,15 +78,17 @@ Create a new app in Developer Hub and optionally clone a boilerplate locally.
```
USAGE
$ csdx app:create [-n <value>] [--app-type stack|organization] [-c <value>] [-d <value>] [--boilerplate
<value>]
<value>] [--org <value>]
FLAGS
-c, --config=<value> Path of the external config
-d, --data-dir=<value> Current working directory.
-n, --name=<value> Name of the app to be created
--app-type=<option> [default: stack] Type of app
<options: stack|organization>
--boilerplate=<value> Provide a boilerplate. <options: App Boilerplate|DAM App Boilerplate|Ecommerce App Boilerplate>
--boilerplate=<value> Provide a boilerplate. <options: App Boilerplate|DAM App Boilerplate|Ecommerce App
Boilerplate>
--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,18 +109,19 @@ EXAMPLES
$ csdx app:create --name App-4 --app-type organization --org <UID> --boilerplate <Ecommerce App Boilerplate>
```

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

## `csdx app:delete`

Delete app from marketplace

```
USAGE
$ csdx app:delete [--app-uid <value>]
$ csdx app:delete [--app-uid <value>] [--org <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 @@ -129,7 +134,7 @@ EXAMPLES
$ csdx app:delete --app-uid <value> --org <value> -d ./boilerplate
```

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

## `csdx app:deploy`

Expand All @@ -138,7 +143,7 @@ Deploy an app
```
USAGE
$ csdx app:deploy [--app-uid <value>] [--hosting-type Hosting with Launch|Custom Hosting] [--app-url <value>]
[--launch-project existing|new] [-c <value>]
[--launch-project existing|new] [-c <value>] [--org <value>]
FLAGS
-c, --config=<value> [optional] Please enter the path of the config file.
Expand All @@ -148,6 +153,7 @@ FLAGS
<options: Hosting with Launch|Custom Hosting>
--launch-project=<option> Choose a new or an existing Launch project.
<options: existing|new>
--org=<value> Provide the organization UID to fetch the app details for the operation.
DESCRIPTION
Deploy an app
Expand All @@ -166,21 +172,22 @@ EXAMPLES
$ csdx app:deploy --org <UID> --app-uid <APP-UID-1> --hosting-type <Hosting with Launch> --launch-project <new> --config <config-path>
```

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

## `csdx app:get`

Get details of an app in developer hub

```
USAGE
$ csdx app:get [--app-uid <value>] [--app-type stack|organization] [-d <value>]
$ csdx app:get [--app-uid <value>] [--app-type stack|organization] [-d <value>] [--org <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 @@ -195,18 +202,19 @@ EXAMPLES
$ csdx app:get --org <value> --app-uid <value> --app-type organization
```

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

## `csdx app:install`

Install an app from the marketplace

```
USAGE
$ csdx app:install [--app-uid <value>] [--stack-api-key <value>]
$ csdx app:install [--app-uid <value>] [--stack-api-key <value>] [--org <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 @@ -220,18 +228,19 @@ EXAMPLES
$ csdx app:install --org <UID> --app-uid <APP-UID-1> --stack-api-key <STACK-API-KEY-1>
```

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

## `csdx app:reinstall`

Reinstall an app from the marketplace

```
USAGE
$ csdx app:reinstall [--app-uid <value>] [--stack-api-key <value>]
$ csdx app:reinstall [--app-uid <value>] [--stack-api-key <value>] [--org <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 @@ -245,19 +254,20 @@ EXAMPLES
$ csdx app:reinstall --org <UID> --app-uid <APP-UID-1> --stack-api-key <STACK-API-KEY-1>
```

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

## `csdx app:uninstall`

Uninstall an app

```
USAGE
$ csdx app:uninstall [--app-uid <value>] [--installation-uid <value>] [--uninstall-all]
$ csdx app:uninstall [--app-uid <value>] [--installation-uid <value>] [--uninstall-all] [--org <value>]
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 @@ -271,18 +281,19 @@ EXAMPLES
$ csdx app:uninstall --org <UID> --app-uid <APP-UID-1> --installation-uid <INSTALLATION-UID-1>
```

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

## `csdx app:update`

Update the existing app in developer hub

```
USAGE
$ csdx app:update [--app-manifest <value>]
$ csdx app:update [--app-manifest <value>] [--org <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 All @@ -293,5 +304,5 @@ EXAMPLES
$ csdx app:update --app-manifest ./boilerplate/manifest.json
```

_See code: [src/commands/app/update.ts](https://github.com/contentstack/apps-cli/blob/v1.3.0/src/commands/app/update.ts)_
_See code: [src/commands/app/update.ts](https://github.com/contentstack/apps-cli/blob/v1.3.1/src/commands/app/update.ts)_
<!-- commandsstop -->
Loading

0 comments on commit 107d6b1

Please sign in to comment.