@pgxsinkit/server 0.1.36 → 0.1.41
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 +212 -5842
- package/dist/index.js.map +5 -85
- package/package.json +2 -2
- package/skills/deploying/SKILL.md +1 -1
- package/src/electric-proxy.ts +6 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pgxsinkit/server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.41",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"tanstack-intent"
|
|
6
6
|
],
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"build": "bun --cwd ../.. run build:public-packages"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@pgxsinkit/contracts": "0.1.
|
|
34
|
+
"@pgxsinkit/contracts": "0.1.41"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"drizzle-orm": "1.0.0-rc.4"
|
package/src/electric-proxy.ts
CHANGED
|
@@ -121,9 +121,12 @@ async function forwardShapeRequest(
|
|
|
121
121
|
method: "GET",
|
|
122
122
|
signal: request.signal,
|
|
123
123
|
}).catch((error: unknown) => {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
// Client disconnected — no meaningful response can be sent.
|
|
125
|
+
// Return a 499 (client closed request) to avoid a 500 in logs.
|
|
126
|
+
// Keyed on the signal's aborted state first: Bun can reject an aborted fetch with a
|
|
127
|
+
// literal `null` (no AbortError to pattern-match), and once the caller aborted there is
|
|
128
|
+
// nobody to answer regardless of what the rejection value looks like.
|
|
129
|
+
if (request.signal.aborted || isAbortError(error)) {
|
|
127
130
|
return new Response(null, { status: 499, statusText: "Client Closed Request" });
|
|
128
131
|
}
|
|
129
132
|
throw error;
|