Skip to content

Commit

Permalink
Merge pull request #1203 from contentstack/feat/CS-42755
Browse files Browse the repository at this point in the history
added new config command for early access header
  • Loading branch information
shafeeqd959 authored Dec 6, 2023
2 parents 8fe2357 + 5a42e0f commit 7599d68
Show file tree
Hide file tree
Showing 23 changed files with 1,764 additions and 1,381 deletions.
2,080 changes: 981 additions & 1,099 deletions package-lock.json

Large diffs are not rendered by default.

54 changes: 42 additions & 12 deletions packages/contentstack-audit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ USAGE
* [`csdx plugins:install PLUGIN...`](#csdx-pluginsinstall-plugin-1)
* [`csdx plugins:link PLUGIN`](#csdx-pluginslink-plugin)
* [`csdx plugins:uninstall PLUGIN...`](#csdx-pluginsuninstall-plugin)
* [`csdx plugins:reset`](#csdx-pluginsreset)
* [`csdx plugins:uninstall PLUGIN...`](#csdx-pluginsuninstall-plugin-1)
* [`csdx plugins:uninstall PLUGIN...`](#csdx-pluginsuninstall-plugin-2)
* [`csdx plugins:update`](#csdx-pluginsupdate)
Expand Down Expand Up @@ -284,7 +285,7 @@ EXAMPLES
$ csdx plugins
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.8.4/src/commands/plugins/index.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.1.10/src/commands/plugins/index.ts)_

## `csdx plugins:install PLUGIN...`

Expand All @@ -300,7 +301,11 @@ ARGUMENTS
FLAGS
-f, --force Run yarn install with force flag.
-h, --help Show CLI help.
-v, --verbose
-s, --silent Silences yarn output.
-v, --verbose Show verbose yarn output.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Installs a plugin into the CLI.
Expand All @@ -317,11 +322,11 @@ ALIASES
$ csdx plugins:add
EXAMPLES
$ csdx plugins:install myplugin
$ csdx plugins:add myplugin
$ csdx plugins:install https://github.com/someuser/someplugin
$ csdx plugins:add https://github.com/someuser/someplugin
$ csdx plugins:install someuser/someplugin
$ csdx plugins:add someuser/someplugin
```

## `csdx plugins:inspect PLUGIN...`
Expand Down Expand Up @@ -349,7 +354,7 @@ EXAMPLES
$ csdx plugins:inspect myplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.8.4/src/commands/plugins/inspect.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.1.10/src/commands/plugins/inspect.ts)_

## `csdx plugins:install PLUGIN...`

Expand All @@ -365,7 +370,11 @@ ARGUMENTS
FLAGS
-f, --force Run yarn install with force flag.
-h, --help Show CLI help.
-v, --verbose
-s, --silent Silences yarn output.
-v, --verbose Show verbose yarn output.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Installs a plugin into the CLI.
Expand All @@ -389,7 +398,7 @@ EXAMPLES
$ csdx plugins:install someuser/someplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.8.4/src/commands/plugins/install.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.1.10/src/commands/plugins/install.ts)_

## `csdx plugins:link PLUGIN`

Expand All @@ -403,8 +412,9 @@ ARGUMENTS
PATH [default: .] path to plugin
FLAGS
-h, --help Show CLI help.
-h, --help Show CLI help.
-v, --verbose
--[no-]install Install dependencies after linking the plugin.
DESCRIPTION
Links a plugin into the CLI for development.
Expand All @@ -418,7 +428,7 @@ EXAMPLES
$ csdx plugins:link myplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.8.4/src/commands/plugins/link.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.1.10/src/commands/plugins/link.ts)_

## `csdx plugins:uninstall PLUGIN...`

Expand All @@ -441,8 +451,22 @@ DESCRIPTION
ALIASES
$ csdx plugins:unlink
$ csdx plugins:remove
EXAMPLES
$ csdx plugins:remove myplugin
```

## `csdx plugins:reset`

Remove all user-installed and linked plugins.

```
USAGE
$ csdx plugins:reset
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.1.10/src/commands/plugins/reset.ts)_

## `csdx plugins:uninstall PLUGIN...`

Removes a plugin from the CLI.
Expand All @@ -464,9 +488,12 @@ DESCRIPTION
ALIASES
$ csdx plugins:unlink
$ csdx plugins:remove
EXAMPLES
$ csdx plugins:uninstall myplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.8.4/src/commands/plugins/uninstall.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.1.10/src/commands/plugins/uninstall.ts)_

## `csdx plugins:uninstall PLUGIN...`

Expand All @@ -489,6 +516,9 @@ DESCRIPTION
ALIASES
$ csdx plugins:unlink
$ csdx plugins:remove
EXAMPLES
$ csdx plugins:unlink myplugin
```

## `csdx plugins:update`
Expand All @@ -507,5 +537,5 @@ DESCRIPTION
Update installed plugins.
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.8.4/src/commands/plugins/update.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.1.10/src/commands/plugins/update.ts)_
<!-- commandsstop -->
4 changes: 2 additions & 2 deletions packages/contentstack-audit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.9",
"@oclif/plugin-help": "^5",
"@oclif/plugin-plugins": "^3.8.4",
"@oclif/plugin-plugins": "^4.1.9",
"chalk": "^4.1.2",
"fast-csv": "^4.3.6",
"fs-extra": "^11.1.1",
Expand Down Expand Up @@ -84,4 +84,4 @@
"keywords": [
"oclif"
]
}
}
2 changes: 1 addition & 1 deletion packages/contentstack-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@
}
},
"repository": "contentstack/cli"
}
}
2 changes: 1 addition & 1 deletion packages/contentstack-bootstrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $ npm install -g @contentstack/cli-cm-bootstrap
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-bootstrap/1.7.0 darwin-arm64 node-v20.8.0
@contentstack/cli-cm-bootstrap/1.7.1 darwin-arm64 node-v20.8.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-branches/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@
}
},
"repository": "https://github.com/contentstack/cli"
}
}
2 changes: 1 addition & 1 deletion packages/contentstack-bulk-publish/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@
"version": "oclif readme && git add README.md",
"clean": "rm -rf ./node_modules tsconfig.build.tsbuildinfo"
}
}
}
146 changes: 145 additions & 1 deletion packages/contentstack-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-config
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-config/1.4.15 darwin-arm64 node-v20.8.0
@contentstack/cli-config/1.5.0 darwin-arm64 node-v20.8.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand All @@ -30,9 +30,15 @@ USAGE

