@inflector/aura 0.8.1 → 0.8.2

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/bin.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AA6JA,wBAAgB,KAAK,CAAC,MAAM,UAAQ,QA4CnC;AAiWD,wBAAsB,GAAG,kBAuDxB"}
1
+ {"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AA6JA,wBAAgB,KAAK,CAAC,MAAM,UAAQ,QA4CnC;AAiWD,wBAAsB,GAAG,kBAiDxB"}
package/dist/bin.js CHANGED
@@ -582,17 +582,11 @@ export async function dev() {
582
582
  changeOrigin: true,
583
583
  secure: false,
584
584
  configure(proxy, _options) {
585
- proxy.on("proxyReq", (proxyReq, req, res) => {
585
+ proxy.on("proxyReq", (proxyReq) => {
586
586
  proxyReq.setHeader("Connection", "close");
587
587
  if (AURA_KEY) {
588
588
  proxyReq.setHeader("Authorization", `Bearer ${AURA_KEY}`);
589
589
  }
590
- // Abort upstream request if client disconnects
591
- req.on("close", () => {
592
- if (!res.writableEnded) {
593
- proxyReq.destroy();
594
- }
595
- });
596
590
  });
597
591
  },
598
592
  },
@@ -649,7 +643,6 @@ async function start() {
649
643
  body: req.method === "GET" || req.method === "HEAD"
650
644
  ? undefined
651
645
  : req.body,
652
- signal: req.signal,
653
646
  });
654
647
  const proxyHeaders = new Headers(proxiedResp.headers);
655
648
  proxyHeaders.delete("content-encoding");
@@ -660,11 +653,7 @@ async function start() {
660
653
  headers: proxyHeaders,
661
654
  });
662
655
  }
663
- catch (err) {
664
- // Client disconnected — no point sending a response
665
- if (err.name === "AbortError" || req.signal.aborted) {
666
- return new Response(null, { status: 499 });
667
- }
656
+ catch {
668
657
  return new Response(JSON.stringify({ error: "Upstream Proxy Failed" }), { status: 502, headers: { "Content-Type": "application/json" } });
669
658
  }
670
659
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inflector/aura",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",