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
|
## 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
|
### Creating Tasks
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
node scripts/tasks.js create \
|
node scripts/tasks.cjs create \
|
||||||
--title "Review PR #123" \
|
--title "Review PR #123" \
|
||||||
--description "Review the authentication refactor" \
|
--description "Review the authentication refactor" \
|
||||||
--priority HIGH \
|
--priority HIGH \
|
||||||
@@ -32,22 +32,22 @@ Natural language examples:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# List all tasks
|
# List all tasks
|
||||||
node scripts/tasks.js list
|
node scripts/tasks.cjs list
|
||||||
|
|
||||||
# Filter by status
|
# Filter by status
|
||||||
node scripts/tasks.js list --status IN_PROGRESS
|
node scripts/tasks.cjs list --status IN_PROGRESS
|
||||||
|
|
||||||
# Filter by priority
|
# Filter by priority
|
||||||
node scripts/tasks.js list --priority HIGH
|
node scripts/tasks.cjs list --priority HIGH
|
||||||
|
|
||||||
# Filter by project
|
# Filter by project
|
||||||
node scripts/tasks.js list --project-id "uuid-here"
|
node scripts/tasks.cjs list --project-id "uuid-here"
|
||||||
|
|
||||||
# Combine filters
|
# 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
|
# Query overdue tasks
|
||||||
node scripts/tasks.js list --overdue
|
node scripts/tasks.cjs list --overdue
|
||||||
```
|
```
|
||||||
|
|
||||||
Natural language examples:
|
Natural language examples:
|
||||||
@@ -61,7 +61,7 @@ Natural language examples:
|
|||||||
### Getting a Specific Task
|
### Getting a Specific Task
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
node scripts/tasks.js get TASK_ID
|
node scripts/tasks.cjs get TASK_ID
|
||||||
```
|
```
|
||||||
|
|
||||||
Natural language examples:
|
Natural language examples:
|
||||||
@@ -72,13 +72,13 @@ Natural language examples:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Update status
|
# Update status
|
||||||
node scripts/tasks.js update TASK_ID --status COMPLETED
|
node scripts/tasks.cjs update TASK_ID --status COMPLETED
|
||||||
|
|
||||||
# Update priority
|
# Update priority
|
||||||
node scripts/tasks.js update TASK_ID --priority HIGH
|
node scripts/tasks.cjs update TASK_ID --priority HIGH
|
||||||
|
|
||||||
# Update multiple fields
|
# Update multiple fields
|
||||||
node scripts/tasks.js update TASK_ID \
|
node scripts/tasks.cjs update TASK_ID \
|
||||||
--title "Updated Title" \
|
--title "Updated Title" \
|
||||||
--status IN_PROGRESS \
|
--status IN_PROGRESS \
|
||||||
--priority MEDIUM
|
--priority MEDIUM
|
||||||
@@ -94,7 +94,7 @@ Natural language examples:
|
|||||||
### Deleting Tasks
|
### Deleting Tasks
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
node scripts/tasks.js delete TASK_ID
|
node scripts/tasks.cjs delete TASK_ID
|
||||||
```
|
```
|
||||||
|
|
||||||
Natural language examples:
|
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:
|
Overdue tasks are those with a due date in the past that aren't completed or archived:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
node scripts/tasks.js list --overdue
|
node scripts/tasks.cjs list --overdue
|
||||||
```
|
```
|
||||||
|
|
||||||
This filters to:
|
This filters to:
|
||||||
@@ -250,10 +250,10 @@ Tasks support hierarchical organization via `parentId`:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Create parent task
|
# Create parent task
|
||||||
node scripts/tasks.js create --title "Deploy v2.0"
|
node scripts/tasks.cjs create --title "Deploy v2.0"
|
||||||
|
|
||||||
# Create subtask
|
# Create subtask
|
||||||
node scripts/tasks.js create \
|
node scripts/tasks.cjs create \
|
||||||
--title "Run tests" \
|
--title "Run tests" \
|
||||||
--parent-id PARENT_TASK_ID
|
--parent-id PARENT_TASK_ID
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -295,7 +295,7 @@ function showHelp() {
|
|||||||
Mosaic Tasks CLI
|
Mosaic Tasks CLI
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
node tasks.js <command> [options]
|
node tasks.cjs <command> [options]
|
||||||
|
|
||||||
Commands:
|
Commands:
|
||||||
create Create a new task
|
create Create a new task
|
||||||
@@ -346,22 +346,22 @@ Environment Variables:
|
|||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
# Create a task
|
# 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
|
# List high priority tasks
|
||||||
node tasks.js list --priority HIGH
|
node tasks.cjs list --priority HIGH
|
||||||
|
|
||||||
# List overdue tasks
|
# List overdue tasks
|
||||||
node tasks.js list --overdue
|
node tasks.cjs list --overdue
|
||||||
|
|
||||||
# Get task details
|
# Get task details
|
||||||
node tasks.js get abc-123-def-456
|
node tasks.cjs get abc-123-def-456
|
||||||
|
|
||||||
# Mark task as completed
|
# 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
|
# 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:
|
default:
|
||||||
console.error(`Unknown command: ${command}`);
|
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);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
Reference in New Issue
Block a user