<!-- commands -->
* [`csdx config:get:base-branch`](#csdx-configgetbase-branch)
* [`csdx config:get:ea-header`](#csdx-configgetea-header)
* [`csdx config:get:early-access-header`](#csdx-configgetearly-access-header)
* [`csdx config:get:region`](#csdx-configgetregion)
* [`csdx config:remove:base-branch`](#csdx-configremovebase-branch)
* [`csdx config:remove:ea-header`](#csdx-configremoveea-header)
* [`csdx config:remove:early-access-header`](#csdx-configremoveearly-access-header)
* [`csdx config:set:base-branch`](#csdx-configsetbase-branch)
* [`csdx config:set:ea-header`](#csdx-configsetea-header)
* [`csdx config:set:early-access-header`](#csdx-configsetearly-access-header)
* [`csdx config:set:region [REGION]`](#csdx-configsetregion-region)

## `csdx config:get:base-branch`
Expand All @@ -52,6 +58,44 @@ EXAMPLES

_See code: [src/commands/config/get/base-branch.ts](https://github.com/contentstack/cli/blob/main/packages/contentstack-config/src/commands/config/get/base-branch.ts)_

## `csdx config:get:ea-header`

Display early access headers

```
USAGE
$ csdx config:get:ea-header
DESCRIPTION
Display early access headers
ALIASES
$ csdx config:get:ea-header
EXAMPLES
$ csdx config:get:ea-header
```

## `csdx config:get:early-access-header`

Display early access headers

```
USAGE
$ csdx config:get:early-access-header
DESCRIPTION
Display early access headers
ALIASES
$ csdx config:get:ea-header
EXAMPLES
$ csdx config:get:early-access-header
```

_See code: [src/commands/config/get/early-access-header.ts](https://github.com/contentstack/cli/blob/main/packages/contentstack-config/src/commands/config/get/early-access-header.ts)_

## `csdx config:get:region`

Get current region set for CLI
Expand Down Expand Up @@ -92,6 +136,56 @@ EXAMPLES

_See code: [src/commands/config/remove/base-branch.ts](https://github.com/contentstack/cli/blob/main/packages/contentstack-config/src/commands/config/remove/base-branch.ts)_

## `csdx config:remove:ea-header`

Remove early access header

```
USAGE
$ csdx config:remove:ea-header [--header-alias <value>] [-y]
FLAGS
-y, --yes Force Remove
--header-alias=<value> Early access header alias
DESCRIPTION
Remove early access header
ALIASES
$ csdx config:remove:ea-header
EXAMPLES
$ csdx config:remove:ea-header
$ csdx config:remove:ea-header --header-alias <value>
```

## `csdx config:remove:early-access-header`

Remove early access header

```
USAGE
$ csdx config:remove:early-access-header [--header-alias <value>] [-y]
FLAGS
-y, --yes Force Remove
--header-alias=<value> Early access header alias
DESCRIPTION
Remove early access header
ALIASES
$ csdx config:remove:ea-header
EXAMPLES
$ csdx config:remove:early-access-header
$ csdx config:remove:early-access-header --header-alias <value>
```

_See code: [src/commands/config/remove/early-access-header.ts](https://github.com/contentstack/cli/blob/main/packages/contentstack-config/src/commands/config/remove/early-access-header.ts)_

## `csdx config:set:base-branch`

Set branch for CLI
Expand All @@ -115,6 +209,56 @@ EXAMPLES

_See code: [src/commands/config/set/base-branch.ts](https://github.com/contentstack/cli/blob/main/packages/contentstack-config/src/commands/config/set/base-branch.ts)_

## `csdx config:set:ea-header`

Set early access header

```
USAGE
$ csdx config:set:ea-header [--header-alias <value>] [--header <value>]
FLAGS
--header=<value> Early access header value
--header-alias=<value> Alias for the header
DESCRIPTION
Set early access header
ALIASES
$ csdx config:set:ea-header
EXAMPLES
$ csdx config:set:ea-header
$ csdx config:set:ea-header --header <value> --header-alias <value>
```

## `csdx config:set:early-access-header`

Set early access header

```
USAGE
$ csdx config:set:early-access-header [--header-alias <value>] [--header <value>]
FLAGS
--header=<value> Early access header value
--header-alias=<value> Alias for the header
DESCRIPTION
Set early access header
ALIASES
$ csdx config:set:ea-header
EXAMPLES
$ csdx config:set:early-access-header
$ csdx config:set:early-access-header --header <value> --header-alias <value>
```

_See code: [src/commands/config/set/early-access-header.ts](https://github.com/contentstack/cli/blob/main/packages/contentstack-config/src/commands/config/set/early-access-header.ts)_

## `csdx config:set:region [REGION]`

Set region for CLI
Expand Down
5 changes: 4 additions & 1 deletion packages/contentstack-config/messages/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@
"CLI_CONFIG_SELECT_REGION": "Please select a region",
"CLI_CONFIG_INQUIRE_API_KEY": "Enter stack api key",
"CLI_CONFIG_INQUIRE_BASE_BRANCH": "Enter base branch",
"CLI_CONFIG_BRANCH_LIST_NO_BRANCHES": "No branches are added. Use config:set:base-branch command to add base branch."
"CLI_CONFIG_BRANCH_LIST_NO_BRANCHES": "No branches are added. Use config:set:base-branch command to add base branch.",
"CLI_CONFIG_INQUIRE_EARLY_ACCESS_HEADER_VALUE": "Enter early access header value",
"CLI_CONFIG_INQUIRE_EARLY_ACCESS_HEADER_ALIAS": "Enter early access header alias",
"CLI_BRANCH_REQUIRED_FIELD": "Required given field"
}
Loading

0 comments on commit 7599d68

Please sign in to comment.