Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
72fc441
improved error messages: 500 lines
reeshika-h Oct 15, 2025
b71d59e
Merge branch 'development' into fix/DX-3458-error-msg-improve
reeshika-h Oct 15, 2025
e71f266
chore: fixed testcase assertions
reeshika-h Oct 15, 2025
1641516
chore: update package-lock
reeshika-h Oct 15, 2025
c061f77
testing config test cases
reeshika-h Oct 15, 2025
8c7a765
chore: add test cases for label, and marketplace modules
Nov 10, 2025
e6c525b
Merge branch 'development' into feat/DX-3585
Nov 11, 2025
85cb7ec
Merge pull request #2224 from contentstack/feat/DX-3585
naman-contentstack Nov 11, 2025
05ce74c
chore: add test case for personalize module
Nov 11, 2025
f37b10b
Merge pull request #2230 from contentstack/feat/DX-3337
naman-contentstack Nov 11, 2025
4f58dae
chore: add test case for entries module
Nov 12, 2025
60aebb9
Merge pull request #2231 from contentstack/feat/DX-3586
naman-contentstack Nov 12, 2025
1ad38d9
added delay after create entries
shafeeqd959 Nov 17, 2025
323bcc7
Fix: Updated File Names of Generated reports
cs-raj Nov 17, 2025
8cb3aa1
Merge branch 'development' into fix/DR-1
cs-raj Nov 17, 2025
892f3d8
Lock File update
cs-raj Nov 17, 2025
3ce1ba2
feat: session based logs with date hierarchy
Nov 17, 2025
192ba55
resolved comments
Nov 18, 2025
349f207
feat: add v2 logger in clone
Nov 18, 2025
2798552
Merge pull request #2241 from contentstack/fix/DR-1
cs-raj Nov 18, 2025
e35c2e9
updated debug logs
Nov 19, 2025
9c0c100
Merge branch 'feat/DX-3646' into feat/DX-3700
Nov 19, 2025
fac8313
updated talisman
Nov 19, 2025
42828b5
resolved comments
Nov 19, 2025
014f0ee
added export and import support for composable studio project
shafeeqd959 Nov 20, 2025
83d017e
restricted authentication to basiz auth
shafeeqd959 Nov 21, 2025
77cdc90
updated test cases
shafeeqd959 Nov 24, 2025
c1de49f
updated talismanrc
shafeeqd959 Nov 24, 2025
0a79eb0
updated talismanrc
shafeeqd959 Nov 24, 2025
e315e30
updated error handling
shafeeqd959 Nov 26, 2025
11d559f
Merge pull request #2246 from contentstack/export-import/composable-s…
shafeeqd959 Nov 26, 2025
0a5136c
integrate centralized logger in import setup
sunil-lakshman Nov 26, 2025
cbdaf4b
Fixed PR comments
sunil-lakshman Nov 27, 2025
9786c8d
chore: update package-lock.json and improve error messages across mul…
reeshika-h Nov 27, 2025
c317289
merged development changes
reeshika-h Nov 27, 2025
afb21a2
chore: update package-lock.json to upgrade AWS SDK and TypeScript dep…
reeshika-h Nov 27, 2025
cefa2b7
fix: Taxonomy Export Fails When Localization Not in Plan
aman19K Nov 27, 2025
1f9ddd5
fix: test cases
aman19K Nov 27, 2025
ab5b003
Merge pull request #2255 from contentstack/fix/DX-3792
aman19K Nov 28, 2025
3e6fda5
Merge branch 'development' into enh/dx-3701
sunil-lakshman Nov 28, 2025
bf89d5f
Merge pull request #2254 from contentstack/enh/dx-3701
sunil-lakshman Dec 1, 2025
619161b
refactor: enhance logging messages for clarity across multiple import…
reeshika-h Dec 1, 2025
72cbe46
refactor: improve error and logging messages for consistency and clar…
reeshika-h Dec 2, 2025
4263ac4
merged devlopment changes
reeshika-h Dec 2, 2025
570714c
Merge branch 'development' into feat/DX-3646
Dec 2, 2025
6d46d49
updated package-lock
Dec 2, 2025
6918642
Merge branch 'feat/DX-3646' into feat/DX-3700
Dec 2, 2025
f003dba
resolved comments
Dec 2, 2025
077cd8f
Merge pull request #2244 from contentstack/feat/DX-3700
naman-contentstack Dec 2, 2025
30bdd5a
refactor: enhance error handling and logging messages for improved cl…
reeshika-h Dec 3, 2025
6990c54
added multi region support
shafeeqd959 Dec 3, 2025
3eb3080
refactor: remove unnecessary logging and clean up test file configura…
reeshika-h Dec 4, 2025
1014392
fixed test cases and added import support
shafeeqd959 Dec 4, 2025
8bf0657
fixed test cases and added import support
shafeeqd959 Dec 4, 2025
0f3c9b8
fixed test cases and added import support
shafeeqd959 Dec 4, 2025
34ae653
fixed test cases and added import support
shafeeqd959 Dec 4, 2025
7405477
Merge pull request #2258 from contentstack/export-import/composable-s…
shafeeqd959 Dec 4, 2025
622afc9
merged changes
shafeeqd959 Dec 4, 2025
ddb6d37
bumped versions
shafeeqd959 Dec 4, 2025
97cd57e
Merge pull request #2242 from contentstack/feat/DX-3646
naman-contentstack Dec 4, 2025
125055e
refactor: add error logging for current region in RegionGetCommand
reeshika-h Dec 4, 2025
88ec7c2
Merge branch development into fix/DX-3458-error-msg-improve
reeshika-h Dec 4, 2025
d6de898
fixed the base path
shafeeqd959 Dec 4, 2025
edc4f22
fixed the base path
shafeeqd959 Dec 4, 2025
77b5110
chore: update package-lock.json and pnpm-lock.yaml to reflect depende…
reeshika-h Dec 5, 2025
349ecba
Merge pull request #2257 from contentstack/fix/DX-3458-error-msg-improve
reeshika-h Dec 5, 2025
eab5965
version bump
harshithad0703 Dec 5, 2025
dcc72fc
Merge branch 'main' into fix/version-bump-1.53.0
harshithad0703 Dec 5, 2025
693fd36
Merge pull request #2263 from contentstack/fix/version-bump-1.53.0
harshithad0703 Dec 5, 2025
8563ce3
updated auth unit test workflow script
shafeeqd959 Dec 5, 2025
ed1c1ca
merged latest changes
shafeeqd959 Dec 5, 2025
c6c3d22
Merge pull request #2259 from contentstack/feat/composable-studio-sup…
harshithad0703 Dec 5, 2025
241c5e3
resolve version bump
harshithad0703 Dec 5, 2025
e5da630
Merge pull request #2266 from contentstack/fix/version-bumps
harshithad0703 Dec 5, 2025
37dbb6d
Merged development branch changes to v2 beta dev
sunil-lakshman Dec 5, 2025
05cd0bb
Merged development branch changes to v2 beta dev
sunil-lakshman Dec 5, 2025
a772c50
Workflow file added
sunil-lakshman Dec 5, 2025
fd72578
Fixed failed unit tests
sunil-lakshman Dec 8, 2025
f71d666
Fixed failed unit tests
sunil-lakshman Dec 8, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ jobs:
# else
# echo "contentstack-audit has not changed. Skipping tests."
# fi
# done
# done
5,885 changes: 3,398 additions & 2,487 deletions package-lock.json

