@sveltejs/adapter-cloudflare
Advanced tools
Comparing version 2.2.4 to 2.3.0
@@ -1,2 +0,2 @@ | ||
import { Cache, CacheStorage } from '@cloudflare/workers-types'; | ||
import { Cache, CacheStorage, IncomingRequestCfProperties } from '@cloudflare/workers-types'; | ||
@@ -10,4 +10,5 @@ declare global { | ||
caches?: CacheStorage & { default: Cache }; | ||
cf?: IncomingRequestCfProperties; | ||
} | ||
} | ||
} |
@@ -74,3 +74,3 @@ // src/worker.js | ||
// @ts-ignore | ||
platform: { env, context, caches }, | ||
platform: { env, context, caches, cf: req.cf }, | ||
getClientAddress() { | ||
@@ -77,0 +77,0 @@ return req.headers.get("cf-connecting-ip"); |
@@ -74,11 +74,11 @@ import { writeFileSync } from 'node:fs'; | ||
if (!Array.isArray(include) || !Array.isArray(exclude)) { | ||
throw new Error(`routes.include and routes.exclude must be arrays`); | ||
throw new Error('routes.include and routes.exclude must be arrays'); | ||
} | ||
if (include.length === 0) { | ||
throw new Error(`routes.include must contain at least one route`); | ||
throw new Error('routes.include must contain at least one route'); | ||
} | ||
if (include.length > 100) { | ||
throw new Error(`routes.include must contain 100 or fewer routes`); | ||
throw new Error('routes.include must contain 100 or fewer routes'); | ||
} | ||
@@ -85,0 +85,0 @@ |
{ | ||
"name": "@sveltejs/adapter-cloudflare", | ||
"version": "2.2.4", | ||
"version": "2.3.0", | ||
"description": "Adapter for building SvelteKit applications on Cloudflare Pages with Workers integration", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11267
257