0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00

[ci] format

This commit is contained in:
Princesseuh 2022-11-09 15:56:16 +00:00 committed by fredkbot
parent a780f2595d
commit bab0e8bf53
5 changed files with 4 additions and 5 deletions

View file

@ -9,10 +9,10 @@ import path from 'path';
import { fileURLToPath, pathToFileURL } from 'url'; import { fileURLToPath, pathToFileURL } from 'url';
import * as vite from 'vite'; import * as vite from 'vite';
import { mergeConfig as mergeViteConfig } from 'vite'; import { mergeConfig as mergeViteConfig } from 'vite';
import { AstroError, AstroErrorData } from '../errors/index.js';
import { LogOptions } from '../logger/core.js'; import { LogOptions } from '../logger/core.js';
import { arraify, isObject, isURL } from '../util.js'; import { arraify, isObject, isURL } from '../util.js';
import { createRelativeSchema } from './schema.js'; import { createRelativeSchema } from './schema.js';
import { AstroError, AstroErrorData } from '../errors/index.js';
load.use([loadTypeScript]); load.use([loadTypeScript]);

View file

@ -4,8 +4,8 @@ import type { Environment, RenderContext } from '../render/index';
import { renderEndpoint } from '../../runtime/server/index.js'; import { renderEndpoint } from '../../runtime/server/index.js';
import { ASTRO_VERSION } from '../constants.js'; import { ASTRO_VERSION } from '../constants.js';
import { AstroCookies, attachToResponse } from '../cookies/index.js'; import { AstroCookies, attachToResponse } from '../cookies/index.js';
import { getParamsAndProps, GetParamsAndPropsError } from '../render/core.js';
import { AstroError, AstroErrorData } from '../errors/index.js'; import { AstroError, AstroErrorData } from '../errors/index.js';
import { getParamsAndProps, GetParamsAndPropsError } from '../render/core.js';
const clientAddressSymbol = Symbol.for('astro.clientAddress'); const clientAddressSymbol = Symbol.for('astro.clientAddress');

View file

@ -25,7 +25,6 @@ export function collectErrorMetadata(e: any, rootFolder?: URL | undefined): Erro
error = collectInfoFromStacktrace(e); error = collectInfoFromStacktrace(e);
} }
if (error.loc?.file && rootFolder && !error.loc.file.startsWith('/')) { if (error.loc?.file && rootFolder && !error.loc.file.startsWith('/')) {
error.loc.file = join(fileURLToPath(rootFolder), error.loc.file); error.loc.file = join(fileURLToPath(rootFolder), error.loc.file);
} }

View file

@ -5,10 +5,10 @@ import type { Environment } from './environment.js';
import { Fragment, renderPage as runtimeRenderPage } from '../../runtime/server/index.js'; import { Fragment, renderPage as runtimeRenderPage } from '../../runtime/server/index.js';
import { attachToResponse } from '../cookies/index.js'; import { attachToResponse } from '../cookies/index.js';
import { AstroError, AstroErrorData } from '../errors/index.js';
import { getParams } from '../routing/params.js'; import { getParams } from '../routing/params.js';
import { createResult } from './result.js'; import { createResult } from './result.js';
import { callGetStaticPaths, findPathItemByKey, RouteCache } from './route-cache.js'; import { callGetStaticPaths, findPathItemByKey, RouteCache } from './route-cache.js';
import { AstroError, AstroErrorData } from '../errors/index.js';
interface GetParamsAndPropsOptions { interface GetParamsAndPropsOptions {
mod: ComponentInstance; mod: ComponentInstance;

View file

@ -6,6 +6,7 @@ import { DevelopmentEnvironment, SSROptions } from '../core/render/dev/index';
import { attachToResponse } from '../core/cookies/index.js'; import { attachToResponse } from '../core/cookies/index.js';
import { call as callEndpoint } from '../core/endpoint/dev/index.js'; import { call as callEndpoint } from '../core/endpoint/dev/index.js';
import { throwIfRedirectNotAllowed } from '../core/endpoint/index.js'; import { throwIfRedirectNotAllowed } from '../core/endpoint/index.js';
import { AstroErrorData } from '../core/errors/index.js';
import { warn } from '../core/logger/core.js'; import { warn } from '../core/logger/core.js';
import { appendForwardSlash } from '../core/path.js'; import { appendForwardSlash } from '../core/path.js';
import { preload, renderPage } from '../core/render/dev/index.js'; import { preload, renderPage } from '../core/render/dev/index.js';
@ -15,7 +16,6 @@ import { matchAllRoutes } from '../core/routing/index.js';
import { resolvePages } from '../core/util.js'; import { resolvePages } from '../core/util.js';
import { log404 } from './common.js'; import { log404 } from './common.js';
import { handle404Response, writeSSRResult, writeWebResponse } from './response.js'; import { handle404Response, writeSSRResult, writeWebResponse } from './response.js';
import { AstroErrorData } from '../core/errors/index.js';
type AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends ( type AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (
...args: any ...args: any