Fix scope
This commit is contained in:
6
packages/cloudflare/src/cache/config.ts
vendored
6
packages/cloudflare/src/cache/config.ts
vendored
@@ -4,7 +4,7 @@
|
||||
* This is the config-time helper. Import it in your astro.config.mjs:
|
||||
*
|
||||
* ```ts
|
||||
* import { cloudflareCache } from "@emdashcms/cloudflare";
|
||||
* import { cloudflareCache } from "@emdash-cms/cloudflare";
|
||||
*
|
||||
* export default defineConfig({
|
||||
* experimental: {
|
||||
@@ -49,7 +49,7 @@ export type { CloudflareCacheConfig };
|
||||
* ```ts
|
||||
* import { defineConfig } from "astro/config";
|
||||
* import cloudflare from "@astrojs/cloudflare";
|
||||
* import { cloudflareCache } from "@emdashcms/cloudflare";
|
||||
* import { cloudflareCache } from "@emdash-cms/cloudflare";
|
||||
*
|
||||
* export default defineConfig({
|
||||
* adapter: cloudflare(),
|
||||
@@ -75,7 +75,7 @@ export function cloudflareCache(
|
||||
): CacheProviderConfig<CloudflareCacheConfig> {
|
||||
return {
|
||||
// Resolved by Vite/Astro at build time — points to the runtime module
|
||||
entrypoint: "@emdashcms/cloudflare/cache",
|
||||
entrypoint: "@emdash-cms/cloudflare/cache",
|
||||
config,
|
||||
};
|
||||
}
|
||||
|
||||
4
packages/cloudflare/src/cache/runtime.ts
vendored
4
packages/cloudflare/src/cache/runtime.ts
vendored
@@ -15,7 +15,7 @@
|
||||
* headers from the response that next() returns.
|
||||
*
|
||||
* Do NOT import this at config time. Use cloudflareCache() from
|
||||
* "@emdashcms/cloudflare" or "@emdashcms/cloudflare/cache/config" instead.
|
||||
* "@emdash-cms/cloudflare" or "@emdash-cms/cloudflare/cache/config" instead.
|
||||
*/
|
||||
|
||||
import type { CacheProviderFactory } from "astro";
|
||||
@@ -41,7 +41,7 @@ const SWR_REGEX = /stale-while-revalidate=(\d+)/;
|
||||
/** Internal headers to strip before returning responses to the client */
|
||||
const INTERNAL_HEADERS = [STORED_AT_HEADER, MAX_AGE_HEADER, SWR_HEADER];
|
||||
|
||||
/** Default D1 bookmark cookie name (from @emdashcms/cloudflare d1 config) */
|
||||
/** Default D1 bookmark cookie name (from @emdash-cms/cloudflare d1 config) */
|
||||
const DEFAULT_BOOKMARK_COOKIE = "__ec_d1_bookmark";
|
||||
|
||||
export interface CloudflareCacheConfig {
|
||||
|
||||
Reference in New Issue
Block a user