Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
3935cb3
feat(audit): validate referenced entry content types in entries audit
cs-raj Feb 23, 2026
ad98bea
Remove Redundant code block
cs-raj Feb 24, 2026
c9b1a38
Merge pull request #2423 from contentstack/feat/DX-3800
cs-raj Feb 24, 2026
a2b3040
fix: Skipping lytics audience creation
cs-raj Feb 24, 2026
a0dbaf5
fix(personalize): filter lytics audiences in experience variants duri…
cs-raj Feb 24, 2026
6e88515
Merge pull request #2427 from contentstack/fix/DX-3445
cs-raj Feb 25, 2026
1ec096d
added workflows and scripts
shafeeqd959 Feb 26, 2026
8ae7a27
updated release workflow
shafeeqd959 Feb 26, 2026
3aab1af
merged git workflow changes
shafeeqd959 Mar 2, 2026
1227ad1
disabled the beta release
shafeeqd959 Mar 2, 2026
eeed14c
Merge pull request #2 from contentstack/v1-dev
shafeeqd959 Mar 2, 2026
a7a6b49
enabled the beta release
shafeeqd959 Mar 2, 2026
9e7984e
Delete CODEOWNERS
aravindbuilt Mar 2, 2026
a33fce9
Update policy-scan.yml
aravindbuilt Mar 2, 2026
1281c3f
Merge pull request #5 from contentstack/v1-beta
aravindbuilt Mar 2, 2026
0a41a86
updated clean script
shafeeqd959 Mar 3, 2026
4f34260
updated clean packages
shafeeqd959 Mar 3, 2026
fbd7687
added oclif manifest in the build script
shafeeqd959 Mar 3, 2026
592f465
added update lock file script
shafeeqd959 Mar 3, 2026
60d07ef
Fixed seed command for existing stack
sunil-lakshman Mar 4, 2026
5309da2
updated importer file
sunil-lakshman Mar 4, 2026
46073b2
bumped dev dependency
shafeeqd959 Mar 5, 2026
464beed
updated scripts and release yml
shafeeqd959 Mar 5, 2026
3339b41
Merge pull request #6 from contentstack/v1-dev
shafeeqd959 Mar 5, 2026
d03658d
updated scripts and release yml
shafeeqd959 Mar 5, 2026
0229932
Merge branch 'v1-dev' into v1-beta
shafeeqd959 Mar 5, 2026
601dec9
updated release yml
shafeeqd959 Mar 5, 2026
a50257d
Fixed merge conflits
sunil-lakshman Mar 6, 2026
82266e0
Merge pull request #10 from contentstack/fix/enh-4442
sunil-lakshman Mar 9, 2026
2baaded
feat: add support for assets in custom roles
Mar 10, 2026
4f4d009
chore: revert version bump
Mar 10, 2026
3397f4a
Fixed version bump
sunil-lakshman Mar 10, 2026
dea6855
Added beta version bump
sunil-lakshman Mar 10, 2026
74bd0fc
Merge pull request #24 from contentstack/fix/beta-version-bump
sunil-lakshman Mar 10, 2026
53745cc
Merge pull request #23 from contentstack/v1-beta
cs-raj Mar 11, 2026
bec384e
Merge branch 'v1-dev' into feat/DX-4942
Mar 11, 2026
7552f25
chore: version bumps
Mar 11, 2026
3e38d66
chore: updated versions in readme
Mar 11, 2026
3d4243a
Merge pull request #22 from contentstack/feat/DX-4942
naman-contentstack Mar 11, 2026
e3c8a07
chore: version bumps
Mar 16, 2026
295969c
Merge pull request #34 from contentstack/chore/version_bumps_v1
naman-contentstack Mar 16, 2026
c2e22b9
chore: update workflows and update lock file
Mar 18, 2026
c0939dd
Merge pull request #37 from contentstack/update/workflows
naman-contentstack Mar 18, 2026
7324ccf
Merge pull request #33 from contentstack/v1-dev
naman-contentstack Mar 18, 2026
4beaeab
Merge pull request #38 from contentstack/v1-beta
naman-contentstack Mar 18, 2026
fa718e7
added cursor rules
shafeeqd959 Mar 25, 2026
80b49e5
v1 beta to prod
shafeeqd959 Mar 25, 2026
b9d91a2
Merge branch 'main' of github.com:contentstack/cli-plugins into v1-be…
shafeeqd959 Mar 25, 2026
d7c1623
reverted utilities bump
shafeeqd959 Mar 26, 2026
0ce0890
bumped versions of picomatch
shafeeqd959 Mar 26, 2026
c32cb32
update lockfile
harshitha-cstk Mar 30, 2026
b9ccc1b
update brace-expansion to version 5.0.5 in lockfile and workspace con…
harshitha-cstk Mar 30, 2026
1d6461f
Update README.md
dhaval-jain-cstk Mar 30, 2026
2282ebe
Update README.md
Madhuri-cs Mar 30, 2026
827e5ee
Merge pull request #57 from contentstack/next-release
shafeeqd959 Mar 30, 2026
b5815a0
Merge pull request #62 from contentstack/fix/back-merge
shafeeqd959 Mar 30, 2026
af54f54
added cursor files
shafeeqd959 Apr 1, 2026
fbb6180
reverted inquirer + overrided loadash
shafeeqd959 Apr 2, 2026
9b9ae37
bumped versions
shafeeqd959 Apr 2, 2026
edd6412
Merge pull request #53 from contentstack/v1-cursor-rules-update
shafeeqd959 Apr 2, 2026
7fbf559
Merge pull request #78 from contentstack/development
harshitha-cstk Apr 6, 2026
aa6e8bc
chore: fixed script
Apr 9, 2026
b206321
Merge pull request #81 from contentstack/chore/fix-script
naman-contentstack Apr 9, 2026
9223672
Merge pull request #82 from contentstack/development
shafeeqd959 Apr 9, 2026
289124d
Merge branch 'main' into fix/conflicts-back-merge-main
harshitha-cstk Apr 17, 2026
ba93db9
Delete .github/workflows/release-production-plugins.yml
harshitha-cstk Apr 17, 2026
ee94369
Remove TypeScript configuration files for contentstack-bulk-publish p…
harshitha-cstk Apr 17, 2026
a1441dc
revert the custom role changes
harshitha-cstk Apr 17, 2026
7e82abc
Merge pull request #92 from contentstack/fix/conflicts-back-merge-main
harshitha-cstk Apr 17, 2026
95bcf25
Merge branch 'v2-beta' into fix/back-merge-v2-beta
harshitha-cstk Apr 17, 2026
6ac9b51
Merge branch 'v2-dev' into fix/back-merge-v2-beta
harshitha-cstk Apr 17, 2026
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
156 changes: 156 additions & 0 deletions .cursor/commands/code-review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
---
name: code-review
description: Automated PR review using comprehensive checklist tailored for modularized Contentstack CLI
---

