Skip to content

Commit

Permalink
fix: launch project query, removed duplicate yes flag & updated readm…
Browse files Browse the repository at this point in the history
…e file
  • Loading branch information
aman19K committed Jun 19, 2024
1 parent cef7d91 commit 8eba9b7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 33 deletions.
43 changes: 22 additions & 21 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.20.2
@contentstack/apps-cli/1.2.0 darwin-arm64 node-v18.20.2
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down Expand Up @@ -67,7 +67,7 @@ EXAMPLES
$ csdx app:reinstall
```

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

## `csdx app:create`

Expand Down Expand Up @@ -97,7 +97,7 @@ EXAMPLES
$ csdx app:create --name App-3 --app-type organization --org <UID> -d ./boilerplate -c ./external-config.json
```

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

## `csdx app:delete`

Expand All @@ -121,25 +121,24 @@ 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.1.1/src/commands/app/delete.ts)_
_See code: [src/commands/app/delete.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/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>]
$ csdx app:deploy [--app-uid <value>] [--hosting-type <value>] [--app-url <value>] [--launch-project
existing|new] [-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>
-c, --config=<value> [optional] path of config file
--app-uid=<value> Provide the app UID of an existing app.
--app-url=<value> App URL
--hosting-type=<value> Hosting Type
--launch-project=<option> Launch Project
<options: existing|new>
DESCRIPTION
Deploy an app
Expand All @@ -151,12 +150,14 @@ EXAMPLES
$ 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 <existing>
$ csdx app:deploy --org <UID> --app-uid <APP-UID-1> --hosting-type <Hosting with Launch> --launch-project-type <existing-project> --config <config-path>
$ csdx app:deploy --org <UID> --app-uid <APP-UID-1> --hosting-type <Hosting with Launch> --launch-project <new>
$ 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.1.1/src/commands/app/deploy.ts)_
_See code: [src/commands/app/deploy.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/src/commands/app/deploy.ts)_

## `csdx app:get`

Expand Down Expand Up @@ -185,7 +186,7 @@ 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.1.1/src/commands/app/get.ts)_
_See code: [src/commands/app/get.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/src/commands/app/get.ts)_

## `csdx app:install`

Expand All @@ -210,7 +211,7 @@ 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.1.1/src/commands/app/install.ts)_
_See code: [src/commands/app/install.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/src/commands/app/install.ts)_

## `csdx app:reinstall`

Expand All @@ -235,7 +236,7 @@ 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.1.1/src/commands/app/reinstall.ts)_
_See code: [src/commands/app/reinstall.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/src/commands/app/reinstall.ts)_

## `csdx app:uninstall`

Expand All @@ -261,7 +262,7 @@ 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.1.1/src/commands/app/uninstall.ts)_
_See code: [src/commands/app/uninstall.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/src/commands/app/uninstall.ts)_

## `csdx app:update`

Expand All @@ -283,5 +284,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.1.1/src/commands/app/update.ts)_
_See code: [src/commands/app/update.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/src/commands/app/update.ts)_
<!-- commandsstop -->
7 changes: 1 addition & 6 deletions src/commands/app/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ export default class Deploy extends AppCLIBaseCommand {
"app-url": Flags.string({
description: deployAppMsg.APP_URL,
}),
yes: Flags.boolean({
char: "y",
description: deployAppMsg.FORCE_DISCONNECT,
default: false,
}),
"launch-project": Flags.string({
multiple: false,
options: ["existing", "new"],
Expand Down Expand Up @@ -291,4 +286,4 @@ export default class Deploy extends AppCLIBaseCommand {
);
}
}
}
}
9 changes: 3 additions & 6 deletions src/util/common-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,17 +313,14 @@ async function getProjects(
node: {
uid,
name,
latestDeploymentStatus: {
deployment: { url },
environment: { uid: environmentUid },
},
latestDeploymentStatus,
integrations: { developerHubApp },
},
}) => ({
name,
uid,
url,
environmentUid,
url: latestDeploymentStatus?.deployment?.url || null,
environmentUid: latestDeploymentStatus?.environment?.uid || null,
developerHubAppUid: developerHubApp?.uid || null,
})
);
Expand Down

0 comments on commit 8eba9b7

Please sign in to comment.