taskin 0.1.0-beta.1 → 0.1.0-beta.2
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/README.md +91 -12
- package/dist/index.d.ts +380 -5
- package/dist/index.js +1372 -25
- package/package.json +13 -4
- package/dist/commands/commands.types.d.ts +0 -13
- package/dist/commands/commands.types.js +0 -6
- package/dist/commands/commands.types.js.map +0 -1
- package/dist/commands/define-command/define-command.d.ts +0 -6
- package/dist/commands/define-command/define-command.js +0 -27
- package/dist/commands/define-command/define-command.js.map +0 -1
- package/dist/commands/define-command/define-command.test.d.ts +0 -4
- package/dist/commands/define-command/define-command.test.js +0 -125
- package/dist/commands/define-command/define-command.test.js.map +0 -1
- package/dist/commands/define-command/define-command.types.d.ts +0 -49
- package/dist/commands/define-command/define-command.types.js +0 -5
- package/dist/commands/define-command/define-command.types.js.map +0 -1
- package/dist/commands/define-command/index.d.ts +0 -5
- package/dist/commands/define-command/index.js +0 -6
- package/dist/commands/define-command/index.js.map +0 -1
- package/dist/commands/finish.d.ts +0 -4
- package/dist/commands/finish.js +0 -69
- package/dist/commands/finish.js.map +0 -1
- package/dist/commands/index.d.ts +0 -9
- package/dist/commands/index.js +0 -10
- package/dist/commands/index.js.map +0 -1
- package/dist/commands/init.d.ts +0 -4
- package/dist/commands/init.js +0 -192
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/lint.d.ts +0 -4
- package/dist/commands/lint.js +0 -31
- package/dist/commands/lint.js.map +0 -1
- package/dist/commands/list.d.ts +0 -4
- package/dist/commands/list.js +0 -132
- package/dist/commands/list.js.map +0 -1
- package/dist/commands/pause.d.ts +0 -4
- package/dist/commands/pause.js +0 -69
- package/dist/commands/pause.js.map +0 -1
- package/dist/commands/start.d.ts +0 -4
- package/dist/commands/start.js +0 -70
- package/dist/commands/start.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/colors.d.ts +0 -26
- package/dist/lib/colors.js +0 -42
- package/dist/lib/colors.js.map +0 -1
- package/dist/lib/file-system-task-linter/file-system-task-linter.d.ts +0 -36
- package/dist/lib/file-system-task-linter/file-system-task-linter.js +0 -219
- package/dist/lib/file-system-task-linter/file-system-task-linter.js.map +0 -1
- package/dist/lib/file-system-task-linter/file-system-task-linter.mock.d.ts +0 -81
- package/dist/lib/file-system-task-linter/file-system-task-linter.mock.js +0 -152
- package/dist/lib/file-system-task-linter/file-system-task-linter.mock.js.map +0 -1
- package/dist/lib/file-system-task-linter/file-system-task-linter.test.d.ts +0 -4
- package/dist/lib/file-system-task-linter/file-system-task-linter.test.js +0 -146
- package/dist/lib/file-system-task-linter/file-system-task-linter.test.js.map +0 -1
- package/dist/lib/file-system-task-linter/file-system-task-linter.types.d.ts +0 -52
- package/dist/lib/file-system-task-linter/file-system-task-linter.types.js +0 -6
- package/dist/lib/file-system-task-linter/file-system-task-linter.types.js.map +0 -1
- package/dist/lib/file-system-task-linter/index.d.ts +0 -6
- package/dist/lib/file-system-task-linter/index.js +0 -7
- package/dist/lib/file-system-task-linter/index.js.map +0 -1
- package/dist/lib/help.d.ts +0 -4
- package/dist/lib/help.js +0 -104
- package/dist/lib/help.js.map +0 -1
- package/dist/lib/index.d.ts +0 -6
- package/dist/lib/index.js +0 -7
- package/dist/lib/index.js.map +0 -1
- package/dist/lib/provider-installer/index.d.ts +0 -5
- package/dist/lib/provider-installer/index.js +0 -6
- package/dist/lib/provider-installer/index.js.map +0 -1
- package/dist/lib/provider-installer/provider-installer.d.ts +0 -28
- package/dist/lib/provider-installer/provider-installer.js +0 -86
- package/dist/lib/provider-installer/provider-installer.js.map +0 -1
- package/dist/lib/provider-installer/provider-installer.types.d.ts +0 -4
- package/dist/lib/provider-installer/provider-installer.types.js +0 -5
- package/dist/lib/provider-installer/provider-installer.types.js.map +0 -1
- package/dist/lib/provider-installer.d.ts +0 -27
- package/dist/lib/provider-installer.js +0 -86
- package/dist/lib/provider-installer.js.map +0 -1
- package/dist/lib/provider-registry/index.d.ts +0 -5
- package/dist/lib/provider-registry/index.js +0 -6
- package/dist/lib/provider-registry/index.js.map +0 -1
- package/dist/lib/provider-registry/provider-registry.d.ts +0 -9
- package/dist/lib/provider-registry/provider-registry.js +0 -111
- package/dist/lib/provider-registry/provider-registry.js.map +0 -1
- package/dist/lib/provider-registry/provider-registry.types.d.ts +0 -5
- package/dist/lib/provider-registry/provider-registry.types.js +0 -6
- package/dist/lib/provider-registry/provider-registry.types.js.map +0 -1
- package/dist/lib/provider-registry.d.ts +0 -26
- package/dist/lib/provider-registry.js +0 -111
- package/dist/lib/provider-registry.js.map +0 -1
- package/dist/lib/task-linter/index.d.ts +0 -5
- package/dist/lib/task-linter/index.js +0 -6
- package/dist/lib/task-linter/index.js.map +0 -1
- package/dist/lib/task-linter/task-linter.d.ts +0 -36
- package/dist/lib/task-linter/task-linter.js +0 -219
- package/dist/lib/task-linter/task-linter.js.map +0 -1
- package/dist/lib/task-linter/task-linter.types.d.ts +0 -52
- package/dist/lib/task-linter/task-linter.types.js +0 -6
- package/dist/lib/task-linter/task-linter.types.js.map +0 -1
- package/dist/lib/task-linter.d.ts +0 -29
- package/dist/lib/task-linter.js +0 -215
- package/dist/lib/task-linter.js.map +0 -1
- package/dist/lib/task-linter.types.d.ts +0 -38
- package/dist/lib/task-linter.types.js +0 -5
- package/dist/lib/task-linter.types.js.map +0 -1
- package/dist/main.d.ts +0 -14
- package/dist/main.js +0 -29
- package/dist/main.js.map +0 -1
- package/dist/taskin.d.ts +0 -33
- package/dist/taskin.js +0 -101
- package/dist/taskin.js.map +0 -1
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
import { readdir, readFile } from 'fs/promises';
|
|
3
|
-
import { join } from 'path';
|
|
4
|
-
const VALID_STATUSES = ['pending', 'in-progress', 'done', 'blocked'];
|
|
5
|
-
const VALID_TYPES = ['feat', 'fix', 'chore', 'docs', 'refactor', 'test'];
|
|
6
|
-
/**
|
|
7
|
-
* FileSystem-specific task linter implementation
|
|
8
|
-
* Validates task markdown files in the local filesystem
|
|
9
|
-
*/
|
|
10
|
-
export class FileSystemTaskLinter {
|
|
11
|
-
errors = [];
|
|
12
|
-
addError(file, message, severity = 'error', line) {
|
|
13
|
-
this.errors.push({ file, message, severity, line });
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Validate task file name format (FileSystem-specific)
|
|
17
|
-
*/
|
|
18
|
-
validateFileName(fileName) {
|
|
19
|
-
const pattern = /^task-\d{2,3}-[a-z0-9-]+\.md$/;
|
|
20
|
-
if (!pattern.test(fileName)) {
|
|
21
|
-
return {
|
|
22
|
-
file: fileName,
|
|
23
|
-
message: 'Invalid filename. Expected: task-NNN-kebab-case-title.md',
|
|
24
|
-
severity: 'error',
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
29
|
-
extractMetadata(content) {
|
|
30
|
-
const headerSection = content.split(/^##/m)[0];
|
|
31
|
-
const statusMatch = headerSection.match(/^Status:\s*(.+)$/im);
|
|
32
|
-
const typeMatch = headerSection.match(/^Type:\s*(.+)$/im);
|
|
33
|
-
const assigneeMatch = headerSection.match(/^Assignee:\s*(.+)$/im);
|
|
34
|
-
return {
|
|
35
|
-
status: statusMatch?.[1]?.trim().toLowerCase(),
|
|
36
|
-
type: typeMatch?.[1]?.trim().toLowerCase(),
|
|
37
|
-
assignee: assigneeMatch?.[1]?.trim(),
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Validate task metadata (FileSystem-specific)
|
|
42
|
-
*/
|
|
43
|
-
validateMetadata(metadata, filePath) {
|
|
44
|
-
const errors = [];
|
|
45
|
-
if (!metadata.status) {
|
|
46
|
-
errors.push({
|
|
47
|
-
file: filePath,
|
|
48
|
-
message: 'Missing required metadata: Status',
|
|
49
|
-
severity: 'error',
|
|
50
|
-
});
|
|
51
|
-
} else if (!VALID_STATUSES.includes(metadata.status)) {
|
|
52
|
-
errors.push({
|
|
53
|
-
file: filePath,
|
|
54
|
-
message: `Invalid status "${metadata.status}". Valid: ${VALID_STATUSES.join(', ')}`,
|
|
55
|
-
severity: 'error',
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
if (!metadata.type) {
|
|
59
|
-
errors.push({
|
|
60
|
-
file: filePath,
|
|
61
|
-
message: 'Missing required metadata: Type',
|
|
62
|
-
severity: 'error',
|
|
63
|
-
});
|
|
64
|
-
} else if (!VALID_TYPES.includes(metadata.type)) {
|
|
65
|
-
errors.push({
|
|
66
|
-
file: filePath,
|
|
67
|
-
message: `Invalid type "${metadata.type}". Valid: ${VALID_TYPES.join(', ')}`,
|
|
68
|
-
severity: 'error',
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
if (!metadata.assignee) {
|
|
72
|
-
errors.push({
|
|
73
|
-
file: filePath,
|
|
74
|
-
message: 'Missing recommended metadata: Assignee',
|
|
75
|
-
severity: 'warning',
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
return errors;
|
|
79
|
-
}
|
|
80
|
-
validateContent(filename, content) {
|
|
81
|
-
const lines = content.split('\n');
|
|
82
|
-
// Check H1 heading
|
|
83
|
-
if (!lines[0]?.trim().startsWith('# ')) {
|
|
84
|
-
this.addError(
|
|
85
|
-
filename,
|
|
86
|
-
'Task file must start with a level 1 heading (# Task NNN — Title)',
|
|
87
|
-
'error',
|
|
88
|
-
1,
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
const h1Pattern = /^#\s+(?:🧩\s+)?Task\s+\d{2,3}\s+[—-]\s+.+$/i;
|
|
92
|
-
if (lines[0] && !h1Pattern.test(lines[0])) {
|
|
93
|
-
this.addError(
|
|
94
|
-
filename,
|
|
95
|
-
'H1 heading must follow format: "# Task NNN — Title"',
|
|
96
|
-
'error',
|
|
97
|
-
1,
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
const metadata = this.extractMetadata(content);
|
|
101
|
-
const metadataErrors = this.validateMetadata(metadata, filename);
|
|
102
|
-
metadataErrors.forEach((error) => {
|
|
103
|
-
this.addError(error.file, error.message, error.severity, error.line);
|
|
104
|
-
});
|
|
105
|
-
const h2Sections = content.match(/^##\s+.+$/gm);
|
|
106
|
-
if (!h2Sections || h2Sections.length === 0) {
|
|
107
|
-
this.addError(
|
|
108
|
-
filename,
|
|
109
|
-
'Task should have at least one section (## heading)',
|
|
110
|
-
'warning',
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
const firstH2Index = content.indexOf('\n##');
|
|
114
|
-
if (firstH2Index > -1) {
|
|
115
|
-
const afterH2 = content.substring(firstH2Index);
|
|
116
|
-
if (
|
|
117
|
-
afterH2.match(/^Status:/im) ||
|
|
118
|
-
afterH2.match(/^Type:/im) ||
|
|
119
|
-
afterH2.match(/^Assignee:/im)
|
|
120
|
-
) {
|
|
121
|
-
this.addError(
|
|
122
|
-
filename,
|
|
123
|
-
'Metadata must be placed BEFORE the first ## section',
|
|
124
|
-
'error',
|
|
125
|
-
);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Lint a single task file (FileSystem-specific)
|
|
131
|
-
*/
|
|
132
|
-
async lintFile(filePath) {
|
|
133
|
-
const errors = [];
|
|
134
|
-
// Validate filename
|
|
135
|
-
const fileName = filePath.split('/').pop() || filePath;
|
|
136
|
-
const fileNameError = this.validateFileName(fileName);
|
|
137
|
-
if (fileNameError) {
|
|
138
|
-
errors.push(fileNameError);
|
|
139
|
-
}
|
|
140
|
-
// Read and validate content
|
|
141
|
-
try {
|
|
142
|
-
const content = await readFile(filePath, 'utf-8');
|
|
143
|
-
this.errors = [];
|
|
144
|
-
this.validateContent(fileName, content);
|
|
145
|
-
errors.push(...this.errors);
|
|
146
|
-
} catch (error) {
|
|
147
|
-
errors.push({
|
|
148
|
-
file: fileName,
|
|
149
|
-
message: `Failed to read file: ${error}`,
|
|
150
|
-
severity: 'error',
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
return errors;
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Lint all task files in the specified directory (FileSystem-specific)
|
|
157
|
-
*/
|
|
158
|
-
async lintDirectory(tasksDir) {
|
|
159
|
-
this.errors = [];
|
|
160
|
-
try {
|
|
161
|
-
const files = await readdir(tasksDir);
|
|
162
|
-
const taskFiles = files.filter((f) => f.endsWith('.md'));
|
|
163
|
-
for (const file of taskFiles) {
|
|
164
|
-
const fileNameError = this.validateFileName(file);
|
|
165
|
-
if (fileNameError) {
|
|
166
|
-
this.addError(file, fileNameError.message, fileNameError.severity);
|
|
167
|
-
}
|
|
168
|
-
const content = await readFile(join(tasksDir, file), 'utf-8');
|
|
169
|
-
this.validateContent(file, content);
|
|
170
|
-
}
|
|
171
|
-
const errors = this.errors.filter((e) => e.severity === 'error');
|
|
172
|
-
const warnings = this.errors.filter((e) => e.severity === 'warning');
|
|
173
|
-
return {
|
|
174
|
-
errors,
|
|
175
|
-
warnings,
|
|
176
|
-
filesChecked: taskFiles.length,
|
|
177
|
-
valid: errors.length === 0,
|
|
178
|
-
};
|
|
179
|
-
} catch (error) {
|
|
180
|
-
throw new Error(`Failed to lint tasks: ${error}`);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
static printResults(result) {
|
|
184
|
-
if (result.errors.length === 0 && result.warnings.length === 0) {
|
|
185
|
-
console.log(
|
|
186
|
-
chalk.green(`✅ All ${result.filesChecked} task files are valid!\n`),
|
|
187
|
-
);
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
190
|
-
console.log(
|
|
191
|
-
chalk.bold(
|
|
192
|
-
`\n📊 Validation Results (${result.filesChecked} files checked):\n`,
|
|
193
|
-
),
|
|
194
|
-
);
|
|
195
|
-
const errorsByFile = new Map();
|
|
196
|
-
[...result.errors, ...result.warnings].forEach((error) => {
|
|
197
|
-
if (!errorsByFile.has(error.file)) {
|
|
198
|
-
errorsByFile.set(error.file, []);
|
|
199
|
-
}
|
|
200
|
-
errorsByFile.get(error.file).push(error);
|
|
201
|
-
});
|
|
202
|
-
for (const [file, fileErrors] of errorsByFile) {
|
|
203
|
-
console.log(chalk.cyan(`\n📄 ${file}`));
|
|
204
|
-
for (const error of fileErrors) {
|
|
205
|
-
const icon =
|
|
206
|
-
error.severity === 'error' ? chalk.red('❌') : chalk.yellow('⚠️');
|
|
207
|
-
const location = error.line ? `:${error.line}` : '';
|
|
208
|
-
console.log(` ${icon} ${error.message}${location}`);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
console.log('\n' + '─'.repeat(60));
|
|
212
|
-
console.log(
|
|
213
|
-
chalk.bold(
|
|
214
|
-
`\n📊 Summary: ${chalk.red(result.errors.length + ' error(s)')}, ${chalk.yellow(result.warnings.length + ' warning(s)')}\n`,
|
|
215
|
-
),
|
|
216
|
-
);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
//# sourceMappingURL=file-system-task-linter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-system-task-linter.js","sourceRoot":"","sources":["../../../src/lib/file-system-task-linter/file-system-task-linter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAQ5B,MAAM,cAAc,GAAG,CAAC,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;AACrE,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;AAEzE;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IACvB,MAAM,GAA0B,EAAE,CAAC;IAEnC,QAAQ,CACd,IAAY,EACZ,OAAe,EACf,WAAgC,OAAO,EACvC,IAAa;QAEb,IAAI,CAAC,MAAM,CAAC,IAAI,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CAAC;QACH,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QACnC,OAAO,CAAC,GAAG,CACT,KAAK,CAAC,IAAI,CACR,iBAAiB,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,WAAW,CAAC,KAAK,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,aAAa,CAAC,IAAI,CAC5H,CACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FileSystemTaskLinter mocks for testing
|
|
3
|
-
*/
|
|
4
|
-
import type {
|
|
5
|
-
FileLintResult,
|
|
6
|
-
FileValidationError,
|
|
7
|
-
IFileSystemTaskLinter,
|
|
8
|
-
TaskMetadata,
|
|
9
|
-
} from './file-system-task-linter.types.js';
|
|
10
|
-
/**
|
|
11
|
-
* Create mock FileValidationError
|
|
12
|
-
*/
|
|
13
|
-
export declare function createMockFileValidationError(
|
|
14
|
-
overrides?: Partial<FileValidationError>,
|
|
15
|
-
): FileValidationError;
|
|
16
|
-
/**
|
|
17
|
-
* Create mock FileLintResult
|
|
18
|
-
*/
|
|
19
|
-
export declare function createMockFileLintResult(
|
|
20
|
-
overrides?: Partial<FileLintResult>,
|
|
21
|
-
): FileLintResult;
|
|
22
|
-
/**
|
|
23
|
-
* Create mock TaskMetadata
|
|
24
|
-
*/
|
|
25
|
-
export declare function createMockTaskMetadata(
|
|
26
|
-
overrides?: Partial<TaskMetadata>,
|
|
27
|
-
): TaskMetadata;
|
|
28
|
-
/**
|
|
29
|
-
* Mock implementation of IFileSystemTaskLinter
|
|
30
|
-
*/
|
|
31
|
-
export declare class MockFileSystemTaskLinter implements IFileSystemTaskLinter {
|
|
32
|
-
private mockLintDirectoryResult;
|
|
33
|
-
private mockLintFileResult;
|
|
34
|
-
private mockValidateMetadataResult;
|
|
35
|
-
lintDirectory(_tasksDir: string): Promise<FileLintResult>;
|
|
36
|
-
lintFile(_filePath: string): Promise<FileValidationError[]>;
|
|
37
|
-
validateMetadata(
|
|
38
|
-
_metadata: Record<string, unknown>,
|
|
39
|
-
_fileName: string,
|
|
40
|
-
): FileValidationError[];
|
|
41
|
-
/**
|
|
42
|
-
* Set mock result for lintDirectory
|
|
43
|
-
*/
|
|
44
|
-
setLintDirectoryResult(result: FileLintResult): void;
|
|
45
|
-
/**
|
|
46
|
-
* Set mock result for lintFile
|
|
47
|
-
*/
|
|
48
|
-
setLintFileResult(result: FileValidationError[]): void;
|
|
49
|
-
/**
|
|
50
|
-
* Set mock result for validateMetadata
|
|
51
|
-
*/
|
|
52
|
-
setValidateMetadataResult(result: FileValidationError[]): void;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Create a mock FileSystemTaskLinter instance
|
|
56
|
-
*/
|
|
57
|
-
export declare function createMockFileSystemTaskLinter(): MockFileSystemTaskLinter;
|
|
58
|
-
/**
|
|
59
|
-
* Mock valid lint result - no errors, all files valid
|
|
60
|
-
*/
|
|
61
|
-
export declare const MOCK_VALID_LINT_RESULT: FileLintResult;
|
|
62
|
-
/**
|
|
63
|
-
* Mock invalid lint result - has errors
|
|
64
|
-
*/
|
|
65
|
-
export declare const MOCK_INVALID_LINT_RESULT: FileLintResult;
|
|
66
|
-
/**
|
|
67
|
-
* Mock lint result with warnings only
|
|
68
|
-
*/
|
|
69
|
-
export declare const MOCK_WARNINGS_LINT_RESULT: FileLintResult;
|
|
70
|
-
/**
|
|
71
|
-
* Mock sample validation errors
|
|
72
|
-
*/
|
|
73
|
-
export declare const MOCK_VALIDATION_ERRORS: FileValidationError[];
|
|
74
|
-
/**
|
|
75
|
-
* Mock sample task metadata - valid
|
|
76
|
-
*/
|
|
77
|
-
export declare const MOCK_VALID_METADATA: TaskMetadata;
|
|
78
|
-
/**
|
|
79
|
-
* Mock sample task metadata - invalid
|
|
80
|
-
*/
|
|
81
|
-
export declare const MOCK_INVALID_METADATA: Record<string, unknown>;
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FileSystemTaskLinter mocks for testing
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Create mock FileValidationError
|
|
6
|
-
*/
|
|
7
|
-
export function createMockFileValidationError(overrides) {
|
|
8
|
-
return {
|
|
9
|
-
file: 'task-001.md',
|
|
10
|
-
message: 'Mock validation error',
|
|
11
|
-
severity: 'error',
|
|
12
|
-
...overrides,
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Create mock FileLintResult
|
|
17
|
-
*/
|
|
18
|
-
export function createMockFileLintResult(overrides) {
|
|
19
|
-
return {
|
|
20
|
-
errors: [],
|
|
21
|
-
filesChecked: 0,
|
|
22
|
-
valid: true,
|
|
23
|
-
warnings: [],
|
|
24
|
-
...overrides,
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Create mock TaskMetadata
|
|
29
|
-
*/
|
|
30
|
-
export function createMockTaskMetadata(overrides) {
|
|
31
|
-
return {
|
|
32
|
-
assignee: 'john@example.com',
|
|
33
|
-
status: 'pending',
|
|
34
|
-
type: 'feat',
|
|
35
|
-
...overrides,
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Mock implementation of IFileSystemTaskLinter
|
|
40
|
-
*/
|
|
41
|
-
export class MockFileSystemTaskLinter {
|
|
42
|
-
mockLintDirectoryResult = createMockFileLintResult();
|
|
43
|
-
mockLintFileResult = [];
|
|
44
|
-
mockValidateMetadataResult = [];
|
|
45
|
-
async lintDirectory(_tasksDir) {
|
|
46
|
-
return this.mockLintDirectoryResult;
|
|
47
|
-
}
|
|
48
|
-
async lintFile(_filePath) {
|
|
49
|
-
return this.mockLintFileResult;
|
|
50
|
-
}
|
|
51
|
-
validateMetadata(_metadata, _fileName) {
|
|
52
|
-
return this.mockValidateMetadataResult;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Set mock result for lintDirectory
|
|
56
|
-
*/
|
|
57
|
-
setLintDirectoryResult(result) {
|
|
58
|
-
this.mockLintDirectoryResult = result;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Set mock result for lintFile
|
|
62
|
-
*/
|
|
63
|
-
setLintFileResult(result) {
|
|
64
|
-
this.mockLintFileResult = result;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Set mock result for validateMetadata
|
|
68
|
-
*/
|
|
69
|
-
setValidateMetadataResult(result) {
|
|
70
|
-
this.mockValidateMetadataResult = result;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Create a mock FileSystemTaskLinter instance
|
|
75
|
-
*/
|
|
76
|
-
export function createMockFileSystemTaskLinter() {
|
|
77
|
-
return new MockFileSystemTaskLinter();
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Mock valid lint result - no errors, all files valid
|
|
81
|
-
*/
|
|
82
|
-
export const MOCK_VALID_LINT_RESULT = {
|
|
83
|
-
errors: [],
|
|
84
|
-
filesChecked: 5,
|
|
85
|
-
valid: true,
|
|
86
|
-
warnings: [],
|
|
87
|
-
};
|
|
88
|
-
/**
|
|
89
|
-
* Mock invalid lint result - has errors
|
|
90
|
-
*/
|
|
91
|
-
export const MOCK_INVALID_LINT_RESULT = {
|
|
92
|
-
errors: [
|
|
93
|
-
createMockFileValidationError({
|
|
94
|
-
file: 'task-001.md',
|
|
95
|
-
message: 'Invalid status: "invalid"',
|
|
96
|
-
}),
|
|
97
|
-
createMockFileValidationError({
|
|
98
|
-
file: 'task-002.md',
|
|
99
|
-
message: 'Invalid type: "unknown"',
|
|
100
|
-
}),
|
|
101
|
-
],
|
|
102
|
-
filesChecked: 2,
|
|
103
|
-
valid: false,
|
|
104
|
-
warnings: [],
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* Mock lint result with warnings only
|
|
108
|
-
*/
|
|
109
|
-
export const MOCK_WARNINGS_LINT_RESULT = {
|
|
110
|
-
errors: [],
|
|
111
|
-
filesChecked: 3,
|
|
112
|
-
valid: true,
|
|
113
|
-
warnings: [
|
|
114
|
-
createMockFileValidationError({
|
|
115
|
-
file: 'task-003.md',
|
|
116
|
-
message: 'Consider adding assignee',
|
|
117
|
-
severity: 'warning',
|
|
118
|
-
}),
|
|
119
|
-
],
|
|
120
|
-
};
|
|
121
|
-
/**
|
|
122
|
-
* Mock sample validation errors
|
|
123
|
-
*/
|
|
124
|
-
export const MOCK_VALIDATION_ERRORS = [
|
|
125
|
-
createMockFileValidationError({
|
|
126
|
-
file: 'task-001.md',
|
|
127
|
-
message: 'Invalid status: must be one of [pending, in-progress, done, blocked]',
|
|
128
|
-
line: 5,
|
|
129
|
-
}),
|
|
130
|
-
createMockFileValidationError({
|
|
131
|
-
file: 'task-001.md',
|
|
132
|
-
message: 'Invalid type: must be one of [feat, fix, chore, docs, refactor, test]',
|
|
133
|
-
line: 6,
|
|
134
|
-
}),
|
|
135
|
-
];
|
|
136
|
-
/**
|
|
137
|
-
* Mock sample task metadata - valid
|
|
138
|
-
*/
|
|
139
|
-
export const MOCK_VALID_METADATA = {
|
|
140
|
-
assignee: 'john@example.com',
|
|
141
|
-
status: 'pending',
|
|
142
|
-
type: 'feat',
|
|
143
|
-
};
|
|
144
|
-
/**
|
|
145
|
-
* Mock sample task metadata - invalid
|
|
146
|
-
*/
|
|
147
|
-
export const MOCK_INVALID_METADATA = {
|
|
148
|
-
assignee: 'john@example.com',
|
|
149
|
-
status: 'invalid-status',
|
|
150
|
-
type: 'invalid-type',
|
|
151
|
-
};
|
|
152
|
-
//# sourceMappingURL=file-system-task-linter.mock.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-system-task-linter.mock.js","sourceRoot":"","sources":["../../../src/lib/file-system-task-linter/file-system-task-linter.mock.ts"],"names":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AE,kBAAkB;IAC5B,MAAM,EAAE,SAAS;IACjB,IAAI,EAAE,MAAM;CACb,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAA4B;IAC5D,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE,gBAAgB;IACxB,IAAI,EAAE,cAAc;CACrB,CAAC"}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FileSystemTaskLinter tests
|
|
3
|
-
*/
|
|
4
|
-
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
5
|
-
import { FileSystemTaskLinter } from './file-system-task-linter.js';
|
|
6
|
-
describe('FileSystemTaskLinter', () => {
|
|
7
|
-
let linter;
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
linter = new FileSystemTaskLinter();
|
|
10
|
-
});
|
|
11
|
-
afterEach(() => {
|
|
12
|
-
vi.restoreAllMocks();
|
|
13
|
-
});
|
|
14
|
-
describe('validateMetadata', () => {
|
|
15
|
-
it('should return no errors for valid metadata', () => {
|
|
16
|
-
const metadata = {
|
|
17
|
-
assignee: 'john@example.com',
|
|
18
|
-
status: 'pending',
|
|
19
|
-
type: 'feat',
|
|
20
|
-
};
|
|
21
|
-
const errors = linter.validateMetadata(metadata, 'task-001.md');
|
|
22
|
-
expect(errors).toHaveLength(0);
|
|
23
|
-
});
|
|
24
|
-
it('should return error for invalid status', () => {
|
|
25
|
-
const metadata = {
|
|
26
|
-
assignee: 'john@example.com',
|
|
27
|
-
status: 'invalid-status',
|
|
28
|
-
type: 'feat', // Valid type to isolate the status error
|
|
29
|
-
};
|
|
30
|
-
const errors = linter.validateMetadata(metadata, 'task-001.md');
|
|
31
|
-
expect(errors).toHaveLength(1);
|
|
32
|
-
expect(errors[0].message).toContain('Invalid status');
|
|
33
|
-
expect(errors[0].severity).toBe('error');
|
|
34
|
-
expect(errors[0].file).toBe('task-001.md');
|
|
35
|
-
});
|
|
36
|
-
it('should return error for invalid type', () => {
|
|
37
|
-
const metadata = {
|
|
38
|
-
assignee: 'john@example.com',
|
|
39
|
-
status: 'pending', // Valid status to isolate the type error
|
|
40
|
-
type: 'invalid-type',
|
|
41
|
-
};
|
|
42
|
-
const errors = linter.validateMetadata(metadata, 'task-001.md');
|
|
43
|
-
expect(errors).toHaveLength(1);
|
|
44
|
-
expect(errors[0].message).toContain('Invalid type');
|
|
45
|
-
expect(errors[0].severity).toBe('error');
|
|
46
|
-
});
|
|
47
|
-
it('should return multiple errors for multiple invalid fields', () => {
|
|
48
|
-
const metadata = {
|
|
49
|
-
status: 'invalid-status',
|
|
50
|
-
type: 'invalid-type',
|
|
51
|
-
// Missing assignee - will generate warning
|
|
52
|
-
};
|
|
53
|
-
const errors = linter.validateMetadata(metadata, 'task-001.md');
|
|
54
|
-
expect(errors).toHaveLength(3); // 2 errors + 1 warning
|
|
55
|
-
expect(errors.filter((e) => e.severity === 'error')).toHaveLength(2);
|
|
56
|
-
expect(errors.filter((e) => e.severity === 'warning')).toHaveLength(1);
|
|
57
|
-
});
|
|
58
|
-
it('should return warning for missing assignee', () => {
|
|
59
|
-
const metadata = {
|
|
60
|
-
status: 'pending',
|
|
61
|
-
type: 'feat',
|
|
62
|
-
// Missing assignee
|
|
63
|
-
};
|
|
64
|
-
const errors = linter.validateMetadata(metadata, 'task-001.md');
|
|
65
|
-
expect(errors).toHaveLength(1);
|
|
66
|
-
expect(errors[0].message).toContain('Assignee');
|
|
67
|
-
expect(errors[0].severity).toBe('warning');
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
describe('lintFile', () => {
|
|
71
|
-
it('should validate a well-formed task file', async () => {
|
|
72
|
-
// Test will be implemented when we have file mocking utilities
|
|
73
|
-
expect(true).toBe(true);
|
|
74
|
-
});
|
|
75
|
-
it('should detect missing required metadata', async () => {
|
|
76
|
-
// Test will be implemented when we have file mocking utilities
|
|
77
|
-
expect(true).toBe(true);
|
|
78
|
-
});
|
|
79
|
-
it('should validate task filename format', async () => {
|
|
80
|
-
// Test will be implemented when we have file mocking utilities
|
|
81
|
-
expect(true).toBe(true);
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
describe('lintDirectory', () => {
|
|
85
|
-
it('should return valid result for directory with no tasks', async () => {
|
|
86
|
-
// Test will be implemented when we have directory mocking utilities
|
|
87
|
-
expect(true).toBe(true);
|
|
88
|
-
});
|
|
89
|
-
it('should collect all errors from multiple files', async () => {
|
|
90
|
-
// Test will be implemented when we have directory mocking utilities
|
|
91
|
-
expect(true).toBe(true);
|
|
92
|
-
});
|
|
93
|
-
it('should mark result as invalid when errors are found', async () => {
|
|
94
|
-
// Test will be implemented when we have directory mocking utilities
|
|
95
|
-
expect(true).toBe(true);
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
describe('printResults', () => {
|
|
99
|
-
it('should print success message for valid results', () => {
|
|
100
|
-
const consoleSpy = vi.spyOn(console, 'log');
|
|
101
|
-
const result = {
|
|
102
|
-
errors: [],
|
|
103
|
-
warnings: [],
|
|
104
|
-
filesChecked: 5,
|
|
105
|
-
valid: true,
|
|
106
|
-
};
|
|
107
|
-
FileSystemTaskLinter.printResults(result);
|
|
108
|
-
expect(consoleSpy).toHaveBeenCalled();
|
|
109
|
-
});
|
|
110
|
-
it('should print errors when validation fails', () => {
|
|
111
|
-
const consoleSpy = vi.spyOn(console, 'log');
|
|
112
|
-
const result = {
|
|
113
|
-
errors: [
|
|
114
|
-
{
|
|
115
|
-
file: 'task-001.md',
|
|
116
|
-
message: 'Invalid status',
|
|
117
|
-
severity: 'error',
|
|
118
|
-
},
|
|
119
|
-
],
|
|
120
|
-
warnings: [],
|
|
121
|
-
filesChecked: 1,
|
|
122
|
-
valid: false,
|
|
123
|
-
};
|
|
124
|
-
FileSystemTaskLinter.printResults(result);
|
|
125
|
-
expect(consoleSpy).toHaveBeenCalled();
|
|
126
|
-
});
|
|
127
|
-
it('should print warnings separately from errors', () => {
|
|
128
|
-
const consoleSpy = vi.spyOn(console, 'log');
|
|
129
|
-
const result = {
|
|
130
|
-
errors: [],
|
|
131
|
-
warnings: [
|
|
132
|
-
{
|
|
133
|
-
file: 'task-001.md',
|
|
134
|
-
message: 'Consider adding assignee',
|
|
135
|
-
severity: 'warning',
|
|
136
|
-
},
|
|
137
|
-
],
|
|
138
|
-
filesChecked: 1,
|
|
139
|
-
valid: true,
|
|
140
|
-
};
|
|
141
|
-
FileSystemTaskLinter.printResults(result);
|
|
142
|
-
expect(consoleSpy).toHaveBeenCalled();
|
|
143
|
-
});
|
|
144
|
-
});
|
|
145
|
-
});
|
|
146
|
-
//# sourceMappingURL=file-system-task-linter.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-system-task-linter.test.js","sourceRoot":"","sources":["../../../src/lib/file-system-task-linter/file-system-task-linter.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAGpE,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,IAAI,MAA4B,CAAC;IAEjC,UAAU,CAAC,GAAG,EAAE;QACd,MAAM,GAAG,IAAI,oBAAoB,EAAE,CAAC;IACtC,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,EAAE,CAAC,eAAe,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;QAChC,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;YACpD,MAAM,QAAQ,GAAG;gBACf,QAAQ,EAAE,kBAAkB;gBAC5B,MAAM,EAAE,SAAS;gBACjB,IAAI,EAAE,MAAM;aACb,CAAC;YAEF,MAAM,MAAM,GAAG,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,a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gB,EAAE,CAAC;QACxC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FileSystem task linter types
|
|
3
|
-
* Re-exports from @taskin/types-ts + FileSystem-specific extensions
|
|
4
|
-
*/
|
|
5
|
-
import type { TaskValidationIssue } from '@taskin/types-ts';
|
|
6
|
-
export type { TaskMetadata, TaskValidationIssue } from '@taskin/types-ts';
|
|
7
|
-
/**
|
|
8
|
-
* FileSystem-specific validation error
|
|
9
|
-
* Extends TaskValidationIssue with file-specific information
|
|
10
|
-
*/
|
|
11
|
-
export interface FileValidationError
|
|
12
|
-
extends Omit<TaskValidationIssue, 'taskId'> {
|
|
13
|
-
file: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* FileSystem-specific lint result
|
|
17
|
-
* Contains file-based validation results
|
|
18
|
-
*/
|
|
19
|
-
export interface FileLintResult {
|
|
20
|
-
errors: FileValidationError[];
|
|
21
|
-
filesChecked: number;
|
|
22
|
-
valid: boolean;
|
|
23
|
-
warnings: FileValidationError[];
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* FileSystem-specific task linter interface
|
|
27
|
-
* Defines validation operations for file-based task providers
|
|
28
|
-
*/
|
|
29
|
-
export interface IFileSystemTaskLinter {
|
|
30
|
-
/**
|
|
31
|
-
* Lint all task files in a directory
|
|
32
|
-
* @param tasksDir - Directory containing task markdown files
|
|
33
|
-
* @returns Validation results for all files
|
|
34
|
-
*/
|
|
35
|
-
lintDirectory(tasksDir: string): Promise<FileLintResult>;
|
|
36
|
-
/**
|
|
37
|
-
* Lint a single task file
|
|
38
|
-
* @param filePath - Path to the task markdown file
|
|
39
|
-
* @returns Array of validation errors found in the file
|
|
40
|
-
*/
|
|
41
|
-
lintFile(filePath: string): Promise<FileValidationError[]>;
|
|
42
|
-
/**
|
|
43
|
-
* Validate task metadata
|
|
44
|
-
* @param metadata - Task metadata to validate
|
|
45
|
-
* @param fileName - Name of the file being validated
|
|
46
|
-
* @returns Array of validation errors
|
|
47
|
-
*/
|
|
48
|
-
validateMetadata(
|
|
49
|
-
metadata: Record<string, unknown>,
|
|
50
|
-
fileName: string,
|
|
51
|
-
): FileValidationError[];
|
|
52
|
-
}
|