@zereight/mcp-gitlab 1.0.53 → 1.0.54

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.
Files changed (2) hide show
  1. package/build/index.js +16 -1
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -12,6 +12,9 @@ import { fileURLToPath } from "url";
12
12
  import { dirname } from "path";
13
13
  import fs from "fs";
14
14
  import path from "path";
15
+ // Add type imports for proxy agents
16
+ import { Agent } from "http";
17
+ import { Agent as HttpsAgent } from 'https';
15
18
  import { URL } from "url";
16
19
  import { GitLabForkSchema, GitLabReferenceSchema, GitLabRepositorySchema, GitLabIssueSchema, GitLabMergeRequestSchema, GitLabContentSchema, GitLabCreateUpdateFileResponseSchema, GitLabSearchResponseSchema, GitLabTreeSchema, GitLabCommitSchema, GitLabNamespaceSchema, GitLabNamespaceExistsResponseSchema, GitLabProjectSchema, CreateOrUpdateFileSchema, SearchRepositoriesSchema, CreateRepositorySchema, GetFileContentsSchema, PushFilesSchema, CreateIssueSchema, CreateMergeRequestSchema, ForkRepositorySchema, CreateBranchSchema, GitLabMergeRequestDiffSchema, GetMergeRequestSchema, GetMergeRequestDiffsSchema, UpdateMergeRequestSchema, ListIssuesSchema, GetIssueSchema, UpdateIssueSchema, DeleteIssueSchema, GitLabIssueLinkSchema, GitLabIssueWithLinkDetailsSchema, ListIssueLinksSchema, ListIssueDiscussionsSchema, GetIssueLinkSchema, CreateIssueLinkSchema, DeleteIssueLinkSchema, ListNamespacesSchema, GetNamespaceSchema, VerifyNamespaceSchema, GetProjectSchema, ListProjectsSchema, ListLabelsSchema, GetLabelSchema, CreateLabelSchema, UpdateLabelSchema, DeleteLabelSchema, CreateNoteSchema, CreateMergeRequestThreadSchema, ListGroupProjectsSchema, ListWikiPagesSchema, GetWikiPageSchema, CreateWikiPageSchema, UpdateWikiPageSchema, DeleteWikiPageSchema, GitLabWikiPageSchema, GetRepositoryTreeSchema, GitLabTreeItemSchema, GitLabPipelineSchema, GetPipelineSchema, ListPipelinesSchema, ListPipelineJobsSchema, CreatePipelineSchema, RetryPipelineSchema, CancelPipelineSchema,
17
20
  // pipeline job schemas
@@ -53,6 +56,16 @@ const USE_PIPELINE = process.env.USE_PIPELINE === "true";
53
56
  // Add proxy configuration
54
57
  const HTTP_PROXY = process.env.HTTP_PROXY;
55
58
  const HTTPS_PROXY = process.env.HTTPS_PROXY;
59
+ const NODE_TLS_REJECT_UNAUTHORIZED = process.env.NODE_TLS_REJECT_UNAUTHORIZED;
60
+ const GITLAB_CA_CERT_PATH = process.env.GITLAB_CA_CERT_PATH;
61
+ let sslOptions = undefined;
62
+ if (NODE_TLS_REJECT_UNAUTHORIZED === '0') {
63
+ sslOptions = { rejectUnauthorized: false };
64
+ }
65
+ else if (GITLAB_CA_CERT_PATH) {
66
+ const ca = fs.readFileSync(GITLAB_CA_CERT_PATH);
67
+ sslOptions = { ca };
68
+ }
56
69
  // Configure proxy agents if proxies are set
57
70
  let httpAgent = undefined;
58
71
  let httpsAgent = undefined;
@@ -69,9 +82,11 @@ if (HTTPS_PROXY) {
69
82
  httpsAgent = new SocksProxyAgent(HTTPS_PROXY);
70
83
  }
71
84
  else {
72
- httpsAgent = new HttpsProxyAgent(HTTPS_PROXY);
85
+ httpsAgent = new HttpsProxyAgent(HTTPS_PROXY, sslOptions);
73
86
  }
74
87
  }
88
+ httpsAgent = httpsAgent || new HttpsAgent(sslOptions);
89
+ httpAgent = httpAgent || new Agent();
75
90
  // Modify DEFAULT_HEADERS to include agent configuration
76
91
  const DEFAULT_HEADERS = {
77
92
  Accept: "application/json",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zereight/mcp-gitlab",
3
- "version": "1.0.53",
3
+ "version": "1.0.54",
4
4
  "description": "MCP server for using the GitLab API",
5
5
  "license": "MIT",
6
6
  "author": "zereight",