Large diffs are not rendered by default.

27 changes: 13 additions & 14 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/1.14.2 darwin-arm64 node-v22.14.0
@contentstack/cli-audit/1.16.1 darwin-arm64 node-v22.14.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down Expand Up @@ -273,7 +273,7 @@ USAGE
$ csdx help [COMMAND...] [-n]

ARGUMENTS
COMMAND... Command to show help for.
[COMMAND...] Command to show help for.

FLAGS
-n, --nested-commands Include all nested commands in the output.
Expand All @@ -282,8 +282,7 @@ DESCRIPTION
Display help for csdx.
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.33/src/commands/help.ts)_
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.33/src/commands/help.ts)_
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.36/src/commands/help.ts)_

## `csdx plugins`

Expand All @@ -306,7 +305,7 @@ EXAMPLES
$ csdx plugins
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.49/src/commands/plugins/index.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/index.ts)_

## `csdx plugins:add PLUGIN`

Expand Down Expand Up @@ -380,7 +379,7 @@ EXAMPLES
$ csdx plugins:inspect myplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.49/src/commands/plugins/inspect.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/inspect.ts)_

## `csdx plugins:install PLUGIN`

Expand Down Expand Up @@ -429,7 +428,7 @@ EXAMPLES
$ csdx plugins:install someuser/someplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.49/src/commands/plugins/install.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/install.ts)_

## `csdx plugins:link PATH`

Expand Down Expand Up @@ -460,7 +459,7 @@ EXAMPLES
$ csdx plugins:link myplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.49/src/commands/plugins/link.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/link.ts)_

## `csdx plugins:remove [PLUGIN]`

Expand All @@ -471,7 +470,7 @@ USAGE
$ csdx plugins:remove [PLUGIN...] [-h] [-v]

ARGUMENTS
PLUGIN... plugin to uninstall
[PLUGIN...] plugin to uninstall

FLAGS
-h, --help Show CLI help.
Expand Down Expand Up @@ -501,7 +500,7 @@ FLAGS
--reinstall Reinstall all plugins after uninstalling.
```

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

## `csdx plugins:uninstall [PLUGIN]`

Expand All @@ -512,7 +511,7 @@ USAGE
$ csdx plugins:uninstall [PLUGIN...] [-h] [-v]

ARGUMENTS
PLUGIN... plugin to uninstall
[PLUGIN...] plugin to uninstall

FLAGS
-h, --help Show CLI help.
Expand All @@ -529,7 +528,7 @@ EXAMPLES
$ csdx plugins:uninstall myplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.49/src/commands/plugins/uninstall.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/uninstall.ts)_

## `csdx plugins:unlink [PLUGIN]`

Expand All @@ -540,7 +539,7 @@ USAGE
$ csdx plugins:unlink [PLUGIN...] [-h] [-v]

ARGUMENTS
PLUGIN... plugin to uninstall
[PLUGIN...] plugin to uninstall

FLAGS
-h, --help Show CLI help.
Expand Down Expand Up @@ -573,5 +572,5 @@ DESCRIPTION
Update installed plugins.
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.49/src/commands/plugins/update.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/update.ts)_
<!-- commandsstop -->
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.0",
"version": "1.16.1",
"description": "Contentstack audit plugin",
"author": "Contentstack CLI",
"homepage": "https://github.com/contentstack/cli",
Expand All @@ -18,11 +18,11 @@
"/oclif.manifest.json"
],
"dependencies": {
"@contentstack/cli-command": "~1.6.1",
"@contentstack/cli-command": "~1.7.0",
"@contentstack/cli-utilities": "~1.15.0",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"@oclif/plugin-plugins": "^5.4.38",
"@oclif/plugin-plugins": "^5.4.54",
"chalk": "^4.1.2",
"fast-csv": "^4.3.6",
"fs-extra": "^11.3.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-audit/src/audit-base-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,11 @@ export abstract class AuditBaseCommand extends BaseCommand<typeof AuditBaseComma
missingMultipleFields = missingEntry.missingMultipleFields ?? {};
await this.prepareReport(module, missingEntryRefs);

await this.prepareReport(`Entries_Select_feild`, missingSelectFeild);
await this.prepareReport(`Entries_Select_field`, missingSelectFeild);

await this.prepareReport('Entries_Mandatory_feild', missingMandatoryFields);
await this.prepareReport('Entries_Mandatory_field', missingMandatoryFields);

await this.prepareReport('Entries_Title_feild', missingTitleFields);
await this.prepareReport('Entries_Title_field', missingTitleFields);

await this.prepareReport('Entry_Missing_Locale_and_Env_in_Publish_Details', missingEnvLocalesInEntries);

Expand Down
12 changes: 6 additions & 6 deletions packages/contentstack-audit/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,17 @@ const config = {
"Passed",
],
ReportTitleForEntries: {
Entries_Select_feild: 'Entries_Select_feild',
Entries_Mandatory_feild: 'Entries_Mandatory_feild',
Entries_Title_feild: 'Entries_Title_feild',
Entries_Select_field: 'Entries_Select_field',
Entries_Mandatory_field: 'Entries_Mandatory_field',
Entries_Title_field: 'Entries_Title_field',
Entry_Missing_Locale_and_Env: 'Entry_Missing_Locale_and_Env',
Entry_Missing_Locale_and_Env_in_Publish_Details: 'Entry_Missing_Locale_and_Env_in_Publish_Details',
Entry_Multiple_Fields:"Entry_Multiple_Fields"
},
feild_level_modules: [
'Entries_Title_feild',
'Entries_Mandatory_feild',
'Entries_Select_feild',
'Entries_Title_field',
'Entries_Mandatory_field',
'Entries_Select_field',
'Entry_Missing_Locale_and_Env_in_Publish_Details',
'field-rules',
'Entry_Multiple_Fields',
Expand Down
142 changes: 142 additions & 0 deletions packages/contentstack-audit/test/unit/audit-base-command.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,4 +370,146 @@ describe('AuditBaseCommand class', () => {
});
});
});

describe('prepareReport method - Report file names', () => {
fancy
.stdout({ print: process.env.PRINT === 'true' || false })
.stub(winston.transports, 'File', () => fsTransport)
.stub(winston, 'createLogger', createMockWinstonLogger)
.stub(fs, 'createWriteStream', () => new PassThrough())
.stub(fs, 'mkdirSync', () => {})
.stub(fs, 'existsSync', () => true)
.it('should generate report file with correct spelling: Entries_Select_field (not feild)', async () => {
const writeFileSyncSpy = sinon.spy(fs, 'writeFileSync');
class CMD extends AuditBaseCommand {
async run() {
await this.init();
this.sharedConfig.reportPath = resolve(__dirname, 'mock', 'contents');

await this.prepareReport('Entries_Select_field', {
entry1: {
name: 'Test Entry',
display_name: 'Select Field',
missingRefs: ['ref1'],
},
});

const jsonCall = writeFileSyncSpy.getCalls().find(call =>
typeof call.args[0] === 'string' && call.args[0].includes('.json')
);
return jsonCall ? (jsonCall.args[0] as string) : undefined;
}
}

const result = await CMD.run([]);
writeFileSyncSpy.restore();
expect(result).to.include('Entries_Select_field.json');
expect(result).to.not.include('Entries_Select_feild');
});

fancy
.stdout({ print: process.env.PRINT === 'true' || false })
.stub(winston.transports, 'File', () => fsTransport)
.stub(winston, 'createLogger', createMockWinstonLogger)
.stub(fs, 'createWriteStream', () => new PassThrough())
.stub(fs, 'mkdirSync', () => {})
.stub(fs, 'existsSync', () => true)
.it('should generate report file with correct spelling: Entries_Mandatory_field (not feild)', async () => {
const writeFileSyncSpy = sinon.spy(fs, 'writeFileSync');
class CMD extends AuditBaseCommand {
async run() {
await this.init();
this.sharedConfig.reportPath = resolve(__dirname, 'mock', 'contents');

await this.prepareReport('Entries_Mandatory_field', {
entry1: {
name: 'Test Entry',
display_name: 'Mandatory Field',
missingRefs: ['ref1'],
},
});

const jsonCall = writeFileSyncSpy.getCalls().find(call =>
typeof call.args[0] === 'string' && call.args[0].includes('.json')
);
return jsonCall ? (jsonCall.args[0] as string) : undefined;
}
}

const result = await CMD.run([]);
writeFileSyncSpy.restore();
expect(result).to.include('Entries_Mandatory_field.json');
expect(result).to.not.include('Entries_Mandatory_feild');
});

fancy
.stdout({ print: process.env.PRINT === 'true' || false })
.stub(winston.transports, 'File', () => fsTransport)
.stub(winston, 'createLogger', createMockWinstonLogger)
.stub(fs, 'createWriteStream', () => new PassThrough())
.stub(fs, 'mkdirSync', () => {})
.stub(fs, 'existsSync', () => true)
.it('should generate report file with correct spelling: Entries_Title_field (not feild)', async () => {
const writeFileSyncSpy = sinon.spy(fs, 'writeFileSync');
class CMD extends AuditBaseCommand {
async run() {
await this.init();
this.sharedConfig.reportPath = resolve(__dirname, 'mock', 'contents');

await this.prepareReport('Entries_Title_field', {
entry1: {
name: 'Test Entry',
display_name: 'Title Field',
missingRefs: ['ref1'],
},
});

const jsonCall = writeFileSyncSpy.getCalls().find(call =>
typeof call.args[0] === 'string' && call.args[0].includes('.json')
);
return jsonCall ? (jsonCall.args[0] as string) : undefined;
}
}

const result = await CMD.run([]);
writeFileSyncSpy.restore();
expect(result).to.include('Entries_Title_field.json');
expect(result).to.not.include('Entries_Title_feild');
});
});

describe('Config - ReportTitleForEntries keys', () => {
it('should have correct spelling in ReportTitleForEntries config', () => {
const config = require('../../src/config').default;

// Verify correct spelling (field, not feild)
expect(config.ReportTitleForEntries).to.have.property('Entries_Select_field');
expect(config.ReportTitleForEntries).to.have.property('Entries_Mandatory_field');
expect(config.ReportTitleForEntries).to.have.property('Entries_Title_field');

// Verify old typo is not present
expect(config.ReportTitleForEntries).to.not.have.property('Entries_Select_feild');
expect(config.ReportTitleForEntries).to.not.have.property('Entries_Mandatory_feild');
expect(config.ReportTitleForEntries).to.not.have.property('Entries_Title_feild');

// Verify values match keys
expect(config.ReportTitleForEntries.Entries_Select_field).to.equal('Entries_Select_field');
expect(config.ReportTitleForEntries.Entries_Mandatory_field).to.equal('Entries_Mandatory_field');
expect(config.ReportTitleForEntries.Entries_Title_field).to.equal('Entries_Title_field');
});

it('should have correct spelling in feild_level_modules array', () => {
const config = require('../../src/config').default;

// Verify correct spelling in the array
expect(config.feild_level_modules).to.include('Entries_Select_field');
expect(config.feild_level_modules).to.include('Entries_Mandatory_field');
expect(config.feild_level_modules).to.include('Entries_Title_field');

// Verify old typo is not present
expect(config.feild_level_modules).to.not.include('Entries_Select_feild');
expect(config.feild_level_modules).to.not.include('Entries_Mandatory_feild');
expect(config.feild_level_modules).to.not.include('Entries_Title_feild');
});
});
});
2 changes: 1 addition & 1 deletion packages/contentstack-auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ FLAGS
-e, --environment=<value> Environment name for delivery token
-k, --stack-api-key=<value> Stack API Key
-m, --management Set this flag to save management token
-t, --token=<value> Add the token name
-t, --token=<value> [env: TOKEN] Add the token name
-y, --yes Use this flag to skip confirmation

DESCRIPTION
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"test:unit:report": "nyc --extension .ts mocha --forbid-only \"test/unit/**/*.test.ts\""
},
"dependencies": {
"@contentstack/cli-command": "~1.6.1",
"@contentstack/cli-command": "~1.7.0",
"@contentstack/cli-utilities": "~1.15.0",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
Expand Down
Loading
Loading