@zereight/mcp-gitlab 2.3.11 → 2.3.12-next.163
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.ko.md +1 -1
- package/README.md +1 -1
- package/README.pt-BR.md +1 -1
- package/README.zh-CN.md +1 -1
- package/build/config.js +2 -0
- package/build/index.js +2 -2
- package/build/utils/version-check.js +23 -167
- package/package.json +3 -3
package/README.ko.md
CHANGED
|
@@ -154,7 +154,7 @@ PAT, OAuth, 읽기 전용 모드, 동적 API URL, 원격 인증을 지원하며
|
|
|
154
154
|
| **적합한 경우** | AI 에이전트 워크플로우 | 엔터프라이즈 멀티 인스턴스 / 그룹형 도구 | GitLab에 내장, 별도 설치 없음 |
|
|
155
155
|
| **도구 모델** | 278개 도구: toolset 275개 + `execute_graphql` + `discover_tools` + `help` | ~50–60개 `browse_*` / `manage_*` 그룹 도구 | HTTP 헤더로 고르는 toolset |
|
|
156
156
|
| **MR 리뷰** | 2단계 배치 diff | 서버마다 다름 | `get_merge_request`에 diffs |
|
|
157
|
-
| **Node.js** | >=
|
|
157
|
+
| **Node.js** | >=20.0.0 | 보통 >=24 | stdio는 `mcp-remote`, Node.js 20+ |
|
|
158
158
|
| **라이선스** | MIT | 서버마다 다름 | GitLab의 일부 |
|
|
159
159
|
|
|
160
160
|
### tools/list 크기 (2026-10-24 실측)
|
package/README.md
CHANGED
|
@@ -160,7 +160,7 @@ Supports PAT, OAuth, read-only mode, dynamic API URLs, and remote authorization
|
|
|
160
160
|
| **Best for** | AI agent workflows | Enterprise multi-instance / grouped tools | Built into GitLab, no separate install |
|
|
161
161
|
| **Tool model** | 278 tools: 275 in toolsets + `execute_graphql` + `discover_tools` + `help` | ~50–60 grouped `browse_*` / `manage_*` tools | Toolsets chosen with an HTTP header |
|
|
162
162
|
| **MR review** | 2-step batched diff | Varies | `get_merge_request` with diffs |
|
|
163
|
-
| **Node.js** | >=
|
|
163
|
+
| **Node.js** | >=20.0.0 | Often >=24 | Node.js 20+ for stdio via `mcp-remote` |
|
|
164
164
|
| **License** | MIT | Varies | Part of GitLab |
|
|
165
165
|
|
|
166
166
|
### tools/list size (measured 2026-10-24)
|
package/README.pt-BR.md
CHANGED
|
@@ -154,7 +154,7 @@ Suporta PAT, OAuth, modo somente leitura, URLs de API dinâmicas e autorização
|
|
|
154
154
|
| **Mais indicado para** | Workflows de agentes de IA | Múltiplas instâncias corporativas / ferramentas agrupadas | Integrado ao GitLab, sem instalação separada |
|
|
155
155
|
| **Modelo de ferramentas** | 278 ferramentas: 275 em toolsets + `execute_graphql` + `discover_tools` + `help` | ~50–60 ferramentas agrupadas `browse_*` / `manage_*` | Toolsets escolhidos por cabeçalho HTTP |
|
|
156
156
|
| **Revisão de MR** | Diff em lote em 2 etapas | Varia | `get_merge_request` com diffs |
|
|
157
|
-
| **Node.js** | >=
|
|
157
|
+
| **Node.js** | >=20.0.0 | Frequentemente >=24 | Node.js 20+ para stdio via `mcp-remote` |
|
|
158
158
|
| **Licença** | MIT | Varia | Parte do GitLab |
|
|
159
159
|
|
|
160
160
|
### Tamanho do tools/list (medido em 2026-10-24)
|
package/README.zh-CN.md
CHANGED
|
@@ -154,7 +154,7 @@ GitLab 合并请求、议题和流水线走此 MCP(@zereight/mcp-gitlab)。
|
|
|
154
154
|
| **更适合** | AI 代理工作流 | 企业多实例 / 分组工具 | 内置于 GitLab,无需单独安装 |
|
|
155
155
|
| **工具模型** | 278 个工具:toolset 中 275 个 + `execute_graphql` + `discover_tools` + `help` | ~50–60 个 `browse_*` / `manage_*` 分组工具 | 用 HTTP 头选择 toolset |
|
|
156
156
|
| **MR 审查** | 两步批量 diff | 因服务器而异 | `get_merge_request` 带 diffs |
|
|
157
|
-
| **Node.js** | >=
|
|
157
|
+
| **Node.js** | >=20.0.0 | 通常 >=24 | stdio 经 `mcp-remote`,需要 Node.js 20+ |
|
|
158
158
|
| **许可证** | MIT | 因服务器而异 | GitLab 的一部分 |
|
|
159
159
|
|
|
160
160
|
### tools/list 体积(2026-10-24 实测)
|
package/build/config.js
CHANGED
|
@@ -62,6 +62,8 @@ export const USE_MILESTONE = USE_MILESTONE_RAW === "true";
|
|
|
62
62
|
export const USE_PIPELINE_RAW = getConfig("use-pipeline", "USE_PIPELINE");
|
|
63
63
|
export const USE_PIPELINE = USE_PIPELINE_RAW === "true";
|
|
64
64
|
export const GITLAB_DISABLE_VERSION_CHECK = getConfig("disable-version-check", "GITLAB_DISABLE_VERSION_CHECK") === "true";
|
|
65
|
+
/** https registry the startup version check queries instead of registry.npmjs.org. */
|
|
66
|
+
export const GITLAB_VERSION_CHECK_REGISTRY = process.env.GITLAB_VERSION_CHECK_REGISTRY;
|
|
65
67
|
// ---------------------------------------------------------------------------
|
|
66
68
|
// Tool filtering
|
|
67
69
|
// ---------------------------------------------------------------------------
|
package/build/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { cliArgs, getConfig, ENABLE_DYNAMIC_API_URL, ENABLE_DYNAMIC_PROJECT_SCOPE, ENABLE_STRICT_PROJECT_SCOPE, GITLAB_AUTH_COOKIE_PATH, GITLAB_ALLOW_UNAUTHENTICATED_TOOL_DISCOVERY, GITLAB_CA_CERT_PATH, GITLAB_JOB_TOKEN, GITLAB_MCP_OAUTH, GITLAB_MCP_REQUEST_BODY_LIMIT, GITLAB_OAUTH_APP_ID, GITLAB_OAUTH_SCOPES, GITLAB_OAUTH_CALLBACK_PROXY, GITLAB_OAUTH_ALLOWED_REDIRECT_URIS_RAW, GITLAB_PERSONAL_ACCESS_TOKEN, GITLAB_POOL_MAX_SIZE, GITLAB_DISABLE_VERSION_CHECK, GITLAB_MASKING_ENABLED, GITLAB_MASKING_CONFIG, GITLAB_MASKING_POLICY_FILE, GITLAB_MASKING_WORKSPACE_DIR, GITLAB_PERMISSION_MODE, GITLAB_TOOLSETS_RAW, GITLAB_TOOLS_RAW, HOST, HTTP_PROXY, HTTPS_PROXY, IS_OLD, MCP_SERVER_URL, NODE_TLS_REJECT_UNAUTHORIZED, NO_PROXY, OAUTH_DISABLE_REFRESH_TOKEN, OAUTH_STATELESS_CLIENT_TTL_SECONDS, OAUTH_STATELESS_MODE, OAUTH_STATELESS_PENDING_TTL_SECONDS, OAUTH_STATELESS_SESSION_TTL_SECONDS, OAUTH_STATELESS_STORED_TTL_SECONDS, PORT, REMOTE_AUTHORIZATION, SESSION_TIMEOUT_SECONDS, SSE, STREAMABLE_HTTP, MCP_TRUST_PROXY, USE_GITLAB_WIKI, USE_MILESTONE, USE_OAUTH, USE_PIPELINE, GITLAB_TOOL_POLICY_APPROVE_RAW, GITLAB_TOOL_POLICY_HIDDEN_RAW, GITLAB_OAUTH_ALLOWED_GROUPS, GITLAB_MCP_COMPACT_RESULTS, GITLAB_MCP_COMPACT_RESULT_CHARS, GITLAB_MCP_COMPACT_TOOL_NAMES, GITLAB_TOOL_PROFILE, GITLAB_DOWNLOAD_DIR, buildDeprecatedEnvInput, } from "./config.js";
|
|
2
|
+
import { cliArgs, getConfig, ENABLE_DYNAMIC_API_URL, ENABLE_DYNAMIC_PROJECT_SCOPE, ENABLE_STRICT_PROJECT_SCOPE, GITLAB_AUTH_COOKIE_PATH, GITLAB_ALLOW_UNAUTHENTICATED_TOOL_DISCOVERY, GITLAB_CA_CERT_PATH, GITLAB_JOB_TOKEN, GITLAB_MCP_OAUTH, GITLAB_MCP_REQUEST_BODY_LIMIT, GITLAB_OAUTH_APP_ID, GITLAB_OAUTH_SCOPES, GITLAB_OAUTH_CALLBACK_PROXY, GITLAB_OAUTH_ALLOWED_REDIRECT_URIS_RAW, GITLAB_PERSONAL_ACCESS_TOKEN, GITLAB_POOL_MAX_SIZE, GITLAB_DISABLE_VERSION_CHECK, GITLAB_VERSION_CHECK_REGISTRY, GITLAB_MASKING_ENABLED, GITLAB_MASKING_CONFIG, GITLAB_MASKING_POLICY_FILE, GITLAB_MASKING_WORKSPACE_DIR, GITLAB_PERMISSION_MODE, GITLAB_TOOLSETS_RAW, GITLAB_TOOLS_RAW, HOST, HTTP_PROXY, HTTPS_PROXY, IS_OLD, MCP_SERVER_URL, NODE_TLS_REJECT_UNAUTHORIZED, NO_PROXY, OAUTH_DISABLE_REFRESH_TOKEN, OAUTH_STATELESS_CLIENT_TTL_SECONDS, OAUTH_STATELESS_MODE, OAUTH_STATELESS_PENDING_TTL_SECONDS, OAUTH_STATELESS_SESSION_TTL_SECONDS, OAUTH_STATELESS_STORED_TTL_SECONDS, PORT, REMOTE_AUTHORIZATION, SESSION_TIMEOUT_SECONDS, SSE, STREAMABLE_HTTP, MCP_TRUST_PROXY, USE_GITLAB_WIKI, USE_MILESTONE, USE_OAUTH, USE_PIPELINE, GITLAB_TOOL_POLICY_APPROVE_RAW, GITLAB_TOOL_POLICY_HIDDEN_RAW, GITLAB_OAUTH_ALLOWED_GROUPS, GITLAB_MCP_COMPACT_RESULTS, GITLAB_MCP_COMPACT_RESULT_CHARS, GITLAB_MCP_COMPACT_TOOL_NAMES, GITLAB_TOOL_PROFILE, GITLAB_DOWNLOAD_DIR, buildDeprecatedEnvInput, } from "./config.js";
|
|
3
3
|
import { getDeprecatedEnvWarnings } from "./deprecated-env.js";
|
|
4
4
|
/** True when the server is running in remote/network mode (SSE or StreamableHTTP transport). */
|
|
5
5
|
const IS_REMOTE = SSE || STREAMABLE_HTTP;
|
|
@@ -13006,7 +13006,7 @@ async function runServer() {
|
|
|
13006
13006
|
await initializeServerByTransportMode(transportMode);
|
|
13007
13007
|
if (!GITLAB_DISABLE_VERSION_CHECK) {
|
|
13008
13008
|
// Fire-and-forget: logs to stderr only, never blocks or fails startup.
|
|
13009
|
-
void checkForNewVersion(SERVER_VERSION).then(latestVersion => {
|
|
13009
|
+
void checkForNewVersion(SERVER_VERSION, undefined, GITLAB_VERSION_CHECK_REGISTRY).then(latestVersion => {
|
|
13010
13010
|
if (latestVersion) {
|
|
13011
13011
|
logger.warn(`A newer version of @zereight/mcp-gitlab is available: v${latestVersion} (current: v${SERVER_VERSION}). ` +
|
|
13012
13012
|
`Upgrade with \`brew upgrade zereight-mcp-gitlab\`, \`npx -y @zereight/mcp-gitlab@latest\`, or \`npm install -g @zereight/mcp-gitlab\`. ` +
|
|
@@ -1,26 +1,22 @@
|
|
|
1
|
-
import { execFile } from "node:child_process";
|
|
2
|
-
import { readFile } from "node:fs/promises";
|
|
3
|
-
import { homedir } from "node:os";
|
|
4
|
-
import { join } from "node:path";
|
|
5
|
-
import { promisify } from "node:util";
|
|
6
|
-
const execFileAsync = promisify(execFile);
|
|
7
1
|
const DEFAULT_NPM_REGISTRY = "https://registry.npmjs.org";
|
|
8
2
|
const PACKAGE_LATEST_PATH = "@zereight/mcp-gitlab/latest";
|
|
9
3
|
const RELEASE_VERSION_PATTERN = /^\d+\.\d+\.\d+$/;
|
|
10
|
-
const AUTH_TOKEN_KEY_PATTERN = /^\/\/[-A-Za-z0-9.]+(?::\d+)?(?:\/[-A-Za-z0-9._]+)*\/:_authToken$/;
|
|
11
|
-
const NPMRC_ENV_PATTERN = /\$\{([A-Za-z_]\w*)\}/g;
|
|
12
4
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* string like "?tenant=a" would
|
|
17
|
-
* request reaching the intended
|
|
5
|
+
* An operator-set registry (`GITLAB_VERSION_CHECK_REGISTRY`) is only used when
|
|
6
|
+
* it parses as an https URL with a hostname and no userinfo. A query or
|
|
7
|
+
* fragment is rejected too: the package path is appended to this value with
|
|
8
|
+
* plain string concatenation below, so a query string like "?tenant=a" would
|
|
9
|
+
* swallow the appended path instead of the request reaching the intended
|
|
10
|
+
* endpoint.
|
|
18
11
|
*/
|
|
19
12
|
function isUsableRegistryUrl(registry) {
|
|
20
13
|
try {
|
|
21
14
|
const parsed = new URL(registry);
|
|
22
|
-
return ((
|
|
15
|
+
return (!/[?#]/.test(registry) &&
|
|
16
|
+
parsed.protocol === "https:" &&
|
|
23
17
|
parsed.hostname !== "" &&
|
|
18
|
+
parsed.username === "" &&
|
|
19
|
+
parsed.password === "" &&
|
|
24
20
|
parsed.search === "" &&
|
|
25
21
|
parsed.hash === "");
|
|
26
22
|
}
|
|
@@ -28,141 +24,6 @@ function isUsableRegistryUrl(registry) {
|
|
|
28
24
|
return false;
|
|
29
25
|
}
|
|
30
26
|
}
|
|
31
|
-
/** Runs `npm config get <key>` and returns the trimmed value, or null if unavailable/unset. */
|
|
32
|
-
async function npmConfigGet(key) {
|
|
33
|
-
try {
|
|
34
|
-
// On Windows "npm" resolves to npm.cmd, which execFile can't launch
|
|
35
|
-
// directly — route through cmd.exe instead. Command and args are fixed
|
|
36
|
-
// literals (only `key` varies, and only with our own constant inputs), so
|
|
37
|
-
// this doesn't open a shell-injection surface.
|
|
38
|
-
const isWindows = process.platform === "win32";
|
|
39
|
-
const { stdout } = await execFileAsync(isWindows ? "cmd.exe" : "npm", isWindows ? ["/d", "/s", "/c", "npm", "config", "get", key] : ["config", "get", key], { timeout: 5000, windowsHide: true });
|
|
40
|
-
const value = stdout.trim().replace(/\/$/, "");
|
|
41
|
-
return value && value !== "undefined" ? value : null;
|
|
42
|
-
}
|
|
43
|
-
catch {
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Resolves the npm registry to use, honoring `.npmrc` / `npm_config_registry`.
|
|
49
|
-
* Package-scoped config (`@zereight:registry`) takes precedence, matching how
|
|
50
|
-
* npm itself resolves the registry for a scoped package like this one.
|
|
51
|
-
*/
|
|
52
|
-
async function resolveConfiguredRegistry() {
|
|
53
|
-
const scoped = await npmConfigGet("@zereight:registry");
|
|
54
|
-
if (scoped)
|
|
55
|
-
return scoped;
|
|
56
|
-
const unscoped = await npmConfigGet("registry");
|
|
57
|
-
if (unscoped)
|
|
58
|
-
return unscoped;
|
|
59
|
-
return DEFAULT_NPM_REGISTRY;
|
|
60
|
-
}
|
|
61
|
-
function authTokenConfigKeys(registry) {
|
|
62
|
-
if (!isUsableRegistryUrl(registry))
|
|
63
|
-
return [];
|
|
64
|
-
const parsed = new URL(registry);
|
|
65
|
-
if (parsed.protocol !== "https:")
|
|
66
|
-
return [];
|
|
67
|
-
const keys = [];
|
|
68
|
-
let path = parsed.pathname.replace(/\/$/, "");
|
|
69
|
-
while (true) {
|
|
70
|
-
const key = `//${parsed.host}${path}/:_authToken`;
|
|
71
|
-
if (AUTH_TOKEN_KEY_PATTERN.test(key))
|
|
72
|
-
keys.push(key);
|
|
73
|
-
if (path === "")
|
|
74
|
-
break;
|
|
75
|
-
const slash = path.lastIndexOf("/");
|
|
76
|
-
path = slash <= 0 ? "" : path.slice(0, slash);
|
|
77
|
-
}
|
|
78
|
-
return keys;
|
|
79
|
-
}
|
|
80
|
-
async function npmrcCandidatePaths() {
|
|
81
|
-
const paths = [];
|
|
82
|
-
const configuredGlobal = process.env.NPM_CONFIG_GLOBALCONFIG;
|
|
83
|
-
const globalconfig = configuredGlobal || (await npmConfigGet("globalconfig"));
|
|
84
|
-
if (globalconfig)
|
|
85
|
-
paths.push(globalconfig);
|
|
86
|
-
paths.push(process.env.NPM_CONFIG_USERCONFIG ?? join(homedir(), ".npmrc"));
|
|
87
|
-
paths.push(join(process.cwd(), ".npmrc"));
|
|
88
|
-
return paths;
|
|
89
|
-
}
|
|
90
|
-
function unquoteNpmrcValue(value) {
|
|
91
|
-
if (value.length >= 2) {
|
|
92
|
-
const start = value[0];
|
|
93
|
-
const end = value[value.length - 1];
|
|
94
|
-
if ((start === '"' && end === '"') || (start === "'" && end === "'")) {
|
|
95
|
-
return value.slice(1, -1);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return value;
|
|
99
|
-
}
|
|
100
|
-
function expandNpmrcEnv(value) {
|
|
101
|
-
return value.replace(NPMRC_ENV_PATTERN, (_match, name) => process.env[name] ?? "");
|
|
102
|
-
}
|
|
103
|
-
function parseNpmrc(content) {
|
|
104
|
-
const entries = new Map();
|
|
105
|
-
for (const rawLine of content.split(/\r?\n/)) {
|
|
106
|
-
const line = rawLine.trim();
|
|
107
|
-
if (!line || line.startsWith("#") || line.startsWith(";"))
|
|
108
|
-
continue;
|
|
109
|
-
const separator = line.indexOf("=");
|
|
110
|
-
if (separator <= 0)
|
|
111
|
-
continue;
|
|
112
|
-
const key = line.slice(0, separator).trim();
|
|
113
|
-
const value = expandNpmrcEnv(unquoteNpmrcValue(line.slice(separator + 1).trim()));
|
|
114
|
-
entries.set(key, value);
|
|
115
|
-
}
|
|
116
|
-
return entries;
|
|
117
|
-
}
|
|
118
|
-
async function readNpmrcFile(path) {
|
|
119
|
-
try {
|
|
120
|
-
return parseNpmrc(await readFile(path, "utf8"));
|
|
121
|
-
}
|
|
122
|
-
catch {
|
|
123
|
-
return new Map();
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Reads `//host[:port][/path]/:_authToken` from npmrc files, then walks up
|
|
128
|
-
* parent paths to `//host/:_authToken`, matching npm-registry-fetch.
|
|
129
|
-
* `npm config get` refuses to print protected auth keys, so this parses the
|
|
130
|
-
* files npm itself would consult instead of asking the CLI.
|
|
131
|
-
*/
|
|
132
|
-
async function resolveRegistryAuthToken(registry) {
|
|
133
|
-
const keys = authTokenConfigKeys(registry);
|
|
134
|
-
if (keys.length === 0)
|
|
135
|
-
return null;
|
|
136
|
-
const merged = new Map();
|
|
137
|
-
for (const path of await npmrcCandidatePaths()) {
|
|
138
|
-
const entries = await readNpmrcFile(path);
|
|
139
|
-
for (const [entryKey, value] of entries)
|
|
140
|
-
merged.set(entryKey, value);
|
|
141
|
-
}
|
|
142
|
-
for (const key of keys) {
|
|
143
|
-
const token = merged.get(key);
|
|
144
|
-
if (token)
|
|
145
|
-
return token;
|
|
146
|
-
}
|
|
147
|
-
return null;
|
|
148
|
-
}
|
|
149
|
-
function requestIsUnderRegistry(registry, requestUrl) {
|
|
150
|
-
try {
|
|
151
|
-
const parsedRegistry = new URL(registry);
|
|
152
|
-
const parsedRequest = new URL(requestUrl);
|
|
153
|
-
if (parsedRegistry.protocol !== "https:" || parsedRequest.protocol !== "https:")
|
|
154
|
-
return false;
|
|
155
|
-
if (parsedRegistry.origin !== parsedRequest.origin)
|
|
156
|
-
return false;
|
|
157
|
-
const basePath = parsedRegistry.pathname.replace(/\/$/, "");
|
|
158
|
-
if (basePath === "")
|
|
159
|
-
return true;
|
|
160
|
-
return parsedRequest.pathname === basePath || parsedRequest.pathname.startsWith(`${basePath}/`);
|
|
161
|
-
}
|
|
162
|
-
catch {
|
|
163
|
-
return false;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
27
|
function readVersionField(data) {
|
|
167
28
|
if (typeof data !== "object" || data === null)
|
|
168
29
|
return null;
|
|
@@ -183,24 +44,19 @@ export function isNewerVersion(candidate, current) {
|
|
|
183
44
|
}
|
|
184
45
|
return false;
|
|
185
46
|
}
|
|
186
|
-
|
|
47
|
+
/**
|
|
48
|
+
* Looks up the latest published version anonymously: no `.npmrc`, npm config,
|
|
49
|
+
* or credentials are consulted. `registry` replaces the public registry only
|
|
50
|
+
* when it is a usable https URL.
|
|
51
|
+
*/
|
|
52
|
+
export async function fetchLatestVersion(fetchFn = fetch, timeoutMs = 3000, registry) {
|
|
187
53
|
try {
|
|
188
|
-
const
|
|
189
|
-
const
|
|
190
|
-
const
|
|
191
|
-
const headers = { accept: "application/json" };
|
|
192
|
-
const init = {
|
|
54
|
+
const configured = registry?.trim().replace(/\/$/, "");
|
|
55
|
+
const base = configured && isUsableRegistryUrl(configured) ? configured : DEFAULT_NPM_REGISTRY;
|
|
56
|
+
const response = await fetchFn(`${base}/${PACKAGE_LATEST_PATH}`, {
|
|
193
57
|
signal: AbortSignal.timeout(timeoutMs),
|
|
194
|
-
headers,
|
|
195
|
-
};
|
|
196
|
-
const token = await resolveRegistryAuthToken(registry).catch(() => null);
|
|
197
|
-
if (token && requestIsUnderRegistry(registry, registryLatestUrl)) {
|
|
198
|
-
headers.authorization = `Bearer ${token}`;
|
|
199
|
-
// Never follow redirects with a token attached — fetch would otherwise
|
|
200
|
-
// forward Authorization to a different origin.
|
|
201
|
-
init.redirect = "error";
|
|
202
|
-
}
|
|
203
|
-
const response = await fetchFn(registryLatestUrl, init);
|
|
58
|
+
headers: { accept: "application/json" },
|
|
59
|
+
});
|
|
204
60
|
if (!response.ok)
|
|
205
61
|
return null;
|
|
206
62
|
return readVersionField(await response.json());
|
|
@@ -212,10 +68,10 @@ export async function fetchLatestVersion(fetchFn = fetch, timeoutMs = 3000, reso
|
|
|
212
68
|
}
|
|
213
69
|
}
|
|
214
70
|
/** Returns the latest published version when it is newer than `currentVersion`, otherwise null. */
|
|
215
|
-
export async function checkForNewVersion(currentVersion, fetchFn = fetch) {
|
|
71
|
+
export async function checkForNewVersion(currentVersion, fetchFn = fetch, registry) {
|
|
216
72
|
if (!RELEASE_VERSION_PATTERN.test(currentVersion))
|
|
217
73
|
return null;
|
|
218
|
-
const latest = await fetchLatestVersion(fetchFn);
|
|
74
|
+
const latest = await fetchLatestVersion(fetchFn, 3000, registry);
|
|
219
75
|
if (!latest || !RELEASE_VERSION_PATTERN.test(latest))
|
|
220
76
|
return null;
|
|
221
77
|
return isNewerVersion(latest, currentVersion) ? latest : null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zereight/mcp-gitlab",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.12-next.163",
|
|
4
4
|
"mcpName": "io.github.zereight/gitlab-mcp",
|
|
5
5
|
"description": "GitLab MCP server for projects, merge requests, issues, pipelines, wiki, releases, and more",
|
|
6
6
|
"keywords": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
|
-
"node": ">=
|
|
44
|
+
"node": ">=20.0.0",
|
|
45
45
|
"npm": ">=9.0.0"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"socks-proxy-agent": "^8.0.5",
|
|
90
90
|
"tldts": "^6.1.86",
|
|
91
91
|
"tough-cookie": "^5.1.2",
|
|
92
|
-
"undici": "^6.
|
|
92
|
+
"undici": "^6.29.1",
|
|
93
93
|
"zod": "^4.6.5"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|