com.jimuwd.xian.registry-proxy 1.0.14 → 1.0.15
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/dist/index.js +1 -3
- package/package.json +1 -1
- package/src/index.ts +1 -3
package/dist/index.js
CHANGED
|
@@ -199,7 +199,6 @@ export async function startProxyServer(proxyConfigPath, localYarnConfigPath, glo
|
|
|
199
199
|
if (contentType.includes('application/json')) {
|
|
200
200
|
try {
|
|
201
201
|
const data = await successResponse.json();
|
|
202
|
-
console.debug('JSON response data:', JSON.stringify(data, null, 2));
|
|
203
202
|
if (data.versions) {
|
|
204
203
|
const proxyBase = `${proxyConfig.https ? 'https' : 'http'}://${req.headers.host || 'localhost:' + proxyPort}${basePath}`;
|
|
205
204
|
console.debug(`Rewriting tarball URLs with proxy base: ${proxyBase}`);
|
|
@@ -215,7 +214,6 @@ export async function startProxyServer(proxyConfigPath, localYarnConfigPath, glo
|
|
|
215
214
|
}
|
|
216
215
|
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
217
216
|
const jsonResponse = JSON.stringify(data);
|
|
218
|
-
console.debug(`Sending JSON response: ${jsonResponse}`);
|
|
219
217
|
res.end(jsonResponse);
|
|
220
218
|
}
|
|
221
219
|
catch (e) {
|
|
@@ -286,7 +284,7 @@ export async function startProxyServer(proxyConfigPath, localYarnConfigPath, glo
|
|
|
286
284
|
}
|
|
287
285
|
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
288
286
|
const [, , configPath, localYarnPath, globalYarnPath, port] = process.argv;
|
|
289
|
-
console.
|
|
287
|
+
console.log(`Starting server with args: configPath=${configPath}, localYarnPath=${localYarnPath}, globalYarnPath=${globalYarnPath}, port=${port}`);
|
|
290
288
|
startProxyServer(configPath, localYarnPath, globalYarnPath, parseInt(port, 10) || 0).catch(err => {
|
|
291
289
|
console.error('Failed to start server:', err);
|
|
292
290
|
process.exit(1);
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -238,7 +238,6 @@ export async function startProxyServer(
|
|
|
238
238
|
if (contentType.includes('application/json')) {
|
|
239
239
|
try {
|
|
240
240
|
const data = await successResponse.json() as PackageData;
|
|
241
|
-
console.debug('JSON response data:', JSON.stringify(data, null, 2));
|
|
242
241
|
if (data.versions) {
|
|
243
242
|
const proxyBase = `${proxyConfig.https ? 'https' : 'http'}://${req.headers.host || 'localhost:' + proxyPort}${basePath}`;
|
|
244
243
|
console.debug(`Rewriting tarball URLs with proxy base: ${proxyBase}`);
|
|
@@ -254,7 +253,6 @@ export async function startProxyServer(
|
|
|
254
253
|
}
|
|
255
254
|
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
256
255
|
const jsonResponse = JSON.stringify(data);
|
|
257
|
-
console.debug(`Sending JSON response: ${jsonResponse}`);
|
|
258
256
|
res.end(jsonResponse);
|
|
259
257
|
} catch (e) {
|
|
260
258
|
console.error('Failed to parse JSON response:', e);
|
|
@@ -324,7 +322,7 @@ export async function startProxyServer(
|
|
|
324
322
|
|
|
325
323
|
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
326
324
|
const [,, configPath, localYarnPath, globalYarnPath, port] = process.argv;
|
|
327
|
-
console.
|
|
325
|
+
console.log(`Starting server with args: configPath=${configPath}, localYarnPath=${localYarnPath}, globalYarnPath=${globalYarnPath}, port=${port}`);
|
|
328
326
|
startProxyServer(
|
|
329
327
|
configPath,
|
|
330
328
|
localYarnPath,
|