[ci] format
This commit is contained in:
parent
ffcfcddb75
commit
0d3aa89dcf
3 changed files with 15 additions and 15 deletions
|
@ -21,15 +21,15 @@ interface BuildConfig {
|
||||||
export function getAdapter(isModeDirectory: boolean): AstroAdapter {
|
export function getAdapter(isModeDirectory: boolean): AstroAdapter {
|
||||||
return isModeDirectory
|
return isModeDirectory
|
||||||
? {
|
? {
|
||||||
name: '@astrojs/cloudflare',
|
name: '@astrojs/cloudflare',
|
||||||
serverEntrypoint: '@astrojs/cloudflare/server.directory.js',
|
serverEntrypoint: '@astrojs/cloudflare/server.directory.js',
|
||||||
exports: ['onRequest', 'manifest'],
|
exports: ['onRequest', 'manifest'],
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
name: '@astrojs/cloudflare',
|
name: '@astrojs/cloudflare',
|
||||||
serverEntrypoint: '@astrojs/cloudflare/server.advanced.js',
|
serverEntrypoint: '@astrojs/cloudflare/server.advanced.js',
|
||||||
exports: ['default'],
|
exports: ['default'],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const SHIM = `globalThis.process = {
|
const SHIM = `globalThis.process = {
|
||||||
|
|
|
@ -28,7 +28,7 @@ export type PagesRuntime<T = unknown, U = unknown> = {
|
||||||
* ```diff
|
* ```diff
|
||||||
* - import { getRuntime } from '@astrojs/cloudflare/runtime';
|
* - import { getRuntime } from '@astrojs/cloudflare/runtime';
|
||||||
* - getRuntime(Astro.request);
|
* - getRuntime(Astro.request);
|
||||||
*
|
*
|
||||||
* + const runtime = Astro.locals.runtime;
|
* + const runtime = Astro.locals.runtime;
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -13,12 +13,12 @@ type Env = {
|
||||||
};
|
};
|
||||||
|
|
||||||
interface WorkerRuntime {
|
interface WorkerRuntime {
|
||||||
runtime: {
|
runtime: {
|
||||||
waitUntil: (promise: Promise<any>) => void;
|
waitUntil: (promise: Promise<any>) => void;
|
||||||
env: Env;
|
env: Env;
|
||||||
cf: CFRequest['cf'];
|
cf: CFRequest['cf'];
|
||||||
caches: typeof caches;
|
caches: typeof caches;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createExports(manifest: SSRManifest) {
|
export function createExports(manifest: SSRManifest) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue