diff options
author | 2025-06-04 12:48:34 +0000 | |
---|---|---|
committer | 2025-06-04 12:48:34 +0000 | |
commit | 761abb61d8a2ca79be729ab4d7285f10606cd2fd (patch) | |
tree | 125c027c201b797b350202e8ad2ec7615f9c653e /packages | |
parent | 0eafe14b08c627b116842ea0a5299a00f9baa3d1 (diff) | |
download | astro-761abb61d8a2ca79be729ab4d7285f10606cd2fd.tar.gz astro-761abb61d8a2ca79be729ab4d7285f10606cd2fd.tar.zst astro-761abb61d8a2ca79be729ab4d7285f10606cd2fd.zip |
[ci] format
Diffstat (limited to 'packages')
-rw-r--r-- | packages/astro/src/core/build/generate.ts | 10 | ||||
-rw-r--r-- | packages/astro/src/core/build/plugins/plugin-manifest.ts | 10 | ||||
-rw-r--r-- | packages/astro/src/runtime/server/render/component.ts | 2 | ||||
-rw-r--r-- | packages/astro/src/runtime/server/render/page.ts | 4 | ||||
-rw-r--r-- | packages/astro/src/types/public/config.ts | 24 | ||||
-rw-r--r-- | packages/astro/src/types/public/context.ts | 2 | ||||
-rw-r--r-- | packages/astro/src/vite-plugin-astro-server/plugin.ts | 10 |
7 files changed, 31 insertions, 31 deletions
diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index 27a2a4ca2..b38b1cc0e 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -27,18 +27,18 @@ import type { SSRError, SSRLoadedRenderer, } from '../../types/public/internal.js'; -import type { SSRActions, SSRManifestCSP, SSRManifest, SSRManifestI18n } from '../app/types.js'; +import type { SSRActions, SSRManifest, SSRManifestCSP, SSRManifestI18n } from '../app/types.js'; import { getAlgorithm, + getDirectives, getScriptHashes, + getScriptResources, + getStrictDynamic, getStyleHashes, - getDirectives, + getStyleResources, shouldTrackCspHashes, trackScriptHashes, trackStyleHashes, - getScriptResources, - getStyleResources, - getStrictDynamic, } from '../csp/common.js'; import { NoPrerenderedRoutesWithDomains } from '../errors/errors-data.js'; import { AstroError, AstroErrorData } from '../errors/index.js'; diff --git a/packages/astro/src/core/build/plugins/plugin-manifest.ts b/packages/astro/src/core/build/plugins/plugin-manifest.ts index 19369f59a..0b20de7ef 100644 --- a/packages/astro/src/core/build/plugins/plugin-manifest.ts +++ b/packages/astro/src/core/build/plugins/plugin-manifest.ts @@ -10,22 +10,22 @@ import { toFallbackType, toRoutingStrategy } from '../../../i18n/utils.js'; import { runHookBuildSsr } from '../../../integrations/hooks.js'; import { BEFORE_HYDRATION_SCRIPT_ID, PAGE_SCRIPT_ID } from '../../../vite-plugin-scripts/index.js'; import type { + SSRManifestCSP, SSRManifestI18n, SerializedRouteInfo, SerializedSSRManifest, - SSRManifestCSP, } from '../../app/types.js'; import { getAlgorithm, + getDirectives, getScriptHashes, + getScriptResources, + getStrictDynamic, getStyleHashes, - getDirectives, + getStyleResources, shouldTrackCspHashes, trackScriptHashes, trackStyleHashes, - getScriptResources, - getStyleResources, - getStrictDynamic, } from '../../csp/common.js'; import { encodeKey } from '../../encryption.js'; import { fileExtension, joinPaths, prependForwardSlash } from '../../path.js'; diff --git a/packages/astro/src/runtime/server/render/component.ts b/packages/astro/src/runtime/server/render/component.ts index 599105043..ec65a34c0 100644 --- a/packages/astro/src/runtime/server/render/component.ts +++ b/packages/astro/src/runtime/server/render/component.ts @@ -17,6 +17,7 @@ import type { SSRLoadedRenderer, SSRResult, } from '../../../types/public/internal.js'; +import { bufferHeadContent } from './astro/render.js'; import { Fragment, type RenderDestination, @@ -29,7 +30,6 @@ import { maybeRenderHead } from './head.js'; import { ServerIslandComponent, containsServerDirective } from './server-islands.js'; import { type ComponentSlots, renderSlotToString, renderSlots } from './slot.js'; import { formatList, internalSpreadAttributes, renderElement, voidElementNames } from './util.js'; -import { bufferHeadContent } from './astro/render.js'; const needsHeadRenderingSymbol = Symbol.for('astro.needsHeadRendering'); const rendererAliases = new Map([['solid', 'solid-js']]); diff --git a/packages/astro/src/runtime/server/render/page.ts b/packages/astro/src/runtime/server/render/page.ts index d4e244245..9653cfa6f 100644 --- a/packages/astro/src/runtime/server/render/page.ts +++ b/packages/astro/src/runtime/server/render/page.ts @@ -1,9 +1,9 @@ -import { type NonAstroPageComponent, renderComponentToString } from './component.js'; -import type { AstroComponentFactory } from './index.js'; import type { RouteData, SSRResult } from '../../../types/public/internal.js'; import { isAstroComponentFactory } from './astro/index.js'; import { renderToAsyncIterable, renderToReadableStream, renderToString } from './astro/render.js'; import { encoder } from './common.js'; +import { type NonAstroPageComponent, renderComponentToString } from './component.js'; +import type { AstroComponentFactory } from './index.js'; import { isDeno, isNode } from './util.js'; export async function renderPage( diff --git a/packages/astro/src/types/public/config.ts b/packages/astro/src/types/public/config.ts index 0b44702fe..94a5a6e56 100644 --- a/packages/astro/src/types/public/config.ts +++ b/packages/astro/src/types/public/config.ts @@ -15,10 +15,10 @@ import type { AssetsPrefix } from '../../core/app/types.js'; import type { AstroConfigType } from '../../core/config/schemas/index.js'; import type { REDIRECT_STATUS_CODES } from '../../core/constants.js'; import type { AstroCookieSetOptions } from '../../core/cookies/cookies.js'; +import type { CspAlgorithm, CspDirective, CspHash } from '../../core/csp/config.js'; import type { Logger, LoggerLevel } from '../../core/logger/core.js'; import type { EnvSchema } from '../../env/schema.js'; import type { AstroIntegration } from './integrations.js'; -import type { CspAlgorithm, CspDirective, CspHash } from '../../core/csp/config.js'; export type Locales = (string | { codes: [string, ...string[]]; path: string })[]; @@ -48,7 +48,7 @@ export type RedirectConfig = | { status: ValidRedirectStatus; destination: string; - }; + }; export type ServerConfig = { /** @@ -1188,7 +1188,7 @@ export interface ViteUserConfig extends OriginalViteUserConfig { * ``` */ defaultStrategy?: 'tap' | 'hover' | 'viewport' | 'load'; - }; + }; /** * @docs @@ -1506,7 +1506,7 @@ export interface ViteUserConfig extends OriginalViteUserConfig { * * */ excludeLangs?: string[]; - } + } | SyntaxHighlightConfigType | false; /** @@ -1811,7 +1811,7 @@ export interface ViteUserConfig extends OriginalViteUserConfig { * ``` */ fallbackType?: 'redirect' | 'rewrite'; - } + } | 'manual'; /** @@ -2246,7 +2246,7 @@ export interface ViteUserConfig extends OriginalViteUserConfig { * @version 5.9.0 * @description * - * Enables built-in support for Content Security Policy (CSP). For more information, + * Enables built-in support for Content Security Policy (CSP). For more information, * refer to the [experimental CSP documentation](https://docs.astro.build/en/reference/experimental-flags/csp/) * */ @@ -2261,7 +2261,7 @@ export interface ViteUserConfig extends OriginalViteUserConfig { * @description * * The [hash function](https://developer.mozilla.org/en-US/docs/Glossary/Hash_function) to use to generate the hashes of the styles and scripts emitted by Astro. - * + * * ```js * import { defineConfig } from 'astro/config'; * @@ -2299,10 +2299,10 @@ export interface ViteUserConfig extends OriginalViteUserConfig { * * A list of additional hashes added to the `style-src` directive. * - * If you have external styles that aren't generated by Astro, this configuration option allows you to provide additional hashes to be rendered. + * If you have external styles that aren't generated by Astro, this configuration option allows you to provide additional hashes to be rendered. * * You must provide hashes that start with `sha384-`, `sha512-` or `sha256-`. Other values will cause a validation error. These hashes are added to all pages. - * + * * ```js * import { defineConfig } from 'astro/config'; * @@ -2376,10 +2376,10 @@ export interface ViteUserConfig extends OriginalViteUserConfig { * * A list of additional hashes added to the `script-src` directive. * - * If you have external scripts that aren't generated by Astro, or inline scripts, this configuration option allows you to provide additional hashes to be rendered. + * If you have external scripts that aren't generated by Astro, or inline scripts, this configuration option allows you to provide additional hashes to be rendered. * * You must provide hashes that start with `sha384-`, `sha512-` or `sha256-`. Other values will cause a validation error. These hashes are added to all pages. - * + * * ```js * import { defineConfig } from 'astro/config'; * @@ -2484,7 +2484,7 @@ export interface ViteUserConfig extends OriginalViteUserConfig { * */ directives?: CspDirective[]; - }; + }; /** * @name experimental.preserveScriptOrder diff --git a/packages/astro/src/types/public/context.ts b/packages/astro/src/types/public/context.ts index efd2991c7..6b51bbcf7 100644 --- a/packages/astro/src/types/public/context.ts +++ b/packages/astro/src/types/public/context.ts @@ -6,12 +6,12 @@ import type { } from '../../actions/runtime/virtual/server.js'; import type { SUPPORTED_MARKDOWN_FILE_EXTENSIONS } from '../../core/constants.js'; import type { AstroCookies } from '../../core/cookies/cookies.js'; +import type { CspDirective, CspHash } from '../../core/csp/config.js'; import type { AstroSession } from '../../core/session.js'; import type { AstroComponentFactory } from '../../runtime/server/index.js'; import type { Params, RewritePayload } from './common.js'; import type { ValidRedirectStatus } from './config.js'; import type { AstroInstance, MDXInstance, MarkdownInstance } from './content.js'; -import type { CspDirective, CspHash } from '../../core/csp/config.js'; /** * Astro global available in all contexts in .astro files diff --git a/packages/astro/src/vite-plugin-astro-server/plugin.ts b/packages/astro/src/vite-plugin-astro-server/plugin.ts index 82775e41e..3e310ad85 100644 --- a/packages/astro/src/vite-plugin-astro-server/plugin.ts +++ b/packages/astro/src/vite-plugin-astro-server/plugin.ts @@ -4,16 +4,16 @@ import { IncomingMessage } from 'node:http'; import { fileURLToPath } from 'node:url'; import type * as vite from 'vite'; import { normalizePath } from 'vite'; -import type { SSRManifestCSP, SSRManifest, SSRManifestI18n } from '../core/app/types.js'; +import type { SSRManifest, SSRManifestCSP, SSRManifestI18n } from '../core/app/types.js'; import { getAlgorithm, - getScriptHashes, - getStyleHashes, - shouldTrackCspHashes, getDirectives, + getScriptHashes, getScriptResources, - getStyleResources, getStrictDynamic, + getStyleHashes, + getStyleResources, + shouldTrackCspHashes, } from '../core/csp/common.js'; import { warnMissingAdapter } from '../core/dev/adapter-validation.js'; import { createKey, getEnvironmentKey, hasEnvironmentKey } from '../core/encryption.js'; |