@obsfx/trekker 0.1.8 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +209 -153
- package/package.json +1 -1
- package/webapp-dist/.next/BUILD_ID +1 -1
- package/webapp-dist/.next/build-manifest.json +2 -2
- package/webapp-dist/.next/prerender-manifest.json +3 -3
- package/webapp-dist/.next/server/app/_global-error.html +2 -2
- package/webapp-dist/.next/server/app/_global-error.rsc +1 -1
- package/webapp-dist/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/webapp-dist/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/webapp-dist/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/webapp-dist/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/webapp-dist/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/webapp-dist/.next/server/app/_not-found.html +2 -2
- package/webapp-dist/.next/server/app/_not-found.rsc +1 -1
- package/webapp-dist/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/webapp-dist/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/webapp-dist/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/webapp-dist/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/webapp-dist/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/webapp-dist/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/webapp-dist/.next/server/app/index.html +2 -2
- package/webapp-dist/.next/server/app/index.rsc +1 -1
- package/webapp-dist/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/webapp-dist/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/webapp-dist/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/webapp-dist/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/webapp-dist/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/webapp-dist/.next/server/pages/404.html +2 -2
- package/webapp-dist/.next/server/pages/500.html +2 -2
- package/webapp-dist/.next/server/server-reference-manifest.js +1 -1
- package/webapp-dist/.next/server/server-reference-manifest.json +1 -1
- /package/webapp-dist/.next/static/{BJnKdEVHZIBqD4VUrBhO5 → kkou3xZDsj571kwMntH7t}/_buildManifest.js +0 -0
- /package/webapp-dist/.next/static/{BJnKdEVHZIBqD4VUrBhO5 → kkou3xZDsj571kwMntH7t}/_clientMiddlewareManifest.json +0 -0
- /package/webapp-dist/.next/static/{BJnKdEVHZIBqD4VUrBhO5 → kkou3xZDsj571kwMntH7t}/_ssgManifest.js +0 -0
package/dist/index.js
CHANGED
|
@@ -1,44 +1,38 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
// @bun
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __export = (target, all) => {
|
|
5
4
|
for (var name in all)
|
|
6
|
-
__defProp(target, name, {
|
|
7
|
-
get: all[name],
|
|
8
|
-
enumerable: true,
|
|
9
|
-
configurable: true,
|
|
10
|
-
set: (newValue) => all[name] = () => newValue
|
|
11
|
-
});
|
|
5
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
6
|
};
|
|
13
7
|
|
|
14
|
-
// src/index.ts
|
|
8
|
+
// packages/cli/src/index.ts
|
|
15
9
|
import { Command as Command11 } from "commander";
|
|
16
10
|
|
|
17
|
-
// src/commands/init.ts
|
|
11
|
+
// packages/cli/src/commands/init.ts
|
|
18
12
|
import { Command } from "commander";
|
|
19
13
|
|
|
20
|
-
// src/db/client.ts
|
|
14
|
+
// packages/cli/src/db/client.ts
|
|
21
15
|
import { Database } from "bun:sqlite";
|
|
22
16
|
import { drizzle } from "drizzle-orm/bun-sqlite";
|
|
23
17
|
|
|
24
|
-
// src/db/schema.ts
|
|
25
|
-
var
|
|
26
|
-
__export(
|
|
27
|
-
|
|
28
|
-
tasks: () => tasks,
|
|
29
|
-
projectsRelations: () => projectsRelations,
|
|
30
|
-
projects: () => projects,
|
|
31
|
-
idCounters: () => idCounters,
|
|
32
|
-
epicsRelations: () => epicsRelations,
|
|
33
|
-
epics: () => epics,
|
|
34
|
-
dependenciesRelations: () => dependenciesRelations,
|
|
35
|
-
dependencies: () => dependencies,
|
|
18
|
+
// packages/cli/src/db/schema.ts
|
|
19
|
+
var schema_exports = {};
|
|
20
|
+
__export(schema_exports, {
|
|
21
|
+
comments: () => comments,
|
|
36
22
|
commentsRelations: () => commentsRelations,
|
|
37
|
-
|
|
23
|
+
dependencies: () => dependencies,
|
|
24
|
+
dependenciesRelations: () => dependenciesRelations,
|
|
25
|
+
epics: () => epics,
|
|
26
|
+
epicsRelations: () => epicsRelations,
|
|
27
|
+
idCounters: () => idCounters,
|
|
28
|
+
projects: () => projects,
|
|
29
|
+
projectsRelations: () => projectsRelations,
|
|
30
|
+
tasks: () => tasks,
|
|
31
|
+
tasksRelations: () => tasksRelations
|
|
38
32
|
});
|
|
39
33
|
import { relations } from "drizzle-orm";
|
|
40
34
|
|
|
41
|
-
//
|
|
35
|
+
// packages/shared/schema.ts
|
|
42
36
|
import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core";
|
|
43
37
|
var projects = sqliteTable("projects", {
|
|
44
38
|
id: text("id").primaryKey(),
|
|
@@ -87,7 +81,8 @@ var idCounters = sqliteTable("id_counters", {
|
|
|
87
81
|
entityType: text("entity_type").primaryKey(),
|
|
88
82
|
counter: integer("counter").notNull().default(0)
|
|
89
83
|
});
|
|
90
|
-
|
|
84
|
+
|
|
85
|
+
// packages/shared/types.ts
|
|
91
86
|
var TASK_STATUSES = [
|
|
92
87
|
"todo",
|
|
93
88
|
"in_progress",
|
|
@@ -106,7 +101,8 @@ var PREFIX_MAP = {
|
|
|
106
101
|
epic: "EPIC",
|
|
107
102
|
comment: "CMT"
|
|
108
103
|
};
|
|
109
|
-
|
|
104
|
+
|
|
105
|
+
// packages/cli/src/db/schema.ts
|
|
110
106
|
var projectsRelations = relations(projects, ({ many }) => ({
|
|
111
107
|
epics: many(epics),
|
|
112
108
|
tasks: many(tasks)
|
|
@@ -156,7 +152,7 @@ var dependenciesRelations = relations(dependencies, ({ one }) => ({
|
|
|
156
152
|
})
|
|
157
153
|
}));
|
|
158
154
|
|
|
159
|
-
// src/db/client.ts
|
|
155
|
+
// packages/cli/src/db/client.ts
|
|
160
156
|
import { existsSync, mkdirSync, rmSync } from "fs";
|
|
161
157
|
import { join } from "path";
|
|
162
158
|
var TREKKER_DIR = ".trekker";
|
|
@@ -184,17 +180,19 @@ function getDb(cwd = process.cwd()) {
|
|
|
184
180
|
}
|
|
185
181
|
const dbPath = getDbPath(cwd);
|
|
186
182
|
if (!existsSync(dbPath)) {
|
|
187
|
-
throw new Error(
|
|
183
|
+
throw new Error(
|
|
184
|
+
"Trekker not initialized. Run 'trekker init' first."
|
|
185
|
+
);
|
|
188
186
|
}
|
|
189
187
|
sqliteInstance = new Database(dbPath);
|
|
190
|
-
dbInstance = drizzle(sqliteInstance, { schema:
|
|
188
|
+
dbInstance = drizzle(sqliteInstance, { schema: schema_exports });
|
|
191
189
|
return dbInstance;
|
|
192
190
|
}
|
|
193
191
|
function createDb(cwd = process.cwd()) {
|
|
194
192
|
ensureTrekkerDir(cwd);
|
|
195
193
|
const dbPath = getDbPath(cwd);
|
|
196
194
|
sqliteInstance = new Database(dbPath);
|
|
197
|
-
dbInstance = drizzle(sqliteInstance, { schema:
|
|
195
|
+
dbInstance = drizzle(sqliteInstance, { schema: schema_exports });
|
|
198
196
|
sqliteInstance.exec(`
|
|
199
197
|
CREATE TABLE IF NOT EXISTS projects (
|
|
200
198
|
id TEXT PRIMARY KEY,
|
|
@@ -271,7 +269,7 @@ function deleteDb(cwd = process.cwd()) {
|
|
|
271
269
|
}
|
|
272
270
|
}
|
|
273
271
|
|
|
274
|
-
// src/utils/id-generator.ts
|
|
272
|
+
// packages/cli/src/utils/id-generator.ts
|
|
275
273
|
import { eq, sql } from "drizzle-orm";
|
|
276
274
|
function generateId(entityType) {
|
|
277
275
|
const db = getDb();
|
|
@@ -287,7 +285,7 @@ function generateUuid() {
|
|
|
287
285
|
return crypto.randomUUID();
|
|
288
286
|
}
|
|
289
287
|
|
|
290
|
-
// src/services/project.ts
|
|
288
|
+
// packages/cli/src/services/project.ts
|
|
291
289
|
import { basename } from "path";
|
|
292
290
|
function initProject(cwd = process.cwd()) {
|
|
293
291
|
if (isTrekkerInitialized(cwd)) {
|
|
@@ -295,7 +293,7 @@ function initProject(cwd = process.cwd()) {
|
|
|
295
293
|
}
|
|
296
294
|
const db = createDb(cwd);
|
|
297
295
|
const projectName = basename(cwd);
|
|
298
|
-
const now = new Date;
|
|
296
|
+
const now = /* @__PURE__ */ new Date();
|
|
299
297
|
db.insert(projects).values({
|
|
300
298
|
id: generateUuid(),
|
|
301
299
|
name: projectName,
|
|
@@ -310,7 +308,7 @@ function wipeProject(cwd = process.cwd()) {
|
|
|
310
308
|
deleteDb(cwd);
|
|
311
309
|
}
|
|
312
310
|
|
|
313
|
-
// src/utils/output.ts
|
|
311
|
+
// packages/cli/src/utils/output.ts
|
|
314
312
|
var jsonMode = false;
|
|
315
313
|
function setJsonMode(enabled) {
|
|
316
314
|
jsonMode = enabled;
|
|
@@ -373,8 +371,7 @@ function formatTask(task) {
|
|
|
373
371
|
}
|
|
374
372
|
lines.push(`Created: ${task.createdAt.toISOString()}`);
|
|
375
373
|
lines.push(`Updated: ${task.updatedAt.toISOString()}`);
|
|
376
|
-
return lines.join(
|
|
377
|
-
`);
|
|
374
|
+
return lines.join("\n");
|
|
378
375
|
}
|
|
379
376
|
function formatEpic(epic) {
|
|
380
377
|
const lines = [
|
|
@@ -388,8 +385,7 @@ function formatEpic(epic) {
|
|
|
388
385
|
}
|
|
389
386
|
lines.push(`Created: ${epic.createdAt.toISOString()}`);
|
|
390
387
|
lines.push(`Updated: ${epic.updatedAt.toISOString()}`);
|
|
391
|
-
return lines.join(
|
|
392
|
-
`);
|
|
388
|
+
return lines.join("\n");
|
|
393
389
|
}
|
|
394
390
|
function formatComment(comment) {
|
|
395
391
|
const lines = [
|
|
@@ -398,8 +394,7 @@ function formatComment(comment) {
|
|
|
398
394
|
`Content: ${comment.content}`,
|
|
399
395
|
`Created: ${comment.createdAt.toISOString()}`
|
|
400
396
|
];
|
|
401
|
-
return lines.join(
|
|
402
|
-
`);
|
|
397
|
+
return lines.join("\n");
|
|
403
398
|
}
|
|
404
399
|
function formatTaskList(tasks2) {
|
|
405
400
|
if (tasks2.length === 0) {
|
|
@@ -410,8 +405,7 @@ function formatTaskList(tasks2) {
|
|
|
410
405
|
const parent = task.parentTaskId ? ` (subtask of ${task.parentTaskId})` : "";
|
|
411
406
|
return `${task.id} | ${task.status.padEnd(11)} | P${task.priority} | ${task.title}${tags}${parent}`;
|
|
412
407
|
});
|
|
413
|
-
return lines.join(
|
|
414
|
-
`);
|
|
408
|
+
return lines.join("\n");
|
|
415
409
|
}
|
|
416
410
|
function formatEpicList(epics2) {
|
|
417
411
|
if (epics2.length === 0) {
|
|
@@ -420,30 +414,26 @@ function formatEpicList(epics2) {
|
|
|
420
414
|
const lines = epics2.map((epic) => {
|
|
421
415
|
return `${epic.id} | ${epic.status.padEnd(11)} | P${epic.priority} | ${epic.title}`;
|
|
422
416
|
});
|
|
423
|
-
return lines.join(
|
|
424
|
-
`);
|
|
417
|
+
return lines.join("\n");
|
|
425
418
|
}
|
|
426
419
|
function formatCommentList(comments2) {
|
|
427
420
|
if (comments2.length === 0) {
|
|
428
421
|
return "No comments found.";
|
|
429
422
|
}
|
|
430
|
-
return comments2.map((c) => `[${c.id}] ${c.author}: ${c.content}`).join(
|
|
431
|
-
`);
|
|
423
|
+
return comments2.map((c) => `[${c.id}] ${c.author}: ${c.content}`).join("\n");
|
|
432
424
|
}
|
|
433
425
|
function formatDependencyList(dependencies2, direction) {
|
|
434
426
|
if (dependencies2.length === 0) {
|
|
435
427
|
return direction === "depends_on" ? "No dependencies." : "Does not block any tasks.";
|
|
436
428
|
}
|
|
437
429
|
if (direction === "depends_on") {
|
|
438
|
-
return dependencies2.map((d) => ` \u2192 depends on ${d.dependsOnId}`).join(
|
|
439
|
-
`);
|
|
430
|
+
return dependencies2.map((d) => ` \u2192 depends on ${d.dependsOnId}`).join("\n");
|
|
440
431
|
} else {
|
|
441
|
-
return dependencies2.map((d) => ` \u2192 blocks ${d.taskId}`).join(
|
|
442
|
-
`);
|
|
432
|
+
return dependencies2.map((d) => ` \u2192 blocks ${d.taskId}`).join("\n");
|
|
443
433
|
}
|
|
444
434
|
}
|
|
445
435
|
|
|
446
|
-
// src/commands/init.ts
|
|
436
|
+
// packages/cli/src/commands/init.ts
|
|
447
437
|
var initCommand = new Command("init").description("Initialize Trekker in the current directory").action(() => {
|
|
448
438
|
try {
|
|
449
439
|
if (isTrekkerInitialized()) {
|
|
@@ -458,7 +448,7 @@ var initCommand = new Command("init").description("Initialize Trekker in the cur
|
|
|
458
448
|
}
|
|
459
449
|
});
|
|
460
450
|
|
|
461
|
-
// src/commands/wipe.ts
|
|
451
|
+
// packages/cli/src/commands/wipe.ts
|
|
462
452
|
import { Command as Command2 } from "commander";
|
|
463
453
|
import * as readline from "readline";
|
|
464
454
|
var wipeCommand = new Command2("wipe").description("Delete all Trekker data in the current directory").option("-y, --yes", "Skip confirmation prompt").action(async (options) => {
|
|
@@ -468,7 +458,9 @@ var wipeCommand = new Command2("wipe").description("Delete all Trekker data in t
|
|
|
468
458
|
process.exit(1);
|
|
469
459
|
}
|
|
470
460
|
if (!options.yes) {
|
|
471
|
-
const confirmed = await confirm(
|
|
461
|
+
const confirmed = await confirm(
|
|
462
|
+
"Are you sure you want to delete all Trekker data? This cannot be undone. (y/N): "
|
|
463
|
+
);
|
|
472
464
|
if (!confirmed) {
|
|
473
465
|
console.log("Aborted.");
|
|
474
466
|
return;
|
|
@@ -482,22 +474,22 @@ var wipeCommand = new Command2("wipe").description("Delete all Trekker data in t
|
|
|
482
474
|
}
|
|
483
475
|
});
|
|
484
476
|
function confirm(prompt) {
|
|
485
|
-
return new Promise((
|
|
477
|
+
return new Promise((resolve2) => {
|
|
486
478
|
const rl = readline.createInterface({
|
|
487
479
|
input: process.stdin,
|
|
488
480
|
output: process.stdout
|
|
489
481
|
});
|
|
490
482
|
rl.question(prompt, (answer) => {
|
|
491
483
|
rl.close();
|
|
492
|
-
|
|
484
|
+
resolve2(answer.toLowerCase() === "y" || answer.toLowerCase() === "yes");
|
|
493
485
|
});
|
|
494
486
|
});
|
|
495
487
|
}
|
|
496
488
|
|
|
497
|
-
// src/commands/epic.ts
|
|
489
|
+
// packages/cli/src/commands/epic.ts
|
|
498
490
|
import { Command as Command3 } from "commander";
|
|
499
491
|
|
|
500
|
-
// src/services/epic.ts
|
|
492
|
+
// packages/cli/src/services/epic.ts
|
|
501
493
|
import { eq as eq2 } from "drizzle-orm";
|
|
502
494
|
function createEpic(input) {
|
|
503
495
|
const db = getDb();
|
|
@@ -506,7 +498,7 @@ function createEpic(input) {
|
|
|
506
498
|
throw new Error("Project not found. Run 'trekker init' first.");
|
|
507
499
|
}
|
|
508
500
|
const id = generateId("epic");
|
|
509
|
-
const now = new Date;
|
|
501
|
+
const now = /* @__PURE__ */ new Date();
|
|
510
502
|
const epic = {
|
|
511
503
|
id,
|
|
512
504
|
projectId: project.id,
|
|
@@ -539,16 +531,12 @@ function updateEpic(id, input) {
|
|
|
539
531
|
throw new Error(`Epic not found: ${id}`);
|
|
540
532
|
}
|
|
541
533
|
const updates = {
|
|
542
|
-
updatedAt: new Date
|
|
534
|
+
updatedAt: /* @__PURE__ */ new Date()
|
|
543
535
|
};
|
|
544
|
-
if (input.title !==
|
|
545
|
-
|
|
546
|
-
if (input.
|
|
547
|
-
|
|
548
|
-
if (input.status !== undefined)
|
|
549
|
-
updates.status = input.status;
|
|
550
|
-
if (input.priority !== undefined)
|
|
551
|
-
updates.priority = input.priority;
|
|
536
|
+
if (input.title !== void 0) updates.title = input.title;
|
|
537
|
+
if (input.description !== void 0) updates.description = input.description;
|
|
538
|
+
if (input.status !== void 0) updates.status = input.status;
|
|
539
|
+
if (input.priority !== void 0) updates.priority = input.priority;
|
|
552
540
|
db.update(epics).set(updates).where(eq2(epics.id, id)).run();
|
|
553
541
|
return getEpic(id);
|
|
554
542
|
}
|
|
@@ -560,7 +548,8 @@ function deleteEpic(id) {
|
|
|
560
548
|
}
|
|
561
549
|
db.delete(epics).where(eq2(epics.id, id)).run();
|
|
562
550
|
}
|
|
563
|
-
|
|
551
|
+
|
|
552
|
+
// packages/cli/src/utils/validator.ts
|
|
564
553
|
function isValidTaskStatus(status) {
|
|
565
554
|
return TASK_STATUSES.includes(status);
|
|
566
555
|
}
|
|
@@ -571,24 +560,26 @@ function isValidPriority(priority) {
|
|
|
571
560
|
return Number.isInteger(priority) && priority >= 0 && priority <= 5;
|
|
572
561
|
}
|
|
573
562
|
function parseStatus(status, type) {
|
|
574
|
-
if (!status)
|
|
575
|
-
return;
|
|
563
|
+
if (!status) return void 0;
|
|
576
564
|
const normalizedStatus = status.toLowerCase().replace(/-/g, "_");
|
|
577
565
|
if (type === "task") {
|
|
578
566
|
if (!isValidTaskStatus(normalizedStatus)) {
|
|
579
|
-
throw new Error(
|
|
567
|
+
throw new Error(
|
|
568
|
+
`Invalid task status: ${status}. Valid values: ${TASK_STATUSES.join(", ")}`
|
|
569
|
+
);
|
|
580
570
|
}
|
|
581
571
|
return normalizedStatus;
|
|
582
572
|
} else {
|
|
583
573
|
if (!isValidEpicStatus(normalizedStatus)) {
|
|
584
|
-
throw new Error(
|
|
574
|
+
throw new Error(
|
|
575
|
+
`Invalid epic status: ${status}. Valid values: ${EPIC_STATUSES.join(", ")}`
|
|
576
|
+
);
|
|
585
577
|
}
|
|
586
578
|
return normalizedStatus;
|
|
587
579
|
}
|
|
588
580
|
}
|
|
589
581
|
function parsePriority(priority) {
|
|
590
|
-
if (priority ===
|
|
591
|
-
return;
|
|
582
|
+
if (priority === void 0) return void 0;
|
|
592
583
|
const num = parseInt(priority, 10);
|
|
593
584
|
if (isNaN(num) || !isValidPriority(num)) {
|
|
594
585
|
throw new Error(`Invalid priority: ${priority}. Must be a number between 0 and 5.`);
|
|
@@ -596,13 +587,15 @@ function parsePriority(priority) {
|
|
|
596
587
|
return num;
|
|
597
588
|
}
|
|
598
589
|
function validateRequired(value, fieldName) {
|
|
599
|
-
if (value ===
|
|
590
|
+
if (value === void 0 || value === null || value === "") {
|
|
600
591
|
throw new Error(`${fieldName} is required`);
|
|
601
592
|
}
|
|
602
593
|
}
|
|
603
594
|
|
|
604
|
-
// src/commands/epic.ts
|
|
605
|
-
var epicCommand = new Command3("epic").description(
|
|
595
|
+
// packages/cli/src/commands/epic.ts
|
|
596
|
+
var epicCommand = new Command3("epic").description(
|
|
597
|
+
"Manage epics"
|
|
598
|
+
);
|
|
606
599
|
epicCommand.command("create").description("Create a new epic").requiredOption("-t, --title <title>", "Epic title").option("-d, --description <description>", "Epic description").option("-p, --priority <priority>", "Priority (0-5, default: 2)").option("-s, --status <status>", "Status (todo, in_progress, completed, archived)").action((options) => {
|
|
607
600
|
try {
|
|
608
601
|
validateRequired(options.title, "Title");
|
|
@@ -683,10 +676,10 @@ epicCommand.command("delete <epic-id>").description("Delete an epic").action((ep
|
|
|
683
676
|
}
|
|
684
677
|
});
|
|
685
678
|
|
|
686
|
-
// src/commands/task.ts
|
|
679
|
+
// packages/cli/src/commands/task.ts
|
|
687
680
|
import { Command as Command4 } from "commander";
|
|
688
681
|
|
|
689
|
-
// src/services/task.ts
|
|
682
|
+
// packages/cli/src/services/task.ts
|
|
690
683
|
import { eq as eq3, and, isNull } from "drizzle-orm";
|
|
691
684
|
function createTask(input) {
|
|
692
685
|
const db = getDb();
|
|
@@ -707,7 +700,7 @@ function createTask(input) {
|
|
|
707
700
|
}
|
|
708
701
|
}
|
|
709
702
|
const id = generateId("task");
|
|
710
|
-
const now = new Date;
|
|
703
|
+
const now = /* @__PURE__ */ new Date();
|
|
711
704
|
const task = {
|
|
712
705
|
id,
|
|
713
706
|
projectId: project.id,
|
|
@@ -765,20 +758,14 @@ function updateTask(id, input) {
|
|
|
765
758
|
}
|
|
766
759
|
}
|
|
767
760
|
const updates = {
|
|
768
|
-
updatedAt: new Date
|
|
761
|
+
updatedAt: /* @__PURE__ */ new Date()
|
|
769
762
|
};
|
|
770
|
-
if (input.title !==
|
|
771
|
-
|
|
772
|
-
if (input.
|
|
773
|
-
|
|
774
|
-
if (input.
|
|
775
|
-
|
|
776
|
-
if (input.status !== undefined)
|
|
777
|
-
updates.status = input.status;
|
|
778
|
-
if (input.tags !== undefined)
|
|
779
|
-
updates.tags = input.tags;
|
|
780
|
-
if (input.epicId !== undefined)
|
|
781
|
-
updates.epicId = input.epicId;
|
|
763
|
+
if (input.title !== void 0) updates.title = input.title;
|
|
764
|
+
if (input.description !== void 0) updates.description = input.description;
|
|
765
|
+
if (input.priority !== void 0) updates.priority = input.priority;
|
|
766
|
+
if (input.status !== void 0) updates.status = input.status;
|
|
767
|
+
if (input.tags !== void 0) updates.tags = input.tags;
|
|
768
|
+
if (input.epicId !== void 0) updates.epicId = input.epicId;
|
|
782
769
|
db.update(tasks).set(updates).where(eq3(tasks.id, id)).run();
|
|
783
770
|
return getTask(id);
|
|
784
771
|
}
|
|
@@ -791,7 +778,7 @@ function deleteTask(id) {
|
|
|
791
778
|
db.delete(tasks).where(eq3(tasks.id, id)).run();
|
|
792
779
|
}
|
|
793
780
|
|
|
794
|
-
// src/commands/task.ts
|
|
781
|
+
// packages/cli/src/commands/task.ts
|
|
795
782
|
var taskCommand = new Command4("task").description("Manage tasks");
|
|
796
783
|
taskCommand.command("create").description("Create a new task").requiredOption("-t, --title <title>", "Task title").option("-d, --description <description>", "Task description").option("-p, --priority <priority>", "Priority (0-5, default: 2)").option("-s, --status <status>", "Status (todo, in_progress, completed, wont_fix, archived)").option("--tags <tags>", "Comma-separated tags").option("-e, --epic <epic-id>", "Epic ID to assign task to").action((options) => {
|
|
797
784
|
try {
|
|
@@ -822,6 +809,7 @@ taskCommand.command("list").description("List all tasks").option("-s, --status <
|
|
|
822
809
|
status,
|
|
823
810
|
epicId: options.epic,
|
|
824
811
|
parentTaskId: null
|
|
812
|
+
// Only list top-level tasks by default
|
|
825
813
|
});
|
|
826
814
|
if (isJsonMode()) {
|
|
827
815
|
output(tasks2);
|
|
@@ -853,20 +841,16 @@ taskCommand.command("show <task-id>").description("Show task details").action((t
|
|
|
853
841
|
taskCommand.command("update <task-id>").description("Update a task").option("-t, --title <title>", "New title").option("-d, --description <description>", "New description").option("-p, --priority <priority>", "New priority (0-5)").option("-s, --status <status>", "New status").option("--tags <tags>", "New tags (comma-separated)").option("-e, --epic <epic-id>", "New epic ID").option("--no-epic", "Remove from epic").action((taskId, options) => {
|
|
854
842
|
try {
|
|
855
843
|
const updateInput = {};
|
|
856
|
-
if (options.title !==
|
|
857
|
-
|
|
858
|
-
if (options.
|
|
859
|
-
|
|
860
|
-
if (options.priority !== undefined)
|
|
861
|
-
updateInput.priority = parsePriority(options.priority);
|
|
862
|
-
if (options.status !== undefined) {
|
|
844
|
+
if (options.title !== void 0) updateInput.title = options.title;
|
|
845
|
+
if (options.description !== void 0) updateInput.description = options.description;
|
|
846
|
+
if (options.priority !== void 0) updateInput.priority = parsePriority(options.priority);
|
|
847
|
+
if (options.status !== void 0) {
|
|
863
848
|
updateInput.status = parseStatus(options.status, "task");
|
|
864
849
|
}
|
|
865
|
-
if (options.tags !==
|
|
866
|
-
updateInput.tags = options.tags;
|
|
850
|
+
if (options.tags !== void 0) updateInput.tags = options.tags;
|
|
867
851
|
if (options.epic === false) {
|
|
868
852
|
updateInput.epicId = null;
|
|
869
|
-
} else if (options.epic !==
|
|
853
|
+
} else if (options.epic !== void 0) {
|
|
870
854
|
updateInput.epicId = options.epic;
|
|
871
855
|
}
|
|
872
856
|
const task = updateTask(taskId, updateInput);
|
|
@@ -891,9 +875,11 @@ taskCommand.command("delete <task-id>").description("Delete a task").action((tas
|
|
|
891
875
|
}
|
|
892
876
|
});
|
|
893
877
|
|
|
894
|
-
// src/commands/subtask.ts
|
|
878
|
+
// packages/cli/src/commands/subtask.ts
|
|
895
879
|
import { Command as Command5 } from "commander";
|
|
896
|
-
var subtaskCommand = new Command5("subtask").description(
|
|
880
|
+
var subtaskCommand = new Command5("subtask").description(
|
|
881
|
+
"Manage subtasks"
|
|
882
|
+
);
|
|
897
883
|
subtaskCommand.command("create <parent-task-id>").description("Create a new subtask").requiredOption("-t, --title <title>", "Subtask title").option("-d, --description <description>", "Subtask description").option("-p, --priority <priority>", "Priority (0-5, default: 2)").option("-s, --status <status>", "Status (todo, in_progress, completed, wont_fix, archived)").action((parentTaskId, options) => {
|
|
898
884
|
try {
|
|
899
885
|
validateRequired(options.title, "Title");
|
|
@@ -908,7 +894,8 @@ subtaskCommand.command("create <parent-task-id>").description("Create a new subt
|
|
|
908
894
|
priority: parsePriority(options.priority),
|
|
909
895
|
status: parseStatus(options.status, "task"),
|
|
910
896
|
parentTaskId,
|
|
911
|
-
epicId: parent.epicId ??
|
|
897
|
+
epicId: parent.epicId ?? void 0
|
|
898
|
+
// Inherit epic from parent
|
|
912
899
|
});
|
|
913
900
|
if (isJsonMode()) {
|
|
914
901
|
output(subtask);
|
|
@@ -956,13 +943,10 @@ subtaskCommand.command("update <subtask-id>").description("Update a subtask").op
|
|
|
956
943
|
process.exit(1);
|
|
957
944
|
}
|
|
958
945
|
const updateInput = {};
|
|
959
|
-
if (options.title !==
|
|
960
|
-
|
|
961
|
-
if (options.
|
|
962
|
-
|
|
963
|
-
if (options.priority !== undefined)
|
|
964
|
-
updateInput.priority = parsePriority(options.priority);
|
|
965
|
-
if (options.status !== undefined) {
|
|
946
|
+
if (options.title !== void 0) updateInput.title = options.title;
|
|
947
|
+
if (options.description !== void 0) updateInput.description = options.description;
|
|
948
|
+
if (options.priority !== void 0) updateInput.priority = parsePriority(options.priority);
|
|
949
|
+
if (options.status !== void 0) {
|
|
966
950
|
updateInput.status = parseStatus(options.status, "task");
|
|
967
951
|
}
|
|
968
952
|
const updated = updateTask(subtaskId, updateInput);
|
|
@@ -996,10 +980,10 @@ subtaskCommand.command("delete <subtask-id>").description("Delete a subtask").ac
|
|
|
996
980
|
}
|
|
997
981
|
});
|
|
998
982
|
|
|
999
|
-
// src/commands/comment.ts
|
|
983
|
+
// packages/cli/src/commands/comment.ts
|
|
1000
984
|
import { Command as Command6 } from "commander";
|
|
1001
985
|
|
|
1002
|
-
// src/services/comment.ts
|
|
986
|
+
// packages/cli/src/services/comment.ts
|
|
1003
987
|
import { eq as eq4 } from "drizzle-orm";
|
|
1004
988
|
function createComment(input) {
|
|
1005
989
|
const db = getDb();
|
|
@@ -1008,7 +992,7 @@ function createComment(input) {
|
|
|
1008
992
|
throw new Error(`Task not found: ${input.taskId}`);
|
|
1009
993
|
}
|
|
1010
994
|
const id = generateId("comment");
|
|
1011
|
-
const now = new Date;
|
|
995
|
+
const now = /* @__PURE__ */ new Date();
|
|
1012
996
|
const comment = {
|
|
1013
997
|
id,
|
|
1014
998
|
taskId: input.taskId,
|
|
@@ -1041,7 +1025,7 @@ function updateComment(id, input) {
|
|
|
1041
1025
|
}
|
|
1042
1026
|
db.update(comments).set({
|
|
1043
1027
|
content: input.content,
|
|
1044
|
-
updatedAt: new Date
|
|
1028
|
+
updatedAt: /* @__PURE__ */ new Date()
|
|
1045
1029
|
}).where(eq4(comments.id, id)).run();
|
|
1046
1030
|
return getComment(id);
|
|
1047
1031
|
}
|
|
@@ -1054,8 +1038,10 @@ function deleteComment(id) {
|
|
|
1054
1038
|
db.delete(comments).where(eq4(comments.id, id)).run();
|
|
1055
1039
|
}
|
|
1056
1040
|
|
|
1057
|
-
// src/commands/comment.ts
|
|
1058
|
-
var commentCommand = new Command6("comment").description(
|
|
1041
|
+
// packages/cli/src/commands/comment.ts
|
|
1042
|
+
var commentCommand = new Command6("comment").description(
|
|
1043
|
+
"Manage comments"
|
|
1044
|
+
);
|
|
1059
1045
|
commentCommand.command("add <task-id>").description("Add a comment to a task").requiredOption("-a, --author <author>", "Comment author").requiredOption("-c, --content <content>", "Comment content").action((taskId, options) => {
|
|
1060
1046
|
try {
|
|
1061
1047
|
validateRequired(options.author, "Author");
|
|
@@ -1121,10 +1107,10 @@ commentCommand.command("delete <comment-id>").description("Delete a comment").ac
|
|
|
1121
1107
|
}
|
|
1122
1108
|
});
|
|
1123
1109
|
|
|
1124
|
-
// src/commands/dep.ts
|
|
1110
|
+
// packages/cli/src/commands/dep.ts
|
|
1125
1111
|
import { Command as Command7 } from "commander";
|
|
1126
1112
|
|
|
1127
|
-
// src/services/dependency.ts
|
|
1113
|
+
// packages/cli/src/services/dependency.ts
|
|
1128
1114
|
import { eq as eq5 } from "drizzle-orm";
|
|
1129
1115
|
function addDependency(taskId, dependsOnId) {
|
|
1130
1116
|
const db = getDb();
|
|
@@ -1139,15 +1125,19 @@ function addDependency(taskId, dependsOnId) {
|
|
|
1139
1125
|
if (taskId === dependsOnId) {
|
|
1140
1126
|
throw new Error("A task cannot depend on itself.");
|
|
1141
1127
|
}
|
|
1142
|
-
const existing = db.select().from(dependencies).where(
|
|
1128
|
+
const existing = db.select().from(dependencies).where(
|
|
1129
|
+
eq5(dependencies.taskId, taskId)
|
|
1130
|
+
).all().find((d) => d.dependsOnId === dependsOnId);
|
|
1143
1131
|
if (existing) {
|
|
1144
1132
|
throw new Error(`Dependency already exists: ${taskId} \u2192 ${dependsOnId}`);
|
|
1145
1133
|
}
|
|
1146
1134
|
if (wouldCreateCycle(taskId, dependsOnId)) {
|
|
1147
|
-
throw new Error(
|
|
1135
|
+
throw new Error(
|
|
1136
|
+
`Adding this dependency would create a cycle. ${dependsOnId} already depends on ${taskId} (directly or transitively).`
|
|
1137
|
+
);
|
|
1148
1138
|
}
|
|
1149
1139
|
const id = generateUuid();
|
|
1150
|
-
const now = new Date;
|
|
1140
|
+
const now = /* @__PURE__ */ new Date();
|
|
1151
1141
|
const dependency = {
|
|
1152
1142
|
id,
|
|
1153
1143
|
taskId,
|
|
@@ -1179,7 +1169,7 @@ function getDependencies(taskId) {
|
|
|
1179
1169
|
}
|
|
1180
1170
|
function wouldCreateCycle(taskId, dependsOnId) {
|
|
1181
1171
|
const db = getDb();
|
|
1182
|
-
const visited = new Set;
|
|
1172
|
+
const visited = /* @__PURE__ */ new Set();
|
|
1183
1173
|
const stack = [dependsOnId];
|
|
1184
1174
|
while (stack.length > 0) {
|
|
1185
1175
|
const current = stack.pop();
|
|
@@ -1200,8 +1190,10 @@ function wouldCreateCycle(taskId, dependsOnId) {
|
|
|
1200
1190
|
return false;
|
|
1201
1191
|
}
|
|
1202
1192
|
|
|
1203
|
-
// src/commands/dep.ts
|
|
1204
|
-
var depCommand = new Command7("dep").description(
|
|
1193
|
+
// packages/cli/src/commands/dep.ts
|
|
1194
|
+
var depCommand = new Command7("dep").description(
|
|
1195
|
+
"Manage task dependencies"
|
|
1196
|
+
);
|
|
1205
1197
|
depCommand.command("add <task-id> <depends-on-id>").description("Add a dependency (task-id depends on depends-on-id)").action((taskId, dependsOnId) => {
|
|
1206
1198
|
try {
|
|
1207
1199
|
const dependency = addDependency(taskId, dependsOnId);
|
|
@@ -1231,11 +1223,9 @@ depCommand.command("list <task-id>").description("List dependencies for a task")
|
|
|
1231
1223
|
output({ taskId, dependsOn, blocks });
|
|
1232
1224
|
} else {
|
|
1233
1225
|
console.log(`Dependencies for ${taskId}:`);
|
|
1234
|
-
console.log(
|
|
1235
|
-
Depends on:`);
|
|
1226
|
+
console.log("\nDepends on:");
|
|
1236
1227
|
console.log(formatDependencyList(dependsOn, "depends_on"));
|
|
1237
|
-
console.log(
|
|
1238
|
-
Blocks:`);
|
|
1228
|
+
console.log("\nBlocks:");
|
|
1239
1229
|
console.log(formatDependencyList(blocks, "blocks"));
|
|
1240
1230
|
}
|
|
1241
1231
|
} catch (err) {
|
|
@@ -1244,7 +1234,7 @@ Blocks:`);
|
|
|
1244
1234
|
}
|
|
1245
1235
|
});
|
|
1246
1236
|
|
|
1247
|
-
// src/commands/quickstart.ts
|
|
1237
|
+
// packages/cli/src/commands/quickstart.ts
|
|
1248
1238
|
import { Command as Command8 } from "commander";
|
|
1249
1239
|
var QUICKSTART_TEXT = `# Trekker - AI Agent Quickstart Guide
|
|
1250
1240
|
|
|
@@ -1855,7 +1845,7 @@ var quickstartCommand = new Command8("quickstart").description("Show comprehensi
|
|
|
1855
1845
|
console.log(QUICKSTART_TEXT);
|
|
1856
1846
|
});
|
|
1857
1847
|
|
|
1858
|
-
// src/commands/serve.ts
|
|
1848
|
+
// packages/cli/src/commands/serve.ts
|
|
1859
1849
|
import { Command as Command9 } from "commander";
|
|
1860
1850
|
import { spawn, spawnSync } from "child_process";
|
|
1861
1851
|
import { resolve, dirname } from "path";
|
|
@@ -1896,8 +1886,7 @@ var serveCommand = new Command9("serve").description("Start the Trekker web inte
|
|
|
1896
1886
|
};
|
|
1897
1887
|
if (isBundled) {
|
|
1898
1888
|
success(`Starting Trekker web interface on http://localhost:${port}`);
|
|
1899
|
-
console.log(
|
|
1900
|
-
`);
|
|
1889
|
+
console.log("Press Ctrl+C to stop\n");
|
|
1901
1890
|
const vendorPath = resolve(webappDir, "vendor");
|
|
1902
1891
|
const bundledEnv = {
|
|
1903
1892
|
...env,
|
|
@@ -1925,8 +1914,7 @@ var serveCommand = new Command9("serve").description("Start the Trekker web inte
|
|
|
1925
1914
|
}
|
|
1926
1915
|
if (options.dev) {
|
|
1927
1916
|
success(`Starting Trekker web interface (dev) on http://localhost:${port}`);
|
|
1928
|
-
console.log(
|
|
1929
|
-
`);
|
|
1917
|
+
console.log("Press Ctrl+C to stop\n");
|
|
1930
1918
|
const dev = spawn("bun", ["run", "dev", "--", "-p", port], {
|
|
1931
1919
|
cwd: webappDir,
|
|
1932
1920
|
stdio: "inherit",
|
|
@@ -1964,8 +1952,7 @@ var serveCommand = new Command9("serve").description("Start the Trekker web inte
|
|
|
1964
1952
|
});
|
|
1965
1953
|
}
|
|
1966
1954
|
success(`Starting Trekker web interface on http://localhost:${port}`);
|
|
1967
|
-
console.log(
|
|
1968
|
-
`);
|
|
1955
|
+
console.log("Press Ctrl+C to stop\n");
|
|
1969
1956
|
const server = spawn("bun", ["run", "server.js"], {
|
|
1970
1957
|
cwd: standalonePath,
|
|
1971
1958
|
stdio: "inherit",
|
|
@@ -1992,7 +1979,7 @@ function setupSignalHandlers(child) {
|
|
|
1992
1979
|
});
|
|
1993
1980
|
}
|
|
1994
1981
|
|
|
1995
|
-
// src/commands/seed.ts
|
|
1982
|
+
// packages/cli/src/commands/seed.ts
|
|
1996
1983
|
import { Command as Command10 } from "commander";
|
|
1997
1984
|
var SAMPLE_EPICS = [
|
|
1998
1985
|
{
|
|
@@ -2021,6 +2008,7 @@ var SAMPLE_EPICS = [
|
|
|
2021
2008
|
}
|
|
2022
2009
|
];
|
|
2023
2010
|
var SAMPLE_TASKS = [
|
|
2011
|
+
// Auth tasks
|
|
2024
2012
|
{
|
|
2025
2013
|
epicIndex: 0,
|
|
2026
2014
|
title: "Set up OAuth 2.0 provider",
|
|
@@ -2053,6 +2041,7 @@ var SAMPLE_TASKS = [
|
|
|
2053
2041
|
status: "todo",
|
|
2054
2042
|
tags: "backend,frontend"
|
|
2055
2043
|
},
|
|
2044
|
+
// Dashboard tasks
|
|
2056
2045
|
{
|
|
2057
2046
|
epicIndex: 1,
|
|
2058
2047
|
title: "Design dashboard layout",
|
|
@@ -2077,6 +2066,7 @@ var SAMPLE_TASKS = [
|
|
|
2077
2066
|
status: "todo",
|
|
2078
2067
|
tags: "frontend,backend"
|
|
2079
2068
|
},
|
|
2069
|
+
// API tasks
|
|
2080
2070
|
{
|
|
2081
2071
|
epicIndex: 2,
|
|
2082
2072
|
title: "Define API schema",
|
|
@@ -2109,6 +2099,7 @@ var SAMPLE_TASKS = [
|
|
|
2109
2099
|
status: "todo",
|
|
2110
2100
|
tags: "backend"
|
|
2111
2101
|
},
|
|
2102
|
+
// Testing tasks
|
|
2112
2103
|
{
|
|
2113
2104
|
epicIndex: 3,
|
|
2114
2105
|
title: "Set up Jest testing framework",
|
|
@@ -2133,6 +2124,7 @@ var SAMPLE_TASKS = [
|
|
|
2133
2124
|
status: "todo",
|
|
2134
2125
|
tags: "testing,devops"
|
|
2135
2126
|
},
|
|
2127
|
+
// Tasks without epic
|
|
2136
2128
|
{
|
|
2137
2129
|
epicIndex: null,
|
|
2138
2130
|
title: "Update README documentation",
|
|
@@ -2153,6 +2145,7 @@ var SAMPLE_TASKS = [
|
|
|
2153
2145
|
var SAMPLE_SUBTASKS = [
|
|
2154
2146
|
{
|
|
2155
2147
|
parentIndex: 1,
|
|
2148
|
+
// JWT token handling
|
|
2156
2149
|
title: "Implement access token generation",
|
|
2157
2150
|
status: "completed",
|
|
2158
2151
|
priority: 1
|
|
@@ -2171,6 +2164,7 @@ var SAMPLE_SUBTASKS = [
|
|
|
2171
2164
|
},
|
|
2172
2165
|
{
|
|
2173
2166
|
parentIndex: 5,
|
|
2167
|
+
// Chart components
|
|
2174
2168
|
title: "Create bar chart component",
|
|
2175
2169
|
status: "completed",
|
|
2176
2170
|
priority: 2
|
|
@@ -2190,12 +2184,19 @@ var SAMPLE_SUBTASKS = [
|
|
|
2190
2184
|
];
|
|
2191
2185
|
var SAMPLE_DEPENDENCIES = [
|
|
2192
2186
|
[2, 1],
|
|
2187
|
+
// Login page depends on JWT handling
|
|
2193
2188
|
[3, 1],
|
|
2189
|
+
// Password reset depends on JWT handling
|
|
2194
2190
|
[6, 5],
|
|
2191
|
+
// Real-time updates depends on chart components
|
|
2195
2192
|
[6, 4],
|
|
2193
|
+
// Real-time updates depends on dashboard layout
|
|
2196
2194
|
[9, 8],
|
|
2195
|
+
// Rate limiting depends on user endpoints
|
|
2197
2196
|
[12, 11],
|
|
2197
|
+
// Unit tests for auth depends on Jest setup
|
|
2198
2198
|
[13, 11]
|
|
2199
|
+
// E2E testing depends on Jest setup
|
|
2199
2200
|
];
|
|
2200
2201
|
var seedCommand = new Command10("seed").description("Seed the database with sample data (development only)").option("--force", "Skip confirmation prompt").action((options) => {
|
|
2201
2202
|
try {
|
|
@@ -2205,8 +2206,7 @@ var seedCommand = new Command10("seed").description("Seed the database with samp
|
|
|
2205
2206
|
}
|
|
2206
2207
|
if (!options.force) {
|
|
2207
2208
|
info("This will create sample epics, tasks, and dependencies.");
|
|
2208
|
-
info(
|
|
2209
|
-
`);
|
|
2209
|
+
info("Use --force to skip this confirmation.\n");
|
|
2210
2210
|
}
|
|
2211
2211
|
const epicIds = [];
|
|
2212
2212
|
const taskIds = [];
|
|
@@ -2221,8 +2221,7 @@ var seedCommand = new Command10("seed").description("Seed the database with samp
|
|
|
2221
2221
|
epicIds.push(epic.id);
|
|
2222
2222
|
info(` Created ${epic.id}: ${epic.title}`);
|
|
2223
2223
|
}
|
|
2224
|
-
info(
|
|
2225
|
-
Creating tasks...`);
|
|
2224
|
+
info("\nCreating tasks...");
|
|
2226
2225
|
for (const taskData of SAMPLE_TASKS) {
|
|
2227
2226
|
const task = createTask({
|
|
2228
2227
|
title: taskData.title,
|
|
@@ -2230,13 +2229,12 @@ Creating tasks...`);
|
|
|
2230
2229
|
priority: taskData.priority,
|
|
2231
2230
|
status: taskData.status,
|
|
2232
2231
|
tags: taskData.tags,
|
|
2233
|
-
epicId: taskData.epicIndex !== null ? epicIds[taskData.epicIndex] :
|
|
2232
|
+
epicId: taskData.epicIndex !== null ? epicIds[taskData.epicIndex] : void 0
|
|
2234
2233
|
});
|
|
2235
2234
|
taskIds.push(task.id);
|
|
2236
2235
|
info(` Created ${task.id}: ${task.title}`);
|
|
2237
2236
|
}
|
|
2238
|
-
info(
|
|
2239
|
-
Creating subtasks...`);
|
|
2237
|
+
info("\nCreating subtasks...");
|
|
2240
2238
|
for (const subtaskData of SAMPLE_SUBTASKS) {
|
|
2241
2239
|
const subtask = createTask({
|
|
2242
2240
|
title: subtaskData.title,
|
|
@@ -2246,8 +2244,7 @@ Creating subtasks...`);
|
|
|
2246
2244
|
});
|
|
2247
2245
|
info(` Created ${subtask.id}: ${subtask.title} (subtask of ${taskIds[subtaskData.parentIndex]})`);
|
|
2248
2246
|
}
|
|
2249
|
-
info(
|
|
2250
|
-
Creating dependencies...`);
|
|
2247
|
+
info("\nCreating dependencies...");
|
|
2251
2248
|
for (const [taskIndex, dependsOnIndex] of SAMPLE_DEPENDENCIES) {
|
|
2252
2249
|
const taskId = taskIds[taskIndex];
|
|
2253
2250
|
const dependsOnId = taskIds[dependsOnIndex];
|
|
@@ -2262,9 +2259,68 @@ Seed complete! Created ${epicIds.length} epics, ${taskIds.length} tasks, ${SAMPL
|
|
|
2262
2259
|
}
|
|
2263
2260
|
});
|
|
2264
2261
|
|
|
2265
|
-
//
|
|
2266
|
-
var
|
|
2267
|
-
|
|
2262
|
+
// packages/cli/package.json
|
|
2263
|
+
var package_default = {
|
|
2264
|
+
name: "@obsfx/trekker",
|
|
2265
|
+
version: "0.1.9",
|
|
2266
|
+
description: "A CLI-based issue tracker built for AI coding agents. Stores tasks, epics, and dependencies in a local SQLite database with a built-in kanban board UI.",
|
|
2267
|
+
type: "module",
|
|
2268
|
+
main: "dist/index.js",
|
|
2269
|
+
bin: {
|
|
2270
|
+
trekker: "./bin/trekker.js"
|
|
2271
|
+
},
|
|
2272
|
+
files: [
|
|
2273
|
+
"dist",
|
|
2274
|
+
"bin",
|
|
2275
|
+
"webapp-dist"
|
|
2276
|
+
],
|
|
2277
|
+
scripts: {
|
|
2278
|
+
build: "bun build src/index.ts --outdir dist --target bun --external commander --external drizzle-orm",
|
|
2279
|
+
dev: "bun run src/index.ts",
|
|
2280
|
+
"db:generate": "drizzle-kit generate",
|
|
2281
|
+
"db:migrate": "drizzle-kit migrate"
|
|
2282
|
+
},
|
|
2283
|
+
keywords: [
|
|
2284
|
+
"cli",
|
|
2285
|
+
"issue-tracker",
|
|
2286
|
+
"task-management",
|
|
2287
|
+
"kanban",
|
|
2288
|
+
"sqlite",
|
|
2289
|
+
"ai-agents",
|
|
2290
|
+
"coding-agents",
|
|
2291
|
+
"project-management",
|
|
2292
|
+
"todo",
|
|
2293
|
+
"epic",
|
|
2294
|
+
"bun"
|
|
2295
|
+
],
|
|
2296
|
+
author: "Omercan Balandi <balandiomer@gmail.com>",
|
|
2297
|
+
license: "MIT",
|
|
2298
|
+
homepage: "https://github.com/obsfx/trekker",
|
|
2299
|
+
repository: {
|
|
2300
|
+
type: "git",
|
|
2301
|
+
url: "https://github.com/obsfx/trekker.git"
|
|
2302
|
+
},
|
|
2303
|
+
bugs: {
|
|
2304
|
+
url: "https://github.com/obsfx/trekker/issues"
|
|
2305
|
+
},
|
|
2306
|
+
engines: {
|
|
2307
|
+
node: ">=18",
|
|
2308
|
+
bun: ">=1.0.0"
|
|
2309
|
+
},
|
|
2310
|
+
dependencies: {
|
|
2311
|
+
commander: "^13.1.0",
|
|
2312
|
+
"drizzle-orm": "^0.38.4"
|
|
2313
|
+
},
|
|
2314
|
+
devDependencies: {
|
|
2315
|
+
"@types/bun": "^1.2.2",
|
|
2316
|
+
"drizzle-kit": "^0.30.4",
|
|
2317
|
+
typescript: "^5.7.3"
|
|
2318
|
+
}
|
|
2319
|
+
};
|
|
2320
|
+
|
|
2321
|
+
// packages/cli/src/index.ts
|
|
2322
|
+
var program = new Command11();
|
|
2323
|
+
program.name("trekker").description("CLI-based issue tracker for coding agents").version(package_default.version).option("--json", "Output in JSON format").hook("preAction", (thisCommand) => {
|
|
2268
2324
|
const opts = thisCommand.opts();
|
|
2269
2325
|
if (opts.json) {
|
|
2270
2326
|
setJsonMode(true);
|