@tokenoftrust/storefront-runner 2.4.47 → 2.4.48

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.
@@ -45,7 +45,12 @@ export class FetchHttpTransport implements HttpTransport, HttpGetTransport {
45
45
  async post(url: string, headers: Record<string, string>, body: unknown): Promise<HttpResponseLike> {
46
46
  const res = await fetch(url, {
47
47
  method: "POST",
48
- headers: { ...this.defaultHeaders, ...headers },
48
+ // `post()` always JSON.stringify()s the body below, so every call sends JSON —
49
+ // declare it by default rather than leaving a caller that forgets its own
50
+ // `content-type` to silently send an unparseable body (the receiving server's
51
+ // JSON body-parser skips a request with no/wrong content-type and sees an empty
52
+ // body). A per-call or per-transport header of the same name still wins.
53
+ headers: { "content-type": "application/json", ...this.defaultHeaders, ...headers },
49
54
  body: JSON.stringify(body),
50
55
  signal: this.signal(),
51
56
  });
@@ -80,6 +80,9 @@ export async function callMcpService(req: McpServiceRequest): Promise<McpService
80
80
  );
81
81
  return { kind: "misconfigured", status: res.status, reason };
82
82
  }
83
- if (res.status < 200 || res.status >= 300) return { kind: "http-error", status: res.status };
83
+ if (res.status < 200 || res.status >= 300) {
84
+ console.error(`[mcp-service-seam] ${req.method} ${req.path} answered ${res.status}`);
85
+ return { kind: "http-error", status: res.status };
86
+ }
84
87
  return { kind: "ok", status: res.status, json: () => res.json() };
85
88
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokenoftrust/storefront-runner",
3
- "version": "2.4.47",
3
+ "version": "2.4.48",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "description": "World-shareable storefront runner: multi-tenant renderer on Astro/Cloudflare. No control plane.",
6
6
  "packageManager": "pnpm@11.9.0",