Skip to content

Commit

Permalink
Merge pull request #220 from contentstack/fix/DX-537-text-ui-changes
Browse files Browse the repository at this point in the history
dx-537 | text UI changes
  • Loading branch information
harshithad0703 authored May 20, 2024
2 parents f87b3b1 + 0efe419 commit 620faf0
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 32 deletions.
42 changes: 21 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.0.5 darwin-arm64 node-v20.10.0
@contentstack/apps-cli/1.0.7 darwin-arm64 node-v18.16.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down Expand Up @@ -63,7 +63,7 @@ EXAMPLES
$ csdx app:uninstall
```

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

## `csdx app:create`

Expand All @@ -76,10 +76,10 @@ USAGE
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
-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
--org=<value> Provide the organization UID to fetch the app details for the desired operation.
DESCRIPTION
Create a new app in Developer Hub and optionally clone a boilerplate locally.
Expand All @@ -94,7 +94,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.0.5/src/commands/app/create.ts)_
_See code: [src/commands/app/create.ts](https://github.com/contentstack/apps-cli/blob/v1.0.7/src/commands/app/create.ts)_

## `csdx app:delete`

Expand All @@ -105,8 +105,8 @@ USAGE
$ csdx app:delete [--org <value>] [--app-uid <value>]
FLAGS
--app-uid=<value> Provide the app UID
--org=<value> Provide the organization UID
--app-uid=<value> Provide the app UID of an existing app.
--org=<value> Provide the organization UID to fetch the app details for the desired operation.
DESCRIPTION
Delete app from marketplace
Expand All @@ -119,7 +119,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.0.5/src/commands/app/delete.ts)_
_See code: [src/commands/app/delete.ts](https://github.com/contentstack/apps-cli/blob/v1.0.7/src/commands/app/delete.ts)_

## `csdx app:get`

Expand All @@ -131,10 +131,10 @@ USAGE
FLAGS
-d, --data-dir=<value> Current working directory.
--app-type=<option> [default: stack] Type of App
--app-type=<option> [default: stack] Type of app
<options: stack|organization>
--app-uid=<value> Provide the app UID
--org=<value> Provide the organization UID
--app-uid=<value> Provide the app UID of an existing app.
--org=<value> Provide the organization UID to fetch the app details for the desired operation.
DESCRIPTION
Get details of an app in developer hub
Expand All @@ -149,7 +149,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.0.5/src/commands/app/get.ts)_
_See code: [src/commands/app/get.ts](https://github.com/contentstack/apps-cli/blob/v1.0.7/src/commands/app/get.ts)_

## `csdx app:install`

Expand All @@ -160,8 +160,8 @@ USAGE
$ csdx app:install [--org <value>] [--app-uid <value>] [--stack-api-key <value>]
FLAGS
--app-uid=<value> Provide the app UID
--org=<value> Provide the organization UID
--app-uid=<value> Provide the app UID of an existing app.
--org=<value> Provide the organization UID to fetch the app details for the desired operation.
--stack-api-key=<value> API key of the stack where the app is to be installed.
DESCRIPTION
Expand All @@ -175,7 +175,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.0.5/src/commands/app/install.ts)_
_See code: [src/commands/app/install.ts](https://github.com/contentstack/apps-cli/blob/v1.0.7/src/commands/app/install.ts)_

## `csdx app:uninstall`

Expand All @@ -186,9 +186,9 @@ USAGE
$ csdx app:uninstall [--org <value>] [--app-uid <value>] [--installation-uid <value>] [--uninstall-all]
FLAGS
--app-uid=<value> Provide the app UID
--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
--org=<value> Provide the organization UID to fetch the app details for the desired operation.
--uninstall-all Please select stacks from where the app must be uninstalled.
DESCRIPTION
Expand All @@ -202,7 +202,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.0.5/src/commands/app/uninstall.ts)_
_See code: [src/commands/app/uninstall.ts](https://github.com/contentstack/apps-cli/blob/v1.0.7/src/commands/app/uninstall.ts)_

## `csdx app:update`

Expand All @@ -214,7 +214,7 @@ USAGE
FLAGS
--app-manifest=<value> Path to the app manifest.json file:
--org=<value> Provide the organization UID
--org=<value> Provide the organization UID to fetch the app details for the desired operation.
DESCRIPTION
Update the existing app in developer hub
Expand All @@ -225,5 +225,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.0.5/src/commands/app/update.ts)_
_See code: [src/commands/app/update.ts](https://github.com/contentstack/apps-cli/blob/v1.0.7/src/commands/app/update.ts)_
<!-- commandsstop -->
1 change: 1 addition & 0 deletions src/commands/app/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export default class Create extends BaseCommand<typeof Create> {
static flags = {
name: flags.string({
char: "n",
default: "app-boilerplate",
description: appCreate.NAME_DESCRIPTION,
}),
"app-type": flags.string({
Expand Down
2 changes: 1 addition & 1 deletion src/commands/app/uninstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default class Uninstall extends AppCLIBaseCommand {
}),
'uninstall-all': flags.boolean({
description: uninstallAppMsg.UNINSTALL_ALL,
})
}),
}

async run(): Promise<void> {
Expand Down
20 changes: 10 additions & 10 deletions src/messages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ const errors = {
const commonMsg = {
CONFIG: "Path of the external config",
MAX_RETRY_LIMIT: "Maximum retry limit reached.",
PROVIDE_ORG_UID: "Provide the organization UID",
PROVIDE_ORG_UID: "Provide the organization UID to fetch the app details for the desired operation.",
CURRENT_WORKING_DIR: "Current working directory.",
SKIP_CONFIRMATION: "Use this flag to skip the confirmation.",
DEVELOPER_HUB_URL_PROMPT:
"Enter the Developer Hub Base URL for the {name} region: ",
APP_UID: "Provide the app UID",
APP_TYPE_DESCRIPTION: "Type of App",
APP_UID: "Provide the app UID of an existing app.",
APP_TYPE_DESCRIPTION: "Type of app",
CONTACT_SUPPORT: "Please contact the support team.",
STACK_API_KEY: "API key of the stack where the app is to be installed.",
USER_TERMINATION: "Process terminated by the user.",
Expand All @@ -42,7 +42,7 @@ const appCreate = {
ORG_UID: "Organization UID",
NAME: "{target} name",
UNZIP: "Unzipping the boilerplate...",
APP_TYPE_DESCRIPTION: "Type of App",
APP_TYPE_DESCRIPTION: "Type of app",
CHOOSE_ORG: "Choose an organization",
DIR_EXIST: "Directory name already exists.",
ROLLBACK_BOILERPLATE: "Rolling back boilerplate...",
Expand All @@ -58,7 +58,7 @@ const appCreate = {
START_APP_COMMAND: "Start the app using the following command: {command}",
};

const getApp = {
const getAppMsg = {
CHOOSE_APP: "Choose an app",
APP_UID_NOT_FOUND: "App UID was not found!",
FILE_WRITTEN_SUCCESS: "App data has been written to {file} successfully.",
Expand All @@ -80,15 +80,15 @@ const deleteAppMsg = {
APP_DELETED_SUCCESSFULLY: "{app} deleted successfully.",
APP_UID_INVALID: "App UID must be valid.",
PLEASE_SELECT_APP_FROM_LIST: "Please select an app from the list",
DELETE_CONFIRMATION: "Are you sure you want to delete this app?"
DELETE_CONFIRMATION: "Are you sure you want to delete this app?",
}

const installAppMsg = {
CHOOSE_A_STACK: "Please select a stack",
APP_INSTALLED_SUCCESSFULLY: "{app} installed successfully in {target}.",
INSTALL_ORG_APP_TO_STACK: "{app} is an organization app. It cannot be installed to a stack. Do you want to proceed?",
MISSING_STACK_API_KEY: "As {app} is a stack app, it can only be installed in a stack. Please select a stack.",
INSTALLING_APP_NOTICE: "Installing {app} on {type} {target}."
INSTALLING_APP_NOTICE: "Installing {app} on {type} {target}.",
}

const uninstallAppMsg = {
Expand All @@ -104,15 +104,15 @@ const messages: typeof errors &
typeof commonMsg &
typeof appCreate &
typeof appUpdate &
typeof getApp &
typeof getAppMsg &
typeof deleteAppMsg &
typeof installAppMsg &
typeof uninstallAppMsg = {
...errors,
...commonMsg,
...appCreate,
...appUpdate,
...getApp,
...getAppMsg,
...deleteAppMsg,
...installAppMsg,
...uninstallAppMsg
Expand All @@ -130,4 +130,4 @@ const $t = (msg: string, args: Record<string, string>): string => {
};

export default messages;
export { $t, errors, commonMsg, appCreate, appUpdate, getApp, deleteAppMsg, installAppMsg, uninstallAppMsg };
export { $t, errors, commonMsg, appCreate, appUpdate, getAppMsg, deleteAppMsg, installAppMsg, uninstallAppMsg };

0 comments on commit 620faf0

Please sign in to comment.