Skip to content
Merged
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
43 changes: 23 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 1 addition & 16 deletions packages/contentstack-bulk-publish/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-cm-bulk-publish
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-bulk-publish/1.7.2 darwin-arm64 node-v22.2.0
@contentstack/cli-cm-bulk-publish/1.8.0 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand All @@ -31,7 +31,6 @@ USAGE
<!-- commands -->
* [`csdx cm:assets:publish [-a <value>] [--retry-failed <value>] [-e <value>] [--folder-uid <value>] [--bulk-publish <value>] [-c <value>] [-y] [--locales <value>] [--branch <value>] [--delivery-token <value>] [--source-env <value>]`](#csdx-cmassetspublish--a-value---retry-failed-value--e-value---folder-uid-value---bulk-publish-value--c-value--y---locales-value---branch-value---delivery-token-value---source-env-value)
* [`csdx cm:assets:unpublish`](#csdx-cmassetsunpublish)
* [`csdx cm:bulk-publish`](#csdx-cmbulk-publish)
* [`csdx cm:entries:update-and-publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--content-types <value>] [-t <value>] [-e <value>] [-c <value>] [-y] [--locales <value>] [--branch <value>]`](#csdx-cmentriesupdate-and-publish--a-value---retry-failed-value---bulk-publish-value---content-types-value--t-value--e-value--c-value--y---locales-value---branch-value)
* [`csdx cm:assets:publish [-a <value>] [--retry-failed <value>] [-e <value>] [--folder-uid <value>] [--bulk-publish <value>] [-c <value>] [-y] [--locales <value>] [--branch <value>] [--delivery-token <value>] [--source-env <value>]`](#csdx-cmassetspublish--a-value---retry-failed-value--e-value---folder-uid-value---bulk-publish-value--c-value--y---locales-value---branch-value---delivery-token-value---source-env-value-1)
* [`csdx cm:bulk-publish:clear`](#csdx-cmbulk-publishclear)
Expand Down Expand Up @@ -216,20 +215,6 @@ EXAMPLES

_See code: [src/commands/cm/assets/unpublish.js](https://github.com/contentstack/cli/blob/main/packages/contentstack-bulk-publish/src/commands/cm/assets/unpublish.js)_

## `csdx cm:bulk-publish`

Bulk Publish script for managing entries and assets

```
USAGE
$ csdx cm:bulk-publish

DESCRIPTION
Bulk Publish script for managing entries and assets
```

_See code: [src/commands/cm/bulk-publish/index.js](https://github.com/contentstack/cli/blob/main/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/index.js)_

## `csdx cm:entries:update-and-publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--content-types <value>] [-t <value>] [-e <value>] [-c <value>] [-y] [--locales <value>] [--branch <value>]`

Add fields from updated content types to their respective entries
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-bulk-publish/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-cm-bulk-publish",
"description": "Contentstack CLI plugin for bulk publish actions",
"version": "1.7.2",
"version": "1.8.0",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
Expand All @@ -14,7 +14,7 @@
"winston": "^3.17.0"
},
"devDependencies": {
"@oclif/test": "^4.1.6",
"@oclif/test": "^4.1.9",
"chai": "^4.5.0",
"eslint": "^8.57.1",
"eslint-config-oclif": "^4.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ class AssetsPublishCommand extends Command {

if (updatedFlags['source-env']) {
updatedFlags.deliveryToken = updatedFlags['delivery-token'];
if (updatedFlags.deliveryToken) {
const configToken = this.getToken(updatedFlags.deliveryToken)
if(configToken) {
updatedFlags.deliveryToken = configToken.token;
} else {
this.error(`Delivery Token alias does not exist run the csdx auth:tokens command to verify`,{ exit: 2 })
}
}
updatedFlags.destEnv = updatedFlags.environments;
updatedFlags.environment = updatedFlags['source-env'];
updatedFlags.onlyAssets = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,16 @@ class UnpublishCommand extends Command {
this.error('Please use `--alias` or `--stack-api-key` to proceed.', { exit: 2 });
}
if (!updatedFlags.deliveryToken) {
updatedFlags.deliveryToken = await cliux.prompt('Enter delivery token of your source environment');
updatedFlags.deliveryToken = await cliux.prompt('Enter delivery token alias of your source environment');
}

if (updatedFlags.deliveryToken) {
const configToken = this.getToken(updatedFlags.deliveryToken)
if(configToken) {
updatedFlags.deliveryToken = configToken.token;
} else {
this.error(`Delivery Token alias does not exist run the csdx auth:tokens command to verify`,{ exit: 2 })
}
}
updatedFlags.bulkUnpublish = updatedFlags.bulkUnpublish === 'false' ? false : true;
stack = await getStack(config);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,16 @@ class CrossPublishCommand extends Command {
this.error('Please use `--alias` or `--stack-api-key` to proceed.', { exit: 2 });
}
if (!updatedFlags.deliveryToken) {
updatedFlags.deliveryToken = await cliux.prompt('Enter delivery token of your source environment');
updatedFlags.deliveryToken = await cliux.prompt('Enter delivery token alias of your source environment');
}
if (updatedFlags.deliveryToken) {
const configToken = this.getToken(updatedFlags.deliveryToken)
if(configToken) {
updatedFlags.deliveryToken = configToken.token;
} else {
this.error(`Delivery Token alias does not exist run the csdx auth:tokens command to verify`,{ exit: 2 })
}
}
updatedFlags.bulkPublish = updatedFlags.bulkPublish === 'false' ? false : true;
updatedFlags.includeVariants = updatedFlags.includeVariants === false ? false : true;
stack = await getStack(config);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ class PublishEntriesCommand extends Command {

if (updatedFlags['source-env']) {
updatedFlags.deliveryToken = updatedFlags['delivery-token'];
if (updatedFlags.deliveryToken) {
const configToken = this.getToken(updatedFlags.deliveryToken)
if(configToken) {
updatedFlags.deliveryToken = configToken.token;
} else {
this.error(`Delivery Token alias does not exist run the csdx auth:tokens command to verify`,{ exit: 2 })
}
}
updatedFlags.destEnv = updatedFlags.environments;
updatedFlags.environment = updatedFlags['source-env'];
updatedFlags.onlyEntries = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,25 @@ class UnpublishCommand extends Command {
this.error('Please use `--alias` or `--stack-api-key` to proceed.', { exit: 2 });
}
if (!updatedFlags.deliveryToken) {
updatedFlags.deliveryToken = await cliux.prompt('Enter delivery token of your source environment');
updatedFlags.deliveryToken = await cliux.prompt('Enter delivery token alias of your source environment');
}

if (updatedFlags.deliveryToken) {
const configToken = this.getToken(updatedFlags.deliveryToken)
if(configToken) {
updatedFlags.deliveryToken = configToken.token;
} else {
this.error(`Delivery Token alias does not exist run the csdx auth:tokens command to verify`,{ exit: 2 })
}
}

updatedFlags.bulkUnpublish = updatedFlags.bulkUnpublish === 'false' ? false : true;
stack = await getStack(config);
}
if (!updatedFlags.deliveryToken && updatedFlags.deliveryToken.length === 0) {
this.error('Delivery Token is required for executing this command', { exit: 2 });
}


if (await this.confirmFlags(updatedFlags)) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,15 @@ class UnpublishCommand extends Command {
this.error('Please use `--alias` or `--stack-api-key` to proceed.', { exit: 2 });
}
if (!updatedFlags.deliveryToken) {
updatedFlags.deliveryToken = await cliux.prompt('Enter delivery token of your source environment');
updatedFlags.deliveryToken = await cliux.prompt('Enter delivery token alias of your source environment');
}
if (updatedFlags.deliveryToken) {
const configToken = this.getToken(updatedFlags.deliveryToken)
if(configToken) {
updatedFlags.deliveryToken = configToken.token;
} else {
this.error(`Delivery Token alias does not exist run the csdx auth:tokens command to verify`,{ exit: 2 })
}
}
updatedFlags.bulkUnpublish = updatedFlags.bulkUnpublish === 'false' ? false : true;
stack = await getStack(config);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ async function start(
}
process.exit(0);
});

if (retryFailed) {
if (typeof retryFailed === 'string' && retryFailed.length > 0) {
if (!validateFile(retryFailed, ['cross-publish', 'bulk-cross-publish'])) {
Expand Down
17 changes: 1 addition & 16 deletions packages/contentstack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ USAGE
* [`csdx cm:branches:delete [-uid <value>] [-k <value>]`](#csdx-cmbranchesdelete--uid-value--k-value)
* [`csdx cm:branches:diff [--base-branch <value>] [--compare-branch <value>] [-k <value>][--module <value>]`](#csdx-cmbranchesdiff---base-branch-value---compare-branch-value--k-value--module-value)
* [`csdx cm:branches:merge [-k <value>][--compare-branch <value>] [--no-revert] [--export-summary-path <value>] [--use-merge-summary <value>] [--comment <value>] [--base-branch <value>]`](#csdx-cmbranchesmerge--k-value--compare-branch-value---no-revert---export-summary-path-value---use-merge-summary-value---comment-value---base-branch-value)
* [`csdx cm:bulk-publish`](#csdx-cmbulk-publish)
* [`csdx cm:entries:update-and-publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--content-types <value>] [-t <value>] [-e <value>] [-c <value>] [-y] [--locales <value>] [--branch <value>]`](#csdx-cmentriesupdate-and-publish--a-value---retry-failed-value---bulk-publish-value---content-types-value--t-value--e-value--c-value--y---locales-value---branch-value)
* [`csdx cm:assets:publish [-a <value>] [--retry-failed <value>] [-e <value>] [--folder-uid <value>] [--bulk-publish <value>] [-c <value>] [-y] [--locales <value>] [--branch <value>] [--delivery-token <value>] [--source-env <value>]`](#csdx-cmassetspublish--a-value---retry-failed-value--e-value---folder-uid-value---bulk-publish-value--c-value--y---locales-value---branch-value---delivery-token-value---source-env-value-1)
* [`csdx cm:bulk-publish:clear`](#csdx-cmbulk-publishclear)
Expand Down Expand Up @@ -760,20 +759,6 @@ EXAMPLES

_See code: [@contentstack/cli-cm-branches](https://github.com/contentstack/cli/blob/main/packages/contentstack-export/src/commands/cm/branches/merge.ts)_

## `csdx cm:bulk-publish`

Bulk Publish script for managing entries and assets

```
USAGE
$ csdx cm:bulk-publish

DESCRIPTION
Bulk Publish script for managing entries and assets
```

_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/main/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/index.js)_

## `csdx cm:entries:update-and-publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--content-types <value>] [-t <value>] [-e <value>] [-c <value>] [-y] [--locales <value>] [--branch <value>]`

Add fields from updated content types to their respective entries
Expand Down Expand Up @@ -4232,7 +4217,7 @@ EXAMPLES
$ csdx tsgen -a "delivery token alias" -o "contentstack/generated.d.ts" --api-type graphql --namespace "GraphQL"
```

_See code: [contentstack-cli-tsgen](https://github.com/Contentstack-Solutions/contentstack-cli-tsgen/blob/v3.1.0/src/commands/tsgen.ts)_
_See code: [contentstack-cli-tsgen](https://github.com/Contentstack-Solutions/contentstack-cli-tsgen/blob/v3.3.0/src/commands/tsgen.ts)_

## `csdx whoami`

Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@contentstack/cli-auth": "~1.3.23",
"@contentstack/cli-cm-bootstrap": "~1.13.1",
"@contentstack/cli-cm-branches": "~1.2.1",
"@contentstack/cli-cm-bulk-publish": "~1.7.2",
"@contentstack/cli-cm-bulk-publish": "~1.8.0",
"@contentstack/cli-cm-clone": "~1.13.1",
"@contentstack/cli-cm-export": "~1.14.2",
"@contentstack/cli-cm-export-to-csv": "~1.7.3",
Expand Down
Loading
Loading