mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
[ci] format
This commit is contained in:
parent
47877a7540
commit
4436398642
6 changed files with 14 additions and 14 deletions
|
@ -1,16 +1,16 @@
|
|||
import type {
|
||||
ComponentInstance,
|
||||
ManifestData,
|
||||
RewritePayload,
|
||||
RouteData,
|
||||
SSRElement,
|
||||
SSRResult,
|
||||
ComponentInstance,
|
||||
RewritePayload,
|
||||
} from '../../@types/astro.js';
|
||||
import { Pipeline } from '../base-pipeline.js';
|
||||
import type { SinglePageBuiltModule } from '../build/types.js';
|
||||
import { DEFAULT_404_COMPONENT } from '../constants.js';
|
||||
import { RedirectSinglePageBuiltModule } from '../redirects/component.js';
|
||||
import { createModuleScriptElement, createStylesheetElementSet } from '../render/ssr-element.js';
|
||||
import type { SinglePageBuiltModule } from '../build/types.js';
|
||||
|
||||
export class AppPipeline extends Pipeline {
|
||||
#manifestData: ManifestData | undefined;
|
||||
|
|
|
@ -8,7 +8,10 @@ import type {
|
|||
import { getOutputDirectory } from '../../prerender/utils.js';
|
||||
import { BEFORE_HYDRATION_SCRIPT_ID, PAGE_SCRIPT_ID } from '../../vite-plugin-scripts/index.js';
|
||||
import type { SSRManifest } from '../app/types.js';
|
||||
import { RouteNotFound } from '../errors/errors-data.js';
|
||||
import { AstroError } from '../errors/index.js';
|
||||
import { routeIsFallback, routeIsRedirect } from '../redirects/helpers.js';
|
||||
import { RedirectSinglePageBuiltModule } from '../redirects/index.js';
|
||||
import { Pipeline } from '../render/index.js';
|
||||
import {
|
||||
createAssetLink,
|
||||
|
@ -16,6 +19,7 @@ import {
|
|||
createStylesheetElementSet,
|
||||
} from '../render/ssr-element.js';
|
||||
import { isServerLikeOutput } from '../util.js';
|
||||
import { getOutDirWithinCwd } from './common.js';
|
||||
import {
|
||||
type BuildInternals,
|
||||
cssOrder,
|
||||
|
@ -31,10 +35,6 @@ import {
|
|||
} from './plugins/util.js';
|
||||
import type { PageBuildData, SinglePageBuiltModule, StaticBuildOptions } from './types.js';
|
||||
import { i18nHasFallback } from './util.js';
|
||||
import { RedirectSinglePageBuiltModule } from '../redirects/index.js';
|
||||
import { getOutDirWithinCwd } from './common.js';
|
||||
import { RouteNotFound } from '../errors/errors-data.js';
|
||||
import { AstroError } from '../errors/index.js';
|
||||
|
||||
/**
|
||||
* The build pipeline is responsible to gather the files emitted by the SSR build and generate the pages by executing these files.
|
||||
|
|
|
@ -4,7 +4,7 @@ import {
|
|||
computePreferredLocale,
|
||||
computePreferredLocaleList,
|
||||
} from '../../i18n/utils.js';
|
||||
import { ASTRO_VERSION, clientLocalsSymbol, clientAddressSymbol } from '../constants.js';
|
||||
import { ASTRO_VERSION, clientAddressSymbol, clientLocalsSymbol } from '../constants.js';
|
||||
import { AstroCookies } from '../cookies/index.js';
|
||||
import { AstroError, AstroErrorData } from '../errors/index.js';
|
||||
import { sequence } from './sequence.js';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type { APIContext, MiddlewareHandler, RewritePayload } from '../../@types/astro.js';
|
||||
import { defineMiddleware } from './index.js';
|
||||
import { AstroCookies } from '../cookies/cookies.js';
|
||||
import { defineMiddleware } from './index.js';
|
||||
|
||||
// From SvelteKit: https://github.com/sveltejs/kit/blob/master/packages/kit/src/exports/hooks/sequence.js
|
||||
/**
|
||||
|
|
|
@ -14,10 +14,11 @@ import { getInfoOutput } from '../cli/info/index.js';
|
|||
import type { HeadElements } from '../core/base-pipeline.js';
|
||||
import { ASTRO_VERSION, DEFAULT_404_COMPONENT } from '../core/constants.js';
|
||||
import { enhanceViteSSRError } from '../core/errors/dev/index.js';
|
||||
import { RouteNotFound } from '../core/errors/errors-data.js';
|
||||
import { AggregateError, AstroError, CSSError, MarkdownError } from '../core/errors/index.js';
|
||||
import type { Logger } from '../core/logger/core.js';
|
||||
import type { ModuleLoader } from '../core/module-loader/index.js';
|
||||
import { loadRenderer, Pipeline } from '../core/render/index.js';
|
||||
import { Pipeline, loadRenderer } from '../core/render/index.js';
|
||||
import { isPage, isServerLikeOutput, resolveIdToUrl, viteID } from '../core/util.js';
|
||||
import { PAGE_SCRIPT_ID } from '../vite-plugin-scripts/index.js';
|
||||
import { getStylesForURL } from './css.js';
|
||||
|
@ -25,7 +26,6 @@ import { getComponentMetadata } from './metadata.js';
|
|||
import { createResolve } from './resolve.js';
|
||||
import { default404Page } from './response.js';
|
||||
import { getScriptsForURL } from './scripts.js';
|
||||
import { RouteNotFound } from '../core/errors/errors-data.js';
|
||||
|
||||
export class DevPipeline extends Pipeline {
|
||||
// renderers are loaded on every request,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { describe, it, before, after } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
import { load as cheerioLoad } from 'cheerio';
|
||||
import assert from 'node:assert/strict';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import { load as cheerioLoad } from 'cheerio';
|
||||
import testAdapter from './test-adapter.js';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Dev reroute', () => {
|
||||
/** @type {import('./test-utils').Fixture} */
|
||||
|
|
Loading…
Reference in a new issue