-
Notifications
You must be signed in to change notification settings - Fork 0
export query command base code #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@shafeeqd959 Can you fix the GH workflow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new CLI plugin for query-based exports, including test scaffolding, core export logic, utilities, configuration, and documentation updates.
- Adds test configuration and runner (
test/tsconfig.json,test/run.test.js, Mocha configs) - Implements core query export components (
QueryParser,QueryExporter,ModuleExporter) and related utility modules - Updates CLI command, package manifest, README, and CI workflows
Reviewed Changes
Copilot reviewed 38 out of 46 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/tsconfig.json | Adds TypeScript config for tests |
| test/run.test.js | Implements integration test runner with file inclusion |
| src/utils/file-helper.ts | Provides file read/write utilities |
| src/utils/logger.ts | Implements logging with Winston |
| src/utils/query-parser.ts | Parses and validates JSON queries |
| src/core/query-executor.ts | Coordinates the query-based export flow |
| src/core/module-exporter.ts | Wraps the Contentstack export command invocation |
| src/commands/cm/stacks/export-query.ts | Defines the CLI command entry point |
| README.md | Documents plugin usage and features |
| package.json | Declares plugin metadata, dependencies, scripts, and flags |
| .nycrc.json | Configures coverage reporting (typo) |
Comments suppressed due to low confidence (1)
README.md:77
- The path
src/config/export-defaults.jsondoes not match the actual file (src/config/export-config.json). Update the documentation to point to the correct file.
The plugin includes a default configuration file at `src/config/export-defaults.json`:
this workflow will be fixed once we made the repo public |
ba0c63b
Query-based Export Plugin for Contentstack CLI
Overview
Introducing a new plugin for Contentstack CLI that enables query-based content export. This plugin allows users to selectively export content types and their dependencies using MongoDB-style queries, improving the flexibility of content migration and backup processes.
Key Features
Implementation Details
@contentstack/cli-cm-export-query)Current Scope
✅ Supported:
❌ Not Yet Supported:
Usage Examples
Testing
Documentation
Future Enhancements
Breaking Changes
None - This is a new plugin that doesn't affect existing functionality
Related Issues
Closes #[issue_number]
Checklist