@mcp-consultant-tools/azure-devops 27.0.0-beta.1 → 27.0.0-beta.11
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/build/AzureDevOpsService.d.ts +64 -0
- package/build/AzureDevOpsService.d.ts.map +1 -1
- package/build/AzureDevOpsService.js +424 -2
- package/build/AzureDevOpsService.js.map +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +991 -13
- package/build/index.js.map +1 -1
- package/build/sync/file-utils.d.ts +86 -0
- package/build/sync/file-utils.d.ts.map +1 -0
- package/build/sync/file-utils.js +224 -0
- package/build/sync/file-utils.js.map +1 -0
- package/build/sync/git-utils.d.ts +31 -0
- package/build/sync/git-utils.d.ts.map +1 -0
- package/build/sync/git-utils.js +116 -0
- package/build/sync/git-utils.js.map +1 -0
- package/build/sync/html-converter.d.ts +32 -0
- package/build/sync/html-converter.d.ts.map +1 -0
- package/build/sync/html-converter.js +91 -0
- package/build/sync/html-converter.js.map +1 -0
- package/build/sync/html-detection.d.ts +93 -0
- package/build/sync/html-detection.d.ts.map +1 -0
- package/build/sync/html-detection.js +169 -0
- package/build/sync/html-detection.js.map +1 -0
- package/build/sync/index.d.ts +12 -0
- package/build/sync/index.d.ts.map +1 -0
- package/build/sync/index.js +12 -0
- package/build/sync/index.js.map +1 -0
- package/build/sync/markdown-serializer.d.ts +136 -0
- package/build/sync/markdown-serializer.d.ts.map +1 -0
- package/build/sync/markdown-serializer.js +646 -0
- package/build/sync/markdown-serializer.js.map +1 -0
- package/build/sync/task-serializer.d.ts +93 -0
- package/build/sync/task-serializer.d.ts.map +1 -0
- package/build/sync/task-serializer.js +395 -0
- package/build/sync/task-serializer.js.map +1 -0
- package/build/tool-examples.d.ts +56 -0
- package/build/tool-examples.d.ts.map +1 -0
- package/build/tool-examples.js +142 -0
- package/build/tool-examples.js.map +1 -0
- package/package.json +3 -1
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Markdown Serialization Utilities
|
|
3
|
+
*
|
|
4
|
+
* Convert between ADO work items and local markdown files.
|
|
5
|
+
* Uses YAML frontmatter for metadata and markdown sections for content.
|
|
6
|
+
*/
|
|
7
|
+
export interface WorkItemFrontmatter {
|
|
8
|
+
id: number;
|
|
9
|
+
title: string;
|
|
10
|
+
type: string;
|
|
11
|
+
state: string;
|
|
12
|
+
url: string;
|
|
13
|
+
assignedTo?: string;
|
|
14
|
+
storyPoints?: number;
|
|
15
|
+
parent?: number;
|
|
16
|
+
moscow?: string;
|
|
17
|
+
tags?: string[];
|
|
18
|
+
areaPath?: string;
|
|
19
|
+
iterationPath?: string;
|
|
20
|
+
lastSyncedRevision: number;
|
|
21
|
+
lastSyncedAt: string;
|
|
22
|
+
}
|
|
23
|
+
export interface AdditionalFields {
|
|
24
|
+
howToTest?: string;
|
|
25
|
+
deploymentInformation?: string;
|
|
26
|
+
predeploymentSteps?: string;
|
|
27
|
+
postdeploymentSteps?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ParsedWorkItemFile {
|
|
30
|
+
frontmatter: WorkItemFrontmatter;
|
|
31
|
+
description: string;
|
|
32
|
+
acceptanceCriteria: string;
|
|
33
|
+
additionalFields: AdditionalFields;
|
|
34
|
+
rawContent: string;
|
|
35
|
+
}
|
|
36
|
+
export interface CommentsFrontmatter {
|
|
37
|
+
id: number;
|
|
38
|
+
title: string;
|
|
39
|
+
commentCount: number;
|
|
40
|
+
lastSyncedAt: string;
|
|
41
|
+
}
|
|
42
|
+
export interface ParsedComment {
|
|
43
|
+
author: string;
|
|
44
|
+
date: string;
|
|
45
|
+
content: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Result of converting work item to markdown
|
|
49
|
+
*/
|
|
50
|
+
export interface WorkItemToMarkdownResult {
|
|
51
|
+
content: string;
|
|
52
|
+
skippedFields: string[];
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Convert an ADO work item to markdown file content
|
|
56
|
+
*
|
|
57
|
+
* @param workItem - The work item from ADO API
|
|
58
|
+
* @param revision - The revision number
|
|
59
|
+
* @returns Object with markdown content and list of skipped fields (if any were HTML)
|
|
60
|
+
*/
|
|
61
|
+
export declare function workItemToMarkdown(workItem: any, revision: number): WorkItemToMarkdownResult;
|
|
62
|
+
/**
|
|
63
|
+
* Parse a markdown file to extract frontmatter and content sections
|
|
64
|
+
*/
|
|
65
|
+
export declare function parseWorkItemMarkdown(content: string): ParsedWorkItemFile;
|
|
66
|
+
/**
|
|
67
|
+
* Convert ADO comments to a read-only markdown file
|
|
68
|
+
*/
|
|
69
|
+
export declare function commentsToMarkdown(workItem: any, comments: any[]): string;
|
|
70
|
+
/**
|
|
71
|
+
* Build ADO patch operations from parsed markdown changes
|
|
72
|
+
* Only updates fields that have actually changed.
|
|
73
|
+
* Auto-converts HTML fields to markdown format unless skipAutoConvert is true.
|
|
74
|
+
*
|
|
75
|
+
* @param parsed - Parsed work item file
|
|
76
|
+
* @param currentWorkItem - Current work item from ADO
|
|
77
|
+
* @param skipAutoConvert - Skip automatic HTML-to-markdown conversion (default: false)
|
|
78
|
+
*/
|
|
79
|
+
export declare function buildPatchOperations(parsed: ParsedWorkItemFile, currentWorkItem: any, skipAutoConvert?: boolean): {
|
|
80
|
+
operations: any[];
|
|
81
|
+
skippedFields: string[];
|
|
82
|
+
convertedFields: string[];
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Update the lastSyncedRevision in a markdown file content
|
|
86
|
+
*/
|
|
87
|
+
export declare function updateSyncRevision(content: string, newRevision: number): string;
|
|
88
|
+
/**
|
|
89
|
+
* Frontmatter for new work items (before they have an ID)
|
|
90
|
+
*/
|
|
91
|
+
export interface NewWorkItemFrontmatter {
|
|
92
|
+
title: string;
|
|
93
|
+
type: string;
|
|
94
|
+
state: string;
|
|
95
|
+
parent: number;
|
|
96
|
+
assignedTo?: string;
|
|
97
|
+
storyPoints?: number;
|
|
98
|
+
moscow?: string;
|
|
99
|
+
tags?: string[];
|
|
100
|
+
areaPath?: string;
|
|
101
|
+
iterationPath?: string;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Parsed new work item file structure
|
|
105
|
+
*/
|
|
106
|
+
export interface ParsedNewWorkItemFile {
|
|
107
|
+
frontmatter: NewWorkItemFrontmatter;
|
|
108
|
+
description: string;
|
|
109
|
+
acceptanceCriteria: string;
|
|
110
|
+
additionalFields: AdditionalFields;
|
|
111
|
+
rawContent: string;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Check if a work item frontmatter indicates a new (not yet created) work item
|
|
115
|
+
* New work items don't have an 'id' field
|
|
116
|
+
*/
|
|
117
|
+
export declare function isNewWorkItem(frontmatter: Record<string, any>): boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Parse a markdown file for a NEW work item (no id required)
|
|
120
|
+
*/
|
|
121
|
+
export declare function parseNewWorkItemMarkdown(content: string): ParsedNewWorkItemFile;
|
|
122
|
+
/**
|
|
123
|
+
* Build ADO fields object for creating a new work item
|
|
124
|
+
* Inherits areaPath and iterationPath from parent work item
|
|
125
|
+
*/
|
|
126
|
+
export declare function buildNewWorkItemFields(parsed: ParsedNewWorkItemFile, parentWorkItem: any): Record<string, any>;
|
|
127
|
+
/**
|
|
128
|
+
* Generate a new work item template markdown file
|
|
129
|
+
*/
|
|
130
|
+
export declare function generateNewWorkItemTemplate(parentId: number, parentTitle: string, project: string, workItemType?: string): string;
|
|
131
|
+
/**
|
|
132
|
+
* Update a new work item file after creation with the assigned ID
|
|
133
|
+
* Converts it from a "new" file to a synced file with proper frontmatter
|
|
134
|
+
*/
|
|
135
|
+
export declare function convertNewFileToSynced(content: string, workItemId: number, revision: number, url: string): string;
|
|
136
|
+
//# sourceMappingURL=markdown-serializer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-serializer.d.ts","sourceRoot":"","sources":["../../src/sync/markdown-serializer.ts"],"names":[],"mappings":"AAAA;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