0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

[ci] format

This commit is contained in:
ematipico 2023-06-21 12:35:19 +00:00 committed by fredkbot
parent 459b5bd05f
commit 01b1c21c6b
6 changed files with 13 additions and 13 deletions

View file

@ -1,3 +1,4 @@
import mime from 'mime';
import type {
EndpointHandler,
ManifestData,
@ -6,8 +7,6 @@ import type {
SSRElement,
SSRManifest,
} from '../../@types/astro';
import type { RouteInfo } from './types';
import mime from 'mime';
import type { SinglePageBuiltModule } from '../build/types';
import { attachToResponse, getSetCookiesFromResponse } from '../cookies/index.js';
import { callEndpoint, createAPIContext } from '../endpoint/index.js';
@ -29,6 +28,7 @@ import {
createStylesheetElementSet,
} from '../render/ssr-element.js';
import { matchRoute } from '../routing/match.js';
import type { RouteInfo } from './types';
export { deserializeManifest } from './common.js';
const clientLocalsSymbol = Symbol.for('astro.locals');

View file

@ -4,8 +4,8 @@ import type { PageOptions } from '../../vite-plugin-astro/types';
import { prependForwardSlash, removeFileExtension } from '../path.js';
import { viteID } from '../util.js';
import { ASTRO_PAGE_MODULE_ID, getVirtualModulePageIdFromPath } from './plugins/plugin-pages.js';
import type { PageBuildData, StylesheetAsset, ViteID } from './types';
import { ASTRO_PAGE_EXTENSION_POST_PATTERN } from './plugins/util.js';
import type { PageBuildData, StylesheetAsset, ViteID } from './types';
export interface BuildInternals {
/**

View file

@ -1,4 +1,4 @@
import { getPathFromVirtualModulePageName, ASTRO_PAGE_EXTENSION_POST_PATTERN } from './util.js';
import { extname } from 'node:path';
import type { Plugin as VitePlugin } from 'vite';
import { routeIsRedirect } from '../../redirects/index.js';
import { addRollupInput } from '../add-rollup-input.js';
@ -7,7 +7,7 @@ import type { AstroBuildPlugin } from '../plugin';
import type { StaticBuildOptions } from '../types';
import { MIDDLEWARE_MODULE_ID } from './plugin-middleware.js';
import { RENDERERS_MODULE_ID } from './plugin-renderers.js';
import { extname } from 'node:path';
import { ASTRO_PAGE_EXTENSION_POST_PATTERN, getPathFromVirtualModulePageName } from './util.js';
export const ASTRO_PAGE_MODULE_ID = '@astro-page:';
export const ASTRO_PAGE_RESOLVED_MODULE_ID = '\0' + ASTRO_PAGE_MODULE_ID;

View file

@ -1,4 +1,5 @@
import glob from 'fast-glob';
import { join } from 'node:path';
import { fileURLToPath, pathToFileURL } from 'node:url';
import type { Plugin as VitePlugin } from 'vite';
import type { AstroAdapter, AstroConfig } from '../../../@types/astro';
@ -14,10 +15,9 @@ import { getOutFile, getOutFolder } from '../common.js';
import { cssOrder, mergeInlineCss, type BuildInternals } from '../internal.js';
import type { AstroBuildPlugin } from '../plugin';
import type { OutputChunk, StaticBuildOptions } from '../types';
import { getPathFromVirtualModulePageName, getVirtualModulePageNameFromPath } from './util.js';
import { RENDERERS_MODULE_ID } from './plugin-renderers.js';
import { ASTRO_PAGE_MODULE_ID } from './plugin-pages.js';
import { join } from 'node:path';
import { RENDERERS_MODULE_ID } from './plugin-renderers.js';
import { getPathFromVirtualModulePageName, getVirtualModulePageNameFromPath } from './util.js';
export const SSR_VIRTUAL_MODULE_ID = '@astrojs-ssr-virtual-entry';
const RESOLVED_SSR_VIRTUAL_MODULE_ID = '\0' + SSR_VIRTUAL_MODULE_ID;

View file

@ -1,5 +1,5 @@
import type { Plugin as VitePlugin } from 'vite';
import { extname } from 'node:path';
import type { Plugin as VitePlugin } from 'vite';
// eslint-disable-next-line @typescript-eslint/ban-types
type OutputOptionsHook = Extract<VitePlugin['outputOptions'], Function>;

View file

@ -3,9 +3,11 @@ import * as eslexer from 'es-module-lexer';
import glob from 'fast-glob';
import fs from 'fs';
import { bgGreen, bgMagenta, black, dim } from 'kleur/colors';
import { extname } from 'node:path';
import path from 'path';
import { fileURLToPath } from 'url';
import * as vite from 'vite';
import type { RouteData } from '../../@types/astro';
import {
createBuildInternals,
eachPageData,
@ -28,11 +30,9 @@ import { MIDDLEWARE_MODULE_ID } from './plugins/plugin-middleware.js';
import { ASTRO_PAGE_RESOLVED_MODULE_ID } from './plugins/plugin-pages.js';
import { RESOLVED_RENDERERS_MODULE_ID } from './plugins/plugin-renderers.js';
import { RESOLVED_SPLIT_MODULE_ID, SSR_VIRTUAL_MODULE_ID } from './plugins/plugin-ssr.js';
import type { AllPagesData, PageBuildData, StaticBuildOptions } from './types';
import { getTimeStat } from './util.js';
import { ASTRO_PAGE_EXTENSION_POST_PATTERN } from './plugins/util.js';
import { extname } from 'node:path';
import type { RouteData } from '../../@types/astro';
import type { PageBuildData, StaticBuildOptions } from './types';
import { getTimeStat } from './util.js';
export async function viteBuild(opts: StaticBuildOptions) {
const { allPages, settings } = opts;