fetchwork 1.0.10 → 1.0.11
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/README.md +154 -123
- package/dist/adapters/bun.cjs.map +1 -1
- package/dist/adapters/bun.mjs.map +1 -1
- package/dist/adapters/cloudflare.d.ts.map +1 -1
- package/dist/adapters/index.cjs.map +5 -5
- package/dist/adapters/index.mjs.map +5 -5
- package/dist/adapters/node.cjs.map +2 -2
- package/dist/adapters/node.d.ts.map +1 -1
- package/dist/adapters/node.mjs.map +2 -2
- package/dist/adapters/vercel.cjs.map +2 -2
- package/dist/adapters/vercel.d.ts.map +1 -1
- package/dist/adapters/vercel.mjs.map +2 -2
- package/dist/context.d.ts +2 -1
- package/dist/context.d.ts.map +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +11 -9
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +11 -9
- package/dist/middlewares/bodyLimit.d.ts +11 -0
- package/dist/middlewares/bodyLimit.d.ts.map +1 -0
- package/dist/middlewares/bodyParser.d.ts.map +1 -1
- package/dist/middlewares/docs.d.ts.map +1 -1
- package/dist/middlewares/index.d.ts +2 -0
- package/dist/middlewares/index.d.ts.map +1 -1
- package/dist/middlewares/rateLimiter.d.ts +40 -0
- package/dist/middlewares/rateLimiter.d.ts.map +1 -0
- package/dist/middlewares/validator.d.ts +2 -2
- package/dist/middlewares/validator.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,54 +12,43 @@
|
|
|
12
12
|
|
|
13
13
|
## Features
|
|
14
14
|
|
|
15
|
-
- **Pure W3C Web Standard Core**: Built 100% on native `Request` and `Response` web interfaces
|
|
16
|
-
- **Fast Compiled Regex Engine**: High-performance $O(1)$ `Map` lookups for static routes and single-pass compiled regex matching for dynamic routes
|
|
17
|
-
- **
|
|
18
|
-
- **
|
|
19
|
-
- **
|
|
20
|
-
- **
|
|
21
|
-
- **
|
|
22
|
-
- **Multi-Runtime Ready**:
|
|
15
|
+
- **Pure W3C Web Standard Core**: Built 100% on native `Request` and `Response` web interfaces with zero-copy I/O.
|
|
16
|
+
- **Fast Compiled Regex Engine**: High-performance $O(1)$ `Map` lookups for static routes and single-pass compiled regex matching for dynamic routes.
|
|
17
|
+
- **Standard Schema Interoperability**: First-class validation for `body`, `query`, `params`, and `headers` using Zod, Valibot, or ArkType via Standard Schema (`validateSchema`).
|
|
18
|
+
- **Ultra-Low Latency SSE**: Built-in `c.sse()` streaming helper backed by native `TransformStream` and zero proxy buffering headers.
|
|
19
|
+
- **Gradual Level-Based Rate Limiter**: High-performance multi-level `FloodWait` rate limiter (`app.rateLimit()`) supporting static and wildcard path matching.
|
|
20
|
+
- **Built-in Ultra-Fast CORS**: Zero-overhead CORS middleware supporting static origins and $O(1)$ Set-based whitelist matching.
|
|
21
|
+
- **Custom Not Found & Error Handling**: Flexible `app.notFound()` and `app.onError()` handlers with zero latency penalty on hot paths.
|
|
22
|
+
- **Multi-Runtime Ready**: Seamlessly run under Bun, Node.js, Cloudflare Workers, or Vercel via standard `app.fetch`.
|
|
23
23
|
|
|
24
24
|
---
|
|
25
25
|
|
|
26
26
|
## ⚡ Performance & Benchmarks
|
|
27
27
|
|
|
28
|
-
Benchmarking results using **Autocannon** (100 parallel connections, 10 pipelining factor, 10-second duration) on Bun.
|
|
28
|
+
Benchmarking results measured using **Autocannon** (100 parallel connections, 10 pipelining factor, 10-second duration) running natively on Bun.
|
|
29
29
|
|
|
30
|
-
### 1.
|
|
30
|
+
### 1. Complete Feature Suite Performance (`bench-all`)
|
|
31
31
|
|
|
32
|
-
_Comparing
|
|
32
|
+
_Comparing performance across core framework features under heavy load:_
|
|
33
33
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
| **
|
|
37
|
-
| **
|
|
38
|
-
| **
|
|
34
|
+
| Feature / Scenario | Throughput (Avg RPS) | Latency Avg | Latency P50 | Latency P99 | Throughput (MB/s) | Total Requests (10s) |
|
|
35
|
+
| :----------------------------- | :------------------- | :----------- | :----------- | :------------ | :---------------- | :------------------- |
|
|
36
|
+
| **Baseline Routing (`/ping`)** | **14,901.6 RPS** | **67.24 ms** | **66.00 ms** | **142.00 ms** | **1.71 MB/s** | **149k req** |
|
|
37
|
+
| **CORS Preflight (`OPTIONS`)** | **15,100.8 RPS** | **66.06 ms** | **65.00 ms** | **82.00 ms** | **3.30 MB/s** | **151k req** |
|
|
38
|
+
| **Validator Standard Schema** | **11,076.0 RPS** | **90.69 ms** | **89.00 ms** | **111.00 ms** | **3.55 MB/s** | **110k req** |
|
|
39
|
+
| **SSE Initial Handshake** | **6,691.2 RPS** | **14.47 ms** | **13.00 ms** | **27.00 ms** | **1.60 MB/s** | **66k req** |
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
### 2. Multi-Level Rate Limiter Throughput
|
|
41
42
|
|
|
42
|
-
|
|
43
|
+
_Throughput evaluation when rate limiting is applied across static and wildcard paths:_
|
|
43
44
|
|
|
44
|
-
|
|
45
|
+
| Scenario | Throughput (Avg RPS) | Latency Avg | Latency P50 | Latency P99 | Throughput (MB/s) | Total Requests (10s) |
|
|
46
|
+
| :------------------------------ | :------------------- | :----------- | :----------- | :------------ | :---------------- | :------------------- |
|
|
47
|
+
| **No Rate Limit (Baseline)** | **15,409.6 RPS** | **64.76 ms** | **64.00 ms** | **82.00 ms** | **1.76 MB/s** | **154k req** |
|
|
48
|
+
| **Static Rate Limit $O(1)$** | **12,703.2 RPS** | **79.15 ms** | **77.00 ms** | **96.00 ms** | **3.44 MB/s** | **127k req** |
|
|
49
|
+
| **Wildcard Rate Limit (Regex)** | **12,674.4 RPS** | **79.26 ms** | **76.00 ms** | **150.00 ms** | **3.31 MB/s** | **126k req** |
|
|
45
50
|
|
|
46
|
-
|
|
47
|
-
| :----------------------------- | :------------------- | :----------- | :----------- | :----------- | :------------------- |
|
|
48
|
-
| **URLPattern Engine (Legacy)** | 9,904.6 RPS | 101.59 ms | 96.00 ms | 210.00 ms | 99k req |
|
|
49
|
-
| **FetchWork Compiled Regex** | **14,336.8 RPS** | **69.89 ms** | **69.00 ms** | **91.00 ms** | **143k req** |
|
|
50
|
-
|
|
51
|
-
> **Result:** Fast Compiled Regex engine delivers a **+44.7% throughput increase** and stabilizes peak P99 latency down to **91 ms**.
|
|
52
|
-
|
|
53
|
-
### 3. Middleware Chain Overhead
|
|
54
|
-
|
|
55
|
-
_Accumulated overhead test comparing a clean route vs. 4 chained middlewares (Logger, CORS, Auth, Rate Limiter):_
|
|
56
|
-
|
|
57
|
-
| Scenario | Throughput (Avg RPS) | Latency Avg | Latency P50 | Latency P99 | Throughput (MB/s) |
|
|
58
|
-
| :-------------------------------- | :------------------- | :----------- | :----------- | :------------ | :---------------- |
|
|
59
|
-
| **Clean Route (0 Middleware)** | 13,203.2 RPS | 76.06 ms | 70.00 ms | 154.00 ms | 1.93 MB/s |
|
|
60
|
-
| **Chained Route (4 Middlewares)** | **12,803.2 RPS** | **78.68 ms** | **76.00 ms** | **120.00 ms** | **2.28 MB/s** |
|
|
61
|
-
|
|
62
|
-
> **Result:** Running 4 chained middlewares results in less than **~3% throughput drop**, proving the efficiency of FetchWork's recursive dispatch pipeline.
|
|
51
|
+
> **Result:** Static and Wildcard rate limiting maintain high throughput (**12,700+ RPS**) while reliably managing penalty windows with less than 0.2% variance between static and regex matching.
|
|
63
52
|
|
|
64
53
|
---
|
|
65
54
|
|
|
@@ -78,11 +67,10 @@ bun add fetchwork
|
|
|
78
67
|
import { FetchWork } from "fetchwork";
|
|
79
68
|
|
|
80
69
|
const app = new FetchWork();
|
|
81
|
-
let server: Bun.Server<undefined>;
|
|
82
70
|
|
|
83
71
|
// Global Logger Middleware
|
|
84
72
|
app.use(async (c, next) => {
|
|
85
|
-
console.log(`[${c.req.method}] ${c.
|
|
73
|
+
console.log(`[${c.req.method}] ${c.path}`);
|
|
86
74
|
return next();
|
|
87
75
|
});
|
|
88
76
|
|
|
@@ -98,151 +86,194 @@ app.get("/:tenant/users/:userId", (c) => {
|
|
|
98
86
|
return c.json({ tenant, userId });
|
|
99
87
|
});
|
|
100
88
|
|
|
101
|
-
//
|
|
102
|
-
|
|
89
|
+
// Custom 404 Not Found Handler
|
|
90
|
+
app.notFound((c) => {
|
|
91
|
+
return c.json({ status: 404, error: "Custom Route Not Found" }, 404);
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
export default {
|
|
95
|
+
port: 3000,
|
|
96
|
+
fetch: app.fetch,
|
|
97
|
+
};
|
|
103
98
|
```
|
|
104
99
|
|
|
105
100
|
---
|
|
106
101
|
|
|
107
|
-
##
|
|
102
|
+
## Usage Guide
|
|
108
103
|
|
|
109
|
-
|
|
104
|
+
### 1. CORS Middleware
|
|
110
105
|
|
|
111
|
-
|
|
106
|
+
Apply CORS globally or per route using the built-in `cors` middleware:
|
|
112
107
|
|
|
113
108
|
```typescript
|
|
114
109
|
import { FetchWork } from "fetchwork";
|
|
115
|
-
import {
|
|
110
|
+
import { cors } from "fetchwork/cors";
|
|
116
111
|
|
|
117
112
|
const app = new FetchWork();
|
|
118
|
-
let server: Bun.Server<undefined>;
|
|
119
113
|
|
|
120
|
-
app.
|
|
121
|
-
|
|
122
|
-
|
|
114
|
+
app.use(
|
|
115
|
+
cors({
|
|
116
|
+
origin: [
|
|
117
|
+
"[https://tinylink.dev](https://tinylink.dev)",
|
|
118
|
+
"[https://app.tinylink.dev](https://app.tinylink.dev)",
|
|
119
|
+
],
|
|
120
|
+
credentials: true,
|
|
121
|
+
methods: ["GET", "POST", "PUT", "DELETE"],
|
|
122
|
+
allowedHeaders: ["Content-Type", "Authorization"],
|
|
123
|
+
maxAge: 86400,
|
|
124
|
+
}),
|
|
125
|
+
);
|
|
123
126
|
```
|
|
124
127
|
|
|
125
|
-
### 2.
|
|
128
|
+
### 2. Multi-Level Rate Limiter
|
|
129
|
+
|
|
130
|
+
Protect specific static or wildcard paths with level-based penalty windows (`FloodWait`):
|
|
126
131
|
|
|
127
132
|
```typescript
|
|
128
133
|
import { FetchWork } from "fetchwork";
|
|
129
|
-
import {
|
|
134
|
+
import { rateLimit } from "fetchwork/rate-limiter";
|
|
130
135
|
|
|
131
136
|
const app = new FetchWork();
|
|
132
|
-
app.get("/api", (c) => c.json({ runtime: "Cloudflare Workers" }));
|
|
133
137
|
|
|
134
|
-
|
|
138
|
+
// Rate limit specific static route
|
|
139
|
+
app.rateLimit(
|
|
140
|
+
"/api/v1/auth/login",
|
|
141
|
+
rateLimit({
|
|
142
|
+
keyPrefix: "auth-login",
|
|
143
|
+
limit: [5, 2], // Level 0: 5 reqs, Level 1+: 2 reqs
|
|
144
|
+
windowMs: { minutes: 1 },
|
|
145
|
+
floodwaitMs: [{ seconds: 30 }, { minutes: 5 }], // Penalties increase per violation level
|
|
146
|
+
}),
|
|
147
|
+
);
|
|
148
|
+
|
|
149
|
+
// Rate limit wildcard paths
|
|
150
|
+
app.rateLimit(
|
|
151
|
+
"/api/v1/data/*",
|
|
152
|
+
rateLimit({
|
|
153
|
+
keyPrefix: "api-data",
|
|
154
|
+
limit: 100,
|
|
155
|
+
windowMs: { minutes: 1 },
|
|
156
|
+
floodwaitMs: { minutes: 1 },
|
|
157
|
+
}),
|
|
158
|
+
);
|
|
135
159
|
```
|
|
136
160
|
|
|
137
|
-
### 3.
|
|
161
|
+
### 3. Input Validation (Standard Schema)
|
|
162
|
+
|
|
163
|
+
Validate incoming payloads with Zod, Valibot, or ArkType using `validateSchema`:
|
|
138
164
|
|
|
139
165
|
```typescript
|
|
140
|
-
import {
|
|
141
|
-
import {
|
|
166
|
+
import { z } from "zod";
|
|
167
|
+
import { validateSchema } from "fetchwork/validator";
|
|
142
168
|
|
|
143
|
-
const
|
|
144
|
-
|
|
169
|
+
const RegisterSchema = z.object({
|
|
170
|
+
name: z.string().min(2),
|
|
171
|
+
email: z.string().email(),
|
|
172
|
+
password: z.string().min(6),
|
|
173
|
+
});
|
|
145
174
|
|
|
146
|
-
|
|
175
|
+
app.post(
|
|
176
|
+
"/api/v1/register",
|
|
177
|
+
validateSchema("body", RegisterSchema),
|
|
178
|
+
async (c) => {
|
|
179
|
+
const payload = c.validData?.body;
|
|
180
|
+
return c.json({ success: true, data: payload }, 201);
|
|
181
|
+
},
|
|
182
|
+
);
|
|
147
183
|
```
|
|
148
184
|
|
|
149
|
-
### 4.
|
|
150
|
-
|
|
151
|
-
```typescript
|
|
152
|
-
import { FetchWork } from "fetchwork";
|
|
153
|
-
import { serveVercel } from "fetchwork/adapters";
|
|
185
|
+
### 4. Server-Sent Events (SSE)
|
|
154
186
|
|
|
155
|
-
|
|
156
|
-
app.get("/api", (c) => c.json({ runtime: "Vercel Serverless" }));
|
|
187
|
+
Stream real-time updates seamlessly with non-blocking `c.sse()`:
|
|
157
188
|
|
|
158
|
-
|
|
189
|
+
```typescript
|
|
190
|
+
app.get("/api/v1/stream", (c) => {
|
|
191
|
+
c.timeout(0);
|
|
192
|
+
|
|
193
|
+
return c.sse(async (sse) => {
|
|
194
|
+
// Send initial handshake
|
|
195
|
+
await sse.send({
|
|
196
|
+
event: "connected",
|
|
197
|
+
data: { status: "online" },
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
// Push periodic updates
|
|
201
|
+
const interval = setInterval(async () => {
|
|
202
|
+
await sse.send({
|
|
203
|
+
event: "ping",
|
|
204
|
+
data: { time: Date.now() },
|
|
205
|
+
});
|
|
206
|
+
}, 1000);
|
|
207
|
+
|
|
208
|
+
// Clean up when client disconnects
|
|
209
|
+
c.req.signal.addEventListener("abort", () => {
|
|
210
|
+
clearInterval(interval);
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
});
|
|
159
214
|
```
|
|
160
215
|
|
|
161
216
|
---
|
|
162
217
|
|
|
163
|
-
##
|
|
218
|
+
## Running Across Runtimes
|
|
164
219
|
|
|
165
|
-
|
|
220
|
+
FetchWork core uses standard W3C interfaces, allowing it to run across any modern JS runtime:
|
|
166
221
|
|
|
167
|
-
|
|
168
|
-
// src/routes/user.router.ts
|
|
169
|
-
import type { FetchWork } from "fetchwork";
|
|
170
|
-
|
|
171
|
-
export function registerUserRoutes(app: FetchWork) {
|
|
172
|
-
app.get("/users/me", (c) => c.json({ user: "Ayiin" }));
|
|
173
|
-
app.post("/users", async (c) => {
|
|
174
|
-
const body = await c.reqBody();
|
|
175
|
-
return c.json({ created: true, data: body }, 201);
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
```
|
|
222
|
+
### Bun Adapter
|
|
179
223
|
|
|
180
224
|
```typescript
|
|
181
|
-
// src/index.ts
|
|
182
225
|
import { FetchWork } from "fetchwork";
|
|
183
|
-
import {
|
|
226
|
+
import { serveBun } from "fetchwork/adapters";
|
|
184
227
|
|
|
185
228
|
const app = new FetchWork();
|
|
229
|
+
app.get("/api", (c) => c.json({ runtime: "Bun" }));
|
|
186
230
|
|
|
187
|
-
|
|
188
|
-
app.route("/api", registerUserRoutes);
|
|
189
|
-
|
|
190
|
-
export default {
|
|
191
|
-
port: 3000,
|
|
192
|
-
fetch: app.fetch,
|
|
193
|
-
};
|
|
231
|
+
serveBun(app, { port: 3000 });
|
|
194
232
|
```
|
|
195
233
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
## Input Validation (Zod)
|
|
199
|
-
|
|
200
|
-
Validate request bodies, query params, or URL params seamlessly before executing controllers:
|
|
234
|
+
### Cloudflare Workers
|
|
201
235
|
|
|
202
236
|
```typescript
|
|
203
|
-
import {
|
|
204
|
-
import {
|
|
237
|
+
import { FetchWork } from "fetchwork";
|
|
238
|
+
import { serveCloudflare } from "fetchwork/adapters";
|
|
205
239
|
|
|
206
|
-
const
|
|
207
|
-
|
|
208
|
-
email: z.string().email(),
|
|
209
|
-
});
|
|
240
|
+
const app = new FetchWork();
|
|
241
|
+
app.get("/api", (c) => c.json({ runtime: "Cloudflare Workers" }));
|
|
210
242
|
|
|
211
|
-
app
|
|
212
|
-
path: "/users",
|
|
213
|
-
validator: validator("body", CreateUserSchema),
|
|
214
|
-
controller: (c) => {
|
|
215
|
-
// Validated data is fully typed
|
|
216
|
-
const payload = c.validData?.body;
|
|
217
|
-
return c.json({ success: true, data: payload }, 201);
|
|
218
|
-
},
|
|
219
|
-
});
|
|
243
|
+
export default serveCloudflare(app);
|
|
220
244
|
```
|
|
221
245
|
|
|
222
246
|
---
|
|
223
247
|
|
|
224
|
-
##
|
|
248
|
+
## **FetchWork Progress Checklist**
|
|
225
249
|
|
|
226
|
-
|
|
250
|
+
**Core & Routing**
|
|
227
251
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
252
|
+
- [x] **High-Performance Router**: Static $O(1)$ map lookups and single-pass compiled regex matching.
|
|
253
|
+
- [x] **W3C Standard Context**: Native `Context` abstraction built on standard `Request` and `Response`.
|
|
254
|
+
- [x] **Scoped Routing / Prefixing**: Modular route prefixing via `app.route('/v1', ...)`.
|
|
255
|
+
- [x] **Flexible Error Handling**: Exception management via `app.onError()`.
|
|
256
|
+
- [x] **Custom Not Found Handler**: `app.notFound()` with zero latency penalty on hot paths.
|
|
231
257
|
|
|
232
|
-
|
|
233
|
-
bun run example/server.ts
|
|
258
|
+
**Type Safety & DX**
|
|
234
259
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
bun run benchmark/middleware.ts
|
|
260
|
+
- [x] **Standard Schema Interoperability**: Validation support for `body`, `query`, `params`, and `headers` via `validateSchema()`.
|
|
261
|
+
- [x] **Route Parameter Inferencing**: Automatic type inferencing for `c.params`.
|
|
238
262
|
|
|
239
|
-
|
|
240
|
-
bun run build
|
|
263
|
+
**Streaming & Real-Time Utilities**
|
|
241
264
|
|
|
242
|
-
|
|
265
|
+
- [x] **Ultra-Low Latency SSE**: `c.sse()` helper powered by `TransformStream` with zero proxy buffering.
|
|
266
|
+
- [ ] **WebSockets Adapter**: Light abstraction for bidirectional WebSocket connections.
|
|
267
|
+
|
|
268
|
+
**Security & Production Ready**
|
|
269
|
+
|
|
270
|
+
- [x] **Built-in CORS Helper**: Optimized CORS middleware supporting static and $O(1)$ set matching.
|
|
271
|
+
- [x] **Multi-Level Rate Limiter**: Path-based `FloodWait` rate limiter (`app.rateLimit()`).
|
|
272
|
+
- [x] **OpenAPI / Swagger Generator**: Automatic OpenAPI doc generator reading route metadata and schemas.
|
|
273
|
+
- [x] **Body Size Limits**: Memory protection for large `reqBody()` payloads.
|
|
243
274
|
|
|
244
275
|
---
|
|
245
276
|
|
|
246
277
|
## License
|
|
247
278
|
|
|
248
|
-
[MIT](
|
|
279
|
+
[MIT](https://www.google.com/search?q=./LICENSE) © Ayiin
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/adapters/bun.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type { FetchWork } from \"../index\";\n\ntype CustomServeOptions = Omit<\n Bun.Serve.Options<undefined>,\n \"fetch\" | \"websocket\" | \"routes\" | \"error\"\n>;\n\nexport function serveBun(app: FetchWork, options: CustomServeOptions) {\n const globalRuntime = globalThis as any;\n\n if (!globalRuntime.Bun) {\n throw new Error(\"Runtime Bun tidak terdeteksi.\");\n }\n\n const server = globalRuntime.Bun.serve({\n ...options,\n fetch: app.fetch
|
|
5
|
+
"import type { FetchWork } from \"../index\";\n\ntype CustomServeOptions = Omit<\n Bun.Serve.Options<undefined>,\n \"fetch\" | \"websocket\" | \"routes\" | \"error\"\n>;\n\nexport function serveBun(app: FetchWork, options: CustomServeOptions) {\n const globalRuntime = globalThis as any;\n\n if (!globalRuntime.Bun) {\n throw new Error(\"Runtime Bun tidak terdeteksi.\");\n }\n\n const server = globalRuntime.Bun.serve({\n ...options,\n fetch: app.fetch,\n });\n\n return server;\n}\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": "y/BAOO,SAAS,CAAQ,CAAC,EAAgB,EAA6B,CACpE,IAAM,EAAgB,WAEtB,GAAI,CAAC,EAAc,IACjB,MAAU,MAAM,+BAA+B,EAQjD,OALe,EAAc,IAAI,MAAM,IAClC,EACH,MAAO,EAAI,KACb,CAAC",
|
|
8
8
|
"debugId": "2A336670799FDA3264756E2164756E21",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/adapters/bun.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type { FetchWork } from \"../index\";\n\ntype CustomServeOptions = Omit<\n Bun.Serve.Options<undefined>,\n \"fetch\" | \"websocket\" | \"routes\" | \"error\"\n>;\n\nexport function serveBun(app: FetchWork, options: CustomServeOptions) {\n const globalRuntime = globalThis as any;\n\n if (!globalRuntime.Bun) {\n throw new Error(\"Runtime Bun tidak terdeteksi.\");\n }\n\n const server = globalRuntime.Bun.serve({\n ...options,\n fetch: app.fetch
|
|
5
|
+
"import type { FetchWork } from \"../index\";\n\ntype CustomServeOptions = Omit<\n Bun.Serve.Options<undefined>,\n \"fetch\" | \"websocket\" | \"routes\" | \"error\"\n>;\n\nexport function serveBun(app: FetchWork, options: CustomServeOptions) {\n const globalRuntime = globalThis as any;\n\n if (!globalRuntime.Bun) {\n throw new Error(\"Runtime Bun tidak terdeteksi.\");\n }\n\n const server = globalRuntime.Bun.serve({\n ...options,\n fetch: app.fetch,\n });\n\n return server;\n}\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": ";AAOO,SAAS,CAAQ,CAAC,EAAgB,EAA6B,CACpE,IAAM,EAAgB,WAEtB,GAAI,CAAC,EAAc,IACjB,MAAU,MAAM,+BAA+B,EAQjD,OALe,EAAc,IAAI,MAAM,IAClC,EACH,MAAO,EAAI,KACb,CAAC",
|
|
8
8
|
"debugId": "DD099E0E78AD86B064756E2164756E21",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloudflare.d.ts","sourceRoot":"","sources":["../../src/adapters/cloudflare.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAEpC,MAAM,WAAW,aAAa;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IACvC,sBAAsB,IAAI,IAAI,CAAC;CAChC;AAED,MAAM,MAAM,iBAAiB,GAAG,CAC9B,GAAG,EAAE,OAAO,EACZ,GAAG,CAAC,EAAE,aAAa,EACnB,GAAG,CAAC,EAAE,gBAAgB,KACnB,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEvB;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,SAAS;IAE1C,KAAK,QACE,OAAO,QACN,aAAa,QACb,gBAAgB,KACrB,OAAO,CAAC,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"cloudflare.d.ts","sourceRoot":"","sources":["../../src/adapters/cloudflare.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAEpC,MAAM,WAAW,aAAa;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IACvC,sBAAsB,IAAI,IAAI,CAAC;CAChC;AAED,MAAM,MAAM,iBAAiB,GAAG,CAC9B,GAAG,EAAE,OAAO,EACZ,GAAG,CAAC,EAAE,aAAa,EACnB,GAAG,CAAC,EAAE,gBAAgB,KACnB,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEvB;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,SAAS;IAE1C,KAAK,QACE,OAAO,QACN,aAAa,QACb,gBAAgB,KACrB,OAAO,CAAC,QAAQ,CAAC;EAIvB"}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/adapters/bun.ts", "../src/adapters/cloudflare.ts", "../src/adapters/node.ts", "../src/adapters/vercel.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type { FetchWork } from \"../index\";\n\ntype CustomServeOptions = Omit<\n Bun.Serve.Options<undefined>,\n \"fetch\" | \"websocket\" | \"routes\" | \"error\"\n>;\n\nexport function serveBun(app: FetchWork, options: CustomServeOptions) {\n const globalRuntime = globalThis as any;\n\n if (!globalRuntime.Bun) {\n throw new Error(\"Runtime Bun tidak terdeteksi.\");\n }\n\n const server = globalRuntime.Bun.serve({\n ...options,\n fetch: app.fetch
|
|
6
|
-
"import type { FetchWork } from \"..\";\n\nexport interface CloudflareEnv {\n [key: string]: any;\n}\n\nexport interface ExecutionContext {\n waitUntil(promise: Promise<any>): void;\n passThroughOnException(): void;\n}\n\nexport type CloudflareHandler = (\n req: Request,\n env?: CloudflareEnv,\n ctx?: ExecutionContext,\n) => Promise<Response>;\n\n/**\n * Adapter untuk menjalankan FetchWork di Cloudflare Workers / Pages Functions\n */\nexport function serveCloudflare(app: FetchWork) {\n return {\n fetch: async (\n req: Request,\n env?: CloudflareEnv,\n ctx?: ExecutionContext,\n ): Promise<Response> => {\n
|
|
7
|
-
"import http from \"node:http\";\nimport https from \"node:https\";\nimport type { FetchWork } from \"..\";\n\nexport type NodeServeOptions = {\n port: number;\n hostname?: string;\n tls?: https.ServerOptions;\n};\n\nexport function serveNode(app: FetchWork, options: NodeServeOptions) {\n const requestListener: http.RequestListener = async (req, res) => {\n try {\n const protocol = options.tls ? \"https\" : \"http\";\n const host = req.headers.host || \"localhost\";\n const url = `${protocol}://${host}${req.url}`;\n\n // Tambahkan `as RequestInit` di akhir objek opsi\n const webReq = new Request(url, {\n method: req.method,\n headers: req.headers as Record<string, string>,\n body: [\"GET\", \"HEAD\"].includes(req.method || \"\") ? null : (req as any),\n duplex: \"half\",\n } as RequestInit);\n\n
|
|
8
|
-
"import type { FetchWork } from \"..\";\n\nexport type VercelHandler = {\n (req: Request): Promise<Response>;\n (req: any, res: any): Promise<void>;\n};\n\n/**\n * Adapter serveVercel hybrid\n * Mendukung Web Standard Request/Response (App Router / Edge)\n * sekaligus Node.js (req, res) Serverless Functions (Pages Router / api/*.ts)\n */\nexport function serveVercel(app: FetchWork): VercelHandler {\n return async function vercelAdapter(req: any, res?: any): Promise<any> {\n
|
|
5
|
+
"import type { FetchWork } from \"../index\";\n\ntype CustomServeOptions = Omit<\n Bun.Serve.Options<undefined>,\n \"fetch\" | \"websocket\" | \"routes\" | \"error\"\n>;\n\nexport function serveBun(app: FetchWork, options: CustomServeOptions) {\n const globalRuntime = globalThis as any;\n\n if (!globalRuntime.Bun) {\n throw new Error(\"Runtime Bun tidak terdeteksi.\");\n }\n\n const server = globalRuntime.Bun.serve({\n ...options,\n fetch: app.fetch,\n });\n\n return server;\n}\n",
|
|
6
|
+
"import type { FetchWork } from \"..\";\n\nexport interface CloudflareEnv {\n [key: string]: any;\n}\n\nexport interface ExecutionContext {\n waitUntil(promise: Promise<any>): void;\n passThroughOnException(): void;\n}\n\nexport type CloudflareHandler = (\n req: Request,\n env?: CloudflareEnv,\n ctx?: ExecutionContext,\n) => Promise<Response>;\n\n/**\n * Adapter untuk menjalankan FetchWork di Cloudflare Workers / Pages Functions\n */\nexport function serveCloudflare(app: FetchWork) {\n return {\n fetch: async (\n req: Request,\n env?: CloudflareEnv,\n ctx?: ExecutionContext,\n ): Promise<Response> => {\n return app.fetch(req, env, ctx);\n },\n };\n}\n",
|
|
7
|
+
"import http from \"node:http\";\nimport https from \"node:https\";\nimport type { FetchWork } from \"..\";\n\nexport type NodeServeOptions = {\n port: number;\n hostname?: string;\n tls?: https.ServerOptions;\n};\n\nexport function serveNode(app: FetchWork, options: NodeServeOptions) {\n const requestListener: http.RequestListener = async (req, res) => {\n try {\n const protocol = options.tls ? \"https\" : \"http\";\n const host = req.headers.host || \"localhost\";\n const url = `${protocol}://${host}${req.url}`;\n\n // Tambahkan `as RequestInit` di akhir objek opsi\n const webReq = new Request(url, {\n method: req.method,\n headers: req.headers as Record<string, string>,\n body: [\"GET\", \"HEAD\"].includes(req.method || \"\") ? null : (req as any),\n duplex: \"half\",\n } as RequestInit);\n\n const webRes = await app.fetch(webReq);\n\n res.statusCode = webRes.status;\n webRes.headers.forEach((value, key) => {\n res.setHeader(key, value);\n });\n\n if (webRes.body) {\n const reader = webRes.body.getReader();\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n res.write(value);\n }\n }\n res.end();\n } catch (err) {\n res.statusCode = 500;\n res.end(\"Internal Server Error\");\n }\n };\n\n const server = options.tls\n ? https.createServer(options.tls, requestListener)\n : http.createServer(requestListener);\n\n server.listen(options.port, options.hostname);\n return server;\n}\n",
|
|
8
|
+
"import type { FetchWork } from \"..\";\n\nexport type VercelHandler = {\n (req: Request): Promise<Response>;\n (req: any, res: any): Promise<void>;\n};\n\n/**\n * Adapter serveVercel hybrid\n * Mendukung Web Standard Request/Response (App Router / Edge)\n * sekaligus Node.js (req, res) Serverless Functions (Pages Router / api/*.ts)\n */\nexport function serveVercel(app: FetchWork): VercelHandler {\n return async function vercelAdapter(req: any, res?: any): Promise<any> {\n if (\n req instanceof Request ||\n (req && typeof req.arrayBuffer === \"function\" && !res)\n ) {\n return app.fetch(req);\n }\n\n if (res && typeof res.setHeader === \"function\") {\n try {\n const host = req.headers.host || \"localhost\";\n const protocol = req.headers[\"x-forwarded-proto\"] || \"http\";\n const url = `${protocol}://${host}${req.url}`;\n\n let body: any = null;\n if (![\"GET\", \"HEAD\"].includes(req.method || \"\")) {\n if (typeof req.body === \"string\" || Buffer.isBuffer(req.body)) {\n body = req.body;\n } else if (req.body && typeof req.body === \"object\") {\n body = JSON.stringify(req.body);\n } else {\n body = req;\n }\n }\n\n const webReq = new Request(url, {\n method: req.method,\n headers: req.headers as Record<string, string>,\n body,\n // @ts-ignore - duplex dibutuhkan untuk Node.js streaming request body\n duplex: \"half\",\n });\n\n const webRes = await app.fetch(webReq);\n\n res.statusCode = webRes.status;\n webRes.headers.forEach((value, key) => {\n res.setHeader(key, value);\n });\n\n if (webRes.body) {\n const reader = webRes.body.getReader();\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n res.write(value);\n }\n }\n\n res.end();\n } catch (err) {\n if (!res.headersSent) {\n res.statusCode = 500;\n }\n res.end(\"Internal Server Error\");\n }\n return;\n }\n\n throw new Error(\n \"Invalid request/response arguments passed to handleVercel\",\n );\n } as VercelHandler;\n}\n"
|
|
9
9
|
],
|
|
10
|
-
"mappings": "kpCAOO,SAAS,CAAQ,CAAC,EAAgB,EAA6B,CACpE,IAAM,EAAgB,WAEtB,GAAI,CAAC,EAAc,IACjB,MAAU,MAAM,+BAA+B,EAQjD,OALe,EAAc,IAAI,MAAM,IAClC,EACH,MAAO,EAAI,KACb,CAAC,ECGI,SAAS,CAAe,CAAC,EAAgB,CAC9C,MAAO,CACL,MAAO,MACL,EACA,EACA,
|
|
10
|
+
"mappings": "kpCAOO,SAAS,CAAQ,CAAC,EAAgB,EAA6B,CACpE,IAAM,EAAgB,WAEtB,GAAI,CAAC,EAAc,IACjB,MAAU,MAAM,+BAA+B,EAQjD,OALe,EAAc,IAAI,MAAM,IAClC,EACH,MAAO,EAAI,KACb,CAAC,ECGI,SAAS,CAAe,CAAC,EAAgB,CAC9C,MAAO,CACL,MAAO,MACL,EACA,EACA,IAEO,EAAI,MAAM,EAAK,EAAK,CAAG,CAElC,EC7Be,IAAjB,4BACA,6BASO,SAAS,CAAS,CAAC,EAAgB,EAA2B,CACnE,IAAM,EAAwC,MAAO,EAAK,IAAQ,CAChE,GAAI,CACF,IAAM,EAAW,EAAQ,IAAM,QAAU,OACnC,EAAO,EAAI,QAAQ,MAAQ,YAC3B,EAAM,GAAG,OAAc,IAAO,EAAI,MAGlC,EAAS,IAAI,QAAQ,EAAK,CAC9B,OAAQ,EAAI,OACZ,QAAS,EAAI,QACb,KAAM,CAAC,MAAO,MAAM,EAAE,SAAS,EAAI,QAAU,EAAE,EAAI,KAAQ,E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AM,EAAI,MAAM,CAAM,EAOrC,GALA,EAAI,WAAa,EAAO,OACxB,EAAO,QAAQ,QAAQ,CAAC,EAAO,IAAQ,CACrC,EAAI,UAAU,EAAK,CAAK,EACzB,EAEG,EAAO,KAAM,CACf,IAAM,EAAS,EAAO,KAAK,UAAU,EACrC,MAAO,GAAM,CACX,IAAQ,OAAM,SAAU,MAAM,EAAO,KAAK,EAC1C,GAAI,EAAM,MACV,EAAI,MAAM,CAAK,GAInB,EAAI,IAAI,EACR,MAAO,EAAK,CACZ,GAAI,CAAC,EAAI,YACP,EAAI,WAAa,IAEnB,EAAI,IAAI,uBAAuB,EAEjC,OAGF,MAAU,MACR,2DACF",
|
|
11
11
|
"debugId": "64942FBF5FD39F0364756E2164756E21",
|
|
12
12
|
"names": []
|
|
13
13
|
}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/adapters/bun.ts", "../src/adapters/cloudflare.ts", "../src/adapters/node.ts", "../src/adapters/vercel.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type { FetchWork } from \"../index\";\n\ntype CustomServeOptions = Omit<\n Bun.Serve.Options<undefined>,\n \"fetch\" | \"websocket\" | \"routes\" | \"error\"\n>;\n\nexport function serveBun(app: FetchWork, options: CustomServeOptions) {\n const globalRuntime = globalThis as any;\n\n if (!globalRuntime.Bun) {\n throw new Error(\"Runtime Bun tidak terdeteksi.\");\n }\n\n const server = globalRuntime.Bun.serve({\n ...options,\n fetch: app.fetch
|
|
6
|
-
"import type { FetchWork } from \"..\";\n\nexport interface CloudflareEnv {\n [key: string]: any;\n}\n\nexport interface ExecutionContext {\n waitUntil(promise: Promise<any>): void;\n passThroughOnException(): void;\n}\n\nexport type CloudflareHandler = (\n req: Request,\n env?: CloudflareEnv,\n ctx?: ExecutionContext,\n) => Promise<Response>;\n\n/**\n * Adapter untuk menjalankan FetchWork di Cloudflare Workers / Pages Functions\n */\nexport function serveCloudflare(app: FetchWork) {\n return {\n fetch: async (\n req: Request,\n env?: CloudflareEnv,\n ctx?: ExecutionContext,\n ): Promise<Response> => {\n
|
|
7
|
-
"import http from \"node:http\";\nimport https from \"node:https\";\nimport type { FetchWork } from \"..\";\n\nexport type NodeServeOptions = {\n port: number;\n hostname?: string;\n tls?: https.ServerOptions;\n};\n\nexport function serveNode(app: FetchWork, options: NodeServeOptions) {\n const requestListener: http.RequestListener = async (req, res) => {\n try {\n const protocol = options.tls ? \"https\" : \"http\";\n const host = req.headers.host || \"localhost\";\n const url = `${protocol}://${host}${req.url}`;\n\n // Tambahkan `as RequestInit` di akhir objek opsi\n const webReq = new Request(url, {\n method: req.method,\n headers: req.headers as Record<string, string>,\n body: [\"GET\", \"HEAD\"].includes(req.method || \"\") ? null : (req as any),\n duplex: \"half\",\n } as RequestInit);\n\n
|
|
8
|
-
"import type { FetchWork } from \"..\";\n\nexport type VercelHandler = {\n (req: Request): Promise<Response>;\n (req: any, res: any): Promise<void>;\n};\n\n/**\n * Adapter serveVercel hybrid\n * Mendukung Web Standard Request/Response (App Router / Edge)\n * sekaligus Node.js (req, res) Serverless Functions (Pages Router / api/*.ts)\n */\nexport function serveVercel(app: FetchWork): VercelHandler {\n return async function vercelAdapter(req: any, res?: any): Promise<any> {\n
|
|
5
|
+
"import type { FetchWork } from \"../index\";\n\ntype CustomServeOptions = Omit<\n Bun.Serve.Options<undefined>,\n \"fetch\" | \"websocket\" | \"routes\" | \"error\"\n>;\n\nexport function serveBun(app: FetchWork, options: CustomServeOptions) {\n const globalRuntime = globalThis as any;\n\n if (!globalRuntime.Bun) {\n throw new Error(\"Runtime Bun tidak terdeteksi.\");\n }\n\n const server = globalRuntime.Bun.serve({\n ...options,\n fetch: app.fetch,\n });\n\n return server;\n}\n",
|
|
6
|
+
"import type { FetchWork } from \"..\";\n\nexport interface CloudflareEnv {\n [key: string]: any;\n}\n\nexport interface ExecutionContext {\n waitUntil(promise: Promise<any>): void;\n passThroughOnException(): void;\n}\n\nexport type CloudflareHandler = (\n req: Request,\n env?: CloudflareEnv,\n ctx?: ExecutionContext,\n) => Promise<Response>;\n\n/**\n * Adapter untuk menjalankan FetchWork di Cloudflare Workers / Pages Functions\n */\nexport function serveCloudflare(app: FetchWork) {\n return {\n fetch: async (\n req: Request,\n env?: CloudflareEnv,\n ctx?: ExecutionContext,\n ): Promise<Response> => {\n return app.fetch(req, env, ctx);\n },\n };\n}\n",
|
|
7
|
+
"import http from \"node:http\";\nimport https from \"node:https\";\nimport type { FetchWork } from \"..\";\n\nexport type NodeServeOptions = {\n port: number;\n hostname?: string;\n tls?: https.ServerOptions;\n};\n\nexport function serveNode(app: FetchWork, options: NodeServeOptions) {\n const requestListener: http.RequestListener = async (req, res) => {\n try {\n const protocol = options.tls ? \"https\" : \"http\";\n const host = req.headers.host || \"localhost\";\n const url = `${protocol}://${host}${req.url}`;\n\n // Tambahkan `as RequestInit` di akhir objek opsi\n const webReq = new Request(url, {\n method: req.method,\n headers: req.headers as Record<string, string>,\n body: [\"GET\", \"HEAD\"].includes(req.method || \"\") ? null : (req as any),\n duplex: \"half\",\n } as RequestInit);\n\n const webRes = await app.fetch(webReq);\n\n res.statusCode = webRes.status;\n webRes.headers.forEach((value, key) => {\n res.setHeader(key, value);\n });\n\n if (webRes.body) {\n const reader = webRes.body.getReader();\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n res.write(value);\n }\n }\n res.end();\n } catch (err) {\n res.statusCode = 500;\n res.end(\"Internal Server Error\");\n }\n };\n\n const server = options.tls\n ? https.createServer(options.tls, requestListener)\n : http.createServer(requestListener);\n\n server.listen(options.port, options.hostname);\n return server;\n}\n",
|
|
8
|
+
"import type { FetchWork } from \"..\";\n\nexport type VercelHandler = {\n (req: Request): Promise<Response>;\n (req: any, res: any): Promise<void>;\n};\n\n/**\n * Adapter serveVercel hybrid\n * Mendukung Web Standard Request/Response (App Router / Edge)\n * sekaligus Node.js (req, res) Serverless Functions (Pages Router / api/*.ts)\n */\nexport function serveVercel(app: FetchWork): VercelHandler {\n return async function vercelAdapter(req: any, res?: any): Promise<any> {\n if (\n req instanceof Request ||\n (req && typeof req.arrayBuffer === \"function\" && !res)\n ) {\n return app.fetch(req);\n }\n\n if (res && typeof res.setHeader === \"function\") {\n try {\n const host = req.headers.host || \"localhost\";\n const protocol = req.headers[\"x-forwarded-proto\"] || \"http\";\n const url = `${protocol}://${host}${req.url}`;\n\n let body: any = null;\n if (![\"GET\", \"HEAD\"].includes(req.method || \"\")) {\n if (typeof req.body === \"string\" || Buffer.isBuffer(req.body)) {\n body = req.body;\n } else if (req.body && typeof req.body === \"object\") {\n body = JSON.stringify(req.body);\n } else {\n body = req;\n }\n }\n\n const webReq = new Request(url, {\n method: req.method,\n headers: req.headers as Record<string, string>,\n body,\n // @ts-ignore - duplex dibutuhkan untuk Node.js streaming request body\n duplex: \"half\",\n });\n\n const webRes = await app.fetch(webReq);\n\n res.statusCode = webRes.status;\n webRes.headers.forEach((value, key) => {\n res.setHeader(key, value);\n });\n\n if (webRes.body) {\n const reader = webRes.body.getReader();\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n res.write(value);\n }\n }\n\n res.end();\n } catch (err) {\n if (!res.headersSent) {\n res.statusCode = 500;\n }\n res.end(\"Internal Server Error\");\n }\n return;\n }\n\n throw new Error(\n \"Invalid request/response arguments passed to handleVercel\",\n );\n } as VercelHandler;\n}\n"
|
|
9
9
|
],
|
|
10
|
-
"mappings": ";AAOO,SAAS,CAAQ,CAAC,EAAgB,EAA6B,CACpE,IAAM,EAAgB,WAEtB,GAAI,CAAC,EAAc,IACjB,MAAU,MAAM,+BAA+B,EAQjD,OALe,EAAc,IAAI,MAAM,IAClC,EACH,MAAO,EAAI,KACb,CAAC,ECGI,SAAS,CAAe,CAAC,EAAgB,CAC9C,MAAO,CACL,MAAO,MACL,EACA,EACA,
|
|
10
|
+
"mappings": ";AAOO,SAAS,CAAQ,CAAC,EAAgB,EAA6B,CACpE,IAAM,EAAgB,WAEtB,GAAI,C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,YAAc,CAAC,EAElD,OAAO,EAAI,MAAM,CAAG,EAGtB,GAAI,GAAO,OAAO,EAAI,YAAc,WAAY,CAC9C,GAAI,CACF,IAAM,EAAO,EAAI,QAAQ,MAAQ,YAE3B,EAAM,GADK,EAAI,QAAQ,sBAAwB,YACxB,IAAO,EAAI,MAEpC,EAAY,KAChB,GAAI,CAAC,CAAC,MAAO,MAAM,EAAE,SAAS,EAAI,QAAU,EAAE,EAC5C,GAAI,OAAO,EAAI,OAAS,UAAY,OAAO,SAAS,EAAI,IAAI,EAC1D,EAAO,EAAI,KACN,QAAI,EAAI,MAAQ,OAAO,EAAI,OAAS,SACzC,EAAO,KAAK,UAAU,EAAI,IAAI,EAE9B,OAAO,EAIX,IAAM,EAAS,IAAI,QAAQ,EAAK,CAC9B,OAAQ,EAAI,OACZ,QAAS,EAAI,QACb,OAEA,OAAQ,MACV,CAAC,EAEK,EAAS,MAAM,EAAI,MAAM,CAAM,EAOrC,GALA,EAAI,WAAa,EAAO,OACxB,EAAO,QAAQ,QAAQ,CAAC,EAAO,IAAQ,CACrC,EAAI,UAAU,EAAK,CAAK,EACzB,EAEG,EAAO,KAAM,CACf,IAAM,EAAS,EAAO,KAAK,UAAU,EACrC,MAAO,GAAM,CACX,IAAQ,OAAM,SAAU,MAAM,EAAO,KAAK,EAC1C,GAAI,EAAM,MACV,EAAI,MAAM,CAAK,GAInB,EAAI,IAAI,EACR,MAAO,EAAK,CACZ,GAAI,CAAC,EAAI,YACP,EAAI,WAAa,IAEnB,EAAI,IAAI,uBAAuB,EAEjC,OAGF,MAAU,MACR,2DACF",
|
|
11
11
|
"debugId": "3C6780C371BF7B6C64756E2164756E21",
|
|
12
12
|
"names": []
|
|
13
13
|
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/adapters/node.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import http from \"node:http\";\nimport https from \"node:https\";\nimport type { FetchWork } from \"..\";\n\nexport type NodeServeOptions = {\n port: number;\n hostname?: string;\n tls?: https.ServerOptions;\n};\n\nexport function serveNode(app: FetchWork, options: NodeServeOptions) {\n const requestListener: http.RequestListener = async (req, res) => {\n try {\n const protocol = options.tls ? \"https\" : \"http\";\n const host = req.headers.host || \"localhost\";\n const url = `${protocol}://${host}${req.url}`;\n\n // Tambahkan `as RequestInit` di akhir objek opsi\n const webReq = new Request(url, {\n method: req.method,\n headers: req.headers as Record<string, string>,\n body: [\"GET\", \"HEAD\"].includes(req.method || \"\") ? null : (req as any),\n duplex: \"half\",\n } as RequestInit);\n\n
|
|
5
|
+
"import http from \"node:http\";\nimport https from \"node:https\";\nimport type { FetchWork } from \"..\";\n\nexport type NodeServeOptions = {\n port: number;\n hostname?: string;\n tls?: https.ServerOptions;\n};\n\nexport function serveNode(app: FetchWork, options: NodeServeOptions) {\n const requestListener: http.RequestListener = async (req, res) => {\n try {\n const protocol = options.tls ? \"https\" : \"http\";\n const host = req.headers.host || \"localhost\";\n const url = `${protocol}://${host}${req.url}`;\n\n // Tambahkan `as RequestInit` di akhir objek opsi\n const webReq = new Request(url, {\n method: req.method,\n headers: req.headers as Record<string, string>,\n body: [\"GET\", \"HEAD\"].includes(req.method || \"\") ? null : (req as any),\n duplex: \"half\",\n } as RequestInit);\n\n const webRes = await app.fetch(webReq);\n\n res.statusCode = webRes.status;\n webRes.headers.forEach((value, key) => {\n res.setHeader(key, value);\n });\n\n if (webRes.body) {\n const reader = webRes.body.getReader();\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n res.write(value);\n }\n }\n res.end();\n } catch (err) {\n res.statusCode = 500;\n res.end(\"Internal Server Error\");\n }\n };\n\n const server = options.tls\n ? https.createServer(options.tls, requestListener)\n : http.createServer(requestListener);\n\n server.listen(options.port, options.hostname);\n return server;\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "0/BAAiB,IAAjB,4BACA,6BASO,SAAS,CAAS,CAAC,EAAgB,EAA2B,CACnE,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EAAQ,QAAQ,EACrC",
|
|
8
8
|
"debugId": "AEF7EA4D2826799964756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/adapters/node.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAEpC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC3B,CAAC;AAEF,wBAAgB,SAAS,CAAC,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/adapters/node.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAEpC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC3B,CAAC;AAEF,wBAAgB,SAAS,CAAC,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,wEA2ClE"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/adapters/node.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import http from \"node:http\";\nimport https from \"node:https\";\nimport type { FetchWork } from \"..\";\n\nexport type NodeServeOptions = {\n port: number;\n hostname?: string;\n tls?: https.ServerOptions;\n};\n\nexport function serveNode(app: FetchWork, options: NodeServeOptions) {\n const requestListener: http.RequestListener = async (req, res) => {\n try {\n const protocol = options.tls ? \"https\" : \"http\";\n const host = req.headers.host || \"localhost\";\n const url = `${protocol}://${host}${req.url}`;\n\n // Tambahkan `as RequestInit` di akhir objek opsi\n const webReq = new Request(url, {\n method: req.method,\n headers: req.headers as Record<string, string>,\n body: [\"GET\", \"HEAD\"].includes(req.method || \"\") ? null : (req as any),\n duplex: \"half\",\n } as RequestInit);\n\n
|
|
5
|
+
"import http from \"node:http\";\nimport https from \"node:https\";\nimport type { FetchWork } from \"..\";\n\nexport type NodeServeOptions = {\n port: number;\n hostname?: string;\n tls?: https.ServerOptions;\n};\n\nexport function serveNode(app: FetchWork, options: NodeServeOptions) {\n const requestListener: http.RequestListener = async (req, res) => {\n try {\n const protocol = options.tls ? \"https\" : \"http\";\n const host = req.headers.host || \"localhost\";\n const url = `${protocol}://${host}${req.url}`;\n\n // Tambahkan `as RequestInit` di akhir objek opsi\n const webReq = new Request(url, {\n method: req.method,\n headers: req.headers as Record<string, string>,\n body: [\"GET\", \"HEAD\"].includes(req.method || \"\") ? null : (req as any),\n duplex: \"half\",\n } as RequestInit);\n\n const webRes = await app.fetch(webReq);\n\n res.statusCode = webRes.status;\n webRes.headers.forEach((value, key) => {\n res.setHeader(key, value);\n });\n\n if (webRes.body) {\n const reader = webRes.body.getReader();\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n res.write(value);\n }\n }\n res.end();\n } catch (err) {\n res.statusCode = 500;\n res.end(\"Internal Server Error\");\n }\n };\n\n const server = options.tls\n ? https.createServer(options.tls, requestListener)\n : http.createServer(requestListener);\n\n server.listen(options.port, options.hostname);\n return server;\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": ";AAAA,oBACA,qBASO,SAAS,CAAS,CAAC,EAAgB,EAA2B,CACnE,IAAM,EAAwC,MAAO,EAAK,IAAQ,CAChE,GAAI,CACF,IAAM,EAAW,E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
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/adapters/vercel.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type { FetchWork } from \"..\";\n\nexport type VercelHandler = {\n (req: Request): Promise<Response>;\n (req: any, res: any): Promise<void>;\n};\n\n/**\n * Adapter serveVercel hybrid\n * Mendukung Web Standard Request/Response (App Router / Edge)\n * sekaligus Node.js (req, res) Serverless Functions (Pages Router / api/*.ts)\n */\nexport function serveVercel(app: FetchWork): VercelHandler {\n return async function vercelAdapter(req: any, res?: any): Promise<any> {\n
|
|
5
|
+
"import type { FetchWork } from \"..\";\n\nexport type VercelHandler = {\n (req: Request): Promise<Response>;\n (req: any, res: any): Promise<void>;\n};\n\n/**\n * Adapter serveVercel hybrid\n * Mendukung Web Standard Request/Response (App Router / Edge)\n * sekaligus Node.js (req, res) Serverless Functions (Pages Router / api/*.ts)\n */\nexport function serveVercel(app: FetchWork): VercelHandler {\n return async function vercelAdapter(req: any, res?: any): Promise<any> {\n if (\n req instanceof Request ||\n (req && typeof req.arrayBuffer === \"function\" && !res)\n ) {\n return app.fetch(req);\n }\n\n if (res && typeof res.setHeader === \"function\") {\n try {\n const host = req.headers.host || \"localhost\";\n const protocol = req.headers[\"x-forwarded-proto\"] || \"http\";\n const url = `${protocol}://${host}${req.url}`;\n\n let body: any = null;\n if (![\"GET\", \"HEAD\"].includes(req.method || \"\")) {\n if (typeof req.body === \"string\" || Buffer.isBuffer(req.body)) {\n body = req.body;\n } else if (req.body && typeof req.body === \"object\") {\n body = JSON.stringify(req.body);\n } else {\n body = req;\n }\n }\n\n const webReq = new Request(url, {\n method: req.method,\n headers: req.headers as Record<string, string>,\n body,\n // @ts-ignore - duplex dibutuhkan untuk Node.js streaming request body\n duplex: \"half\",\n });\n\n const webRes = await app.fetch(webReq);\n\n res.statusCode = webRes.status;\n webRes.headers.forEach((value, key) => {\n res.setHeader(key, value);\n });\n\n if (webRes.body) {\n const reader = webRes.body.getReader();\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n res.write(value);\n }\n }\n\n res.end();\n } catch (err) {\n if (!res.headersSent) {\n res.statusCode = 500;\n }\n res.end(\"Internal Server Error\");\n }\n return;\n }\n\n throw new Error(\n \"Invalid request/response arguments passed to handleVercel\",\n );\n } as VercelHandler;\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "4/BAYO,SAAS,CAAW,CAAC,EAA+B,CACzD,OAAO,cAA4B,CAAC,EAAU,EAAyB,
|
|
7
|
+
"mappings": "4/BAYO,SAAS,CAAW,CAAC,EAA+B,CACzD,OAAO,cAA4B,CAAC,EAAU,EAAyB,CACrE,GACE,aAAe,SACd,GAAO,OAAO,EAAI,cAAgB,YAAc,CAAC,EAElD,OAAO,EAAI,MAAM,CAAG,EAGtB,GAAI,GAAO,OAAO,EAAI,YAAc,WAAY,CAC9C,GAAI,CACF,IAAM,EAAO,EAAI,QAAQ,MAAQ,YAE3B,EAAM,GADK,EAAI,QAAQ,sBAAwB,YACxB,IAAO,EAAI,MAEpC,EAAY,KAChB,GAAI,CAAC,CAAC,MAAO,MAAM,EAAE,SAAS,EAAI,QAAU,EAAE,EAC5C,GAAI,OAAO,EAAI,OAAS,UAAY,OAAO,SAAS,EAAI,IAAI,EAC1D,EAAO,EAAI,KACN,QAAI,EAAI,MAAQ,OAAO,EAAI,OAAS,SACzC,EAAO,KAAK,UAAU,EAAI,IAAI,EAE9B,OAAO,EAIX,IAAM,EAAS,IAAI,QAAQ,EAAK,CAC9B,OAAQ,EAAI,OACZ,QAAS,EAAI,QACb,OAEA,OAAQ,MACV,CAAC,EAEK,EAAS,MAAM,EAAI,MAAM,CAAM,EAOrC,GALA,EAAI,WAAa,EAAO,OACxB,EAAO,QAAQ,QAAQ,CAAC,EAAO,IAAQ,CACrC,EAAI,UAAU,EAAK,CAAK,EACzB,EAEG,EAAO,KAAM,CACf,IAAM,EAAS,EAAO,KAAK,UAAU,EACrC,MAAO,GAAM,CACX,IAAQ,OAAM,SAAU,MAAM,EAAO,KAAK,EAC1C,GAAI,EAAM,MACV,EAAI,MAAM,CAAK,GAInB,EAAI,IAAI,EACR,MAAO,EAAK,CACZ,GAAI,CAAC,EAAI,YACP,EAAI,WAAa,IAEnB,EAAI,IAAI,uBAAuB,EAEjC,OAGF,MAAU,MACR,2DACF",
|
|
8
8
|
"debugId": "5892A35B9E12186464756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vercel.d.ts","sourceRoot":"","sources":["../../src/adapters/vercel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAEpC,MAAM,MAAM,aAAa,GAAG;IAC1B,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACrC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,SAAS,GAAG,aAAa,
|
|
1
|
+
{"version":3,"file":"vercel.d.ts","sourceRoot":"","sources":["../../src/adapters/vercel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAEpC,MAAM,MAAM,aAAa,GAAG;IAC1B,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACrC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,SAAS,GAAG,aAAa,CAgEzD"}
|