@zhanglc77/bitbucket-mcp-server 1.0.12 → 1.0.13
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/handlers/pull-request-handlers.d.ts.map +1 -1
- package/build/handlers/pull-request-handlers.js +5 -2
- package/build/handlers/pull-request-handlers.js.map +1 -1
- package/build/handlers/resource-handlers.d.ts +20 -0
- package/build/handlers/resource-handlers.d.ts.map +1 -0
- package/build/handlers/resource-handlers.js +32 -0
- package/build/handlers/resource-handlers.js.map +1 -0
- package/build/index.d.ts +1245 -4
- package/build/index.d.ts.map +1 -1
- package/build/index.js +25 -96
- package/build/index.js.map +1 -1
- package/build/resources/field-schemas.d.ts +11 -108
- package/build/resources/field-schemas.d.ts.map +1 -1
- package/build/resources/field-schemas.js +169 -871
- package/build/resources/field-schemas.js.map +1 -1
- package/build/resources/resource-definitions.d.ts +19 -0
- package/build/resources/resource-definitions.d.ts.map +1 -0
- package/build/resources/resource-definitions.js +327 -0
- package/build/resources/resource-definitions.js.map +1 -0
- package/build/tools/definitions.d.ts +19 -0
- package/build/tools/definitions.d.ts.map +1 -1
- package/build/tools/definitions.js +4 -0
- package/build/tools/definitions.js.map +1 -1
- package/build/types/guards.d.ts +1 -0
- package/build/types/guards.d.ts.map +1 -1
- package/build/types/guards.js +2 -1
- package/build/types/guards.js.map +1 -1
- package/build/utils/field-filter.d.ts +42 -0
- package/build/utils/field-filter.d.ts.map +1 -0
- package/build/utils/field-filter.js +224 -0
- package/build/utils/field-filter.js.map +1 -0
- package/package.json +1 -1
- package/build/resources/handlers.d.ts +0 -65
- package/build/resources/handlers.d.ts.map +0 -1
- package/build/resources/handlers.js +0 -571
- package/build/resources/handlers.js.map +0 -1
- package/build/resources/schema-handlers.d.ts +0 -44
- package/build/resources/schema-handlers.d.ts.map +0 -1
- package/build/resources/schema-handlers.js +0 -183
- package/build/resources/schema-handlers.js.map +0 -1
- package/build/resources/static-resources.d.ts +0 -20
- package/build/resources/static-resources.d.ts.map +0 -1
- package/build/resources/static-resources.js +0 -73
- package/build/resources/static-resources.js.map +0 -1
- package/build/resources/templates.d.ts +0 -4
- package/build/resources/templates.d.ts.map +0 -1
- package/build/resources/templates.js +0 -306
- package/build/resources/templates.js.map +0 -1
- package/build/utils/bitbucket-uri.d.ts +0 -52
- package/build/utils/bitbucket-uri.d.ts.map +0 -1
- package/build/utils/bitbucket-uri.js +0 -139
- package/build/utils/bitbucket-uri.js.map +0 -1
|
@@ -1,571 +0,0 @@
|
|
|
1
|
-
import { ErrorCode, McpError } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
-
import { BitbucketURI } from '../utils/bitbucket-uri.js';
|
|
3
|
-
import { SchemaHandlers } from './schema-handlers.js';
|
|
4
|
-
export class ResourceHandlers {
|
|
5
|
-
apiClient;
|
|
6
|
-
pullRequestHandlers;
|
|
7
|
-
branchHandlers;
|
|
8
|
-
fileHandlers;
|
|
9
|
-
searchHandlers;
|
|
10
|
-
reviewHandlers;
|
|
11
|
-
schemaHandlers;
|
|
12
|
-
constructor(apiClient, pullRequestHandlers, branchHandlers, fileHandlers, searchHandlers, reviewHandlers) {
|
|
13
|
-
this.apiClient = apiClient;
|
|
14
|
-
this.pullRequestHandlers = pullRequestHandlers;
|
|
15
|
-
this.branchHandlers = branchHandlers;
|
|
16
|
-
this.fileHandlers = fileHandlers;
|
|
17
|
-
this.searchHandlers = searchHandlers;
|
|
18
|
-
this.reviewHandlers = reviewHandlers;
|
|
19
|
-
this.schemaHandlers = new SchemaHandlers();
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Parse a Bitbucket resource URI and extract components
|
|
23
|
-
*/
|
|
24
|
-
parseResourceUri(uri) {
|
|
25
|
-
return new BitbucketURI(uri);
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Handle resource read requests by delegating to appropriate handlers
|
|
29
|
-
*/
|
|
30
|
-
async handleResourceRead(uri) {
|
|
31
|
-
console.error(`[ResourceHandlers] Starting resource read for URI: ${uri}`);
|
|
32
|
-
try {
|
|
33
|
-
const parsed = this.parseResourceUri(uri);
|
|
34
|
-
const { workspace, repo, resourceType, resourcePath, params } = parsed;
|
|
35
|
-
console.error(`[ResourceHandlers] Parsed URI:`, {
|
|
36
|
-
workspace,
|
|
37
|
-
repo,
|
|
38
|
-
resourceType,
|
|
39
|
-
resourcePath,
|
|
40
|
-
params: Object.keys(params).length > 0 ? params : 'none'
|
|
41
|
-
});
|
|
42
|
-
switch (resourceType) {
|
|
43
|
-
case 'schema':
|
|
44
|
-
// Handle schema resources: bitbucket://schema/...
|
|
45
|
-
console.error(`[ResourceHandlers] Handling schema resource: ${resourcePath || 'index'}`);
|
|
46
|
-
const schemaResult = await this.schemaHandlers.handleSchemaResource(uri);
|
|
47
|
-
console.error(`[ResourceHandlers] Schema resource processed successfully`);
|
|
48
|
-
// Schema handlers already return the correct resource format, just wrap it
|
|
49
|
-
return {
|
|
50
|
-
contents: [schemaResult]
|
|
51
|
-
};
|
|
52
|
-
case 'file':
|
|
53
|
-
if (!resourcePath) {
|
|
54
|
-
throw new McpError(ErrorCode.InvalidParams, 'File path is required');
|
|
55
|
-
}
|
|
56
|
-
if (!workspace || !repo) {
|
|
57
|
-
throw new McpError(ErrorCode.InvalidParams, 'Workspace and repository are required for file resources');
|
|
58
|
-
}
|
|
59
|
-
console.error(`[ResourceHandlers] Handling file resource: ${workspace}/${repo}/${resourcePath}`);
|
|
60
|
-
const fileResult = await this.fileHandlers.handleGetFileContent({
|
|
61
|
-
workspace,
|
|
62
|
-
repository: repo,
|
|
63
|
-
file_path: resourcePath,
|
|
64
|
-
branch: params.ref,
|
|
65
|
-
start_line: params.start_line ? parseInt(params.start_line) : undefined,
|
|
66
|
-
line_count: params.line_count ? parseInt(params.line_count) : undefined,
|
|
67
|
-
full_content: params.full_content === 'true'
|
|
68
|
-
});
|
|
69
|
-
console.error(`[ResourceHandlers] File resource processed successfully`);
|
|
70
|
-
return this.convertToolResponseToResource(uri, fileResult);
|
|
71
|
-
case 'dir':
|
|
72
|
-
if (!workspace || !repo) {
|
|
73
|
-
throw new McpError(ErrorCode.InvalidParams, 'Workspace and repository are required for directory resources');
|
|
74
|
-
}
|
|
75
|
-
console.error(`[ResourceHandlers] Handling directory resource: ${workspace}/${repo}/${resourcePath || 'root'}`);
|
|
76
|
-
const dirResult = await this.fileHandlers.handleListDirectoryContent({
|
|
77
|
-
workspace,
|
|
78
|
-
repository: repo,
|
|
79
|
-
path: resourcePath,
|
|
80
|
-
branch: params.ref
|
|
81
|
-
});
|
|
82
|
-
console.error(`[ResourceHandlers] Directory resource processed successfully`);
|
|
83
|
-
return this.convertToolResponseToResource(uri, dirResult);
|
|
84
|
-
case 'pull-request':
|
|
85
|
-
if (!resourcePath) {
|
|
86
|
-
throw new McpError(ErrorCode.InvalidParams, 'PR ID is required');
|
|
87
|
-
}
|
|
88
|
-
// Parse hierarchical resource path: {id}/diff, {id}/commits, {id}/diff/{filePath}, or just {id}
|
|
89
|
-
const pathParts = resourcePath.split('/');
|
|
90
|
-
const prId = pathParts[0];
|
|
91
|
-
const subResource = pathParts[1];
|
|
92
|
-
const filePath = pathParts.slice(2).join('/');
|
|
93
|
-
if (!prId || !/^\d+$/.test(prId)) {
|
|
94
|
-
throw new McpError(ErrorCode.InvalidParams, 'Valid PR ID is required');
|
|
95
|
-
}
|
|
96
|
-
if (subResource === 'diff') {
|
|
97
|
-
if (filePath) {
|
|
98
|
-
// Single file diff: bitbucket://workspace/repo/pull-request/123/diff/path/to/file
|
|
99
|
-
console.error(`[ResourceHandlers] Handling PR file diff resource: ${workspace}/${repo}/pull-request/${prId}/diff/${filePath}`);
|
|
100
|
-
const fileDiffResult = await this.reviewHandlers.handleGetPullRequestDiff({
|
|
101
|
-
workspace,
|
|
102
|
-
repository: repo,
|
|
103
|
-
pull_request_id: parseInt(prId),
|
|
104
|
-
file_path: filePath,
|
|
105
|
-
context: params.context ? parseInt(params.context) : undefined,
|
|
106
|
-
mode: params.mode
|
|
107
|
-
});
|
|
108
|
-
console.error(`[ResourceHandlers] PR file diff resource processed successfully`);
|
|
109
|
-
return this.convertToolResponseToResource(uri, fileDiffResult);
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
// Full PR diff: bitbucket://workspace/repo/pull-request/123/diff
|
|
113
|
-
console.error(`[ResourceHandlers] Handling PR diff resource: ${workspace}/${repo}/pull-request/${prId}/diff`);
|
|
114
|
-
const diffResult = await this.reviewHandlers.handleGetPullRequestDiff({
|
|
115
|
-
workspace,
|
|
116
|
-
repository: repo,
|
|
117
|
-
pull_request_id: parseInt(prId),
|
|
118
|
-
context: params.context ? parseInt(params.context) : undefined,
|
|
119
|
-
include_patterns: params.include,
|
|
120
|
-
exclude_patterns: params.exclude,
|
|
121
|
-
mode: params.mode
|
|
122
|
-
});
|
|
123
|
-
console.error(`[ResourceHandlers] PR diff resource processed successfully`);
|
|
124
|
-
return this.convertToolResponseToResource(uri, diffResult);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
else if (subResource === 'commits') {
|
|
128
|
-
// PR commits: bitbucket://workspace/repo/pull-request/123/commits
|
|
129
|
-
console.error(`[ResourceHandlers] Handling PR commits resource: ${workspace}/${repo}/pull-request/${prId}/commits`);
|
|
130
|
-
const commitsResult = await this.pullRequestHandlers.handleListPrCommits({
|
|
131
|
-
workspace,
|
|
132
|
-
repository: repo,
|
|
133
|
-
pull_request_id: parseInt(prId),
|
|
134
|
-
start: params.start ? parseInt(params.start) : undefined,
|
|
135
|
-
limit: params.limit ? parseInt(params.limit) : undefined
|
|
136
|
-
});
|
|
137
|
-
console.error(`[ResourceHandlers] PR commits resource processed successfully`);
|
|
138
|
-
return this.convertToolResponseToResource(uri, commitsResult);
|
|
139
|
-
}
|
|
140
|
-
else if (subResource) {
|
|
141
|
-
// Unknown sub-resource
|
|
142
|
-
throw new McpError(ErrorCode.InvalidParams, `Unknown pull request sub-resource: ${subResource}`);
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
// PR details: bitbucket://workspace/repo/pull-request/123
|
|
146
|
-
console.error(`[ResourceHandlers] Handling PR details resource: ${workspace}/${repo}/pull-request/${prId}`);
|
|
147
|
-
const prResult = await this.pullRequestHandlers.handleGetPullRequest({
|
|
148
|
-
workspace,
|
|
149
|
-
repository: repo,
|
|
150
|
-
pull_request_id: parseInt(prId)
|
|
151
|
-
});
|
|
152
|
-
console.error(`[ResourceHandlers] PR details resource processed successfully`);
|
|
153
|
-
return this.convertToolResponseToResource(uri, prResult);
|
|
154
|
-
}
|
|
155
|
-
case 'branches':
|
|
156
|
-
console.error(`[ResourceHandlers] Handling branches list resource: ${workspace}/${repo}/branches`);
|
|
157
|
-
const branchesResult = await this.branchHandlers.handleListBranches({
|
|
158
|
-
workspace,
|
|
159
|
-
repository: repo,
|
|
160
|
-
filter: params.filter,
|
|
161
|
-
limit: params.limit ? parseInt(params.limit) : undefined,
|
|
162
|
-
start: params.start ? parseInt(params.start) : undefined
|
|
163
|
-
});
|
|
164
|
-
console.error(`[ResourceHandlers] Branches list resource processed successfully`);
|
|
165
|
-
return this.convertToolResponseToResource(uri, branchesResult);
|
|
166
|
-
case 'branch':
|
|
167
|
-
if (!resourcePath) {
|
|
168
|
-
throw new McpError(ErrorCode.InvalidParams, 'Branch name is required');
|
|
169
|
-
}
|
|
170
|
-
console.error(`[ResourceHandlers] Handling branch details resource: ${workspace}/${repo}/branch/${resourcePath}`);
|
|
171
|
-
const branchResult = await this.branchHandlers.handleGetBranch({
|
|
172
|
-
workspace,
|
|
173
|
-
repository: repo,
|
|
174
|
-
branch_name: resourcePath
|
|
175
|
-
});
|
|
176
|
-
console.error(`[ResourceHandlers] Branch details resource processed successfully`);
|
|
177
|
-
return this.convertToolResponseToResource(uri, branchResult);
|
|
178
|
-
case 'search':
|
|
179
|
-
if (!params.query) {
|
|
180
|
-
throw new McpError(ErrorCode.InvalidParams, 'Search query is required');
|
|
181
|
-
}
|
|
182
|
-
console.error(`[ResourceHandlers] Handling search resource: ${workspace}/${repo}/search?query=${params.query}`);
|
|
183
|
-
const searchResult = await this.searchHandlers.handleSearchCode({
|
|
184
|
-
workspace,
|
|
185
|
-
repository: repo,
|
|
186
|
-
search_query: params.query,
|
|
187
|
-
file_extensions: params.file_extensions,
|
|
188
|
-
include_paths: params.include_paths,
|
|
189
|
-
exclude_paths: params.exclude_paths,
|
|
190
|
-
limit: params.limit ? parseInt(params.limit) : undefined
|
|
191
|
-
});
|
|
192
|
-
console.error(`[ResourceHandlers] Search resource processed successfully`);
|
|
193
|
-
return this.convertToolResponseToResource(uri, searchResult);
|
|
194
|
-
case 'pull-requests':
|
|
195
|
-
console.error(`[ResourceHandlers] Handling PRs list resource: ${workspace}/${repo}/pull-requests with state=${params.state || 'OPEN'}`);
|
|
196
|
-
const prsResult = await this.pullRequestHandlers.handleListPullRequests({
|
|
197
|
-
workspace,
|
|
198
|
-
repository: repo,
|
|
199
|
-
state: params.state || 'OPEN',
|
|
200
|
-
author: params.author,
|
|
201
|
-
reviewer: params.reviewer,
|
|
202
|
-
limit: params.limit ? parseInt(params.limit) : 25,
|
|
203
|
-
start: params.start ? parseInt(params.start) : 0
|
|
204
|
-
});
|
|
205
|
-
console.error(`[ResourceHandlers] PRs list resource processed successfully`);
|
|
206
|
-
return this.convertToolResponseToResource(uri, prsResult);
|
|
207
|
-
// Backward compatibility cases
|
|
208
|
-
case 'pr':
|
|
209
|
-
// Redirect to pull-request handler for backward compatibility
|
|
210
|
-
console.error(`[ResourceHandlers] Redirecting legacy 'pr' to 'pull-request' handler`);
|
|
211
|
-
return this.handleResourceRead(uri.replace('/pr/', '/pull-request/'));
|
|
212
|
-
case 'prs':
|
|
213
|
-
// Redirect to pull-requests handler for backward compatibility
|
|
214
|
-
console.error(`[ResourceHandlers] Redirecting legacy 'prs' to 'pull-requests' handler`);
|
|
215
|
-
return this.handleResourceRead(uri.replace('/prs', '/pull-requests'));
|
|
216
|
-
default:
|
|
217
|
-
console.error(`[ResourceHandlers] Unknown resource type: ${resourceType}`);
|
|
218
|
-
throw new McpError(ErrorCode.InvalidParams, `Unknown resource type: ${resourceType}`);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
catch (error) {
|
|
222
|
-
console.error(`[ResourceHandlers] Error processing resource URI: ${uri}`, error);
|
|
223
|
-
if (error instanceof McpError) {
|
|
224
|
-
console.error(`[ResourceHandlers] MCP Error - Code: ${error.code}, Message: ${error.message}`);
|
|
225
|
-
throw error;
|
|
226
|
-
}
|
|
227
|
-
console.error(`[ResourceHandlers] Unexpected error:`, error instanceof Error ? error.message : error);
|
|
228
|
-
// Convert API errors to MCP errors
|
|
229
|
-
return {
|
|
230
|
-
contents: [
|
|
231
|
-
{
|
|
232
|
-
uri,
|
|
233
|
-
mimeType: 'application/json',
|
|
234
|
-
text: JSON.stringify({
|
|
235
|
-
error: 'Resource retrieval failed',
|
|
236
|
-
message: error instanceof Error ? error.message : 'Unknown error',
|
|
237
|
-
uri
|
|
238
|
-
}, null, 2),
|
|
239
|
-
},
|
|
240
|
-
],
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* Convert tool response to resource response format with field filtering support
|
|
246
|
-
*/
|
|
247
|
-
convertToolResponseToResource(uri, toolResponse) {
|
|
248
|
-
let responseData;
|
|
249
|
-
// Extract the actual data from tool response
|
|
250
|
-
if (Array.isArray(toolResponse.content)) {
|
|
251
|
-
try {
|
|
252
|
-
responseData = JSON.parse(toolResponse.content[0].text);
|
|
253
|
-
}
|
|
254
|
-
catch {
|
|
255
|
-
responseData = { text: toolResponse.content[0].text };
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
else {
|
|
259
|
-
responseData = toolResponse;
|
|
260
|
-
}
|
|
261
|
-
// Apply field filtering based on URI parameters
|
|
262
|
-
const parsed = new URL(uri);
|
|
263
|
-
const fields = parsed.searchParams.get('fields');
|
|
264
|
-
const exclude = parsed.searchParams.get('exclude');
|
|
265
|
-
const format = parsed.searchParams.get('format') || 'full';
|
|
266
|
-
if (fields || exclude || format !== 'full') {
|
|
267
|
-
responseData = this.applyFieldFiltering(responseData, {
|
|
268
|
-
fields: fields?.split(',').map(f => f.trim()),
|
|
269
|
-
exclude: exclude?.split(',').map(f => f.trim()),
|
|
270
|
-
format
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
return {
|
|
274
|
-
contents: [
|
|
275
|
-
{
|
|
276
|
-
uri,
|
|
277
|
-
mimeType: 'application/json',
|
|
278
|
-
text: JSON.stringify(responseData, null, 2),
|
|
279
|
-
},
|
|
280
|
-
],
|
|
281
|
-
};
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Apply field filtering to response data
|
|
285
|
-
*/
|
|
286
|
-
applyFieldFiltering(data, options) {
|
|
287
|
-
if (!data || typeof data !== 'object') {
|
|
288
|
-
return data;
|
|
289
|
-
}
|
|
290
|
-
let result;
|
|
291
|
-
// Handle different format options
|
|
292
|
-
switch (options.format) {
|
|
293
|
-
case 'minimal':
|
|
294
|
-
result = this.extractMinimalFields(data);
|
|
295
|
-
break;
|
|
296
|
-
case 'summary':
|
|
297
|
-
result = this.extractSummaryFields(data);
|
|
298
|
-
break;
|
|
299
|
-
case 'metadata':
|
|
300
|
-
result = this.extractMetadataFields(data);
|
|
301
|
-
break;
|
|
302
|
-
default:
|
|
303
|
-
result = { ...data };
|
|
304
|
-
}
|
|
305
|
-
// Apply explicit field inclusion
|
|
306
|
-
if (options.fields && options.fields.length > 0) {
|
|
307
|
-
result = this.includeOnlyFields(result, options.fields);
|
|
308
|
-
}
|
|
309
|
-
// Apply field exclusion
|
|
310
|
-
if (options.exclude && options.exclude.length > 0) {
|
|
311
|
-
result = this.excludeFields(result, options.exclude);
|
|
312
|
-
}
|
|
313
|
-
return result;
|
|
314
|
-
}
|
|
315
|
-
/**
|
|
316
|
-
* Extract only specified fields using dot notation
|
|
317
|
-
*/
|
|
318
|
-
includeOnlyFields(data, fields) {
|
|
319
|
-
const result = {};
|
|
320
|
-
for (const field of fields) {
|
|
321
|
-
if (field.includes('*')) {
|
|
322
|
-
// Handle wildcard fields
|
|
323
|
-
const parts = field.split('.');
|
|
324
|
-
const wildcardIndex = parts.indexOf('*');
|
|
325
|
-
const beforeWildcard = parts.slice(0, wildcardIndex);
|
|
326
|
-
const afterWildcard = parts.slice(wildcardIndex + 1);
|
|
327
|
-
// Navigate to the array containing the wildcard
|
|
328
|
-
let current = data;
|
|
329
|
-
for (const part of beforeWildcard) {
|
|
330
|
-
if (current && typeof current === 'object') {
|
|
331
|
-
current = current[part];
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
if (Array.isArray(current)) {
|
|
335
|
-
// Create result array structure
|
|
336
|
-
const resultArray = current.map(item => {
|
|
337
|
-
if (afterWildcard.length > 0) {
|
|
338
|
-
// Extract nested field from each array item
|
|
339
|
-
let nestedValue = item;
|
|
340
|
-
for (const part of afterWildcard) {
|
|
341
|
-
if (nestedValue && typeof nestedValue === 'object') {
|
|
342
|
-
nestedValue = nestedValue[part];
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
if (nestedValue !== undefined) {
|
|
346
|
-
const itemResult = {};
|
|
347
|
-
let buildPath = itemResult;
|
|
348
|
-
for (let i = 0; i < afterWildcard.length - 1; i++) {
|
|
349
|
-
buildPath[afterWildcard[i]] = {};
|
|
350
|
-
buildPath = buildPath[afterWildcard[i]];
|
|
351
|
-
}
|
|
352
|
-
buildPath[afterWildcard[afterWildcard.length - 1]] = nestedValue;
|
|
353
|
-
return itemResult;
|
|
354
|
-
}
|
|
355
|
-
return undefined;
|
|
356
|
-
}
|
|
357
|
-
return item;
|
|
358
|
-
}).filter(item => item !== undefined);
|
|
359
|
-
// Set result in the correct nested structure
|
|
360
|
-
let buildResult = result;
|
|
361
|
-
for (let i = 0; i < beforeWildcard.length - 1; i++) {
|
|
362
|
-
if (!buildResult[beforeWildcard[i]]) {
|
|
363
|
-
buildResult[beforeWildcard[i]] = {};
|
|
364
|
-
}
|
|
365
|
-
buildResult = buildResult[beforeWildcard[i]];
|
|
366
|
-
}
|
|
367
|
-
if (beforeWildcard.length > 0) {
|
|
368
|
-
buildResult[beforeWildcard[beforeWildcard.length - 1]] = resultArray;
|
|
369
|
-
}
|
|
370
|
-
else {
|
|
371
|
-
return resultArray; // Root level wildcard
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
else {
|
|
376
|
-
// Handle regular fields
|
|
377
|
-
const value = this.getNestedField(data, field);
|
|
378
|
-
if (value !== undefined) {
|
|
379
|
-
this.setNestedField(result, field, value);
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
return result;
|
|
384
|
-
}
|
|
385
|
-
/**
|
|
386
|
-
* Exclude specified fields using dot notation
|
|
387
|
-
*/
|
|
388
|
-
excludeFields(data, fields) {
|
|
389
|
-
const result = JSON.parse(JSON.stringify(data)); // Deep clone
|
|
390
|
-
for (const field of fields) {
|
|
391
|
-
this.deleteNestedField(result, field);
|
|
392
|
-
}
|
|
393
|
-
return result;
|
|
394
|
-
}
|
|
395
|
-
/**
|
|
396
|
-
* Get nested field value using dot notation (e.g., "user.name", "files.0.path", "reviewers.*.display_name")
|
|
397
|
-
*/
|
|
398
|
-
getNestedField(obj, path) {
|
|
399
|
-
if (obj === null || obj === undefined)
|
|
400
|
-
return undefined;
|
|
401
|
-
const keys = path.split('.');
|
|
402
|
-
let current = obj;
|
|
403
|
-
for (let i = 0; i < keys.length; i++) {
|
|
404
|
-
const key = keys[i];
|
|
405
|
-
if (current === null || current === undefined)
|
|
406
|
-
return undefined;
|
|
407
|
-
// Handle wildcard for arrays
|
|
408
|
-
if (key === '*' && Array.isArray(current)) {
|
|
409
|
-
const remainingPath = keys.slice(i + 1).join('.');
|
|
410
|
-
if (remainingPath) {
|
|
411
|
-
return current.map(item => this.getNestedField(item, remainingPath));
|
|
412
|
-
}
|
|
413
|
-
return current;
|
|
414
|
-
}
|
|
415
|
-
// Handle array indices
|
|
416
|
-
if (Array.isArray(current) && /^\d+$/.test(key)) {
|
|
417
|
-
current = current[parseInt(key)];
|
|
418
|
-
}
|
|
419
|
-
else {
|
|
420
|
-
current = current[key];
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
return current;
|
|
424
|
-
}
|
|
425
|
-
/**
|
|
426
|
-
* Set nested field value using dot notation
|
|
427
|
-
*/
|
|
428
|
-
setNestedField(obj, path, value) {
|
|
429
|
-
const keys = path.split('.');
|
|
430
|
-
const lastKey = keys.pop();
|
|
431
|
-
let current = obj;
|
|
432
|
-
for (let i = 0; i < keys.length; i++) {
|
|
433
|
-
const key = keys[i];
|
|
434
|
-
const nextKey = keys[i + 1];
|
|
435
|
-
if (!(key in current)) {
|
|
436
|
-
// Determine if next level should be array or object
|
|
437
|
-
if (nextKey && /^\d+$/.test(nextKey)) {
|
|
438
|
-
current[key] = [];
|
|
439
|
-
}
|
|
440
|
-
else {
|
|
441
|
-
current[key] = {};
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
current = current[key];
|
|
445
|
-
}
|
|
446
|
-
// Handle array index assignment
|
|
447
|
-
if (Array.isArray(current) && /^\d+$/.test(lastKey)) {
|
|
448
|
-
const index = parseInt(lastKey);
|
|
449
|
-
current[index] = value;
|
|
450
|
-
}
|
|
451
|
-
else {
|
|
452
|
-
current[lastKey] = value;
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
/**
|
|
456
|
-
* Delete nested field using dot notation
|
|
457
|
-
*/
|
|
458
|
-
deleteNestedField(obj, path) {
|
|
459
|
-
const keys = path.split('.');
|
|
460
|
-
const lastKey = keys.pop();
|
|
461
|
-
let current = obj;
|
|
462
|
-
for (const key of keys) {
|
|
463
|
-
if (!current || !(key in current))
|
|
464
|
-
return;
|
|
465
|
-
current = current[key];
|
|
466
|
-
}
|
|
467
|
-
if (current && typeof current === 'object') {
|
|
468
|
-
delete current[lastKey];
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
/**
|
|
472
|
-
* Extract minimal fields for different resource types
|
|
473
|
-
*/
|
|
474
|
-
extractMinimalFields(data) {
|
|
475
|
-
// Common minimal fields across all resource types
|
|
476
|
-
const commonFields = ['id', 'name', 'title', 'state', 'status'];
|
|
477
|
-
if (data.pull_request_id || (data.id && data.source && data.destination)) {
|
|
478
|
-
// Pull request minimal fields
|
|
479
|
-
return this.includeOnlyFields(data, [
|
|
480
|
-
'pull_request_id', 'id', 'title', 'state', 'author.display_name', 'created_on', 'updated_on'
|
|
481
|
-
]);
|
|
482
|
-
}
|
|
483
|
-
if (data.path !== undefined || data.contents) {
|
|
484
|
-
// File/directory minimal fields
|
|
485
|
-
return this.includeOnlyFields(data, [
|
|
486
|
-
'path', 'name', 'type', 'size', 'total_items'
|
|
487
|
-
]);
|
|
488
|
-
}
|
|
489
|
-
if (data.name && (data.target || data.heads)) {
|
|
490
|
-
// Branch minimal fields
|
|
491
|
-
return this.includeOnlyFields(data, [
|
|
492
|
-
'name', 'target.hash', 'type', 'heads'
|
|
493
|
-
]);
|
|
494
|
-
}
|
|
495
|
-
if (data.hash || data.message) {
|
|
496
|
-
// Commit minimal fields
|
|
497
|
-
return this.includeOnlyFields(data, [
|
|
498
|
-
'hash', 'message', 'author.display_name', 'date'
|
|
499
|
-
]);
|
|
500
|
-
}
|
|
501
|
-
if (Array.isArray(data) && data.length > 0) {
|
|
502
|
-
// Array of items - apply minimal to each
|
|
503
|
-
return data.map(item => this.extractMinimalFields(item));
|
|
504
|
-
}
|
|
505
|
-
// Default minimal extraction for unknown types
|
|
506
|
-
const result = {};
|
|
507
|
-
for (const field of commonFields) {
|
|
508
|
-
if (data[field] !== undefined) {
|
|
509
|
-
result[field] = data[field];
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
return Object.keys(result).length > 0 ? result : data;
|
|
513
|
-
}
|
|
514
|
-
/**
|
|
515
|
-
* Extract summary fields for different resource types
|
|
516
|
-
*/
|
|
517
|
-
extractSummaryFields(data) {
|
|
518
|
-
if (data.pull_request_id || (data.id && data.source && data.destination)) {
|
|
519
|
-
// Pull request summary
|
|
520
|
-
return this.includeOnlyFields(data, [
|
|
521
|
-
'pull_request_id', 'id', 'title', 'description', 'state', 'author',
|
|
522
|
-
'reviewers', 'created_on', 'updated_on', 'source.branch.name', 'destination.branch.name'
|
|
523
|
-
]);
|
|
524
|
-
}
|
|
525
|
-
if (data.path !== undefined || data.contents) {
|
|
526
|
-
// File/directory summary
|
|
527
|
-
return this.includeOnlyFields(data, [
|
|
528
|
-
'path', 'branch', 'contents', 'total_items', 'size', 'mimeType'
|
|
529
|
-
]);
|
|
530
|
-
}
|
|
531
|
-
if (data.name && (data.target || data.heads)) {
|
|
532
|
-
// Branch summary
|
|
533
|
-
return this.includeOnlyFields(data, [
|
|
534
|
-
'name', 'target', 'heads', 'type'
|
|
535
|
-
]);
|
|
536
|
-
}
|
|
537
|
-
if (data.hash || data.message) {
|
|
538
|
-
// Commit summary
|
|
539
|
-
return this.includeOnlyFields(data, [
|
|
540
|
-
'hash', 'message', 'author', 'date', 'parents'
|
|
541
|
-
]);
|
|
542
|
-
}
|
|
543
|
-
if (data.files && Array.isArray(data.files)) {
|
|
544
|
-
// Diff summary
|
|
545
|
-
return this.includeOnlyFields(data, [
|
|
546
|
-
'files', 'stats', 'description'
|
|
547
|
-
]);
|
|
548
|
-
}
|
|
549
|
-
if (Array.isArray(data) && data.length > 0) {
|
|
550
|
-
// Array of items - apply summary to each
|
|
551
|
-
return data.map(item => this.extractSummaryFields(item));
|
|
552
|
-
}
|
|
553
|
-
return data;
|
|
554
|
-
}
|
|
555
|
-
/**
|
|
556
|
-
* Extract metadata fields only
|
|
557
|
-
*/
|
|
558
|
-
extractMetadataFields(data) {
|
|
559
|
-
const metadataFields = [
|
|
560
|
-
'id', 'name', 'title', 'description', 'state', 'status', 'type',
|
|
561
|
-
'created_on', 'updated_on', 'author.display_name', 'author.uuid',
|
|
562
|
-
'size', 'mimeType', 'branch', 'hash', 'pull_request_id'
|
|
563
|
-
];
|
|
564
|
-
if (Array.isArray(data) && data.length > 0) {
|
|
565
|
-
// Array of items - apply metadata to each
|
|
566
|
-
return data.map(item => this.extractMetadataFields(item));
|
|
567
|
-
}
|
|
568
|
-
return this.includeOnlyFields(data, metadataFields);
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
//# sourceMappingURL=handlers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.js","sourceRoot":"","sources":["../../src/resources/handlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAMzD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,OAAO,gBAAgB;IAIjB;IACA;IACA;IACA;IACA;IACA;IARF,cAAc,CAAiB;IAEvC,YACU,SAA6B,EAC7B,mBAAwC,EACxC,cAA8B,EAC9B,YAA0B,EAC1B,cAA8B,EAC9B,cAA8B;QAL9B,cAAS,GAAT,SAAS,CAAoB;QAC7B,wBAAmB,GAAnB,mBAAmB,CAAqB;QACxC,mBAAc,GAAd,cAAc,CAAgB;QAC9B,iBAAY,GAAZ,YAAY,CAAc;QAC1B,mBAAc,GAAd,cAAc,CAAgB;QAC9B,mBAAc,GAAd,cAAc,CAAgB;QAEtC,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC;IAC7C,CAAC;IAED;;OAEG;IACK,gBAAgB,CAAC,GAAW;QAClC,OAAO,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,kBAAkB,CAAC,GAAW;QAClC,OAAO,CAAC,KAAK,CAAC,sDAAsD,GAAG,EAAE,CAAC,CAAC;QAE3E,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAI,CAAC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C,eAAe;YACf,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE;gBAClC,OAAO,EAAE,OAAO,EAAE,aAAa;aAChC,CAAC,CAAC;QACL,CAAC;QAED,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3C,yCAAyC;YACzC,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC;QAC3D,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACK,qBAAqB,CAAC,IAAS;QACrC,MAAM,cAAc,GAAG;YACrB,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM;YAC/D,YAAY,EAAE,YAAY,EAAE,qBAAqB,EAAE,aAAa;YAChE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,iBAAiB;SACxD,CAAC;QAEF,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3C,0CAA0C;YAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC;QAC5D,CAAC;QAED,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;IACtD,CAAC;CACF"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Handles schema-related resource requests
|
|
3
|
-
*/
|
|
4
|
-
export declare class SchemaHandlers {
|
|
5
|
-
/**
|
|
6
|
-
* Handle schema index resource request
|
|
7
|
-
* NOTE: This method is deprecated. The schema index is now handled as a static resource in index.ts
|
|
8
|
-
* This is kept for backwards compatibility but may be removed in future versions.
|
|
9
|
-
*/
|
|
10
|
-
handleSchemaIndex(params: Record<string, any>): Promise<{
|
|
11
|
-
uri: string;
|
|
12
|
-
mimeType: string;
|
|
13
|
-
text: string;
|
|
14
|
-
}>;
|
|
15
|
-
/**
|
|
16
|
-
* Handle resource schema request
|
|
17
|
-
*/
|
|
18
|
-
handleResourceSchema(uri: string, resourceType: string, params: Record<string, any>): Promise<{
|
|
19
|
-
uri: string;
|
|
20
|
-
mimeType: string;
|
|
21
|
-
text: string;
|
|
22
|
-
}>;
|
|
23
|
-
/**
|
|
24
|
-
* Handle field schema request
|
|
25
|
-
*/
|
|
26
|
-
handleFieldSchema(uri: string, resourceType: string, fieldName: string, params: Record<string, any>): Promise<{
|
|
27
|
-
uri: string;
|
|
28
|
-
mimeType: string;
|
|
29
|
-
text: string;
|
|
30
|
-
}>;
|
|
31
|
-
/**
|
|
32
|
-
* Handle validation schema request
|
|
33
|
-
*/
|
|
34
|
-
handleValidationSchema(uri: string, resourceType: string, params: Record<string, any>): Promise<{
|
|
35
|
-
uri: string;
|
|
36
|
-
mimeType: string;
|
|
37
|
-
text: string;
|
|
38
|
-
}>;
|
|
39
|
-
/**
|
|
40
|
-
* Parse schema URI and route to appropriate handler
|
|
41
|
-
*/
|
|
42
|
-
handleSchemaResource(uri: string): Promise<any>;
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=schema-handlers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema-handlers.d.ts","sourceRoot":"","sources":["../../src/resources/schema-handlers.ts"],"names":[],"mappings":"AAaA;;GAEG;AACH,qBAAa,cAAc;IAEzB;;;;OAIG;IACG,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;;;IAgBnD;;OAEG;IACG,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;;;IAsEzF;;OAEG;IACG,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;;;IA2BzG;;OAEG;IACG,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;;;IA0B3F;;OAEG;IACG,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;CAoDtD"}
|