fix(#25): rename tasks.js to tasks.cjs for CommonJS compatibility
This commit is contained in:
@@ -9,12 +9,12 @@ Integration with Mosaic Stack's Tasks API for comprehensive task management and
|
||||
|
||||
## Quick Start
|
||||
|
||||
Use `scripts/tasks.js` for all task operations. The script handles authentication and API communication automatically.
|
||||
Use `scripts/tasks.cjs` for all task operations. The script handles authentication and API communication automatically.
|
||||
|
||||
### Creating Tasks
|
||||
|
||||
```bash
|
||||
node scripts/tasks.js create \
|
||||
node scripts/tasks.cjs create \
|
||||
--title "Review PR #123" \
|
||||
--description "Review the authentication refactor" \
|
||||
--priority HIGH \
|
||||
@@ -32,22 +32,22 @@ Natural language examples:
|
||||
|
||||
```bash
|
||||
# List all tasks
|
||||
node scripts/tasks.js list
|
||||
node scripts/tasks.cjs list
|
||||
|
||||
# Filter by status
|
||||
node scripts/tasks.js list --status IN_PROGRESS
|
||||
node scripts/tasks.cjs list --status IN_PROGRESS
|
||||
|
||||
# Filter by priority
|
||||
node scripts/tasks.js list --priority HIGH
|
||||
node scripts/tasks.cjs list --priority HIGH
|
||||
|
||||
# Filter by project
|
||||
node scripts/tasks.js list --project-id "uuid-here"
|
||||
node scripts/tasks.cjs list --project-id "uuid-here"
|
||||
|
||||
# Combine filters
|
||||
node scripts/tasks.js list --status IN_PROGRESS --priority HIGH
|
||||
node scripts/tasks.cjs list --status IN_PROGRESS --priority HIGH
|
||||
|
||||
# Query overdue tasks
|
||||
node scripts/tasks.js list --overdue
|
||||
node scripts/tasks.cjs list --overdue
|
||||
```
|
||||
|
||||
Natural language examples:
|
||||
@@ -61,7 +61,7 @@ Natural language examples:
|
||||
### Getting a Specific Task
|
||||
|
||||
```bash
|
||||
node scripts/tasks.js get TASK_ID
|
||||
node scripts/tasks.cjs get TASK_ID
|
||||
```
|
||||
|
||||
Natural language examples:
|
||||
@@ -72,13 +72,13 @@ Natural language examples:
|
||||
|
||||
```bash
|
||||
# Update status
|
||||
node scripts/tasks.js update TASK_ID --status COMPLETED
|
||||
node scripts/tasks.cjs update TASK_ID --status COMPLETED
|
||||
|
||||
# Update priority
|
||||
node scripts/tasks.js update TASK_ID --priority HIGH
|
||||
node scripts/tasks.cjs update TASK_ID --priority HIGH
|
||||
|
||||
# Update multiple fields
|
||||
node scripts/tasks.js update TASK_ID \
|
||||
node scripts/tasks.cjs update TASK_ID \
|
||||
--title "Updated Title" \
|
||||
--status IN_PROGRESS \
|
||||
--priority MEDIUM
|
||||
@@ -94,7 +94,7 @@ Natural language examples:
|
||||
### Deleting Tasks
|
||||
|
||||
```bash
|
||||
node scripts/tasks.js delete TASK_ID
|
||||
node scripts/tasks.cjs delete TASK_ID
|
||||
```
|
||||
|
||||
Natural language examples:
|
||||
@@ -144,7 +144,7 @@ When processing natural language date/time requests:
|
||||
Overdue tasks are those with a due date in the past that aren't completed or archived:
|
||||
|
||||
```bash
|
||||
node scripts/tasks.js list --overdue
|
||||
node scripts/tasks.cjs list --overdue
|
||||
```
|
||||
|
||||
This filters to:
|
||||
@@ -250,10 +250,10 @@ Tasks support hierarchical organization via `parentId`:
|
||||
|
||||
```bash
|
||||
# Create parent task
|
||||
node scripts/tasks.js create --title "Deploy v2.0"
|
||||
node scripts/tasks.cjs create --title "Deploy v2.0"
|
||||
|
||||
# Create subtask
|
||||
node scripts/tasks.js create \
|
||||
node scripts/tasks.cjs create \
|
||||
--title "Run tests" \
|
||||
--parent-id PARENT_TASK_ID
|
||||
```
|
||||
|
||||
@@ -295,7 +295,7 @@ function showHelp() {
|
||||
Mosaic Tasks CLI
|
||||
|
||||
Usage:
|
||||
node tasks.js <command> [options]
|
||||
node tasks.cjs <command> [options]
|
||||
|
||||
Commands:
|
||||
create Create a new task
|
||||
@@ -346,22 +346,22 @@ Environment Variables:
|
||||
|
||||
Examples:
|
||||
# Create a task
|
||||
node tasks.js create --title "Review PR #123" --priority HIGH
|
||||
node tasks.cjs create --title "Review PR #123" --priority HIGH
|
||||
|
||||
# List high priority tasks
|
||||
node tasks.js list --priority HIGH
|
||||
node tasks.cjs list --priority HIGH
|
||||
|
||||
# List overdue tasks
|
||||
node tasks.js list --overdue
|
||||
node tasks.cjs list --overdue
|
||||
|
||||
# Get task details
|
||||
node tasks.js get abc-123-def-456
|
||||
node tasks.cjs get abc-123-def-456
|
||||
|
||||
# Mark task as completed
|
||||
node tasks.js update abc-123-def-456 --status COMPLETED
|
||||
node tasks.cjs update abc-123-def-456 --status COMPLETED
|
||||
|
||||
# Delete a task
|
||||
node tasks.js delete abc-123-def-456
|
||||
node tasks.cjs delete abc-123-def-456
|
||||
`);
|
||||
}
|
||||
|
||||
@@ -401,7 +401,7 @@ async function main() {
|
||||
|
||||
default:
|
||||
console.error(`Unknown command: ${command}`);
|
||||
console.error('Run "node tasks.js help" for usage information');
|
||||
console.error('Run "node tasks.cjs help" for usage information');
|
||||
process.exit(1);
|
||||
}
|
||||
} catch (error) {
|
||||
Reference in New Issue
Block a user