Skip to content

Commit d9a2b84

Browse files
committed
readme updates
1 parent d2aed9b commit d9a2b84

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,26 @@
55
This is a plugin for [Contentstack's](https://www.contentstack.com/) CLI.
66
It allows you to quickly retrieve information about Content Types in a Stack.
77

8+
## Why use this plugin
9+
1. The `csdx content-type:audit` command lists recent changes to a content type and by whom.
10+
This is useful when needing to find Content Type versions to compare with `csdx content-type:compare`.
11+
[Audit logs](https://www.contentstack.com/docs/developers/set-up-stack/monitor-stack-activities-in-audit-log/) are stored for 90 days within Contentstack.
12+
13+
1. The `csdx content-type:compare-remote` command allows you to compare the same Content Type between two Stacks.
14+
This is useful when you have cloned or duplicated a Stack, and want to check what has changed in a child Stack.
15+
16+
1. The `csdx content-type:compare` command allows you to compare multiple versions of a Content Type within a single Stack.
17+
This is useful when you are working in a development team, and want to compare changes made by colleagues.
18+
19+
1. The `csdx content-type:list` command is useful when you want to see all the Content Types within a Stack.
20+
The Content Types Display Name, UID, Last Modified Date, and Version number is shown. The list can be ordered by `title` or `modified` date.
21+
22+
1. The `csdx content-type:details` command provides useful information, such as:
23+
- Field UID and Data Types
24+
- Referenced Content Types
25+
- Options such as required, multiple, and unique.
26+
- The full path to a field, useful when using the [include reference endpoint](https://www.contentstack.com/docs/developers/apis/content-delivery-api/#include-reference) or filtering operations, such as the [equality endpoint](https://www.contentstack.com/docs/developers/apis/content-delivery-api/#equals-operator).
27+
828
## How to install this plugin
929

1030
```shell

src/commands/content-type/compare-remote.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ export default class CompareRemoteCommand extends Command {
4242
const originStackApi = flags['origin-stack'] as string
4343
const remoteStackApi = flags['remote-stack'] as string
4444

45+
if (originStackApi === remoteStackApi) {
46+
this.warn('Comparing the same Stack does not produce useful results.')
47+
}
48+
4549
const [originStackResp, remoteStackResp, originContentTypeResp, remoteContentTypeResp] = await Promise.all([
4650
this.client.getStack(originStackApi),
4751
this.client.getStack(remoteStackApi),

0 commit comments

Comments
 (0)