com.jimuwd.xian.registry-proxy 1.0.53 → 1.0.54

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
@@ -144,7 +144,7 @@ async function fetchFromRegistry(registry, targetUrl, limiter) {
144
144
  const headers = registry.token ? { Authorization: `Bearer ${registry.token}` } : {};
145
145
  headers.Collection = "keep-alive";
146
146
  const response = await fetch(targetUrl, { headers });
147
- console.log(`Response from upstream ${targetUrl}: ${response.status} ${response.statusText}`, { headers: [...response.headers] });
147
+ console.log(`Response from upstream ${targetUrl}: ${response.status} ${response.statusText} content-type=${response.headers.get('content-type')} content-length=${response.headers.get('content-length')} transfer-encoding=${response.headers.get('transfer-encoding')}`);
148
148
  return response.ok ? response : null;
149
149
  }
150
150
  catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.jimuwd.xian.registry-proxy",
3
- "version": "1.0.53",
3
+ "version": "1.0.54",
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
@@ -196,7 +196,7 @@ async function fetchFromRegistry(
196
196
  const headers: {} = registry.token ? {Authorization: `Bearer ${registry.token}`} : {};
197
197
  (headers as any).Collection = "keep-alive";
198
198
  const response = await fetch(targetUrl, {headers});
199
- console.log(`Response from upstream ${targetUrl}: ${response.status} ${response.statusText}`, {headers: [...response.headers]});
199
+ console.log(`Response from upstream ${targetUrl}: ${response.status} ${response.statusText} content-type=${response.headers.get('content-type')} content-length=${response.headers.get('content-length')} transfer-encoding=${response.headers.get('transfer-encoding')}`);
200
200
  return response.ok ? response : null;
201
201
  } catch (e) {
202
202
  if (e instanceof Error) {