Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: organize imports and formatting in cloudflare handler (#14697)
* Initial plan

* fix: organize imports and formatting in handler.ts

Co-authored-by: matthewp <361671+matthewp@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: matthewp <361671+matthewp@users.noreply.github.com>
  • Loading branch information
Copilot and matthewp authored Oct 30, 2025
commit 9af11de75cf31e9facb1797dc93dce3e9c73eb27
6 changes: 3 additions & 3 deletions packages/integrations/cloudflare/src/utils/handler.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @ts-expect-error - It is safe to expect the error here.
import { env as globalEnv } from 'cloudflare:workers';
import { sessionKVBindingName } from 'virtual:astro-cloudflare:config';
import type {
Response as CfResponse,
CacheStorage as CloudflareCacheStorage,
Expand All @@ -9,7 +10,6 @@ import type {
import { createApp } from 'astro/app/entrypoint';
import { setGetEnv } from 'astro/env/setup';
import { createGetEnv } from '../utils/env.js';
import { sessionKVBindingName } from 'virtual:astro-cloudflare:config';

export type Env = {
[key: string]: unknown;
Expand Down Expand Up @@ -40,10 +40,10 @@ export async function handle(
const app = createApp(import.meta.env.DEV);
const { pathname } = new URL(request.url);

if(env[sessionKVBindingName]) {
if (env[sessionKVBindingName]) {
const sessionConfigOptions = app.manifest.sessionConfig?.options ?? {};
Object.assign(sessionConfigOptions, {
binding: env[sessionKVBindingName]
binding: env[sessionKVBindingName],
});
}

Expand Down
Loading