@skydiveai/git-cache 0.1.0-beta.2851 → 0.1.0-beta.2982

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/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { f as startServer } from "./server-Dh-RKXuT.mjs";
2
+ import { f as startServer } from "./server-Cu_B_yai.mjs";
3
3
  //#region src/cli.ts
4
4
  /**
5
5
  * `git-cache` CLI — the published binary for @skydiveai/git-cache.
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as isProtocolV2Request, c as parseAdvertisement, d as shouldBackfillAfterPassthrough, f as startServer, i as explainRejection, l as parseUpstream, n as classifyUploadRequest, o as metricsSnapshot, r as copyRequestHeaders, s as mirrorHasObjects, t as SidebandPackExtractor, u as recordColdBuildOutcome } from "./server-Dh-RKXuT.mjs";
1
+ import { a as isProtocolV2Request, c as parseAdvertisement, d as shouldBackfillAfterPassthrough, f as startServer, i as explainRejection, l as parseUpstream, n as classifyUploadRequest, o as metricsSnapshot, r as copyRequestHeaders, s as mirrorHasObjects, t as SidebandPackExtractor, u as recordColdBuildOutcome } from "./server-Cu_B_yai.mjs";
2
2
  export { SidebandPackExtractor, classifyUploadRequest, copyRequestHeaders, explainRejection, isProtocolV2Request, metricsSnapshot, mirrorHasObjects, parseAdvertisement, parseUpstream, recordColdBuildOutcome, shouldBackfillAfterPassthrough, startServer };
@@ -1883,11 +1883,18 @@ async function startServer(options = {}) {
1883
1883
  await cleanupQuarantine();
1884
1884
  runningVersion = await readOwnPackageVersion();
1885
1885
  const server = http.createServer((req, res) => {
1886
+ const context = requestErrorContext(req);
1887
+ res.on("finish", () => {
1888
+ if (res.statusCode >= 400 && res.statusCode < 500) log("info", "client_error", {
1889
+ ...context,
1890
+ status: res.statusCode
1891
+ });
1892
+ });
1886
1893
  handle(req, res).catch((error) => {
1887
1894
  log("error", "unhandled", {
1888
1895
  error: String(error),
1889
1896
  stack: error instanceof Error ? error.stack : null,
1890
- ...requestErrorContext(req)
1897
+ ...context
1891
1898
  });
1892
1899
  if (!res.headersSent) res.writeHead(500);
1893
1900
  res.end();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skydiveai/git-cache",
3
- "version": "0.1.0-beta.2851",
3
+ "version": "0.1.0-beta.2982",
4
4
  "description": "Sandbox-local Git smart-HTTP clone/fetch cache: a loopback daemon that transparently mirrors HTTPS git reads so repeated clone/fetch/ls-remote skip the origin round-trip. Runs inside an agent sandbox; pushes stay direct.",
5
5
  "homepage": "https://skydive.com",
6
6
  "license": "MIT",