astro 6.1.5 → 6.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/actions/integration.js +1 -1
  2. package/dist/assets/build/generate.d.ts +2 -2
  3. package/dist/assets/endpoint/shared.js +7 -0
  4. package/dist/assets/fonts/core/compute-font-families-assets.d.ts +2 -2
  5. package/dist/assets/fonts/core/get-or-create-font-family-assets.d.ts +2 -2
  6. package/dist/assets/fonts/vite-plugin-fonts.d.ts +2 -2
  7. package/dist/assets/internal.d.ts +1 -0
  8. package/dist/assets/internal.js +3 -1
  9. package/dist/assets/utils/inferSourceFormat.d.ts +6 -0
  10. package/dist/assets/utils/inferSourceFormat.js +21 -0
  11. package/dist/assets/vite-plugin-assets.d.ts +2 -2
  12. package/dist/cli/create-key/core/create-key.d.ts +2 -2
  13. package/dist/cli/docs/core/open-docs.d.ts +2 -2
  14. package/dist/cli/flags.d.ts +2 -2
  15. package/dist/cli/flags.js +1 -1
  16. package/dist/cli/info/core/info.d.ts +2 -2
  17. package/dist/cli/info/infra/tinyclip-clipboard.d.ts +2 -2
  18. package/dist/cli/infra/build-time-astro-version-provider.js +1 -1
  19. package/dist/cli/infra/logger-help-display.d.ts +2 -2
  20. package/dist/cli/install-package.d.ts +2 -2
  21. package/dist/container/index.js +3 -3
  22. package/dist/content/content-layer.d.ts +2 -2
  23. package/dist/content/content-layer.js +3 -3
  24. package/dist/content/instance.d.ts +2 -2
  25. package/dist/content/server-listeners.d.ts +2 -2
  26. package/dist/content/types-generator.d.ts +2 -2
  27. package/dist/content/utils.d.ts +2 -2
  28. package/dist/content/vite-plugin-content-imports.d.ts +2 -2
  29. package/dist/core/app/base.d.ts +2 -2
  30. package/dist/core/app/base.js +3 -3
  31. package/dist/core/app/dev/app.d.ts +4 -4
  32. package/dist/core/app/logging.d.ts +2 -2
  33. package/dist/core/app/logging.js +3 -3
  34. package/dist/core/app/types.d.ts +2 -2
  35. package/dist/core/base-pipeline.d.ts +3 -3
  36. package/dist/core/build/generate.d.ts +2 -2
  37. package/dist/core/build/index.d.ts +2 -2
  38. package/dist/core/build/page-data.d.ts +2 -2
  39. package/dist/core/build/types.d.ts +2 -2
  40. package/dist/core/cache/runtime/noop.d.ts +2 -2
  41. package/dist/core/constants.js +1 -1
  42. package/dist/core/create-vite.d.ts +2 -2
  43. package/dist/core/dev/adapter-validation.d.ts +3 -3
  44. package/dist/core/dev/container.d.ts +3 -3
  45. package/dist/core/dev/container.js +2 -2
  46. package/dist/core/dev/dev.js +1 -1
  47. package/dist/core/logger/console.d.ts +2 -2
  48. package/dist/core/logger/console.js +4 -1
  49. package/dist/core/logger/core.d.ts +48 -21
  50. package/dist/core/logger/core.js +8 -4
  51. package/dist/core/logger/node.d.ts +4 -4
  52. package/dist/core/logger/node.js +21 -9
  53. package/dist/core/logger/vite.d.ts +1 -1
  54. package/dist/core/messages/runtime.d.ts +2 -2
  55. package/dist/core/messages/runtime.js +1 -1
  56. package/dist/core/preview/static-preview-server.d.ts +2 -2
  57. package/dist/core/render/params-and-props.d.ts +2 -2
  58. package/dist/core/render/route-cache.d.ts +3 -3
  59. package/dist/core/render/slots.d.ts +2 -2
  60. package/dist/core/request.d.ts +2 -2
  61. package/dist/core/routing/create-manifest.d.ts +3 -3
  62. package/dist/core/routing/prerender.d.ts +2 -2
  63. package/dist/core/routing/rewrite.d.ts +2 -2
  64. package/dist/core/sync/index.d.ts +3 -3
  65. package/dist/integrations/features-validation.d.ts +2 -2
  66. package/dist/integrations/hooks.d.ts +13 -13
  67. package/dist/runtime/server/endpoint.d.ts +2 -2
  68. package/dist/runtime/server/escape.d.ts +8 -0
  69. package/dist/runtime/server/escape.js +4 -0
  70. package/dist/runtime/server/render/server-islands.js +5 -12
  71. package/dist/runtime/server/render/util.js +2 -5
  72. package/dist/types/astro.d.ts +3 -3
  73. package/dist/types/public/config.d.ts +2 -2
  74. package/dist/vite-plugin-app/app.d.ts +5 -5
  75. package/dist/vite-plugin-app/createAstroServerApp.d.ts +2 -2
  76. package/dist/vite-plugin-app/createAstroServerApp.js +3 -3
  77. package/dist/vite-plugin-astro/compile.d.ts +2 -2
  78. package/dist/vite-plugin-astro/hmr.d.ts +2 -2
  79. package/dist/vite-plugin-astro/index.d.ts +2 -2
  80. package/dist/vite-plugin-astro-server/base.d.ts +2 -2
  81. package/dist/vite-plugin-astro-server/error.d.ts +2 -2
  82. package/dist/vite-plugin-astro-server/plugin.d.ts +2 -2
  83. package/dist/vite-plugin-astro-server/sec-fetch.d.ts +2 -2
  84. package/dist/vite-plugin-hmr-reload/index.js +17 -0
  85. package/dist/vite-plugin-integrations-container/index.d.ts +2 -2
  86. package/dist/vite-plugin-markdown/index.d.ts +2 -2
  87. package/dist/vite-plugin-routes/index.d.ts +2 -2
  88. package/package.json +4 -6
