com.jimuwd.xian.registry-proxy 1.0.42 → 1.0.43

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 CHANGED
@@ -208,7 +208,7 @@ async function writeSuccessfulResponse(registryInfo, targetUrl, res, response, r
208
208
  console.error(`Empty response body from ${targetUrl}`);
209
209
  }
210
210
  else {
211
- await pipeline(response.body, res);
211
+ await pipeline(response.body, res).finally(() => res.end());
212
212
  }
213
213
  }
214
214
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.jimuwd.xian.registry-proxy",
3
- "version": "1.0.42",
3
+ "version": "1.0.43",
4
4
  "type": "module",
5
5
  "description": "A lightweight npm registry proxy with fallback support",
6
6
  "main": "dist/index.js",
package/src/index.ts CHANGED
@@ -273,7 +273,7 @@ async function writeSuccessfulResponse(
273
273
  if (!response.body) {
274
274
  console.error(`Empty response body from ${targetUrl}`);
275
275
  } else {
276
- await pipeline(response.body, res);
276
+ await pipeline(response.body, res).finally(()=>res.end());
277
277
  }
278
278
  }
279
279
  } catch (err) {