tdecollab 0.2.3 → 0.3.0
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/LICENSE +21 -0
- package/README.md +53 -257
- package/dist/{chunk-UH2YGKTB.js → chunk-6AFNYE7N.js} +10 -170
- package/dist/chunk-6AFNYE7N.js.map +1 -0
- package/dist/{chunk-2HLUO2TQ.js → chunk-GMC75YB2.js} +130 -19
- package/dist/chunk-GMC75YB2.js.map +1 -0
- package/dist/{image-downloader-IY2A3R5N.js → chunk-JBDK5WP3.js} +2 -1
- package/dist/chunk-JI2YUE7N.js +172 -0
- package/dist/chunk-JI2YUE7N.js.map +1 -0
- package/dist/cli.js +19 -13
- package/dist/cli.js.map +1 -1
- package/dist/image-downloader-VKPGS3TY.js +8 -0
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/server-M353VF2O.js +10 -0
- package/dist/server-M353VF2O.js.map +1 -0
- package/dist/tui/index.js +2754 -0
- package/dist/tui/index.js.map +1 -0
- package/package.json +21 -3
- package/dist/chunk-2HLUO2TQ.js.map +0 -1
- package/dist/chunk-UH2YGKTB.js.map +0 -1
- package/dist/cli.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/server-GLKCDDKS.js +0 -9
- /package/dist/{image-downloader-IY2A3R5N.js.map → chunk-JBDK5WP3.js.map} +0 -0
- /package/dist/{server-GLKCDDKS.js.map → image-downloader-VKPGS3TY.js.map} +0 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
// tools/jira/api/transition.ts
|
|
2
|
+
var JiraTransitionApi = class {
|
|
3
|
+
constructor(client) {
|
|
4
|
+
this.client = client;
|
|
5
|
+
}
|
|
6
|
+
async getTransitions(issueKey) {
|
|
7
|
+
const response = await this.client.get(`/rest/api/2/issue/${issueKey}/transitions`);
|
|
8
|
+
return response.data.transitions;
|
|
9
|
+
}
|
|
10
|
+
async doTransition(issueKey, transitionId, fields) {
|
|
11
|
+
const data = {
|
|
12
|
+
transition: { id: transitionId }
|
|
13
|
+
};
|
|
14
|
+
if (fields) {
|
|
15
|
+
data.fields = fields;
|
|
16
|
+
}
|
|
17
|
+
await this.client.post(`/rest/api/2/issue/${issueKey}/transitions`, data);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
// tools/jira/api/comment.ts
|
|
22
|
+
var JiraCommentApi = class {
|
|
23
|
+
constructor(client) {
|
|
24
|
+
this.client = client;
|
|
25
|
+
}
|
|
26
|
+
async getComments(issueKey, startAt = 0, maxResults = 50) {
|
|
27
|
+
const response = await this.client.get(`/rest/api/2/issue/${issueKey}/comment`, {
|
|
28
|
+
params: { startAt, maxResults }
|
|
29
|
+
});
|
|
30
|
+
return response.data;
|
|
31
|
+
}
|
|
32
|
+
async addComment(issueKey, body) {
|
|
33
|
+
const response = await this.client.post(`/rest/api/2/issue/${issueKey}/comment`, { body });
|
|
34
|
+
return response.data;
|
|
35
|
+
}
|
|
36
|
+
async updateComment(issueKey, commentId, body) {
|
|
37
|
+
const response = await this.client.put(
|
|
38
|
+
`/rest/api/2/issue/${issueKey}/comment/${commentId}`,
|
|
39
|
+
{ body }
|
|
40
|
+
);
|
|
41
|
+
return response.data;
|
|
42
|
+
}
|
|
43
|
+
async deleteComment(issueKey, commentId) {
|
|
44
|
+
await this.client.delete(`/rest/api/2/issue/${issueKey}/comment/${commentId}`);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
// tools/jira/api/project.ts
|
|
49
|
+
var JiraProjectApi = class {
|
|
50
|
+
constructor(client) {
|
|
51
|
+
this.client = client;
|
|
52
|
+
}
|
|
53
|
+
async getProjects() {
|
|
54
|
+
const response = await this.client.get("/rest/api/2/project");
|
|
55
|
+
return response.data;
|
|
56
|
+
}
|
|
57
|
+
async getProject(projectKey) {
|
|
58
|
+
const response = await this.client.get(`/rest/api/2/project/${projectKey}`);
|
|
59
|
+
return response.data;
|
|
60
|
+
}
|
|
61
|
+
async getBoards(projectKeyOrId, type) {
|
|
62
|
+
const params = {};
|
|
63
|
+
if (projectKeyOrId) params.projectKeyOrId = projectKeyOrId;
|
|
64
|
+
if (type) params.type = type;
|
|
65
|
+
const response = await this.client.get("/rest/agile/1.0/board", { params });
|
|
66
|
+
return response.data;
|
|
67
|
+
}
|
|
68
|
+
async getSprints(boardId, state) {
|
|
69
|
+
const params = {};
|
|
70
|
+
if (state) params.state = state;
|
|
71
|
+
const response = await this.client.get(`/rest/agile/1.0/board/${boardId}/sprint`, {
|
|
72
|
+
params
|
|
73
|
+
});
|
|
74
|
+
return response.data;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
// tools/gitlab/api/project.ts
|
|
79
|
+
var GitlabProjectApi = class {
|
|
80
|
+
constructor(client) {
|
|
81
|
+
this.client = client;
|
|
82
|
+
}
|
|
83
|
+
async getProjects(params) {
|
|
84
|
+
const response = await this.client.get("/projects", {
|
|
85
|
+
params: {
|
|
86
|
+
search: params?.search,
|
|
87
|
+
owned: params?.owned,
|
|
88
|
+
membership: params?.membership,
|
|
89
|
+
per_page: params?.perPage || 20
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
return response.data;
|
|
93
|
+
}
|
|
94
|
+
async getProject(projectId) {
|
|
95
|
+
const response = await this.client.get(`/projects/${encodeURIComponent(projectId)}`);
|
|
96
|
+
return response.data;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
// tools/gitlab/api/branch.ts
|
|
101
|
+
var GitlabBranchApi = class {
|
|
102
|
+
constructor(client) {
|
|
103
|
+
this.client = client;
|
|
104
|
+
}
|
|
105
|
+
async getBranches(projectId, params) {
|
|
106
|
+
const response = await this.client.get(`/projects/${projectId}/repository/branches`, {
|
|
107
|
+
params: {
|
|
108
|
+
search: params?.search,
|
|
109
|
+
per_page: params?.perPage || 20
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
return response.data;
|
|
113
|
+
}
|
|
114
|
+
async getBranch(projectId, branchName) {
|
|
115
|
+
const response = await this.client.get(
|
|
116
|
+
`/projects/${projectId}/repository/branches/${encodeURIComponent(branchName)}`
|
|
117
|
+
);
|
|
118
|
+
return response.data;
|
|
119
|
+
}
|
|
120
|
+
async createBranch(projectId, branchName, ref) {
|
|
121
|
+
const response = await this.client.post(`/projects/${projectId}/repository/branches`, {
|
|
122
|
+
branch: branchName,
|
|
123
|
+
ref
|
|
124
|
+
});
|
|
125
|
+
return response.data;
|
|
126
|
+
}
|
|
127
|
+
async deleteBranch(projectId, branchName) {
|
|
128
|
+
await this.client.delete(
|
|
129
|
+
`/projects/${projectId}/repository/branches/${encodeURIComponent(branchName)}`
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
// tools/gitlab/api/repository.ts
|
|
135
|
+
var GitlabRepositoryApi = class {
|
|
136
|
+
constructor(client) {
|
|
137
|
+
this.client = client;
|
|
138
|
+
}
|
|
139
|
+
async getFile(projectId, filePath, ref) {
|
|
140
|
+
const encodedPath = encodeURIComponent(filePath);
|
|
141
|
+
const response = await this.client.get(
|
|
142
|
+
`/projects/${projectId}/repository/files/${encodedPath}`,
|
|
143
|
+
{ params: { ref: ref || "HEAD" } }
|
|
144
|
+
);
|
|
145
|
+
const file = response.data;
|
|
146
|
+
if (file.encoding === "base64") {
|
|
147
|
+
file.content = Buffer.from(file.content, "base64").toString("utf-8");
|
|
148
|
+
}
|
|
149
|
+
return file;
|
|
150
|
+
}
|
|
151
|
+
async getTree(projectId, params) {
|
|
152
|
+
const response = await this.client.get(`/projects/${projectId}/repository/tree`, {
|
|
153
|
+
params: {
|
|
154
|
+
path: params?.path,
|
|
155
|
+
ref: params?.ref,
|
|
156
|
+
recursive: params?.recursive,
|
|
157
|
+
per_page: params?.perPage || 100
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
return response.data;
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
export {
|
|
165
|
+
JiraTransitionApi,
|
|
166
|
+
JiraCommentApi,
|
|
167
|
+
JiraProjectApi,
|
|
168
|
+
GitlabProjectApi,
|
|
169
|
+
GitlabBranchApi,
|
|
170
|
+
GitlabRepositoryApi
|
|
171
|
+
};
|
|
172
|
+
//# sourceMappingURL=chunk-JI2YUE7N.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../tools/jira/api/transition.ts","../tools/jira/api/comment.ts","../tools/jira/api/project.ts","../tools/gitlab/api/project.ts","../tools/gitlab/api/branch.ts","../tools/gitlab/api/repository.ts"],"sourcesContent":["import { AxiosInstance } from 'axios';\nimport { JiraTransition } from '../types.js';\n\nexport class JiraTransitionApi {\n constructor(private client: AxiosInstance) {}\n\n async getTransitions(issueKey: string): Promise<JiraTransition[]> {\n const response = await this.client.get(`/rest/api/2/issue/${issueKey}/transitions`);\n return response.data.transitions;\n }\n\n async doTransition(\n issueKey: string,\n transitionId: string,\n fields?: Record<string, unknown>,\n ): Promise<void> {\n const data: Record<string, unknown> = {\n transition: { id: transitionId },\n };\n if (fields) {\n data.fields = fields;\n }\n await this.client.post(`/rest/api/2/issue/${issueKey}/transitions`, data);\n }\n}\n","import { AxiosInstance } from 'axios';\nimport { JiraComment } from '../types.js';\n\nexport class JiraCommentApi {\n constructor(private client: AxiosInstance) {}\n\n async getComments(\n issueKey: string,\n startAt = 0,\n maxResults = 50,\n ): Promise<{ comments: JiraComment[]; total: number; startAt: number; maxResults: number }> {\n const response = await this.client.get(`/rest/api/2/issue/${issueKey}/comment`, {\n params: { startAt, maxResults },\n });\n return response.data;\n }\n\n async addComment(issueKey: string, body: string): Promise<JiraComment> {\n const response = await this.client.post(`/rest/api/2/issue/${issueKey}/comment`, { body });\n return response.data;\n }\n\n async updateComment(issueKey: string, commentId: string, body: string): Promise<JiraComment> {\n const response = await this.client.put(\n `/rest/api/2/issue/${issueKey}/comment/${commentId}`,\n { body },\n );\n return response.data;\n }\n\n async deleteComment(issueKey: string, commentId: string): Promise<void> {\n await this.client.delete(`/rest/api/2/issue/${issueKey}/comment/${commentId}`);\n }\n}\n","import { AxiosInstance } from 'axios';\nimport { JiraProject, JiraBoard, JiraSprint } from '../types.js';\n\nexport class JiraProjectApi {\n constructor(private client: AxiosInstance) {}\n\n async getProjects(): Promise<JiraProject[]> {\n const response = await this.client.get('/rest/api/2/project');\n return response.data;\n }\n\n async getProject(projectKey: string): Promise<JiraProject> {\n const response = await this.client.get(`/rest/api/2/project/${projectKey}`);\n return response.data;\n }\n\n async getBoards(\n projectKeyOrId?: string,\n type?: string,\n ): Promise<{ values: JiraBoard[]; total: number }> {\n const params: Record<string, string> = {};\n if (projectKeyOrId) params.projectKeyOrId = projectKeyOrId;\n if (type) params.type = type;\n const response = await this.client.get('/rest/agile/1.0/board', { params });\n return response.data;\n }\n\n async getSprints(\n boardId: number,\n state?: string,\n ): Promise<{ values: JiraSprint[]; total: number }> {\n const params: Record<string, string> = {};\n if (state) params.state = state;\n const response = await this.client.get(`/rest/agile/1.0/board/${boardId}/sprint`, {\n params,\n });\n return response.data;\n }\n}\n","import { AxiosInstance } from 'axios';\nimport { GitlabProject } from '../types.js';\n\nexport class GitlabProjectApi {\n constructor(private client: AxiosInstance) {}\n\n async getProjects(params?: {\n search?: string;\n owned?: boolean;\n membership?: boolean;\n perPage?: number;\n }): Promise<GitlabProject[]> {\n const response = await this.client.get('/projects', {\n params: {\n search: params?.search,\n owned: params?.owned,\n membership: params?.membership,\n per_page: params?.perPage || 20,\n },\n });\n return response.data;\n }\n\n async getProject(projectId: number | string): Promise<GitlabProject> {\n const response = await this.client.get(`/projects/${encodeURIComponent(projectId)}`);\n return response.data;\n }\n}\n","import { AxiosInstance } from 'axios';\nimport { GitlabBranch } from '../types.js';\n\nexport class GitlabBranchApi {\n constructor(private client: AxiosInstance) {}\n\n async getBranches(\n projectId: number,\n params?: { search?: string; perPage?: number },\n ): Promise<GitlabBranch[]> {\n const response = await this.client.get(`/projects/${projectId}/repository/branches`, {\n params: {\n search: params?.search,\n per_page: params?.perPage || 20,\n },\n });\n return response.data;\n }\n\n async getBranch(projectId: number, branchName: string): Promise<GitlabBranch> {\n const response = await this.client.get(\n `/projects/${projectId}/repository/branches/${encodeURIComponent(branchName)}`,\n );\n return response.data;\n }\n\n async createBranch(\n projectId: number,\n branchName: string,\n ref: string,\n ): Promise<GitlabBranch> {\n const response = await this.client.post(`/projects/${projectId}/repository/branches`, {\n branch: branchName,\n ref,\n });\n return response.data;\n }\n\n async deleteBranch(projectId: number, branchName: string): Promise<void> {\n await this.client.delete(\n `/projects/${projectId}/repository/branches/${encodeURIComponent(branchName)}`,\n );\n }\n}\n","import { AxiosInstance } from 'axios';\nimport { GitlabRepositoryFile, GitlabTreeEntry } from '../types.js';\n\nexport class GitlabRepositoryApi {\n constructor(private client: AxiosInstance) {}\n\n async getFile(\n projectId: number,\n filePath: string,\n ref?: string,\n ): Promise<GitlabRepositoryFile> {\n const encodedPath = encodeURIComponent(filePath);\n const response = await this.client.get(\n `/projects/${projectId}/repository/files/${encodedPath}`,\n { params: { ref: ref || 'HEAD' } },\n );\n const file: GitlabRepositoryFile = response.data;\n // Base64 디코딩\n if (file.encoding === 'base64') {\n file.content = Buffer.from(file.content, 'base64').toString('utf-8');\n }\n return file;\n }\n\n async getTree(\n projectId: number,\n params?: { path?: string; ref?: string; recursive?: boolean; perPage?: number },\n ): Promise<GitlabTreeEntry[]> {\n const response = await this.client.get(`/projects/${projectId}/repository/tree`, {\n params: {\n path: params?.path,\n ref: params?.ref,\n recursive: params?.recursive,\n per_page: params?.perPage || 100,\n },\n });\n return response.data;\n }\n}\n"],"mappings":";AAGO,IAAM,oBAAN,MAAwB;AAAA,EAC3B,YAAoB,QAAuB;AAAvB;AAAA,EAAwB;AAAA,EAE5C,MAAM,eAAe,UAA6C;AAC9D,UAAM,WAAW,MAAM,KAAK,OAAO,IAAI,qBAAqB,QAAQ,cAAc;AAClF,WAAO,SAAS,KAAK;AAAA,E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AAAA,MACjC;AAAA,IACJ,CAAC;AACD,WAAO,SAAS;AAAA,EACpB;AACJ;","names":[]}
|
package/dist/cli.js
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
GitlabBranchApi,
|
|
4
|
+
GitlabProjectApi,
|
|
5
|
+
GitlabRepositoryApi,
|
|
6
|
+
JiraCommentApi,
|
|
7
|
+
JiraProjectApi,
|
|
8
|
+
JiraTransitionApi
|
|
9
|
+
} from "./chunk-JI2YUE7N.js";
|
|
2
10
|
import {
|
|
3
11
|
ConfluenceContentApi,
|
|
4
12
|
ConfluenceSearchApi,
|
|
5
13
|
ConfluenceSpaceApi,
|
|
6
|
-
GitlabBranchApi,
|
|
7
14
|
GitlabMergeRequestApi,
|
|
8
15
|
GitlabPipelineApi,
|
|
9
|
-
GitlabProjectApi,
|
|
10
|
-
GitlabRepositoryApi,
|
|
11
|
-
JiraCommentApi,
|
|
12
16
|
JiraIssueApi,
|
|
13
|
-
JiraProjectApi,
|
|
14
17
|
JiraSearchApi,
|
|
15
|
-
JiraTransitionApi,
|
|
16
18
|
MarkdownToStorageConverter,
|
|
17
19
|
StorageToMarkdownConverter,
|
|
18
20
|
createConfluenceClient,
|
|
@@ -21,7 +23,7 @@ import {
|
|
|
21
23
|
loadConfluenceConfig,
|
|
22
24
|
loadGitlabConfig,
|
|
23
25
|
loadJiraConfig
|
|
24
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-6AFNYE7N.js";
|
|
25
27
|
import {
|
|
26
28
|
logger
|
|
27
29
|
} from "./chunk-IFYMZLQI.js";
|
|
@@ -71,7 +73,7 @@ function registerConfluenceCommands(program2) {
|
|
|
71
73
|
if (page.body?.storage?.value) {
|
|
72
74
|
let imageUrlMap;
|
|
73
75
|
if (options.downloadImages) {
|
|
74
|
-
const { ImageDownloader } = await import("./image-downloader-
|
|
76
|
+
const { ImageDownloader } = await import("./image-downloader-VKPGS3TY.js");
|
|
75
77
|
let baseDir = process.cwd();
|
|
76
78
|
if (options.output) {
|
|
77
79
|
baseDir = path.dirname(path.resolve(process.cwd(), options.output));
|
|
@@ -828,6 +830,14 @@ function registerGitlabCommands(program2) {
|
|
|
828
830
|
// tools/cli.ts
|
|
829
831
|
import dotenv from "dotenv";
|
|
830
832
|
dotenv.config();
|
|
833
|
+
var args = process.argv;
|
|
834
|
+
if (args[2] === "--") {
|
|
835
|
+
args = [args[0], args[1], ...args.slice(3)];
|
|
836
|
+
}
|
|
837
|
+
if (args.length <= 2) {
|
|
838
|
+
await import("./tui/index.js");
|
|
839
|
+
process.exit(0);
|
|
840
|
+
}
|
|
831
841
|
var program = new Command();
|
|
832
842
|
program.name("tdecollab").description("TDE Collaboration CLI").version("0.1.0", "-V, --version", "\uBC84\uC804 \uC815\uBCF4 \uCD9C\uB825").option("-v, --verbose", "\uC0C1\uC138 \uB85C\uADF8 \uCD9C\uB825").option("-d, --debug", "\uB514\uBC84\uADF8 \uB85C\uADF8 \uCD9C\uB825").enablePositionalOptions().hook("preAction", (thisCommand) => {
|
|
833
843
|
const opts = program.opts();
|
|
@@ -840,12 +850,8 @@ registerConfluenceCommands(program);
|
|
|
840
850
|
registerJiraCommands(program);
|
|
841
851
|
registerGitlabCommands(program);
|
|
842
852
|
program.command("mcp").description("Run MCP Server").action(async () => {
|
|
843
|
-
const { runServer } = await import("./server-
|
|
853
|
+
const { runServer } = await import("./server-M353VF2O.js");
|
|
844
854
|
await runServer();
|
|
845
855
|
});
|
|
846
|
-
var args = process.argv;
|
|
847
|
-
if (args[2] === "--") {
|
|
848
|
-
args = [args[0], args[1], ...args.slice(3)];
|
|
849
|
-
}
|
|
850
856
|
program.parse(args);
|
|
851
857
|
//# sourceMappingURL=cli.js.map
|