Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,021 changes: 512 additions & 509 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packages/contentstack-audit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentstack/cli-audit",
"version": "1.16.2",
"version": "1.16.3",
"description": "Contentstack audit plugin",
"author": "Contentstack CLI",
"homepage": "https://github.com/contentstack/cli",
Expand All @@ -18,8 +18,8 @@
"/oclif.manifest.json"
],
"dependencies": {
"@contentstack/cli-command": "~1.7.1",
"@contentstack/cli-utilities": "~1.16.0",
"@contentstack/cli-command": "~1.7.2",
"@contentstack/cli-utilities": "~1.17.0",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"@oclif/plugin-plugins": "^5.4.54",
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-auth/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-auth",
"description": "Contentstack CLI plugin for authentication activities",
"version": "1.6.3",
"version": "1.6.4",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"scripts": {
Expand All @@ -22,8 +22,8 @@
"test:unit:report": "nyc --extension .ts mocha --forbid-only \"test/unit/**/*.test.ts\""
},
"dependencies": {
"@contentstack/cli-command": "~1.7.1",
"@contentstack/cli-utilities": "~1.16.0",
"@contentstack/cli-command": "~1.7.2",
"@contentstack/cli-utilities": "~1.17.0",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"otplib": "^12.0.1"
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-bootstrap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
},
"dependencies": {
"@contentstack/cli-cm-seed": "~1.14.0",
"@contentstack/cli-command": "~1.7.1",
"@contentstack/cli-utilities": "~1.16.0",
"@contentstack/cli-command": "~1.7.2",
"@contentstack/cli-utilities": "~1.17.0",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"inquirer": "8.2.7",
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-branches/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@contentstack/cli-cm-branches",
"description": "Contentstack CLI plugin to do branches operations",
"version": "1.6.2",
"version": "1.6.3",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-command": "~1.7.1",
"@contentstack/cli-command": "~1.7.2",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"@contentstack/cli-utilities": "~1.16.0",
"@contentstack/cli-utilities": "~1.17.0",
"chalk": "^4.1.2",
"just-diff": "^6.0.2",
"lodash": "^4.17.21"
Expand Down
8 changes: 4 additions & 4 deletions packages/contentstack-bulk-publish/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@contentstack/cli-cm-bulk-publish",
"description": "Contentstack CLI plugin for bulk publish actions",
"version": "1.10.4",
"version": "1.10.5",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-command": "~1.7.1",
"@contentstack/cli-config": "~1.16.2",
"@contentstack/cli-utilities": "~1.16.0",
"@contentstack/cli-command": "~1.7.2",
"@contentstack/cli-config": "~1.17.0",
"@contentstack/cli-utilities": "~1.17.0",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"chalk": "^4.1.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-clone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"bugs": "https://github.com/rohitmishra209/cli-cm-clone/issues",
"dependencies": {
"@colors/colors": "^1.6.0",
"@contentstack/cli-cm-export": "~1.22.2",
"@contentstack/cli-cm-export": "~1.22.3",
"@contentstack/cli-cm-import": "~1.31.0",
"@contentstack/cli-command": "~1.7.1",
"@contentstack/cli-utilities": "~1.16.0",
"@contentstack/cli-command": "~1.7.2",
"@contentstack/cli-utilities": "~1.17.0",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"chalk": "^4.1.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-command/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-command",
"description": "Contentstack CLI plugin for configuration",
"version": "1.7.1",
"version": "1.7.2",
"author": "Contentstack",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand All @@ -19,7 +19,7 @@
"test:unit": "mocha --timeout 10000 --forbid-only \"test/unit/**/*.test.ts\""
},
"dependencies": {
"@contentstack/cli-utilities": "~1.16.0",
"@contentstack/cli-utilities": "~1.17.0",
"contentstack": "^3.25.3",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28"
Expand Down
67 changes: 66 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.16.2 darwin-arm64 node-v22.14.0
@contentstack/cli-config/1.17.0 darwin-arm64 node-v22.14.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand All @@ -33,16 +33,19 @@ USAGE
* [`csdx config:get:ea-header`](#csdx-configgetea-header)
* [`csdx config:get:early-access-header`](#csdx-configgetearly-access-header)
* [`csdx config:get:log`](#csdx-configgetlog)
* [`csdx config:get:proxy`](#csdx-configgetproxy)
* [`csdx config:get:rate-limit`](#csdx-configgetrate-limit)
* [`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:remove:proxy`](#csdx-configremoveproxy)
* [`csdx config:remove:rate-limit`](#csdx-configremoverate-limit)
* [`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:log`](#csdx-configsetlog)
* [`csdx config:set:proxy`](#csdx-configsetproxy)
* [`csdx config:set:rate-limit`](#csdx-configsetrate-limit)
* [`csdx config:set:region [REGION]`](#csdx-configsetregion-region)

Expand Down Expand Up @@ -118,6 +121,23 @@ EXAMPLES

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

## `csdx config:get:proxy`

Get proxy configuration for CLI

```
USAGE
$ csdx config:get:proxy

DESCRIPTION
Get proxy configuration for CLI

EXAMPLES
$ csdx config:get:proxy
```

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

## `csdx config:get:rate-limit`

Get rate-limit of organizations
Expand Down Expand Up @@ -227,6 +247,23 @@ EXAMPLES

_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:remove:proxy`

Remove proxy configuration from global config

```
USAGE
$ csdx config:remove:proxy

DESCRIPTION
Remove proxy configuration from global config

EXAMPLES
$ csdx config:remove:proxy
```

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

## `csdx config:remove:rate-limit`

Remove rate-limit of the organization
Expand Down Expand Up @@ -358,6 +395,34 @@ EXAMPLES

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

## `csdx config:set:proxy`

Set proxy configuration for CLI

```
USAGE
$ csdx config:set:proxy --host <value> --port <value> --protocol http|https [--username <value>]

FLAGS
--host=<value> (required) Proxy host address
--port=<value> (required) Proxy port number
--protocol=<option> (required) [default: http] Proxy protocol (http or https)
<options: http|https>
--username=<value> Proxy username (optional)

DESCRIPTION
Set proxy configuration for CLI

EXAMPLES
$ csdx config:set:proxy --host 127.0.0.1 --port 3128

$ csdx config:set:proxy --host proxy.example.com --port 8080 --protocol https

$ csdx config:set:proxy --host proxy.example.com --port 8080 --username user
```

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

## `csdx config:set:rate-limit`

Set rate-limit for CLI
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-config/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-config",
"description": "Contentstack CLI plugin for configuration",
"version": "1.16.2",
"version": "1.17.0",
"author": "Contentstack",
"scripts": {
"build": "npm run clean && npm run compile",
Expand All @@ -21,8 +21,8 @@
"test:unit:report": "nyc --extension .ts mocha --forbid-only \"test/unit/**/*.test.ts\""
},
"dependencies": {
"@contentstack/cli-command": "~1.7.1",
"@contentstack/cli-utilities": "~1.16.0",
"@contentstack/cli-command": "~1.7.2",
"@contentstack/cli-utilities": "~1.17.0",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"lodash": "^4.17.21"
Expand Down
57 changes: 57 additions & 0 deletions packages/contentstack-config/src/commands/config/get/proxy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import { Command } from '@contentstack/cli-command';
import { cliux, configHandler, TableHeader, log } from '@contentstack/cli-utilities';

export default class ProxyGetCommand extends Command {
static description = 'Get proxy configuration for CLI';

static examples = ['csdx config:get:proxy'];

async run() {
try {
log.debug('Starting proxy configuration retrieval');
const globalProxyConfig = configHandler.get('proxy');

if (globalProxyConfig) {
log.debug('Proxy configuration found in global config');
let usernameValue = 'Not set';
if (globalProxyConfig.auth?.username) {
usernameValue = globalProxyConfig.auth.username;
}

const proxyConfigList = [
{
Setting: 'Host',
Value: globalProxyConfig.host || 'Not set',
},
{
Setting: 'Port',
Value: globalProxyConfig.port ? String(globalProxyConfig.port) : 'Not set',
},
{
Setting: 'Protocol',
Value: globalProxyConfig.protocol || 'Not set',
},
{
Setting: 'Username',
Value: usernameValue,
},
{
Setting: 'Password',
Value: globalProxyConfig.auth?.password ? '***' : 'Not set',
},
];

const headers: TableHeader[] = [{ value: 'Setting' }, { value: 'Value' }];

cliux.table(headers, proxyConfigList);
log.info('Proxy configuration displayed successfully');
} else {
log.debug('No proxy configuration found in global config');
}
} catch (error) {
log.error('Error retrieving proxy configuration');
}
}
}


Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { Command } from '@contentstack/cli-command';
import { configHandler, log } from '@contentstack/cli-utilities';

export default class ProxyRemoveCommand extends Command {
static description = 'Remove proxy configuration from global config';

static examples = ['csdx config:remove:proxy'];

async run() {
try {
log.debug('Starting proxy configuration removal');
const currentProxy = configHandler.get('proxy');
if (!currentProxy) {
log.debug('No proxy configuration found in global config');
return;
}

log.debug('Removing proxy configuration from global config');
configHandler.delete('proxy');
log.success('Proxy configuration removed from global config successfully');
} catch (error) {
log.error('Failed to remove proxy configuration');
}
}
}

Loading
Loading