@@ -30,7 +30,7 @@ function astroIntegrationActionsRouteHandler({
30
30
  });
31
31
  },
32
32
  "astro:routes:resolved": ({ routes }) => {
33
- if (!hasNonPrerenderedRoute(routes)) {
33
+ if (!settings.config.adapter && !hasNonPrerenderedRoute(routes)) {
34
34
  const error = new AstroError(ActionsWithoutServerOutputError);
35
35
  error.stack = void 0;
36
36
  throw error;
@@ -1,10 +1,10 @@
1
1
  import type { StaticBuildOptions } from '../../core/build/types.js';
2
- import type { Logger } from '../../core/logger/core.js';
2
+ import type { AstroLogger } from '../../core/logger/core.js';
3
3
  import type { MapValue } from '../../type-utils.js';
4
4
  import type { AstroConfig } from '../../types/public/config.js';
5
5
  import type { AssetsGlobalStaticImagesList } from '../types.js';
6
6
  type AssetEnv = {
7
- logger: Logger;
7
+ logger: AstroLogger;
8
8
  isSSR: boolean;
9
9
  count: {
10
10
  total: number;
@@ -4,6 +4,7 @@ import { isRemoteAllowed } from "@astrojs/internal-helpers/remote";
4
4
  import * as mime from "mrmime";
5
5
  import { getConfiguredImageService } from "../internal.js";
6
6
  import { etag } from "../utils/etag.js";
7
+ import { inferSourceFormat } from "../utils/inferSourceFormat.js";
7
8
  async function loadRemoteImage(src) {
8
9
  try {
9
10
  const res = await fetch(src, { redirect: "manual" });
@@ -31,6 +32,12 @@ const handleImageRequest = async ({
31
32
  if (!transform?.src) {
32
33
  return new Response("Invalid request", { status: 400 });
33
34
  }
35
+ if (transform.format === "svg") {
36
+ const sourceFormat = inferSourceFormat(transform.src);
37
+ if (sourceFormat !== "svg") {
38
+ return new Response("Cannot convert non-SVG source to SVG format", { status: 403 });
39
+ }
40
+ }
34
41
  let inputBuffer = void 0;
35
42
  if (isRemotePath(transform.src)) {
36
43
  if (!isRemoteAllowed(transform.src, imageConfig)) {
@@ -1,4 +1,4 @@
1
- import type { Logger } from '../../../core/logger/core.js';
1
+ import type { AstroLogger } from '../../../core/logger/core.js';
2
2
  import type { FontResolver, StringMatcher } from '../definitions.js';
3
3
  import type { Collaborator, Defaults, FontFileById, ResolvedFontFamily } from '../types.js';
4
4
  import type { collectFontAssetsFromFaces as _collectFontAssetsFromFaces } from './collect-font-assets-from-faces.js';
@@ -7,7 +7,7 @@ import type { getOrCreateFontFamilyAssets as _getOrCreateFontFamilyAssets } from
7
7
  export declare function computeFontFamiliesAssets({ resolvedFamilies, fontResolver, logger, bold, defaults, stringMatcher, getOrCreateFontFamilyAssets, collectFontAssetsFromFaces, filterAndTransformFontFaces, }: {
8
8
  resolvedFamilies: Array<ResolvedFontFamily>;
9
9
  fontResolver: FontResolver;
10
- logger: Logger;
10
+ logger: AstroLogger;
11
11
  bold: (input: string) => string;
12
12
  defaults: Defaults;
13
13
  stringMatcher: StringMatcher;
@@ -1,8 +1,8 @@
1
- import type { Logger } from '../../../core/logger/core.js';
1
+ import type { AstroLogger } from '../../../core/logger/core.js';
2
2
  import type { FontFamilyAssetsByUniqueKey, ResolvedFontFamily } from '../types.js';
3
3
  export declare function getOrCreateFontFamilyAssets({ fontFamilyAssetsByUniqueKey, logger, bold, family, }: {
4
4
  fontFamilyAssetsByUniqueKey: FontFamilyAssetsByUniqueKey;
5
- logger: Logger;
5
+ logger: AstroLogger;
6
6
  bold: (input: string) => string;
7
7
  family: ResolvedFontFamily;
8
8
  }): import("../types.js").FontFamilyAssets;
@@ -1,10 +1,10 @@
1
1
  import type { Plugin } from 'vite';
2
- import type { Logger } from '../../core/logger/core.js';
2
+ import type { AstroLogger } from '../../core/logger/core.js';
3
3
  import type { AstroSettings } from '../../types/astro.js';
4
4
  interface Options {
5
5
  settings: AstroSettings;
6
6
  sync: boolean;
7
- logger: Logger;
7
+ logger: AstroLogger;
8
8
  }
9
9
  export declare function fontsPlugin({ settings, sync, logger }: Options): Plugin;
10
10
  export {};
@@ -2,6 +2,7 @@ import type { AstroConfig } from '../types/public/config.js';
2
2
  import type { AstroAdapterClientConfig } from '../types/public/integrations.js';
3
3
  import { type ImageService } from './services/service.js';
4
4
  import { type GetImageResult, type UnresolvedImageTransform } from './types.js';
5
+ export { verifyOptions } from './services/service.js';
5
6
  export declare const cssFitValues: string[];
6
7
  export declare function getConfiguredImageService(): Promise<ImageService>;
7
8
  export declare function getImage(options: UnresolvedImageTransform, imageConfig: AstroConfig['image'] & AstroAdapterClientConfig): Promise<GetImageResult>;
@@ -15,6 +15,7 @@ import {
15
15
  import { isESMImportedImage, isRemoteImage, resolveSrc } from "./utils/imageKind.js";
16
16
  import { inferRemoteSize } from "./utils/remoteProbe.js";
17
17
  import { createPlaceholderURL, stringifyPlaceholderURL } from "./utils/url.js";
18
+ import { verifyOptions } from "./services/service.js";
18
19
  const cssFitValues = ["fill", "contain", "cover", "scale-down"];
19
20
  async function getConfiguredImageService() {
20
21
  if (!globalThis?.astroAsset?.imageService) {
@@ -190,5 +191,6 @@ async function getImage(options, imageConfig) {
190
191
  export {
191
192
  cssFitValues,
192
193
  getConfiguredImageService,
193
- getImage
194
+ getImage,
195
+ verifyOptions
194
196
  };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Infer the image format from a source path or URL by examining
3
+ * the file extension. For data: URIs, the MIME type is extracted.
4
+ * Returns undefined if the format cannot be determined.
5
+ */
6
+ export declare function inferSourceFormat(src: string): string | undefined;
@@ -0,0 +1,21 @@
1
+ import { removeQueryString } from "@astrojs/internal-helpers/path";
2
+ const DATA_PREFIX = "data:";
3
+ function inferSourceFormat(src) {
4
+ if (src.startsWith(DATA_PREFIX)) {
5
+ const mime = src.slice(DATA_PREFIX.length, src.indexOf(";"));
6
+ if (mime === "image/svg+xml") return "svg";
7
+ const sub = mime.split("/")[1];
8
+ return sub || void 0;
9
+ }
10
+ try {
11
+ const cleanSrc = removeQueryString(src).split("#")[0];
12
+ const lastDot = cleanSrc.lastIndexOf(".");
13
+ if (lastDot === -1) return void 0;
14
+ return cleanSrc.slice(lastDot + 1).toLowerCase();
15
+ } catch {
16
+ return void 0;
17
+ }
18
+ }
19
+ export {
20
+ inferSourceFormat
21
+ };
@@ -1,11 +1,11 @@
1
1
  import type * as fsMod from 'node:fs';
2
2
  import type * as vite from 'vite';
3
- import type { Logger } from '../core/logger/core.js';
3
+ import type { AstroLogger } from '../core/logger/core.js';
4
4
  import type { AstroSettings } from '../types/astro.js';
5
5
  interface Options {
6
6
  settings: AstroSettings;
7
7
  sync: boolean;
8
- logger: Logger;
8
+ logger: AstroLogger;
9
9
  fs: typeof fsMod;
10
10
  }
11
11
  export default function assets({ fs, settings, sync, logger }: Options): vite.Plugin[];
@@ -1,7 +1,7 @@
1
- import type { Logger } from '../../../core/logger/core.js';
1
+ import type { AstroLogger } from '../../../core/logger/core.js';
2
2
  import type { KeyGenerator } from '../definitions.js';
3
3
  interface Options {
4
- logger: Logger;
4
+ logger: AstroLogger;
5
5
  keyGenerator: KeyGenerator;
6
6
  }
7
7
  export declare const createKeyCommand: {
@@ -1,10 +1,10 @@
1
- import type { Logger } from '../../../core/logger/core.js';
1
+ import type { AstroLogger } from '../../../core/logger/core.js';
2
2
  import type { CommandExecutor, OperatingSystemProvider } from '../../definitions.js';
3
3
  import type { CloudIdeProvider } from '../definitions.js';
4
4
  interface Options {
5
5
  url: string;
6
6
  operatingSystemProvider: OperatingSystemProvider;
7
- logger: Logger;
7
+ logger: AstroLogger;
8
8
  commandExecutor: CommandExecutor;
9
9
  cloudIdeProvider: CloudIdeProvider;
10
10
  }
@@ -1,5 +1,5 @@
1
1
  import type { Arguments } from 'yargs-parser';
2
- import type { Logger } from '../core/logger/core.js';
2
+ import type { AstroLogger } from '../core/logger/core.js';
3
3
  import type { AstroInlineConfig } from '../types/public/config.js';
4
4
  export type Flags = Arguments;
5
5
  /** @deprecated Use AstroConfigResolver instead */
@@ -8,4 +8,4 @@ export declare function flagsToAstroInlineConfig(flags: Flags): AstroInlineConfi
8
8
  * The `logging` is usually created from an `AstroInlineConfig`, but some flows like `add`
9
9
  * doesn't read the AstroConfig directly, so we create a `logging` object from the CLI flags instead.
10
10
  */
11
- export declare function createLoggerFromFlags(flags: Flags): Logger;
11
+ export declare function createLoggerFromFlags(flags: Flags): AstroLogger;
package/dist/cli/flags.js CHANGED
@@ -21,7 +21,7 @@ function flagsToAstroInlineConfig(flags) {
21
21
  }
22
22
  function createLoggerFromFlags(flags) {
23
23
  const logging = {
24
- dest: nodeLogDestination,
24
+ destination: nodeLogDestination,
25
25
  level: "info"
26
26
  };
27
27
  if (flags.verbose) {
@@ -1,11 +1,11 @@
1
- import type { Logger } from '../../../core/logger/core.js';
1
+ import type { AstroLogger } from '../../../core/logger/core.js';
2
2
  import type { Clipboard, DebugInfoFormatter, DebugInfoProvider } from '../definitions.js';
3
3
  interface Options {
4
4
  debugInfoProvider: DebugInfoProvider;
5
5
  getDebugInfoFormatter: (options: {
6
6
  pretty: boolean;
7
7
  }) => DebugInfoFormatter;
8
- logger: Logger;
8
+ logger: AstroLogger;
9
9
  clipboard: Clipboard;
10
10
  }
11
11
  export declare const infoCommand: {
@@ -1,9 +1,9 @@
1
- import type { Logger } from '../../../core/logger/core.js';
1
+ import type { AstroLogger } from '../../../core/logger/core.js';
2
2
  import type { Clipboard, Prompt } from '../definitions.js';
3
3
  export declare class TinyclipClipboard implements Clipboard {
4
4
  #private;
5
5
  constructor({ logger, prompt, }: {
6
- logger: Logger;
6
+ logger: AstroLogger;
7
7
  prompt: Prompt;
8
8
  });
9
9
  copy(text: string): Promise<void>;
@@ -1,6 +1,6 @@
1
1
  class BuildTimeAstroVersionProvider {
2
2
  // Injected during the build through esbuild define
3
- version = "6.1.5";
3
+ version = "6.1.7";
4
4
  }
5
5
  export {
6
6
  BuildTimeAstroVersionProvider
@@ -1,11 +1,11 @@
1
- import type { Logger } from '../../core/logger/core.js';
1
+ import type { AstroLogger } from '../../core/logger/core.js';
2
2
  import type { AstroVersionProvider, HelpDisplay, TextStyler } from '../definitions.js';
3
3
  import type { HelpPayload } from '../domain/help-payload.js';
4
4
  import type { Flags } from '../flags.js';
5
5
  export declare class LoggerHelpDisplay implements HelpDisplay {
6
6
  #private;
7
7
  constructor({ logger, textStyler, astroVersionProvider, flags, }: {
8
- logger: Logger;
8
+ logger: AstroLogger;
9
9
  textStyler: TextStyler;
10
10
  astroVersionProvider: AstroVersionProvider;
11
11
  flags: Flags;
@@ -1,10 +1,10 @@
1
- import type { Logger } from '../core/logger/core.js';
1
+ import type { AstroLogger } from '../core/logger/core.js';
2
2
  type GetPackageOptions = {
3
3
  skipAsk?: boolean;
4
4
  optional?: boolean;
5
5
  cwd?: string;
6
6
  };
7
- export declare function getPackage<T>(packageName: string, logger: Logger, options: GetPackageOptions, otherDeps?: string[]): Promise<T | undefined>;
7
+ export declare function getPackage<T>(packageName: string, logger: AstroLogger, options: GetPackageOptions, otherDeps?: string[]): Promise<T | undefined>;
8
8
  export declare function fetchPackageJson(scope: string | undefined, name: string, tag: string): Promise<Record<string, any> | Error>;
9
9
  export declare function fetchPackageVersions(packageName: string): Promise<string[] | Error>;
10
10
  export {};
@@ -3,7 +3,7 @@ import { getDefaultClientDirectives } from "../core/client-directive/index.js";
3
3
  import { ASTRO_CONFIG_DEFAULTS } from "../core/config/schemas/index.js";
4
4
  import { validateConfig } from "../core/config/validate.js";
5
5
  import { createKey } from "../core/encryption.js";
6
- import { Logger } from "../core/logger/core.js";
6
+ import { AstroLogger } from "../core/logger/core.js";
7
7
  import { nodeLogDestination } from "../core/logger/node.js";
8
8
  import { NOOP_MIDDLEWARE_FN } from "../core/middleware/noop-middleware.js";
9
9
  import { removeLeadingForwardSlash } from "../core/path.js";
@@ -82,9 +82,9 @@ class experimental_AstroContainer {
82
82
  astroConfig
83
83
  }) {
84
84
  this.#pipeline = ContainerPipeline.create({
85
- logger: new Logger({
85
+ logger: new AstroLogger({
86
86
  level: "info",
87
- dest: nodeLogDestination
87
+ destination: nodeLogDestination
88
88
  }),
89
89
  manifest: createManifest(manifest, renderers),
90
90
  streaming,
@@ -1,5 +1,5 @@
1
1
  import type { FSWatcher } from 'vite';
2
- import type { Logger } from '../core/logger/core.js';
2
+ import type { AstroLogger } from '../core/logger/core.js';
3
3
  import type { AstroSettings } from '../types/astro.js';
4
4
  import type { RefreshContentOptions } from '../types/public/content.js';
5
5
  import type { MutableDataStore } from './mutable-data-store.js';
@@ -7,7 +7,7 @@ import { type ContentObservable } from './utils.js';
7
7
  export interface ContentLayerOptions {
8
8
  store: MutableDataStore;
9
9
  settings: AstroSettings;
10
- logger: Logger;
10
+ logger: AstroLogger;
11
11
  watcher?: FSWatcher;
12
12
  contentConfigObserver?: ContentObservable;
13
13
  }
@@ -192,7 +192,7 @@ ${contentConfig.error.message}`
192
192
  logger.info("Content config changed");
193
193
  shouldClear = true;
194
194
  }
195
- if (previousAstroVersion && previousAstroVersion !== "6.1.5") {
195
+ if (previousAstroVersion && previousAstroVersion !== "6.1.7") {
196
196
  logger.info("Astro version changed");
197
197
  shouldClear = true;
198
198
  }
@@ -200,8 +200,8 @@ ${contentConfig.error.message}`
200
200
  logger.info("Clearing content store");
201
201
  this.#store.clearAll();
202
202
  }
203
- if ("6.1.5") {
204
- this.#store.metaStore().set("astro-version", "6.1.5");
203
+ if ("6.1.7") {
204
+ this.#store.metaStore().set("astro-version", "6.1.7");
205
205
  }
206
206
  if (currentConfigDigest) {
207
207
  this.#store.metaStore().set("content-config-digest", currentConfigDigest);
@@ -1,12 +1,12 @@
1
1
  import type { FSWatcher } from 'vite';
2
2
  import { ContentLayer } from './content-layer.js';
3
- import type { Logger } from '../core/logger/core.js';
3
+ import type { AstroLogger } from '../core/logger/core.js';
4
4
  import type { AstroSettings } from '../types/astro.js';
5
5
  import type { MutableDataStore } from './mutable-data-store.js';
6
6
  interface ContentLayerOptions {
7
7
  store: MutableDataStore;
8
8
  settings: AstroSettings;
9
- logger: Logger;
9
+ logger: AstroLogger;
10
10
  watcher?: FSWatcher;
11
11
  }
12
12
  export declare const globalContentLayer: {
@@ -1,10 +1,10 @@
1
1
  import type fsMod from 'node:fs';
2
2
  import type { ViteDevServer } from 'vite';
3
- import type { Logger } from '../core/logger/core.js';
3
+ import type { AstroLogger } from '../core/logger/core.js';
4
4
  import type { AstroSettings } from '../types/astro.js';
5
5
  interface ContentServerListenerParams {
6
6
  fs: typeof fsMod;
7
- logger: Logger;
7
+ logger: AstroLogger;
8
8
  settings: AstroSettings;
9
9
  viteServer: ViteDevServer;
10
10
  }
@@ -1,6 +1,6 @@
1
1
  import type fsMod from 'node:fs';
2
2
  import { type ViteDevServer } from 'vite';
3
- import type { Logger } from '../core/logger/core.js';
3
+ import type { AstroLogger } from '../core/logger/core.js';
4
4
  import type { AstroSettings } from '../types/astro.js';
5
5
  import { type ContentObservable } from './utils.js';
6
6
  type ChokidarEvent = 'add' | 'addDir' | 'change' | 'unlink' | 'unlinkDir';
@@ -10,7 +10,7 @@ type RawContentEvent = {
10
10
  };
11
11
  type CreateContentGeneratorParams = {
12
12
  contentConfigObserver: ContentObservable;
13
- logger: Logger;
13
+ logger: AstroLogger;
14
14
  settings: AstroSettings;
15
15
  /** This is required for loading the content config */
16
16
  viteServer: ViteDevServer;
@@ -2,7 +2,7 @@ import fsMod from 'node:fs';
2
2
  import type { PluginContext } from 'rollup';
3
3
  import type { RunnableDevEnvironment } from 'vite';
4
4
  import * as z from 'zod/v4';
5
- import type { Logger } from '../core/logger/core.js';
5
+ import type { AstroLogger } from '../core/logger/core.js';
6
6
  import type { AstroSettings } from '../types/astro.js';
7
7
  import type { AstroConfig } from '../types/public/config.js';
8
8
  import type { ContentEntryType, DataEntryType } from '../types/public/content.js';
@@ -102,7 +102,7 @@ export declare function getDataEntryExts(settings: Pick<AstroSettings, 'dataEntr
102
102
  export declare function getEntryConfigByExtMap<TEntryType extends ContentEntryType | DataEntryType>(entryTypes: TEntryType[]): Map<string, TEntryType>;
103
103
  export declare function getSymlinkedContentCollections({ contentDir, logger, fs, }: {
104
104
  contentDir: URL;
105
- logger: Logger;
105
+ logger: AstroLogger;
106
106
  fs: typeof fsMod;
107
107
  }): Promise<Map<string, string>>;
108
108
  export declare function reverseSymlink({ entry, symlinks, contentDir, }: {
@@ -1,9 +1,9 @@
1
1
  import type fsMod from 'node:fs';
2
2
  import type { Plugin } from 'vite';
3
- import type { Logger } from '../core/logger/core.js';
3
+ import type { AstroLogger } from '../core/logger/core.js';
4
4
  import type { AstroSettings } from '../types/astro.js';
5
5
  export declare function astroContentImportPlugin({ fs, settings, logger, }: {
6
6
  fs: typeof fsMod;
7
7
  settings: AstroSettings;
8
- logger: Logger;
8
+ logger: AstroLogger;
9
9
  }): Plugin[];
@@ -2,7 +2,7 @@ import type { RoutesList } from '../../types/astro.js';
2
2
  import type { RemotePattern, RouteData } from '../../types/public/index.js';
3
3
  import type { Pipeline } from '../base-pipeline.js';
4
4
  import { getSetCookiesFromResponse } from '../cookies/index.js';
5
- import { AstroIntegrationLogger, Logger } from '../logger/core.js';
5
+ import { AstroIntegrationLogger, AstroLogger } from '../logger/core.js';
6
6
  import { type CreateRenderContext, RenderContext } from '../render-context.js';
7
7
  import type { AppPipeline } from './pipeline.js';
8
8
  import type { SSRManifest } from './types.js';
@@ -79,7 +79,7 @@ export declare abstract class BaseApp<P extends Pipeline = AppPipeline> {
79
79
  pipeline: P;
80
80
  adapterLogger: AstroIntegrationLogger;
81
81
  baseWithoutTrailingSlash: string;
82
- logger: Logger;
82
+ logger: AstroLogger;
83
83
  constructor(manifest: SSRManifest, streaming?: boolean, ...args: any[]);
84
84
  abstract isDev(): boolean;
85
85
  createRenderContext(payload: CreateRenderContext): Promise<RenderContext>;
@@ -28,7 +28,7 @@ import {
28
28
  import { getCookiesFromResponse } from "../cookies/response.js";
29
29
  import { AstroError, AstroErrorData } from "../errors/index.js";
30
30
  import { consoleLogDestination } from "../logger/console.js";
31
- import { AstroIntegrationLogger, Logger } from "../logger/core.js";
31
+ import { AstroIntegrationLogger, AstroLogger } from "../logger/core.js";
32
32
  import { RenderContext } from "../render-context.js";
33
33
  import { redirectTemplate } from "../routing/3xx.js";
34
34
  import { ensure404Route } from "../routing/astro-designed-error-pages.js";
@@ -50,8 +50,8 @@ class BaseApp {
50
50
  this.manifestData = { routes: manifest.routes.map((route) => route.routeData) };
51
51
  this.baseWithoutTrailingSlash = removeTrailingForwardSlash(manifest.base);
52
52
  this.pipeline = this.createPipeline(streaming, manifest, ...args);
53
- this.logger = new Logger({
54
- dest: consoleLogDestination,
53
+ this.logger = new AstroLogger({
54
+ destination: consoleLogDestination,
55
55
  level: manifest.logLevel
56
56
  });
57
57
  this.adapterLogger = new AstroIntegrationLogger(this.logger.options, manifest.adapterName);
@@ -1,13 +1,13 @@
1
1
  import type { RouteData } from '../../../types/public/index.js';
2
- import type { Logger } from '../../logger/core.js';
2
+ import type { AstroLogger } from '../../logger/core.js';
3
3
  import { BaseApp, type DevMatch, type LogRequestPayload, type RenderErrorOptions } from '../base.js';
4
4
  import type { SSRManifest } from '../types.js';
5
5
  import { NonRunnablePipeline } from './pipeline.js';
6
6
  import type { RoutesList } from '../../../types/astro.js';
7
7
  export declare class DevApp extends BaseApp<NonRunnablePipeline> {
8
- logger: Logger;
9
- constructor(manifest: SSRManifest, streaming: boolean | undefined, logger: Logger);
10
- createPipeline(streaming: boolean, manifest: SSRManifest, logger: Logger): NonRunnablePipeline;
8
+ logger: AstroLogger;
9
+ constructor(manifest: SSRManifest, streaming: boolean | undefined, logger: AstroLogger);
10
+ createPipeline(streaming: boolean, manifest: SSRManifest, logger: AstroLogger): NonRunnablePipeline;
11
11
  isDev(): boolean;
12
12
  /**
13
13
  * Clears the cached middleware so it is re-resolved on the next request.
@@ -1,3 +1,3 @@
1
1
  import type { AstroInlineConfig } from '../../types/public/index.js';
2
- import { Logger } from '../logger/core.js';
3
- export declare function createConsoleLogger(level: AstroInlineConfig['logLevel']): Logger;
2
+ import { AstroLogger } from '../logger/core.js';
3
+ export declare function createConsoleLogger(level: AstroInlineConfig['logLevel']): AstroLogger;
@@ -1,8 +1,8 @@
1
1
  import { consoleLogDestination } from "../logger/console.js";
2
- import { Logger } from "../logger/core.js";
2
+ import { AstroLogger } from "../logger/core.js";
3
3
  function createConsoleLogger(level) {
4
- return new Logger({
5
- dest: consoleLogDestination,
4
+ return new AstroLogger({
5
+ destination: consoleLogDestination,
6
6
  level: level ?? "info"
7
7
  });
8
8
  }
@@ -5,7 +5,7 @@ import type { AstroConfig, CspAlgorithm, Locales, RemotePattern } from '../../ty
5
5
  import type { RouteData, SSRComponentMetadata, SSRLoadedRenderer, SSRResult } from '../../types/public/internal.js';
6
6
  import type { SinglePageBuiltModule } from '../build/types.js';
7
7
  import type { CspDirective } from '../csp/config.js';
8
- import type { LoggerLevel } from '../logger/core.js';
8
+ import type { AstroLoggerLevel } from '../logger/core.js';
9
9
  import type { RoutingStrategies } from './common.js';
10
10
  import type { CacheProviderFactory, SSRManifestCache } from '../cache/types.js';
11
11
  import type { BaseSessionConfig, SessionDriverFactory } from '../session/types.js';
@@ -138,7 +138,7 @@ export type SSRManifest = {
138
138
  placement: DevToolbarPlacement | undefined;
139
139
  };
140
140
  internalFetchHeaders?: Record<string, string>;
141
- logLevel: LoggerLevel;
141
+ logLevel: AstroLoggerLevel;
142
142
  };
143
143
  export type SSRActions = {
144
144
  server: Record<string, ActionClient<any, any, any>>;
@@ -6,7 +6,7 @@ import type { RuntimeMode } from '../types/public/config.js';
6
6
  import type { RouteData, SSRActions, SSRLoadedRenderer, SSRManifest, SSRResult } from '../types/public/internal.js';
7
7
  import type { ServerIslandMappings } from './app/types.js';
8
8
  import type { SinglePageBuiltModule } from './build/types.js';
9
- import type { Logger } from './logger/core.js';
9
+ import type { AstroLogger } from './logger/core.js';
10
10
  import { RouteCache } from './render/route-cache.js';
11
11
  import { type DefaultRouteParams } from './routing/default.js';
12
12
  import type { CacheProvider, CacheProviderFactory } from './cache/types.js';
@@ -29,7 +29,7 @@ export declare abstract class Pipeline {
29
29
  compiledCacheRoutes: CompiledCacheRoute[] | undefined;
30
30
  nodePool: NodePool | undefined;
31
31
  htmlStringCache: HTMLStringCache | undefined;
32
- readonly logger: Logger;
32
+ readonly logger: AstroLogger;
33
33
  readonly manifest: SSRManifest;
34
34
  /**
35
35
  * "development" or "production" only
@@ -62,7 +62,7 @@ export declare abstract class Pipeline {
62
62
  readonly cacheProvider: SSRManifest['cacheProvider'];
63
63
  readonly cacheConfig: SSRManifest['cacheConfig'];
64
64
  readonly serverIslands: SSRManifest['serverIslandMappings'];
65
- constructor(logger: Logger, manifest: SSRManifest,
65
+ constructor(logger: AstroLogger, manifest: SSRManifest,
66
66
  /**
67
67
  * "development" or "production" only
68
68
  */
@@ -1,4 +1,4 @@
1
- import type { Logger } from '../logger/core.js';
1
+ import type { AstroLogger } from '../logger/core.js';
2
2
  import type { AstroPrerenderer, RouteToHeaders } from '../../types/public/index.js';
3
3
  import type { RouteData } from '../../types/public/internal.js';
4
4
  import { type BuildInternals } from './internal.js';
@@ -20,7 +20,7 @@ interface RenderToPathPayload {
20
20
  route: RouteData;
21
21
  options: StaticBuildOptions;
22
22
  routeToHeaders?: RouteToHeaders;
23
- logger: Logger;
23
+ logger: AstroLogger;
24
24
  }
25
25
  /**
26
26
  * Renders a single prerendered path to an in-memory result.
@@ -1,6 +1,6 @@
1
1
  import type { AstroSettings, RoutesList } from '../../types/astro.js';
2
2
  import type { AstroInlineConfig, RuntimeMode } from '../../types/public/config.js';
3
- import type { Logger } from '../logger/core.js';
3
+ import type { AstroLogger } from '../logger/core.js';
4
4
  interface BuildOptions {
5
5
  /**
6
6
  * Output a development-based build similar to code transformed in `astro dev`. This
@@ -28,7 +28,7 @@ interface BuildOptions {
28
28
  */
29
29
  export default function build(inlineConfig: AstroInlineConfig, options?: BuildOptions): Promise<void>;
30
30
  interface AstroBuilderOptions extends BuildOptions {
31
- logger: Logger;
31
+ logger: AstroLogger;
32
32
  mode: string;
33
33
  runtimeMode: RuntimeMode;
34
34
  /**
@@ -1,9 +1,9 @@
1
1
  import type { AstroSettings, RoutesList } from '../../types/astro.js';
2
- import type { Logger } from '../logger/core.js';
2
+ import type { AstroLogger } from '../logger/core.js';
3
3
  import type { AllPagesData } from './types.js';
4
4
  interface CollectPagesDataOptions {
5
5
  settings: AstroSettings;
6
- logger: Logger;
6
+ logger: AstroLogger;
7
7
  manifest: RoutesList;
8
8
  }
9
9
  interface CollectPagesDataResult {
@@ -4,7 +4,7 @@ import type { AstroSettings, ComponentInstance, RoutesList } from '../../types/a
4
4
  import type { MiddlewareHandler } from '../../types/public/common.js';
5
5
  import type { RuntimeMode } from '../../types/public/config.js';
6
6
  import type { RouteData } from '../../types/public/internal.js';
7
- import type { Logger } from '../logger/core.js';
7
+ import type { AstroLogger } from '../logger/core.js';
8
8
  type ComponentPath = string;
9
9
  export type ViteID = string;
10
10
  export type StylesheetAsset = {
@@ -31,7 +31,7 @@ export type AllPagesData = Record<ComponentPath, PageBuildData>;
31
31
  export interface StaticBuildOptions {
32
32
  allPages: AllPagesData;
33
33
  settings: AstroSettings;
34
- logger: Logger;
34
+ logger: AstroLogger;
35
35
  routesList: RoutesList;
36
36
  runtimeMode: RuntimeMode;
37
37
  origin: string;
@@ -1,6 +1,6 @@
1
1
  import type { CacheLike } from './cache.js';
2
2
  import type { CacheOptions } from '../types.js';
3
- import type { Logger } from '../../logger/core.js';
3
+ import type { AstroLogger } from '../../logger/core.js';
4
4
  export declare class NoopAstroCache implements CacheLike {
5
5
  readonly enabled = false;
6
6
  set(): void;
@@ -18,7 +18,7 @@ export declare class NoopAstroCache implements CacheLike {
18
18
  export declare class DisabledAstroCache implements CacheLike {
19
19
  #private;
20
20
  readonly enabled = false;
21
- constructor(logger?: Logger);
21
+ constructor(logger?: AstroLogger);
22
22
  set(): void;
23
23
  get tags(): string[];
24
24
  get options(): Readonly<CacheOptions>;
@@ -1,4 +1,4 @@
1
- const ASTRO_VERSION = "6.1.5";
1
+ const ASTRO_VERSION = "6.1.7";
2
2
  const ASTRO_GENERATOR = `Astro v${ASTRO_VERSION}`;
3
3
  const REROUTE_DIRECTIVE_HEADER = "X-Astro-Reroute";
4
4
  const REWRITE_DIRECTIVE_HEADER_KEY = "X-Astro-Rewrite";