com.jimuwd.xian.registry-proxy 1.0.101 → 1.0.102

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/dist/index.js +3 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -226,7 +226,7 @@ async function writeResponseToDownstreamClient(registryInfo, targetUrl, resToDow
226
226
  const cleanup = () => {
227
227
  reqFromDownstreamClient.off('close', cleanup);
228
228
  logger.info(`Req from downstream client is closed, stop pipe from upstream ${targetUrl} to downstream client.`);
229
- upstreamResponse.body?.unpipe();
229
+ // upstreamResponse.body?.unpipe();
230
230
  };
231
231
  reqFromDownstreamClient.on('close', cleanup);
232
232
  reqFromDownstreamClient.on('end', () => logger.info("Req from downstream client ends."));
@@ -234,7 +234,7 @@ async function writeResponseToDownstreamClient(registryInfo, targetUrl, resToDow
234
234
  const cleanup0 = () => {
235
235
  resToDownstreamClient.off('close', cleanup0);
236
236
  logger.info(`Close connection to downstream client, upstream url is ${targetUrl}`);
237
- upstreamResponse.body?.unpipe();
237
+ // upstreamResponse.body?.unpipe();
238
238
  };
239
239
  resToDownstreamClient.on('close', cleanup0);
240
240
  // write back body data (chunked probably)
@@ -244,7 +244,7 @@ async function writeResponseToDownstreamClient(registryInfo, targetUrl, resToDow
244
244
  .on('data', (chunk) => logger.info(`Chunk transferred from ${targetUrl} to downstream client size=${chunk.length}`))
245
245
  .on('end', () => {
246
246
  logger.info(`Upstream server ${targetUrl} response.body ended.`);
247
- resToDownstreamClient.end();
247
+ // resToDownstreamClient.end();
248
248
  })
249
249
  // connection will be closed automatically when all chunk data is transferred (after stream ends).
250
250
  .on('close', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.jimuwd.xian.registry-proxy",
3
- "version": "1.0.101",
3
+ "version": "1.0.102",
4
4
  "description": "A lightweight npm registry proxy with fallback support",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",