# Code Review Command

## Usage Patterns

### Scope-Based Reviews
- `/code-review` - Review all current changes with full checklist
- `/code-review --scope typescript` - Focus on TypeScript configuration and patterns
- `/code-review --scope testing` - Focus on Mocha/Chai test patterns
- `/code-review --scope oclif` - Focus on command structure and OCLIF patterns
- `/code-review --scope packages` - Focus on package structure and organization

### Severity Filtering
- `/code-review --severity critical` - Show only critical issues (security, breaking changes)
- `/code-review --severity high` - Show high and critical issues
- `/code-review --severity all` - Show all issues including suggestions

### Package-Aware Reviews
- `/code-review --package contentstack-import` - Review changes in import package
- `/code-review --package contentstack-export` - Review changes in export package
- `/code-review --package-type plugin` - Review all plugin packages (all 12 packages are plugins)
- `/code-review --package-scope cm` - Review CM (content management) related packages

### File Type Focus
- `/code-review --files commands` - Review command files only
- `/code-review --files tests` - Review test files only
- `/code-review --files utils` - Review utility files

## Comprehensive Review Checklist

### Monorepo Structure Compliance
- **Package organization**: 12 plugin packages under `packages/contentstack-*`
- **pnpm workspace**: Correct `pnpm-workspace.yaml` configuration
- **Build artifacts**: No `lib/` directories committed to version control
- **Dependencies**: Proper use of shared utilities (`@contentstack/cli-command`, `@contentstack/cli-utilities`)
- **Scripts**: Consistent build, test, and lint scripts across packages

### Package-Specific Structure
- **All packages are plugins**: Each has `oclif.commands` configuration pointing to `./lib/commands`
- **Plugin topics**: All commands under `cm:` topic (content management)
- **Base commands**: Each plugin defines its own `BaseCommand` extending `@contentstack/cli-command` Command
- **Inter-plugin dependencies**: Some plugins depend on others (e.g., import depends on audit)
- **Dependency versions**: Using consistent versions across plugins

### TypeScript Standards
- **Configuration compliance**: Follows package TypeScript config (`strict: false`, `target: es2017`)
- **Naming conventions**: kebab-case files, PascalCase classes, camelCase functions
- **Import patterns**: ES modules with proper default/named exports
- **Type safety**: No unnecessary `any` types in production code

