diff --git a/packages/astro/src/cli/index.ts b/packages/astro/src/cli/index.ts index ceeb1a915..954628d68 100644 --- a/packages/astro/src/cli/index.ts +++ b/packages/astro/src/cli/index.ts @@ -17,12 +17,12 @@ import { import { ASTRO_VERSION } from '../core/constants.js'; import devServer from '../core/dev/index.js'; import { collectErrorMetadata } from '../core/errors/dev/index.js'; +import { createSafeError } from '../core/errors/index.js'; import { debug, error, info, LogOptions } from '../core/logger/core.js'; import { enableVerboseLogging, nodeLogDestination } from '../core/logger/node.js'; import { formatConfigErrorMessage, formatErrorMessage, printHelp } from '../core/messages.js'; import { appendForwardSlash } from '../core/path.js'; import preview from '../core/preview/index.js'; -import { createSafeError } from '../core/errors/index.js'; import * as event from '../events/index.js'; import { eventConfigError, eventError, telemetry } from '../events/index.js'; import { check } from './check/index.js'; diff --git a/packages/astro/src/core/errors/index.ts b/packages/astro/src/core/errors/index.ts index 9ebf0e8a6..632ff8f36 100644 --- a/packages/astro/src/core/errors/index.ts +++ b/packages/astro/src/core/errors/index.ts @@ -9,4 +9,4 @@ export { RuntimeError, } from './errors.js'; export { codeFrame } from './printer.js'; -export { collectInfoFromStacktrace, positionAt, createSafeError } from './utils.js'; +export { collectInfoFromStacktrace, createSafeError, positionAt } from './utils.js'; diff --git a/packages/astro/src/vite-plugin-astro-server/index.ts b/packages/astro/src/vite-plugin-astro-server/index.ts index 1666c453f..bf34f83bc 100644 --- a/packages/astro/src/vite-plugin-astro-server/index.ts +++ b/packages/astro/src/vite-plugin-astro-server/index.ts @@ -9,6 +9,7 @@ import { attachToResponse, getSetCookiesFromResponse } from '../core/cookies/ind import { call as callEndpoint } from '../core/endpoint/dev/index.js'; import { collectErrorMetadata, getViteErrorPayload } from '../core/errors/dev/index.js'; import type { ErrorWithMetadata } from '../core/errors/index.js'; +import { createSafeError } from '../core/errors/index.js'; import { error, info, LogOptions, warn } from '../core/logger/core.js'; import * as msg from '../core/messages.js'; import { appendForwardSlash } from '../core/path.js'; @@ -18,7 +19,6 @@ import { createRequest } from '../core/request.js'; import { createRouteManifest, matchAllRoutes } from '../core/routing/index.js'; import { resolvePages } from '../core/util.js'; import notFoundTemplate, { subpathNotUsedTemplate } from '../template/4xx.js'; -import { createSafeError } from '../core/errors/index.js'; interface AstroPluginOptions { settings: AstroSettings;