@pi-unipi/kanboard 2.0.8 → 2.0.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/commands.ts +84 -0
- package/package.json +10 -13
- package/parser/index.ts +121 -0
- package/parser/milestones.ts +110 -0
- package/parser/plans.ts +133 -0
- package/parser/remaining.ts +386 -0
- package/parser/specs.ts +105 -0
- package/server/index.ts +278 -0
- package/server/routes/milestone.ts +38 -0
- package/server/routes/workflow.ts +41 -0
- package/tui/kanboard-overlay.ts +300 -0
- package/types.ts +67 -0
package/types.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @pi-unipi/kanboard — Shared types
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/** Document types that kanboard can parse */
|
|
6
|
+
export type DocType =
|
|
7
|
+
| "spec"
|
|
8
|
+
| "plan"
|
|
9
|
+
| "milestone"
|
|
10
|
+
| "quick-work"
|
|
11
|
+
| "debug"
|
|
12
|
+
| "fix"
|
|
13
|
+
| "chore"
|
|
14
|
+
| "review";
|
|
15
|
+
|
|
16
|
+
/** Status of a parsed item */
|
|
17
|
+
export type ItemStatus = "todo" | "in-progress" | "done" | "reviewed";
|
|
18
|
+
|
|
19
|
+
/** A single parsed item from a document */
|
|
20
|
+
export interface ParsedItem {
|
|
21
|
+
/** Item text content */
|
|
22
|
+
text: string;
|
|
23
|
+
/** Current status */
|
|
24
|
+
status: ItemStatus;
|
|
25
|
+
/** Line number in source file (1-indexed) */
|
|
26
|
+
lineNumber: number;
|
|
27
|
+
/** Source file path (relative) */
|
|
28
|
+
sourceFile: string;
|
|
29
|
+
/** Copy command for this item */
|
|
30
|
+
command?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** A parsed document */
|
|
34
|
+
export interface ParsedDoc {
|
|
35
|
+
/** Document type */
|
|
36
|
+
type: DocType;
|
|
37
|
+
/** Document title (from frontmatter or filename) */
|
|
38
|
+
title: string;
|
|
39
|
+
/** File path (relative) */
|
|
40
|
+
filePath: string;
|
|
41
|
+
/** Parsed items */
|
|
42
|
+
items: ParsedItem[];
|
|
43
|
+
/** Frontmatter metadata */
|
|
44
|
+
metadata: Record<string, string>;
|
|
45
|
+
/** Warnings collected during parsing */
|
|
46
|
+
warnings: string[];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** Parser interface — each doc type implements this */
|
|
50
|
+
export interface DocParser {
|
|
51
|
+
/** Check if this parser can handle the given file */
|
|
52
|
+
canParse(filePath: string): boolean;
|
|
53
|
+
/** Parse the file and return a ParsedDoc */
|
|
54
|
+
parse(filePath: string): ParsedDoc;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Kanboard configuration */
|
|
58
|
+
export interface KanboardConfig {
|
|
59
|
+
/** HTTP server port */
|
|
60
|
+
port: number;
|
|
61
|
+
/** Maximum port to try */
|
|
62
|
+
maxPort: number;
|
|
63
|
+
/** Root directory for docs */
|
|
64
|
+
docsRoot: string;
|
|
65
|
+
/** PID file path */
|
|
66
|
+
pidFile: string;
|
|
67
|
+
}
|