@rishibhushan/jenkins-mcp-server 1.0.5 → 1.0.6

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/bin/jenkins-mcp.js +50 -56
  2. package/package.json +2 -1
@@ -162,81 +162,75 @@ function dependenciesInstalled(pipPath) {
162
162
  */
163
163
  function installDependencies(venvPath) {
164
164
  const { pip } = getVenvPaths(venvPath);
165
+ const wheelsPath = path.join(projectRoot, 'wheels');
165
166
  const requirementsPath = path.join(projectRoot, 'requirements.txt');
166
167
 
167
- if (!fs.existsSync(requirementsPath)) {
168
- error('requirements.txt not found');
169
- console.error(`Expected at: ${requirementsPath}`);
170
- process.exit(1);
171
- }
172
-
173
- log('Installing Python dependencies...', 'yellow');
174
- log('This may take a minute...', 'blue');
175
-
176
- // Build pip install command with proxy-friendly options
177
- const pipArgs = ['install', '-r', requirementsPath];
178
-
179
- // Add proxy-friendly options to handle corporate networks
180
- const proxyFriendlyArgs = [
181
- '--trusted-host', 'pypi.org',
182
- '--trusted-host', 'pypi.python.org',
183
- '--trusted-host', 'files.pythonhosted.org'
184
- ];
185
-
186
- // Add proxy if environment variable is set
187
- const proxy = process.env.HTTP_PROXY || process.env.http_proxy ||
188
- process.env.HTTPS_PROXY || process.env.https_proxy;
189
-
190
- if (proxy) {
191
- log(`Using proxy: ${proxy}`, 'blue');
192
- pipArgs.push('--proxy', proxy);
193
- }
168
+ console.error('Installing Python dependencies...');
169
+
170
+ // Check if wheels directory exists (pre-packaged wheels)
171
+ if (fs.existsSync(wheelsPath)) {
172
+ console.error('Using pre-packaged wheels (no internet required)...');
173
+
174
+ // Install from local wheels (fast, no network needed)
175
+ const installReqs = spawnSync(pip, [
176
+ 'install',
177
+ '--no-index', // Don't use PyPI
178
+ '--find-links', wheelsPath, // Use local wheels
179
+ '-r', requirementsPath
180
+ ], {
181
+ cwd: projectRoot,
182
+ stdio: 'inherit'
183
+ });
194
184
 
195
- // Add all proxy-friendly args
196
- pipArgs.push(...proxyFriendlyArgs);
185
+ if (installReqs.status !== 0) {
186
+ error('Failed to install from wheels');
187
+ process.exit(1);
188
+ }
189
+ } else {
190
+ // Fallback to normal install with proxy support
191
+ console.error('Downloading from PyPI...');
192
+ const pipArgs = ['install', '-r', requirementsPath];
193
+
194
+ const proxyFriendlyArgs = [
195
+ '--trusted-host', 'pypi.org',
196
+ '--trusted-host', 'pypi.python.org',
197
+ '--trusted-host', 'files.pythonhosted.org'
198
+ ];
199
+
200
+ const proxy = process.env.HTTP_PROXY || process.env.http_proxy;
201
+ if (proxy) {
202
+ pipArgs.push('--proxy', proxy);
203
+ }
204
+ pipArgs.push(...proxyFriendlyArgs);
197
205
 
198
- // Install requirements
199
- const installReqs = spawnSync(pip, pipArgs, {
200
- cwd: projectRoot,
201
- stdio: 'inherit'
202
- });
206
+ const installReqs = spawnSync(pip, pipArgs, {
207
+ cwd: projectRoot,
208
+ stdio: 'inherit'
209
+ });
203
210
 
204
- if (installReqs.status !== 0) {
205
- error('Failed to install dependencies from requirements.txt');
206
- console.error('\nTroubleshooting:');
207
- console.error(' 1. Check your internet connection');
208
- console.error(' 2. If behind a proxy, set HTTP_PROXY/HTTPS_PROXY env vars');
209
- console.error(' 3. Try manually: .venv/bin/pip install -r requirements.txt');
210
- process.exit(1);
211
+ if (installReqs.status !== 0) {
212
+ error('Failed to install dependencies');
213
+ process.exit(1);
214
+ }
211
215
  }
212
216
 
213
- log('✓ Requirements installed', 'green');
214
-
215
- // Install the package itself in editable mode
216
- log('Installing jenkins-mcp-server package...', 'yellow');
217
+ console.error('✓ Requirements installed');
217
218
 
219
+ // Install package itself
220
+ console.error('Installing jenkins-mcp-server package...');
218
221
  const packageArgs = ['install', '-e', '.'];
219
222
 
220
- // Add same proxy-friendly options
221
- if (proxy) {
222
- packageArgs.push('--proxy', proxy);
223
- }
224
- packageArgs.push(...proxyFriendlyArgs);
225
-
226
223
  const installPkg = spawnSync(pip, packageArgs, {
227
224
  cwd: projectRoot,
228
225
  stdio: 'inherit'
229
226
  });
230
227
 
231
228
  if (installPkg.status !== 0) {
232
- error('Failed to install jenkins-mcp-server package');
233
- console.error('\nTroubleshooting:');
234
- console.error(' 1. Ensure pyproject.toml or setup.py exists');
235
- console.error(' 2. Try manually: .venv/bin/pip install -e .');
229
+ error('Failed to install package');
236
230
  process.exit(1);
237
231
  }
238
232
 
239
- log('✓ Package installed', 'green');
233
+ console.error('✓ Package installed');
240
234
  }
241
235
 
242
236
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rishibhushan/jenkins-mcp-server",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "AI-enabled Jenkins automation via Model Context Protocol (MCP)",
5
5
  "main": "bin/jenkins-mcp.js",
6
6
  "bin": {
@@ -15,6 +15,7 @@
15
15
  "bin/",
16
16
  "src/",
17
17
  "requirements.txt",
18
+ "wheels/",
18
19
  "README.md",
19
20
  "LICENSE"
20
21
  ],