0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-06 22:10:10 -05:00

[ci] format

This commit is contained in:
Emanuele Stoppa 2024-09-23 15:42:36 +00:00 committed by astrobot-houston
parent 25a104b451
commit 72dc2313ec
7 changed files with 12 additions and 12 deletions

View file

@ -1,7 +1,7 @@
import { decodeKey } from '../encryption.js';
import { NOOP_MIDDLEWARE_FN } from '../middleware/noop-middleware.js';
import { deserializeRouteData } from '../routing/manifest/serialization.js';
import type { RouteInfo, SSRManifest, SerializedSSRManifest } from './types.js';
import { NOOP_MIDDLEWARE_FN } from '../middleware/noop-middleware.js';
export function deserializeManifest(serializedManifest: SerializedSSRManifest): SSRManifest {
const routes: RouteInfo[] = [];

View file

@ -11,6 +11,7 @@ import { getSetCookiesFromResponse } from '../cookies/index.js';
import { AstroError, AstroErrorData } from '../errors/index.js';
import { consoleLogDestination } from '../logger/console.js';
import { AstroIntegrationLogger, Logger } from '../logger/core.js';
import { NOOP_MIDDLEWARE_FN } from '../middleware/noop-middleware.js';
import {
appendForwardSlash,
joinPaths,
@ -22,7 +23,6 @@ import { createAssetLink } from '../render/ssr-element.js';
import { createDefaultRoutes, injectDefaultRoutes } from '../routing/default.js';
import { matchRoute } from '../routing/match.js';
import { AppPipeline } from './pipeline.js';
import { NOOP_MIDDLEWARE_FN } from '../middleware/noop-middleware.js';
export { deserializeManifest } from './common.js';

View file

@ -1,4 +1,5 @@
import type {
AstroMiddlewareInstance,
ComponentInstance,
Locales,
RouteData,
@ -6,7 +7,6 @@ import type {
SSRLoadedRenderer,
SSRResult,
SerializedRouteData,
AstroMiddlewareInstance,
} from '../../@types/astro.js';
import type { RoutingStrategies } from '../../i18n/utils.js';
import type { SinglePageBuiltModule } from '../build/types.js';

View file

@ -10,14 +10,14 @@ import type {
} from '../@types/astro.js';
import { setGetEnv } from '../env/runtime.js';
import { createI18nMiddleware } from '../i18n/middleware.js';
import { createOriginCheckMiddleware } from './app/middlewares.js';
import { AstroError } from './errors/errors.js';
import { AstroErrorData } from './errors/index.js';
import type { Logger } from './logger/core.js';
import { sequence } from './middleware/index.js';
import { NOOP_MIDDLEWARE_FN } from './middleware/noop-middleware.js';
import { RouteCache } from './render/route-cache.js';
import { createDefaultRoutes } from './routing/default.js';
import {NOOP_MIDDLEWARE_FN} from "./middleware/noop-middleware.js";
import {sequence} from "./middleware/index.js";
import {createOriginCheckMiddleware} from "./app/middlewares.js";
/**
* The `Pipeline` represents the static parts of rendering that do not change between requests.
@ -28,7 +28,7 @@ import {createOriginCheckMiddleware} from "./app/middlewares.js";
export abstract class Pipeline {
readonly internalMiddleware: MiddlewareHandler[];
resolvedMiddleware: MiddlewareHandler | undefined = undefined;
constructor(
readonly logger: Logger,
readonly manifest: SSRManifest,

View file

@ -9,6 +9,7 @@ import { getViteErrorPayload } from '../core/errors/dev/index.js';
import { AstroError, AstroErrorData } from '../core/errors/index.js';
import { patchOverlay } from '../core/errors/overlay.js';
import type { Logger } from '../core/logger/core.js';
import { NOOP_MIDDLEWARE_FN } from '../core/middleware/noop-middleware.js';
import { createViteLoader } from '../core/module-loader/index.js';
import { injectDefaultRoutes } from '../core/routing/default.js';
import { createRouteManifest } from '../core/routing/index.js';
@ -19,7 +20,6 @@ import { recordServerError } from './error.js';
import { DevPipeline } from './pipeline.js';
import { handleRequest } from './request.js';
import { setRouteError } from './server-state.js';
import { NOOP_MIDDLEWARE_FN } from "../core/middleware/noop-middleware.js";
export interface AstroPluginOptions {
settings: AstroSettings;
@ -155,7 +155,7 @@ export function createDevelopmentManifest(settings: AstroSettings): SSRManifest
key: createKey(),
middleware() {
return {
onRequest: NOOP_MIDDLEWARE_FN
onRequest: NOOP_MIDDLEWARE_FN,
};
},
};

View file

@ -235,7 +235,7 @@ export async function handleRoute({
req({
url: pathname,
method: incomingRequest.method,
statusCode: isRewrite ? response.status : (status ?? response.status),
statusCode: isRewrite ? response.status : status ?? response.status,
isRewrite,
reqTime: timeEnd - timeStart,
}),

View file

@ -10,10 +10,10 @@ import { createBaseSettings } from '../../dist/core/config/settings.js';
import { createContainer } from '../../dist/core/dev/container.js';
import { Logger } from '../../dist/core/logger/core.js';
import { nodeLogDestination } from '../../dist/core/logger/node.js';
import { NOOP_MIDDLEWARE_FN } from '../../dist/core/middleware/noop-middleware.js';
import { Pipeline } from '../../dist/core/render/index.js';
import { RouteCache } from '../../dist/core/render/route-cache.js';
import { unixify } from './correct-path.js';
import {NOOP_MIDDLEWARE_FN} from "../../dist/core/middleware/noop-middleware.js";
/** @type {import('../../src/core/logger/core').Logger} */
export const defaultLogger = new Logger({
@ -210,7 +210,7 @@ export function createBasicPipeline(options = {}) {
pipeline.componentMetadata = () => new Map();
pipeline.getMiddleware = () => {
return NOOP_MIDDLEWARE_FN;
}
};
return pipeline;
}