### OCLIF Command Patterns
- **Base class usage**: Extends plugin-specific `BaseCommand` or `@contentstack/cli-command` Command
- **Command structure**: Proper `static id`, `static description`, `static examples`, `static flags`
- **Topic organization**: Uses `cm:stacks:*` structure (`cm:stacks:import`, `cm:stacks:export`, `cm:stacks:audit`)
- **Error handling**: Uses `handleAndLogError` from utilities with context
- **Flag validation**: Early validation and user-friendly error messages
- **Service delegation**: Commands are thin, services handle business logic

### Testing Excellence (Mocha/Chai Stack)
- **Framework compliance**: Uses Mocha + Chai (not Jest)
- **File patterns**: Follows `*.test.ts` naming convention
- **Directory structure**: Proper placement in `test/unit/`
- **Test organization**: Arrange-Act-Assert pattern consistently used
- **Isolation**: Proper setup/teardown with beforeEach/afterEach
- **No real API calls**: All external dependencies properly mocked

### Error Handling Standards
- **Consistent patterns**: Use `handleAndLogError` from utilities
- **User-friendly messages**: Clear error descriptions for end users
- **Logging**: Proper use of `log.debug` for diagnostic information
- **Status messages**: Use `cliux` for user feedback (success, error, info)

### Build and Compilation
- **TypeScript compilation**: Clean compilation with no errors
- **OCLIF manifest**: Generated for command discovery
- **README generation**: Commands documented in package README
- **Source maps**: Properly configured for debugging
- **No build artifacts in commit**: `.gitignore` excludes `lib/` directories

### Testing Coverage
- **Test structure**: Tests in `test/unit/` with descriptive names
- **Command testing**: Uses @oclif/test for command validation
- **Error scenarios**: Tests for both success and failure paths
- **Mocking**: All dependencies properly mocked

### Package.json Compliance
- **Correct metadata**: name, description, version, author
- **Script definitions**: build, compile, test, lint scripts present
- **Dependencies**: Correct versions of shared packages
- **Main/types**: Properly configured for library packages
- **OCLIF config**: Present for plugin packages

### Security and Best Practices
- **No secrets**: No API keys or tokens in code or tests
- **Input validation**: Proper validation of user inputs and flags
- **Process management**: Appropriate use of error codes
- **File operations**: Safe handling of file system operations

### Code Quality
- **Naming consistency**: Follow established conventions
- **Comments**: Only for non-obvious logic (no "narration" comments)
- **Error messages**: Clear, actionable messages for users
- **Module organization**: Proper separation of concerns

## Review Execution

### Automated Checks
1. **Lint compliance**: ESLint checks for code style
2. **TypeScript compiler**: Successful compilation to `lib/` directories
3. **Test execution**: All tests pass successfully
4. **Build verification**: Build scripts complete without errors

### Manual Review Focus Areas
1. **Command usability**: Clear help text and realistic examples
2. **Error handling**: Appropriate error messages and recovery options
3. **Test quality**: Comprehensive test coverage for critical paths
4. **Monorepo consistency**: Consistent patterns across all packages
5. **Flag design**: Intuitive flag names and combinations

### Common Issues to Flag
- **Inconsistent TypeScript settings**: Mixed strict mode without reason
- **Real API calls in tests**: Unmocked external dependencies
- **Missing error handling**: Commands that fail silently
- **Poor test organization**: Tests without clear Arrange-Act-Assert
- **Build artifacts committed**: `lib/` directories in version control
- **Unclear error messages**: Non-actionable error descriptions
- **Inconsistent flag naming**: Similar flags with different names
- **Missing command examples**: Examples not showing actual usage

## Repository-Specific Checklist

### For Modularized CLI
- [ ] Command properly extends `@contentstack/cli-command` Command
- [ ] Flags defined with proper types from `@contentstack/cli-utilities`
- [ ] Error handling uses `handleAndLogError` utility
- [ ] User feedback uses `cliux` utilities
- [ ] Tests use Mocha + Chai pattern with mocked dependencies
- [ ] Package.json has correct scripts (build, compile, test, lint)
- [ ] TypeScript compiles with no errors
- [ ] Tests pass: `pnpm test`
- [ ] No `.only` or `.skip` in test files
- [ ] Build succeeds: `pnpm run build`
- [ ] OCLIF manifest generated successfully

### Before Merge
- [ ] All review items addressed
- [ ] No build artifacts in commit
- [ ] Tests added for new functionality
- [ ] Documentation updated if needed
- [ ] No console.log() statements (use log.debug instead)
- [ ] Error messages are user-friendly
- [ ] No secrets or credentials in code
Loading
Loading