@jagadeesh52423/atlassian-mcp-server 1.0.1 → 1.0.3
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 +92 -45
- package/dist/clients/base-client.d.ts +26 -0
- package/dist/clients/base-client.d.ts.map +1 -0
- package/dist/clients/base-client.js +58 -0
- package/dist/clients/base-client.js.map +1 -0
- package/dist/clients/bitbucket-client.d.ts +17 -0
- package/dist/clients/bitbucket-client.d.ts.map +1 -0
- package/dist/clients/bitbucket-client.js +36 -0
- package/dist/clients/bitbucket-client.js.map +1 -0
- package/dist/clients/confluence-client.d.ts +8 -0
- package/dist/clients/confluence-client.d.ts.map +1 -0
- package/dist/clients/confluence-client.js +16 -0
- package/dist/clients/confluence-client.js.map +1 -0
- package/dist/clients/index.d.ts +5 -0
- package/dist/clients/index.d.ts.map +1 -0
- package/dist/clients/index.js +5 -0
- package/dist/clients/index.js.map +1 -0
- package/dist/clients/jira-client.d.ts +8 -0
- package/dist/clients/jira-client.d.ts.map +1 -0
- package/dist/clients/jira-client.js +16 -0
- package/dist/clients/jira-client.js.map +1 -0
- package/dist/constants.d.ts +67 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +78 -0
- package/dist/constants.js.map +1 -0
- package/dist/error-handler.d.ts +77 -0
- package/dist/error-handler.d.ts.map +1 -0
- package/dist/error-handler.js +135 -0
- package/dist/error-handler.js.map +1 -0
- package/dist/formatters/adf-formatter.d.ts +25 -0
- package/dist/formatters/adf-formatter.d.ts.map +1 -0
- package/dist/formatters/adf-formatter.js +609 -0
- package/dist/formatters/adf-formatter.js.map +1 -0
- package/dist/formatters/index.d.ts +2 -0
- package/dist/formatters/index.d.ts.map +1 -0
- package/dist/formatters/index.js +2 -0
- package/dist/formatters/index.js.map +1 -0
- package/dist/handlers/bitbucket-handlers.d.ts +94 -0
- package/dist/handlers/bitbucket-handlers.d.ts.map +1 -0
- package/dist/handlers/bitbucket-handlers.js +251 -0
- package/dist/handlers/bitbucket-handlers.js.map +1 -0
- package/dist/handlers/confluence-handlers.d.ts +84 -0
- package/dist/handlers/confluence-handlers.d.ts.map +1 -0
- package/dist/handlers/confluence-handlers.js +255 -0
- package/dist/handlers/confluence-handlers.js.map +1 -0
- package/dist/handlers/index.d.ts +4 -0
- package/dist/handlers/index.d.ts.map +1 -0
- package/dist/handlers/index.js +4 -0
- package/dist/handlers/index.js.map +1 -0
- package/dist/handlers/jira-handlers.d.ts +153 -0
- package/dist/handlers/jira-handlers.d.ts.map +1 -0
- package/dist/handlers/jira-handlers.js +577 -0
- package/dist/handlers/jira-handlers.js.map +1 -0
- package/dist/index.js +147 -2536
- package/dist/index.js.map +1 -1
- package/dist/services/bitbucket.d.ts +11 -1
- package/dist/services/bitbucket.d.ts.map +1 -1
- package/dist/services/bitbucket.js +78 -0
- package/dist/services/bitbucket.js.map +1 -1
- package/dist/services/confluence.d.ts.map +1 -1
- package/dist/services/confluence.js +5 -4
- package/dist/services/confluence.js.map +1 -1
- package/dist/services/jira.d.ts +4 -0
- package/dist/services/jira.d.ts.map +1 -1
- package/dist/services/jira.js +159 -24
- package/dist/services/jira.js.map +1 -1
- package/dist/tools/bitbucket-tools.d.ts +6 -0
- package/dist/tools/bitbucket-tools.d.ts.map +1 -0
- package/dist/tools/bitbucket-tools.js +386 -0
- package/dist/tools/bitbucket-tools.js.map +1 -0
- package/dist/tools/confluence-tools.d.ts +17 -0
- package/dist/tools/confluence-tools.d.ts.map +1 -0
- package/dist/tools/confluence-tools.js +337 -0
- package/dist/tools/confluence-tools.js.map +1 -0
- package/dist/tools/index.d.ts +8 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +15 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/jira-tools.d.ts +6 -0
- package/dist/tools/jira-tools.d.ts.map +1 -0
- package/dist/tools/jira-tools.js +656 -0
- package/dist/tools/jira-tools.js.map +1 -0
- package/dist/types.d.ts +23 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standard MCP tool response type
|
|
3
|
+
*/
|
|
4
|
+
export interface ToolResponse {
|
|
5
|
+
content: Array<{
|
|
6
|
+
type: string;
|
|
7
|
+
text: string;
|
|
8
|
+
}>;
|
|
9
|
+
isError?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Error context for building informative error messages
|
|
13
|
+
*/
|
|
14
|
+
export interface ErrorContext {
|
|
15
|
+
operation: string;
|
|
16
|
+
params?: Record<string, any>;
|
|
17
|
+
tip?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Creates a successful response with text content
|
|
21
|
+
*/
|
|
22
|
+
export declare function successResponse(text: string): ToolResponse;
|
|
23
|
+
/**
|
|
24
|
+
* Creates a successful response with JSON content
|
|
25
|
+
*/
|
|
26
|
+
export declare function jsonResponse(data: any): ToolResponse;
|
|
27
|
+
/**
|
|
28
|
+
* Creates an error response with detailed information
|
|
29
|
+
*/
|
|
30
|
+
export declare function errorResponse(error: any, context: ErrorContext): ToolResponse;
|
|
31
|
+
/**
|
|
32
|
+
* Wraps an async operation with standardized error handling
|
|
33
|
+
*/
|
|
34
|
+
export declare function withErrorHandling<T>(operation: () => Promise<T>, context: ErrorContext, formatResult: (result: T) => ToolResponse): Promise<ToolResponse>;
|
|
35
|
+
/**
|
|
36
|
+
* Common error tips for different scenarios
|
|
37
|
+
*/
|
|
38
|
+
export declare const ERROR_TIPS: {
|
|
39
|
+
readonly CONFLUENCE_SEARCH: "Check your Confluence permissions and that the domain is accessible.";
|
|
40
|
+
readonly CONFLUENCE_PAGE_VIEW: "Check if the page ID exists and you have permission to view it.";
|
|
41
|
+
readonly CONFLUENCE_PAGE_CREATE: "Check if the space exists and you have permission to create pages in it.";
|
|
42
|
+
readonly CONFLUENCE_PAGE_EDIT: "Check if the page exists, version is correct, and you have permission to edit it.";
|
|
43
|
+
readonly CONFLUENCE_SPACE: "Check your Confluence permissions and API access.";
|
|
44
|
+
readonly CONFLUENCE_ATTACHMENT: "Check if the page exists and you have permission to attach files.";
|
|
45
|
+
readonly CONFLUENCE_COMMENT: "Check if the page/comment exists and you have the appropriate permissions.";
|
|
46
|
+
readonly JIRA_SEARCH: "Check your JQL syntax and Jira permissions.";
|
|
47
|
+
readonly JIRA_ISSUE_VIEW: "Check if the issue key exists and you have permission to view it.";
|
|
48
|
+
readonly JIRA_ISSUE_CREATE: "Check if all required fields are provided and project exists.";
|
|
49
|
+
readonly JIRA_ISSUE_EDIT: "Check if the issue exists and you have permission to update it.";
|
|
50
|
+
readonly JIRA_COMMENT: "Check if the issue/comment exists and you have the appropriate permissions.";
|
|
51
|
+
readonly JIRA_TRANSITION: "Check if the transition ID is valid for this issue and you have permission to transition it.";
|
|
52
|
+
readonly JIRA_ATTACHMENT: "Check if the issue exists and file content is properly base64 encoded.";
|
|
53
|
+
readonly JIRA_LINK: "Check if both issues exist and the link type is valid. Use jira_get_link_types to see available link types.";
|
|
54
|
+
readonly JIRA_WORKLOG: "Check if the issue/worklog exists and you have permission.";
|
|
55
|
+
readonly JIRA_WATCHER: "Check if the issue and user exist, and you have permission.";
|
|
56
|
+
readonly JIRA_SUBTASK: "Check if the parent issue exists, the project allows sub-tasks, and you have permission to create issues.";
|
|
57
|
+
readonly BITBUCKET_REPO: "Check your Bitbucket permissions and API access.";
|
|
58
|
+
readonly BITBUCKET_REPO_VIEW: "Check if the repository exists and you have access to it.";
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Format helpers for common response patterns
|
|
62
|
+
*/
|
|
63
|
+
export declare const formatHelpers: {
|
|
64
|
+
/**
|
|
65
|
+
* Format a success message with optional details
|
|
66
|
+
*/
|
|
67
|
+
success(message: string, details?: Record<string, any>): string;
|
|
68
|
+
/**
|
|
69
|
+
* Format an issue creation success message
|
|
70
|
+
*/
|
|
71
|
+
issueCreated(issue: any, optionalFields?: Record<string, any>): string;
|
|
72
|
+
/**
|
|
73
|
+
* Format an issue update success message
|
|
74
|
+
*/
|
|
75
|
+
issueUpdated(issue: any, updatedFields: string[]): string;
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=error-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../src/error-handler.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAI1D;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,YAAY,CAIpD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,YAAY,GAAG,YAAY,CAsB7E;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,EACvC,SAAS,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAC3B,OAAO,EAAE,YAAY,EACrB,YAAY,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,YAAY,GACxC,OAAO,CAAC,YAAY,CAAC,CAOvB;AAED;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;CA0Bb,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,aAAa;IACxB;;OAEG;qBACc,MAAM,YAAY,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM;IAU/D;;OAEG;wBACiB,GAAG,mBAAmB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM;IAsBtE;;OAEG;wBACiB,GAAG,iBAAiB,MAAM,EAAE,GAAG,MAAM;CAe1D,CAAC"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { ICONS } from './constants.js';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a successful response with text content
|
|
4
|
+
*/
|
|
5
|
+
export function successResponse(text) {
|
|
6
|
+
return {
|
|
7
|
+
content: [{ type: 'text', text }],
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Creates a successful response with JSON content
|
|
12
|
+
*/
|
|
13
|
+
export function jsonResponse(data) {
|
|
14
|
+
return {
|
|
15
|
+
content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Creates an error response with detailed information
|
|
20
|
+
*/
|
|
21
|
+
export function errorResponse(error, context) {
|
|
22
|
+
const errorDetails = error.response?.data || error.message;
|
|
23
|
+
const paramsText = context.params
|
|
24
|
+
? Object.entries(context.params)
|
|
25
|
+
.map(([key, value]) => `- ${key}: ${value ?? 'none'}`)
|
|
26
|
+
.join('\n')
|
|
27
|
+
: '';
|
|
28
|
+
let text = `${ICONS.ERROR} ${context.operation}\n\n**Error Details:**\n${JSON.stringify(errorDetails, null, 2)}`;
|
|
29
|
+
if (paramsText) {
|
|
30
|
+
text += `\n\n**Request:**\n${paramsText}`;
|
|
31
|
+
}
|
|
32
|
+
if (context.tip) {
|
|
33
|
+
text += `\n\n**Tip:** ${context.tip}`;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
content: [{ type: 'text', text }],
|
|
37
|
+
isError: true,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Wraps an async operation with standardized error handling
|
|
42
|
+
*/
|
|
43
|
+
export async function withErrorHandling(operation, context, formatResult) {
|
|
44
|
+
try {
|
|
45
|
+
const result = await operation();
|
|
46
|
+
return formatResult(result);
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
return errorResponse(error, context);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Common error tips for different scenarios
|
|
54
|
+
*/
|
|
55
|
+
export const ERROR_TIPS = {
|
|
56
|
+
// Confluence
|
|
57
|
+
CONFLUENCE_SEARCH: 'Check your Confluence permissions and that the domain is accessible.',
|
|
58
|
+
CONFLUENCE_PAGE_VIEW: 'Check if the page ID exists and you have permission to view it.',
|
|
59
|
+
CONFLUENCE_PAGE_CREATE: 'Check if the space exists and you have permission to create pages in it.',
|
|
60
|
+
CONFLUENCE_PAGE_EDIT: 'Check if the page exists, version is correct, and you have permission to edit it.',
|
|
61
|
+
CONFLUENCE_SPACE: 'Check your Confluence permissions and API access.',
|
|
62
|
+
CONFLUENCE_ATTACHMENT: 'Check if the page exists and you have permission to attach files.',
|
|
63
|
+
CONFLUENCE_COMMENT: 'Check if the page/comment exists and you have the appropriate permissions.',
|
|
64
|
+
// Jira
|
|
65
|
+
JIRA_SEARCH: 'Check your JQL syntax and Jira permissions.',
|
|
66
|
+
JIRA_ISSUE_VIEW: 'Check if the issue key exists and you have permission to view it.',
|
|
67
|
+
JIRA_ISSUE_CREATE: 'Check if all required fields are provided and project exists.',
|
|
68
|
+
JIRA_ISSUE_EDIT: 'Check if the issue exists and you have permission to update it.',
|
|
69
|
+
JIRA_COMMENT: 'Check if the issue/comment exists and you have the appropriate permissions.',
|
|
70
|
+
JIRA_TRANSITION: 'Check if the transition ID is valid for this issue and you have permission to transition it.',
|
|
71
|
+
JIRA_ATTACHMENT: 'Check if the issue exists and file content is properly base64 encoded.',
|
|
72
|
+
JIRA_LINK: 'Check if both issues exist and the link type is valid. Use jira_get_link_types to see available link types.',
|
|
73
|
+
JIRA_WORKLOG: 'Check if the issue/worklog exists and you have permission.',
|
|
74
|
+
JIRA_WATCHER: 'Check if the issue and user exist, and you have permission.',
|
|
75
|
+
JIRA_SUBTASK: 'Check if the parent issue exists, the project allows sub-tasks, and you have permission to create issues.',
|
|
76
|
+
// Bitbucket
|
|
77
|
+
BITBUCKET_REPO: 'Check your Bitbucket permissions and API access.',
|
|
78
|
+
BITBUCKET_REPO_VIEW: 'Check if the repository exists and you have access to it.',
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Format helpers for common response patterns
|
|
82
|
+
*/
|
|
83
|
+
export const formatHelpers = {
|
|
84
|
+
/**
|
|
85
|
+
* Format a success message with optional details
|
|
86
|
+
*/
|
|
87
|
+
success(message, details) {
|
|
88
|
+
let text = `${ICONS.SUCCESS} ${message}`;
|
|
89
|
+
if (details) {
|
|
90
|
+
text += '\n\n' + Object.entries(details)
|
|
91
|
+
.map(([key, value]) => `**${key}:** ${value}`)
|
|
92
|
+
.join('\n');
|
|
93
|
+
}
|
|
94
|
+
return text;
|
|
95
|
+
},
|
|
96
|
+
/**
|
|
97
|
+
* Format an issue creation success message
|
|
98
|
+
*/
|
|
99
|
+
issueCreated(issue, optionalFields) {
|
|
100
|
+
const domain = process.env.JIRA_DOMAIN || process.env.ATLASSIAN_DOMAIN || 'your-domain.atlassian.net';
|
|
101
|
+
let text = `${ICONS.SUCCESS} **Jira Issue Created Successfully**
|
|
102
|
+
|
|
103
|
+
${ICONS.TICKET} **Issue Key:** ${issue.key}
|
|
104
|
+
${ICONS.SUMMARY} **Summary:** ${issue.summary}
|
|
105
|
+
${ICONS.STATUS} **Status:** ${issue.status}
|
|
106
|
+
${ICONS.DATE} **Created:** ${new Date(issue.created).toLocaleString()}`;
|
|
107
|
+
if (optionalFields) {
|
|
108
|
+
const fieldLines = Object.entries(optionalFields)
|
|
109
|
+
.filter(([_, value]) => value)
|
|
110
|
+
.map(([key, value]) => `${key}: ${value}`);
|
|
111
|
+
if (fieldLines.length > 0) {
|
|
112
|
+
text += '\n\n' + fieldLines.join('\n');
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
text += `\n\n${ICONS.LINK} **Issue URL:** [View Issue](https://${domain}/browse/${issue.key})`;
|
|
116
|
+
return text;
|
|
117
|
+
},
|
|
118
|
+
/**
|
|
119
|
+
* Format an issue update success message
|
|
120
|
+
*/
|
|
121
|
+
issueUpdated(issue, updatedFields) {
|
|
122
|
+
const domain = process.env.JIRA_DOMAIN || process.env.ATLASSIAN_DOMAIN || 'your-domain.atlassian.net';
|
|
123
|
+
let text = `${ICONS.SUCCESS} **Jira Issue Updated Successfully**
|
|
124
|
+
|
|
125
|
+
${ICONS.TICKET} **Issue Key:** ${issue.key}
|
|
126
|
+
${ICONS.STATUS} **Current Status:** ${issue.status}
|
|
127
|
+
${ICONS.DATE} **Last Updated:** ${new Date(issue.updated).toLocaleString()}`;
|
|
128
|
+
if (updatedFields.length > 0) {
|
|
129
|
+
text += `\n\n**Updated Fields:**\n${updatedFields.join('\n')}`;
|
|
130
|
+
}
|
|
131
|
+
text += `\n\n${ICONS.LINK} **Issue URL:** [View Issue](https://${domain}/browse/${issue.key})`;
|
|
132
|
+
return text;
|
|
133
|
+
},
|
|
134
|
+
};
|
|
135
|
+
//# sourceMappingURL=error-handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-handler.js","sourceRoot":"","sources":["../src/error-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAmBvC;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;KAClC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,IAAS;IACpC,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI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,CAAC,OAAO;;EAE7B,KAAK,CAAC,MAAM,mBAAmB,KAAK,CAAC,GAAG;EACxC,KAAK,CAAC,MAAM,wBAAwB,KAAK,CAAC,MAAM;EAChD,KAAK,CAAC,IAAI,sBAAsB,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC;QAEzE,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7B,IAAI,IAAI,4BAA4B,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACjE,CAAC;QAED,IAAI,IAAI,OAAO,KAAK,CAAC,IAAI,wCAAwC,MAAM,WAAW,KAAK,CAAC,GAAG,GAAG,CAAC;QAC/F,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ADF (Atlassian Document Format) Formatter
|
|
3
|
+
* Handles conversion between plain text/markdown and ADF format used by Jira API v3
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Extracts plain text from ADF (Atlassian Document Format) body
|
|
7
|
+
*/
|
|
8
|
+
export declare function extractTextFromADF(body: any): string;
|
|
9
|
+
/**
|
|
10
|
+
* Formats wiki markup to cleaner text
|
|
11
|
+
*/
|
|
12
|
+
export declare function formatWikiMarkup(text: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Parses inline formatting like **bold**, *italic*, `code`, {{code}}
|
|
15
|
+
*/
|
|
16
|
+
export declare function parseInlineFormatting(text: string): any[];
|
|
17
|
+
/**
|
|
18
|
+
* Enhanced description parser that converts text to proper ADF format
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseDescriptionToADF(description: string): any;
|
|
21
|
+
/**
|
|
22
|
+
* Convert description to wiki markup text format
|
|
23
|
+
*/
|
|
24
|
+
export declare function parseDescriptionToWikiMarkup(description: string): string;
|
|
25
|
+
//# sourceMappingURL=adf-formatter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adf-formatter.d.ts","sourceRoot":"","sources":["../../src/formatters/adf-formatter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM,CAqGpD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAqBrD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,EAAE,CAmHzD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,GAAG,CAgT9D;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CA6FxE"}
|