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
510 changes: 510 additions & 0 deletions BULK-OPERATIONS-MIGRATION.md

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,29 @@ csdx cm:stacks:migration -k b*******9ca0 --file-path "../contentstack-migration/

**Migration Action:** use the import/export commands instead.

### 5. 📦 Bulk Operations Command Consolidation

**What Changed:**
- The bulk publish plugin has been consolidated into unified bulk operations commands
- 15 separate commands have been simplified into 2 commands with operation flags
- Enhanced functionality with new filtering and cross-publish capabilities

**Impact:**
- Commands like `cm:entries:publish`, `cm:entries:unpublish`, `cm:assets:publish` have been replaced
- New unified commands: `cm:stacks:bulk-entries` and `cm:stacks:bulk-assets`
- Operation flag (`--operation`) is now required

**Migration Action:** Refer to the detailed [Bulk Operations Migration Guide](./BULK-OPERATIONS-MIGRATION.md) for complete command mappings and examples.

**Quick Example:**
```bash
# Before (1.x.x)
csdx cm:entries:publish --content-types blog --environments prod --locales en-us -k blt123

# After (2.x.x-beta)
csdx cm:stacks:bulk-entries --operation publish --content-types blog --environments prod --locales en-us -k blt123
```

## Troubleshooting

### Common Issues
Expand Down
1,624 changes: 614 additions & 1,010 deletions package-lock.json

Large diffs are not rendered by default.

24 changes: 13 additions & 11 deletions packages/contentstack-audit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $ npm install -g @contentstack/cli-audit
$ csdx COMMAND
running command...
$ csdx (--version|-v)
@contentstack/cli-audit/2.0.0-beta.1 darwin-arm64 node-v24.12.0
@contentstack/cli-audit/2.0.0-beta.2 darwin-arm64 node-v24.12.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand All @@ -41,13 +41,14 @@ Perform audits and find possible errors in the exported Contentstack data
```
USAGE
$ csdx cm:stacks:audit [-c <value>] [-d <value>] [--show-console-output] [--report-path <value>] [--modules
content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-rules...] [--columns <value>]
[--sort <value>] [--filter <value>] [--csv] [--no-truncate] [--no-header] [--output csv|json|yaml]
content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-rules|composable-studio...]
[--columns <value>] [--sort <value>] [--filter <value>] [--csv] [--no-truncate] [--no-header] [--output
csv|json|yaml]

FLAGS
--modules=<option>... Provide the list of modules to be audited
<options:
content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-rules>
<options: content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-ru
les|composable-studio>
--report-path=<value> Path to store the audit reports

COMMON FLAGS
Expand Down Expand Up @@ -89,18 +90,19 @@ Perform audits and fix possible errors in the exported Contentstack data.
```
USAGE
$ csdx cm:stacks:audit:fix [-c <value>] [-d <value>] [--show-console-output] [--report-path <value>] [--modules
content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-rules...] [--copy-path <value>
--copy-dir] [--fix-only reference|global_field|json:rte|json:extension|blocks|group|content_types...] [--columns
<value>] [--sort <value>] [--filter <value>] [--csv] [--no-truncate] [--no-header] [--output csv|json|yaml]
content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-rules|composable-studio...]
[--copy-path <value> --copy-dir] [--fix-only
reference|global_field|json:rte|json:extension|blocks|group|content_types...] [--columns <value>] [--sort <value>]
[--filter <value>] [--csv] [--no-truncate] [--no-header] [--output csv|json|yaml]

FLAGS
--copy-dir Create backup from the original data.
--copy-path=<value> Provide the path to backup the copied data
--fix-only=<option>... Provide the list of fix options
<options: reference|global_field|json:rte|json:extension|blocks|group|content_types>
--modules=<option>... Provide the list of modules to be audited
<options:
content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-rules>
<options: content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-r
ules|composable-studio>
--report-path=<value> Path to store the audit reports

COMMON FLAGS
Expand Down Expand Up @@ -155,5 +157,5 @@ DESCRIPTION
Display help for csdx.
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.36/src/commands/help.ts)_
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.37/src/commands/help.ts)_
<!-- commandsstop -->
2 changes: 1 addition & 1 deletion packages/contentstack-auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-auth
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-auth/2.0.0-beta.3 darwin-arm64 node-v24.12.0
@contentstack/cli-auth/2.0.0-beta.4 darwin-arm64 node-v24.12.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
23 changes: 22 additions & 1 deletion packages/contentstack-auth/test/helpers/init.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
const path = require('path');
const { messageHandler } = require('@contentstack/cli-utilities');
const os = require('os');
const sinon = require('sinon');

// Set test log path to temp directory BEFORE any module loads the logger
process.env.CS_CLI_LOG_PATH = path.join(os.tmpdir(), 'cs-cli-test-logs');
process.env.TS_NODE_PROJECT = path.resolve('test/tsconfig.json');
process.env.CLI_ENV = 'TEST';

const { messageHandler } = require('@contentstack/cli-utilities');

// NOTE init messageHandler
const messageFilePath = path.join(__dirname, '..', '..', 'messages/index.json');
messageHandler.init({ messageFilePath });

// Mock logger to prevent file creation during tests
const mockLogger = {
debug: sinon.stub(),
info: sinon.stub(),
warn: sinon.stub(),
error: sinon.stub(),
success: sinon.stub(),
logError: sinon.stub(),
};

// Stub the logger module to prevent log file creation
const cliUtilities = require('@contentstack/cli-utilities');
if (!cliUtilities.log.debug.restore) {
sinon.stub(cliUtilities, 'log').value(mockLogger);
}
2 changes: 1 addition & 1 deletion packages/contentstack-auth/test/run.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ if (includes(args, '--integration-test')) {
run(INTEGRATION_EXECUTION_ORDER);
} else if (includes(args, '--unit-test')) {
// run(UNIT_EXECUTION_ORDER, false);
}
}
2 changes: 1 addition & 1 deletion packages/contentstack-branches/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ $ npm install -g @contentstack/cli-cm-branches
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-branches/1.6.1 darwin-arm64 node-v24.12.0
@contentstack/cli-cm-branches/1.6.3 darwin-arm64 node-v24.12.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe('Diff Command', () => {
'-k',
mockData.flags.stackAPIKey,
'--format',
'verbose'
'detailed-text'
]);
expect(stub1.calledOnce).to.be.true;
}).timeout(10000);
Expand Down
11 changes: 0 additions & 11 deletions packages/contentstack-bulk-publish/.editorconfig

This file was deleted.

3 changes: 0 additions & 3 deletions packages/contentstack-bulk-publish/.eslintrc

This file was deleted.

9 changes: 0 additions & 9 deletions packages/contentstack-bulk-publish/.gitignore

This file was deleted.

13 changes: 0 additions & 13 deletions packages/contentstack-bulk-publish/.mocharc.json

This file was deleted.

10 changes: 0 additions & 10 deletions packages/contentstack-bulk-publish/.snyk

This file was deleted.

21 changes: 0 additions & 21 deletions packages/contentstack-bulk-publish/LICENSE

This file was deleted.

Loading
Loading