@decocms/runtime 1.0.0-alpha.25 → 1.0.0-alpha.26
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/package.json +2 -2
- package/src/index.ts +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/runtime",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.26",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@cloudflare/workers-types": "^4.20250617.0",
|
|
@@ -31,4 +31,4 @@
|
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
33
|
}
|
|
34
|
-
}
|
|
34
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -332,6 +332,9 @@ export const withRuntime = <TEnv, TSchema extends z.ZodTypeAny = never>(
|
|
|
332
332
|
|
|
333
333
|
return {
|
|
334
334
|
fetch: async (req: Request, env: TEnv & DefaultEnv<TSchema>, ctx?: any) => {
|
|
335
|
+
if (new URL(req.url).pathname === "/_healthcheck") {
|
|
336
|
+
return new Response("OK", { status: 200 });
|
|
337
|
+
}
|
|
335
338
|
// Handle CORS preflight (OPTIONS) requests
|
|
336
339
|
if (corsOptions !== false && req.method === "OPTIONS") {
|
|
337
340
|
const options = corsOptions ?? {};
|
|
@@ -340,7 +343,7 @@ export const withRuntime = <TEnv, TSchema extends z.ZodTypeAny = never>(
|
|
|
340
343
|
|
|
341
344
|
const bindings = withBindings({
|
|
342
345
|
authToken: req.headers.get("authorization") ?? null,
|
|
343
|
-
env,
|
|
346
|
+
env: { ...process.env, ...env },
|
|
344
347
|
server,
|
|
345
348
|
bindings: userFns.bindings,
|
|
346
349
|
tokenOrContext: req.headers.get("x-mesh-token") ?? undefined,
|