astro 5.7.3 → 5.7.5

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 (132) hide show
  1. package/dist/actions/runtime/virtual/server.js +9 -7
  2. package/dist/assets/fonts/config.d.ts +0 -16
  3. package/dist/assets/fonts/config.js +1 -2
  4. package/dist/assets/fonts/load.js +53 -26
  5. package/dist/assets/fonts/metrics.d.ts +1 -1
  6. package/dist/assets/fonts/metrics.js +1 -1
  7. package/dist/assets/fonts/providers/index.d.ts +1 -1
  8. package/dist/assets/fonts/providers/index.js +3 -2
  9. package/dist/assets/fonts/providers/local.d.ts +4 -1
  10. package/dist/assets/fonts/providers/local.js +7 -1
  11. package/dist/assets/fonts/utils.d.ts +3 -2
  12. package/dist/assets/fonts/utils.js +28 -19
  13. package/dist/assets/fonts/vite-plugin-fonts.js +11 -8
  14. package/dist/assets/services/service.d.ts +1 -1
  15. package/dist/assets/utils/etag.d.ts +0 -11
  16. package/dist/assets/utils/etag.js +1 -2
  17. package/dist/assets/utils/vendor/image-size/lookup.d.ts +0 -2
  18. package/dist/assets/utils/vendor/image-size/lookup.js +0 -10
  19. package/dist/cli/add/index.d.ts +0 -9
  20. package/dist/cli/add/index.js +1 -2
  21. package/dist/cli/info/index.d.ts +0 -1
  22. package/dist/cli/info/index.js +0 -1
  23. package/dist/cli/preferences/index.d.ts +0 -2
  24. package/dist/container/index.js +1 -6
  25. package/dist/content/content-layer.d.ts +2 -7
  26. package/dist/content/content-layer.js +4 -6
  27. package/dist/content/index.d.ts +1 -2
  28. package/dist/content/index.js +1 -5
  29. package/dist/content/loaders/file.d.ts +2 -1
  30. package/dist/content/loaders/glob.d.ts +3 -2
  31. package/dist/content/utils.d.ts +1 -12
  32. package/dist/content/utils.js +0 -13
  33. package/dist/content/vite-plugin-content-virtual-mod.d.ts +0 -16
  34. package/dist/content/vite-plugin-content-virtual-mod.js +1 -3
  35. package/dist/core/app/index.js +3 -4
  36. package/dist/core/app/pipeline.d.ts +2 -3
  37. package/dist/core/app/pipeline.js +1 -3
  38. package/dist/core/app/types.d.ts +3 -2
  39. package/dist/core/build/consts.d.ts +0 -1
  40. package/dist/core/build/consts.js +1 -3
  41. package/dist/core/build/index.d.ts +2 -1
  42. package/dist/core/build/page-data.d.ts +3 -2
  43. package/dist/core/build/plugin.d.ts +1 -1
  44. package/dist/core/build/plugins/plugin-analyzer.d.ts +0 -2
  45. package/dist/core/build/plugins/plugin-analyzer.js +1 -2
  46. package/dist/core/build/plugins/plugin-chunks.d.ts +0 -2
  47. package/dist/core/build/plugins/plugin-chunks.js +1 -2
  48. package/dist/core/build/plugins/plugin-component-entry.d.ts +0 -8
  49. package/dist/core/build/plugins/plugin-component-entry.js +1 -3
  50. package/dist/core/build/plugins/plugin-internals.d.ts +0 -2
  51. package/dist/core/build/plugins/plugin-internals.js +1 -2
  52. package/dist/core/build/plugins/plugin-renderers.d.ts +0 -2
  53. package/dist/core/build/plugins/plugin-renderers.js +1 -2
  54. package/dist/core/build/plugins/plugin-scripts.d.ts +0 -5
  55. package/dist/core/build/plugins/plugin-scripts.js +1 -2
  56. package/dist/core/build/plugins/plugin-ssr.d.ts +0 -1
  57. package/dist/core/build/plugins/plugin-ssr.js +0 -1
  58. package/dist/core/build/plugins/util.d.ts +0 -9
  59. package/dist/core/build/plugins/util.js +0 -2
  60. package/dist/core/build/types.d.ts +1 -1
  61. package/dist/core/config/config.d.ts +0 -1
  62. package/dist/core/config/config.js +0 -1
  63. package/dist/core/config/index.d.ts +1 -2
  64. package/dist/core/config/index.js +0 -2
  65. package/dist/core/config/schemas/base.d.ts +6 -4
  66. package/dist/core/config/schemas/relative.d.ts +6 -6
  67. package/dist/core/config/timer.d.ts +0 -5
  68. package/dist/core/config/tsconfig.d.ts +1 -1
  69. package/dist/core/constants.d.ts +0 -4
  70. package/dist/core/constants.js +1 -3
  71. package/dist/core/cookies/index.d.ts +1 -1
  72. package/dist/core/cookies/index.js +2 -4
  73. package/dist/core/cookies/response.d.ts +0 -1
  74. package/dist/core/cookies/response.js +1 -5
  75. package/dist/core/dev/container.d.ts +2 -1
  76. package/dist/core/dev/dev.js +1 -1
  77. package/dist/core/dev/index.d.ts +1 -1
  78. package/dist/core/dev/index.js +1 -2
  79. package/dist/core/dev/restart.d.ts +1 -1
  80. package/dist/core/encryption.d.ts +0 -8
  81. package/dist/core/encryption.js +1 -7
  82. package/dist/core/errors/index.d.ts +1 -2
  83. package/dist/core/errors/index.js +0 -2
  84. package/dist/core/logger/core.d.ts +3 -9
  85. package/dist/core/logger/core.js +1 -5
  86. package/dist/core/messages.d.ts +0 -1
  87. package/dist/core/messages.js +2 -11
  88. package/dist/core/middleware/sequence.js +3 -0
  89. package/dist/core/preview/static-preview-server.d.ts +2 -1
  90. package/dist/core/redirects/index.d.ts +0 -1
  91. package/dist/core/redirects/index.js +0 -2
  92. package/dist/core/render/index.d.ts +0 -17
  93. package/dist/core/render/ssr-element.d.ts +0 -2
  94. package/dist/core/render/ssr-element.js +0 -2
  95. package/dist/core/render-context.js +4 -0
  96. package/dist/core/request.d.ts +1 -1
  97. package/dist/core/routing/3xx.d.ts +2 -1
  98. package/dist/core/routing/astro-designed-error-pages.d.ts +0 -1
  99. package/dist/core/routing/astro-designed-error-pages.js +1 -16
  100. package/dist/core/routing/index.d.ts +2 -3
  101. package/dist/core/routing/index.js +3 -8
  102. package/dist/core/routing/manifest/create.d.ts +2 -3
  103. package/dist/core/routing/manifest/create.js +0 -1
  104. package/dist/core/routing/request.d.ts +0 -1
  105. package/dist/core/routing/request.js +1 -2
  106. package/dist/core/routing/rewrite.d.ts +3 -2
  107. package/dist/core/server-islands/vite-plugin-server-islands.d.ts +0 -1
  108. package/dist/core/server-islands/vite-plugin-server-islands.js +0 -1
  109. package/dist/core/sync/index.d.ts +2 -1
  110. package/dist/core/util.d.ts +0 -1
  111. package/dist/core/util.js +0 -1
  112. package/dist/events/session.d.ts +1 -1
  113. package/dist/integrations/features-validation.d.ts +1 -3
  114. package/dist/integrations/features-validation.js +0 -2
  115. package/dist/preferences/index.d.ts +4 -4
  116. package/dist/type-utils.d.ts +0 -4
  117. package/dist/types/public/config.d.ts +19 -0
  118. package/dist/types/typed-emitter.d.ts +2 -1
  119. package/dist/vite-plugin-astro/hmr.d.ts +2 -1
  120. package/dist/vite-plugin-astro/query.d.ts +3 -2
  121. package/dist/vite-plugin-astro/types.d.ts +2 -1
  122. package/dist/vite-plugin-astro-server/controller.d.ts +2 -2
  123. package/dist/vite-plugin-astro-server/plugin.d.ts +2 -1
  124. package/dist/vite-plugin-astro-server/response.d.ts +0 -1
  125. package/dist/vite-plugin-astro-server/response.js +0 -12
  126. package/dist/vite-plugin-astro-server/route.d.ts +1 -1
  127. package/dist/vite-plugin-astro-server/server-state.d.ts +3 -3
  128. package/dist/vite-plugin-astro-server/server-state.js +0 -4
  129. package/dist/vite-plugin-load-fallback/index.d.ts +1 -1
  130. package/dist/vite-plugin-scanner/index.d.ts +2 -1
  131. package/package.json +4 -10
  132. package/templates/env.mjs +1 -0
@@ -6,7 +6,7 @@ import type { Logger } 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';
9
- import { CONTENT_FLAGS } from './consts.js';
9
+ import { type CONTENT_FLAGS } from './consts.js';
10
10
  /**
11
11
  * A map from a collection + slug to the local file path.
12
12
  * This is used internally to resolve entry imports when using `getEntry()`.
@@ -431,14 +431,8 @@ export declare function safeParseFrontmatter(source: string, id?: string): impor
431
431
  * subscribe to changes during dev server updates.
432
432
  */
433
433
  export declare const globalContentConfigObserver: ContentObservable;
434
- export declare function hasAnyContentFlag(viteId: string): boolean;
435
434
  export declare function hasContentFlag(viteId: string, flag: (typeof CONTENT_FLAGS)[number]): boolean;
436
435
  export declare function isDeferredModule(viteId: string): boolean;
437
- export declare function autogenerateCollections({ config, settings, fs, }: {
438
- config?: ContentConfig;
439
- settings: AstroSettings;
440
- fs: typeof fsMod;
441
- }): Promise<ContentConfig | undefined>;
442
436
  export declare function reloadContentConfigObserver({ observer, ...loadContentConfigOpts }: {
443
437
  fs: typeof fsMod;
444
438
  settings: AstroSettings;
@@ -464,7 +458,6 @@ type Observable<C> = {
464
458
  subscribe: (fn: (ctx: C) => void) => () => void;
465
459
  };
466
460
  export type ContentObservable = Observable<ContentCtx>;
467
- export declare function contentObservable(initialCtx: ContentCtx): ContentObservable;
468
461
  export type ContentPaths = {
469
462
  root: URL;
470
463
  contentDir: URL;
@@ -492,10 +485,6 @@ export declare function getEntrySlug({ id, collection, generatedSlug, contentEnt
492
485
  export declare function getExtGlob(exts: string[]): string;
493
486
  export declare function hasAssetPropagationFlag(id: string): boolean;
494
487
  export declare function globWithUnderscoresIgnored(relContentDir: string, exts: string[]): string[];
495
- /**
496
- * Convert a platform path to a posix path.
497
- */
498
- export declare function posixifyPath(filePath: string): string;
499
488
  /**
500
489
  * Unlike `path.posix.relative`, this function will accept a platform path and return a posix path.
501
490
  */
@@ -11,7 +11,6 @@ import { isYAMLException } from "../core/errors/utils.js";
11
11
  import { appendForwardSlash } from "../core/path.js";
12
12
  import { normalizePath } from "../core/viteUtils.js";
13
13
  import {
14
- CONTENT_FLAGS,
15
14
  CONTENT_LAYER_TYPE,
16
15
  CONTENT_MODULE_FLAG,
17
16
  DEFERRED_MODULE,
@@ -349,14 +348,6 @@ function safeParseFrontmatter(source, id) {
349
348
  }
350
349
  }
351
350
  const globalContentConfigObserver = contentObservable({ status: "init" });
352
- function hasAnyContentFlag(viteId) {
353
- const flags = new URLSearchParams(viteId.split("?")[1] ?? "");
354
- const flag = Array.from(flags.keys()).at(0);
355
- if (typeof flag !== "string") {
356
- return false;
357
- }
358
- return CONTENT_FLAGS.includes(flag);
359
- }
360
351
  function hasContentFlag(viteId, flag) {
361
352
  const flags = new URLSearchParams(viteId.split("?")[1] ?? "");
362
353
  return flags.has(flag);
@@ -607,9 +598,7 @@ function safeStringify(value) {
607
598
  return JSON.stringify(value, safeStringifyReplacer(seen));
608
599
  }
609
600
  export {
610
- autogenerateCollections,
611
601
  contentModuleToId,
612
- contentObservable,
613
602
  getContentEntryExts,
614
603
  getContentEntryIdAndSlug,
615
604
  getContentPaths,
@@ -625,14 +614,12 @@ export {
625
614
  getSymlinkedContentCollections,
626
615
  globWithUnderscoresIgnored,
627
616
  globalContentConfigObserver,
628
- hasAnyContentFlag,
629
617
  hasAssetPropagationFlag,
630
618
  hasContentFlag,
631
619
  isDeferredModule,
632
620
  loaderReturnSchema,
633
621
  parseEntrySlug,
634
622
  posixRelative,
635
- posixifyPath,
636
623
  reloadContentConfigObserver,
637
624
  reverseSymlink,
638
625
  safeParseFrontmatter,
@@ -1,25 +1,9 @@
1
1
  import nodeFs from 'node:fs';
2
2
  import type { Plugin } from 'vite';
3
3
  import type { AstroSettings } from '../types/astro.js';
4
- import { type ContentLookupMap } from './utils.js';
5
4
  interface AstroContentVirtualModPluginParams {
6
5
  settings: AstroSettings;
7
6
  fs: typeof nodeFs;
8
7
  }
9
8
  export declare function astroContentVirtualModPlugin({ settings, fs, }: AstroContentVirtualModPluginParams): Plugin;
10
- export declare function generateContentEntryFile({ settings, lookupMap, isClient, }: {
11
- settings: AstroSettings;
12
- fs: typeof nodeFs;
13
- lookupMap: ContentLookupMap;
14
- isClient: boolean;
15
- }): Promise<string>;
16
- /**
17
- * Generate a map from a collection + slug to the local file path.
18
- * This is used internally to resolve entry imports when using `getEntry()`.
19
- * @see `templates/content/module.mjs`
20
- */
21
- export declare function generateLookupMap({ settings, fs, }: {
22
- settings: AstroSettings;
23
- fs: typeof nodeFs;
24
- }): Promise<ContentLookupMap>;
25
9
  export {};
@@ -297,7 +297,5 @@ const UnexpectedLookupMapError = new AstroError({
297
297
  message: `Unexpected error while parsing content entry IDs and slugs.`
298
298
  });
299
299
  export {
300
- astroContentVirtualModPlugin,
301
- generateContentEntryFile,
302
- generateLookupMap
300
+ astroContentVirtualModPlugin
303
301
  };
@@ -44,7 +44,7 @@ class App {
44
44
  };
45
45
  ensure404Route(this.#manifestData);
46
46
  this.#baseWithoutTrailingSlash = removeTrailingForwardSlash(this.#manifest.base);
47
- this.#pipeline = this.#createPipeline(this.#manifestData, streaming);
47
+ this.#pipeline = this.#createPipeline(streaming);
48
48
  this.#adapterLogger = new AstroIntegrationLogger(
49
49
  this.#logger.options,
50
50
  this.#manifest.adapterName
@@ -56,12 +56,11 @@ class App {
56
56
  /**
57
57
  * Creates a pipeline by reading the stored manifest
58
58
  *
59
- * @param manifestData
60
59
  * @param streaming
61
60
  * @private
62
61
  */
63
- #createPipeline(manifestData, streaming = false) {
64
- return AppPipeline.create(manifestData, {
62
+ #createPipeline(streaming = false) {
63
+ return AppPipeline.create({
65
64
  logger: this.#logger,
66
65
  manifest: this.#manifest,
67
66
  runtimeMode: "production",
@@ -1,11 +1,10 @@
1
- import type { ComponentInstance, RoutesList } from '../../types/astro.js';
1
+ import type { ComponentInstance } from '../../types/astro.js';
2
2
  import type { RewritePayload } from '../../types/public/common.js';
3
3
  import type { RouteData, SSRResult } from '../../types/public/internal.js';
4
4
  import { Pipeline, type TryRewriteResult } from '../base-pipeline.js';
5
5
  import type { SinglePageBuiltModule } from '../build/types.js';
6
6
  export declare class AppPipeline extends Pipeline {
7
- #private;
8
- static create(manifestData: RoutesList, { logger, manifest, runtimeMode, renderers, resolve, serverLike, streaming, defaultRoutes, }: Pick<AppPipeline, 'logger' | 'manifest' | 'runtimeMode' | 'renderers' | 'resolve' | 'serverLike' | 'streaming' | 'defaultRoutes'>): AppPipeline;
7
+ static create({ logger, manifest, runtimeMode, renderers, resolve, serverLike, streaming, defaultRoutes, }: Pick<AppPipeline, 'logger' | 'manifest' | 'runtimeMode' | 'renderers' | 'resolve' | 'serverLike' | 'streaming' | 'defaultRoutes'>): AppPipeline;
9
8
  headElements(routeData: RouteData): Pick<SSRResult, 'scripts' | 'styles' | 'links'>;
10
9
  componentMetadata(): void;
11
10
  getComponentByRoute(routeData: RouteData): Promise<ComponentInstance>;
@@ -3,8 +3,7 @@ import { RedirectSinglePageBuiltModule } from "../redirects/component.js";
3
3
  import { createModuleScriptElement, createStylesheetElementSet } from "../render/ssr-element.js";
4
4
  import { findRouteToRewrite } from "../routing/rewrite.js";
5
5
  class AppPipeline extends Pipeline {
6
- #manifestData;
7
- static create(manifestData, {
6
+ static create({
8
7
  logger,
9
8
  manifest,
10
9
  runtimeMode,
@@ -32,7 +31,6 @@ class AppPipeline extends Pipeline {
32
31
  void 0,
33
32
  defaultRoutes
34
33
  );
35
- pipeline.#manifestData = manifestData;
36
34
  return pipeline;
37
35
  }
38
36
  headElements(routeData) {
@@ -6,7 +6,7 @@ import type { AstroMiddlewareInstance } from '../../types/public/common.js';
6
6
  import type { AstroConfig, Locales, ResolvedSessionConfig } from '../../types/public/config.js';
7
7
  import type { RouteData, SSRComponentMetadata, SSRLoadedRenderer, SSRResult } from '../../types/public/internal.js';
8
8
  import type { SinglePageBuiltModule } from '../build/types.js';
9
- export type ComponentPath = string;
9
+ type ComponentPath = string;
10
10
  export type StylesheetAsset = {
11
11
  type: 'inline';
12
12
  content: string;
@@ -30,7 +30,7 @@ export interface RouteInfo {
30
30
  export type SerializedRouteInfo = Omit<RouteInfo, 'routeData'> & {
31
31
  routeData: SerializedRouteData;
32
32
  };
33
- export type ImportComponentInstance = () => Promise<SinglePageBuiltModule>;
33
+ type ImportComponentInstance = () => Promise<SinglePageBuiltModule>;
34
34
  export type AssetsPrefix = string | ({
35
35
  fallback: string;
36
36
  } & Record<string, string>) | undefined;
@@ -98,3 +98,4 @@ export type SerializedSSRManifest = Omit<SSRManifest, 'middleware' | 'routes' |
98
98
  serverIslandNameMap: [string, string][];
99
99
  key: string;
100
100
  };
101
+ export {};
@@ -1,2 +1 @@
1
1
  export declare const CHUNKS_PATH = "chunks/";
2
- export declare const CONTENT_PATH = "content/";
@@ -1,6 +1,4 @@
1
1
  const CHUNKS_PATH = "chunks/";
2
- const CONTENT_PATH = "content/";
3
2
  export {
4
- CHUNKS_PATH,
5
- CONTENT_PATH
3
+ CHUNKS_PATH
6
4
  };
@@ -1,5 +1,5 @@
1
1
  import type { AstroInlineConfig } from '../../types/public/config.js';
2
- export interface BuildOptions {
2
+ interface BuildOptions {
3
3
  /**
4
4
  * Output a development-based build similar to code transformed in `astro dev`. This
5
5
  * can be useful to test build-only issues with additional debugging information included.
@@ -25,3 +25,4 @@ export interface BuildOptions {
25
25
  * @experimental The JavaScript API is experimental
26
26
  */
27
27
  export default function build(inlineConfig: AstroInlineConfig, options?: BuildOptions): Promise<void>;
28
+ export {};
@@ -1,13 +1,14 @@
1
1
  import type { AstroSettings, RoutesList } from '../../types/astro.js';
2
2
  import type { Logger } from '../logger/core.js';
3
3
  import type { AllPagesData } from './types.js';
4
- export interface CollectPagesDataOptions {
4
+ interface CollectPagesDataOptions {
5
5
  settings: AstroSettings;
6
6
  logger: Logger;
7
7
  manifest: RoutesList;
8
8
  }
9
- export interface CollectPagesDataResult {
9
+ interface CollectPagesDataResult {
10
10
  assets: Record<string, string>;
11
11
  allPages: AllPagesData;
12
12
  }
13
13
  export declare function collectPagesData(opts: CollectPagesDataOptions): CollectPagesDataResult;
14
+ export {};
@@ -8,7 +8,7 @@ type OutputChunk = Extract<OutputChunkorAsset, {
8
8
  }>;
9
9
  export type BuildTarget = 'server' | 'client';
10
10
  type MutateChunk = (chunk: OutputChunk, targets: BuildTarget[], newCode: string) => void;
11
- export interface BuildBeforeHookResult {
11
+ interface BuildBeforeHookResult {
12
12
  enforce?: 'after-user-plugins';
13
13
  vitePlugin: VitePlugin | VitePlugin[] | undefined;
14
14
  }
@@ -1,5 +1,3 @@
1
- import type { Plugin as VitePlugin } from 'vite';
2
1
  import type { BuildInternals } from '../internal.js';
3
2
  import type { AstroBuildPlugin } from '../plugin.js';
4
- export declare function vitePluginAnalyzer(internals: BuildInternals): VitePlugin;
5
3
  export declare function pluginAnalyzer(internals: BuildInternals): AstroBuildPlugin;
@@ -74,6 +74,5 @@ function pluginAnalyzer(internals) {
74
74
  };
75
75
  }
76
76
  export {
77
- pluginAnalyzer,
78
- vitePluginAnalyzer
77
+ pluginAnalyzer
79
78
  };
@@ -1,4 +1,2 @@
1
- import type { Plugin as VitePlugin } from 'vite';
2
1
  import type { AstroBuildPlugin } from '../plugin.js';
3
- export declare function vitePluginChunks(): VitePlugin;
4
2
  export declare function pluginChunks(): AstroBuildPlugin;
@@ -29,6 +29,5 @@ function pluginChunks() {
29
29
  };
30
30
  }
31
31
  export {
32
- pluginChunks,
33
- vitePluginChunks
32
+ pluginChunks
34
33
  };
@@ -1,12 +1,4 @@
1
- import type { Plugin as VitePlugin } from 'vite';
2
1
  import type { BuildInternals } from '../internal.js';
3
2
  import type { AstroBuildPlugin } from '../plugin.js';
4
- export declare const astroEntryPrefix = "\0astro-entry:";
5
- /**
6
- * When adding hydrated or client:only components as Rollup inputs, sometimes we're not using all
7
- * of the export names, e.g. `import { Counter } from './ManyComponents.jsx'`. This plugin proxies
8
- * entries to re-export only the names the user is using.
9
- */
10
- export declare function vitePluginComponentEntry(internals: BuildInternals): VitePlugin;
11
3
  export declare function normalizeEntryId(id: string): string;
12
4
  export declare function pluginComponentEntry(internals: BuildInternals): AstroBuildPlugin;
@@ -68,8 +68,6 @@ function pluginComponentEntry(internals) {
68
68
  };
69
69
  }
70
70
  export {
71
- astroEntryPrefix,
72
71
  normalizeEntryId,
73
- pluginComponentEntry,
74
- vitePluginComponentEntry
72
+ pluginComponentEntry
75
73
  };
@@ -1,5 +1,3 @@
1
- import type { Plugin as VitePlugin } from 'vite';
2
1
  import type { BuildInternals } from '../internal.js';
3
2
  import type { AstroBuildPlugin } from '../plugin.js';
4
- export declare function vitePluginInternals(input: Set<string>, internals: BuildInternals): VitePlugin;
5
3
  export declare function pluginInternals(internals: BuildInternals): AstroBuildPlugin;
@@ -59,6 +59,5 @@ function pluginInternals(internals) {
59
59
  };
60
60
  }
61
61
  export {
62
- pluginInternals,
63
- vitePluginInternals
62
+ pluginInternals
64
63
  };
@@ -1,7 +1,5 @@
1
- import type { Plugin as VitePlugin } from 'vite';
2
1
  import type { AstroBuildPlugin } from '../plugin.js';
3
2
  import type { StaticBuildOptions } from '../types.js';
4
3
  export declare const RENDERERS_MODULE_ID = "@astro-renderers";
5
4
  export declare const RESOLVED_RENDERERS_MODULE_ID = "\0@astro-renderers";
6
- export declare function vitePluginRenderers(opts: StaticBuildOptions): VitePlugin;
7
5
  export declare function pluginRenderers(opts: StaticBuildOptions): AstroBuildPlugin;
@@ -50,6 +50,5 @@ function pluginRenderers(opts) {
50
50
  export {
51
51
  RENDERERS_MODULE_ID,
52
52
  RESOLVED_RENDERERS_MODULE_ID,
53
- pluginRenderers,
54
- vitePluginRenderers
53
+ pluginRenderers
55
54
  };
@@ -1,8 +1,3 @@
1
- import type { Plugin as VitePlugin } from 'vite';
2
1
  import type { BuildInternals } from '../internal.js';
3
2
  import type { AstroBuildPlugin } from '../plugin.js';
4
- /**
5
- * Inline scripts from Astro files directly into the HTML.
6
- */
7
- export declare function vitePluginScripts(internals: BuildInternals): VitePlugin;
8
3
  export declare function pluginScripts(internals: BuildInternals): AstroBuildPlugin;
@@ -38,6 +38,5 @@ function pluginScripts(internals) {
38
38
  };
39
39
  }
40
40
  export {
41
- pluginScripts,
42
- vitePluginScripts
41
+ pluginScripts
43
42
  };
@@ -1,6 +1,5 @@
1
1
  import type { BuildInternals } from '../internal.js';
2
2
  import type { AstroBuildPlugin } from '../plugin.js';
3
3
  import type { StaticBuildOptions } from '../types.js';
4
- export declare const SSR_VIRTUAL_MODULE_ID = "@astrojs-ssr-virtual-entry";
5
4
  export declare const RESOLVED_SSR_VIRTUAL_MODULE_ID: string;
6
5
  export declare function pluginSSR(options: StaticBuildOptions, internals: BuildInternals): AstroBuildPlugin;
@@ -177,6 +177,5 @@ if (_start in serverEntrypointModule) {
177
177
  }
178
178
  export {
179
179
  RESOLVED_SSR_VIRTUAL_MODULE_ID,
180
- SSR_VIRTUAL_MODULE_ID,
181
180
  pluginSSR
182
181
  };
@@ -9,7 +9,6 @@ type ExtendManualChunksHooks = {
9
9
  };
10
10
  export declare function extendManualChunks(outputOptions: OutputOptions, hooks: ExtendManualChunksHooks): void;
11
11
  export declare const ASTRO_PAGE_EXTENSION_POST_PATTERN = "@_@";
12
- export declare const ASTRO_PAGE_KEY_SEPARATOR = "&";
13
12
  /**
14
13
  * Generate a unique key to identify each page in the build process.
15
14
  * @param route Usually pageData.route.route
@@ -30,13 +29,5 @@ export declare function getVirtualModulePageName(virtualModulePrefix: string, pa
30
29
  * @param id Virtual module name
31
30
  */
32
31
  export declare function getPagesFromVirtualModulePageName(internals: BuildInternals, virtualModulePrefix: string, id: string): PageBuildData[];
33
- /**
34
- * From the VirtualModulePageName, get the component path.
35
- * Remember that the component can be use by multiple routes.
36
- * Inverse function of getVirtualModulePageName() above.
37
- * @param virtualModulePrefix The prefix at the beginning of the virtual module
38
- * @param id Virtual module name
39
- */
40
- export declare function getComponentFromVirtualModulePageName(virtualModulePrefix: string, id: string): string;
41
32
  export declare function shouldInlineAsset(assetContent: string, assetPath: string, assetsInlineLimit: NonNullable<BuildOptions['assetsInlineLimit']>): boolean;
42
33
  export {};
@@ -60,9 +60,7 @@ function shouldInlineAsset(assetContent, assetPath, assetsInlineLimit) {
60
60
  }
61
61
  export {
62
62
  ASTRO_PAGE_EXTENSION_POST_PATTERN,
63
- ASTRO_PAGE_KEY_SEPARATOR,
64
63
  extendManualChunks,
65
- getComponentFromVirtualModulePageName,
66
64
  getPagesFromVirtualModulePageName,
67
65
  getVirtualModulePageName,
68
66
  makePageDataKey,
@@ -5,7 +5,7 @@ import type { MiddlewareHandler } from '../../types/public/common.js';
5
5
  import type { RuntimeMode } from '../../types/public/config.js';
6
6
  import type { RouteData, SSRLoadedRenderer } from '../../types/public/internal.js';
7
7
  import type { Logger } from '../logger/core.js';
8
- export type ComponentPath = string;
8
+ type ComponentPath = string;
9
9
  export type ViteID = string;
10
10
  export type StylesheetAsset = {
11
11
  type: 'inline';
@@ -1,7 +1,6 @@
1
1
  import fs from 'node:fs';
2
2
  import type { AstroConfig, AstroInlineConfig, AstroUserConfig } from '../../types/public/config.js';
3
3
  export declare function resolveRoot(cwd?: string | URL): string;
4
- export declare const configPaths: readonly string[];
5
4
  interface ResolveConfigPathOptions {
6
5
  root: string;
7
6
  configFile?: string | false;
@@ -101,7 +101,6 @@ async function resolveConfig(inlineConfig, command, fsMod = fs) {
101
101
  return { userConfig: mergedConfig, astroConfig };
102
102
  }
103
103
  export {
104
- configPaths,
105
104
  resolveConfig,
106
105
  resolveConfigPath,
107
106
  resolveRoot
@@ -1,6 +1,5 @@
1
- export { configPaths, resolveConfig, resolveConfigPath, resolveRoot, } from './config.js';
1
+ export { resolveConfig, resolveConfigPath, resolveRoot, } from './config.js';
2
2
  export { createNodeLogger } from './logging.js';
3
3
  export { mergeConfig } from './merge.js';
4
- export type { AstroConfigType } from './schemas/index.js';
5
4
  export { createSettings } from './settings.js';
6
5
  export { loadTSConfig, updateTSConfigForFramework } from './tsconfig.js';
@@ -1,5 +1,4 @@
1
1
  import {
2
- configPaths,
3
2
  resolveConfig,
4
3
  resolveConfigPath,
5
4
  resolveRoot
@@ -9,7 +8,6 @@ import { mergeConfig } from "./merge.js";
9
8
  import { createSettings } from "./settings.js";
10
9
  import { loadTSConfig, updateTSConfigForFramework } from "./tsconfig.js";
11
10
  export {
12
- configPaths,
13
11
  createNodeLogger,
14
12
  createSettings,
15
13
  loadTSConfig,
@@ -2,6 +2,7 @@ import type { OutgoingHttpHeaders } from 'node:http';
2
2
  import type { ShikiConfig, RehypePlugin as _RehypePlugin, RemarkPlugin as _RemarkPlugin, RemarkRehype as _RemarkRehype } from '@astrojs/markdown-remark';
3
3
  import { z } from 'zod';
4
4
  import type { ViteUserConfig } from '../../../types/public/config.js';
5
+ /** @lintignore */
5
6
  export interface ComplexifyUnionObj {
6
7
  }
7
8
  type ComplexifyWithUnion<T> = T & ComplexifyUnionObj;
@@ -11,6 +12,7 @@ type ShikiTheme = ComplexifyWithUnion<NonNullable<ShikiConfig['theme']>>;
11
12
  type ShikiTransformer = ComplexifyWithUnion<NonNullable<ShikiConfig['transformers']>[number]>;
12
13
  type RehypePlugin = ComplexifyWithUnion<_RehypePlugin>;
13
14
  type RemarkPlugin = ComplexifyWithUnion<_RemarkPlugin>;
15
+ /** @lintignore */
14
16
  export type RemarkRehype = ComplexifyWithOmit<_RemarkRehype>;
15
17
  export declare const ASTRO_CONFIG_DEFAULTS: {
16
18
  root: string;
@@ -258,7 +260,7 @@ export declare const AstroConfigSchema: z.ZodObject<{
258
260
  hostname?: string | undefined;
259
261
  pathname?: string | undefined;
260
262
  }[];
261
- experimentalLayout?: "fixed" | "none" | "responsive" | "full-width" | undefined;
263
+ experimentalLayout?: "none" | "fixed" | "responsive" | "full-width" | undefined;
262
264
  experimentalObjectFit?: string | undefined;
263
265
  experimentalObjectPosition?: string | undefined;
264
266
  experimentalBreakpoints?: number[] | undefined;
@@ -278,7 +280,7 @@ export declare const AstroConfigSchema: z.ZodObject<{
278
280
  hostname?: string | undefined;
279
281
  pathname?: string | undefined;
280
282
  }[] | undefined;
281
- experimentalLayout?: "fixed" | "none" | "responsive" | "full-width" | undefined;
283
+ experimentalLayout?: "none" | "fixed" | "responsive" | "full-width" | undefined;
282
284
  experimentalObjectFit?: string | undefined;
283
285
  experimentalObjectPosition?: string | undefined;
284
286
  experimentalBreakpoints?: number[] | undefined;
@@ -1104,7 +1106,7 @@ export declare const AstroConfigSchema: z.ZodObject<{
1104
1106
  hostname?: string | undefined;
1105
1107
  pathname?: string | undefined;
1106
1108
  }[];
1107
- experimentalLayout?: "fixed" | "none" | "responsive" | "full-width" | undefined;
1109
+ experimentalLayout?: "none" | "fixed" | "responsive" | "full-width" | undefined;
1108
1110
  experimentalObjectFit?: string | undefined;
1109
1111
  experimentalObjectPosition?: string | undefined;
1110
1112
  experimentalBreakpoints?: number[] | undefined;
@@ -1336,7 +1338,7 @@ export declare const AstroConfigSchema: z.ZodObject<{
1336
1338
  hostname?: string | undefined;
1337
1339
  pathname?: string | undefined;
1338
1340
  }[] | undefined;
1339
- experimentalLayout?: "fixed" | "none" | "responsive" | "full-width" | undefined;
1341
+ experimentalLayout?: "none" | "fixed" | "responsive" | "full-width" | undefined;
1340
1342
  experimentalObjectFit?: string | undefined;
1341
1343
  experimentalObjectPosition?: string | undefined;
1342
1344
  experimentalBreakpoints?: number[] | undefined;
@@ -185,7 +185,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
185
185
  hostname?: string | undefined;
186
186
  pathname?: string | undefined;
187
187
  }[];
188
- experimentalLayout?: "fixed" | "none" | "responsive" | "full-width" | undefined;
188
+ experimentalLayout?: "none" | "fixed" | "responsive" | "full-width" | undefined;
189
189
  experimentalObjectFit?: string | undefined;
190
190
  experimentalObjectPosition?: string | undefined;
191
191
  experimentalBreakpoints?: number[] | undefined;
@@ -205,7 +205,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
205
205
  hostname?: string | undefined;
206
206
  pathname?: string | undefined;
207
207
  }[] | undefined;
208
- experimentalLayout?: "fixed" | "none" | "responsive" | "full-width" | undefined;
208
+ experimentalLayout?: "none" | "fixed" | "responsive" | "full-width" | undefined;
209
209
  experimentalObjectFit?: string | undefined;
210
210
  experimentalObjectPosition?: string | undefined;
211
211
  experimentalBreakpoints?: number[] | undefined;
@@ -1109,7 +1109,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1109
1109
  hostname?: string | undefined;
1110
1110
  pathname?: string | undefined;
1111
1111
  }[];
1112
- experimentalLayout?: "fixed" | "none" | "responsive" | "full-width" | undefined;
1112
+ experimentalLayout?: "none" | "fixed" | "responsive" | "full-width" | undefined;
1113
1113
  experimentalObjectFit?: string | undefined;
1114
1114
  experimentalObjectPosition?: string | undefined;
1115
1115
  experimentalBreakpoints?: number[] | undefined;
@@ -1341,7 +1341,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1341
1341
  hostname?: string | undefined;
1342
1342
  pathname?: string | undefined;
1343
1343
  }[] | undefined;
1344
- experimentalLayout?: "fixed" | "none" | "responsive" | "full-width" | undefined;
1344
+ experimentalLayout?: "none" | "fixed" | "responsive" | "full-width" | undefined;
1345
1345
  experimentalObjectFit?: string | undefined;
1346
1346
  experimentalObjectPosition?: string | undefined;
1347
1347
  experimentalBreakpoints?: number[] | undefined;
@@ -1565,7 +1565,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1565
1565
  hostname?: string | undefined;
1566
1566
  pathname?: string | undefined;
1567
1567
  }[];
1568
- experimentalLayout?: "fixed" | "none" | "responsive" | "full-width" | undefined;
1568
+ experimentalLayout?: "none" | "fixed" | "responsive" | "full-width" | undefined;
1569
1569
  experimentalObjectFit?: string | undefined;
1570
1570
  experimentalObjectPosition?: string | undefined;
1571
1571
  experimentalBreakpoints?: number[] | undefined;
@@ -1797,7 +1797,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1797
1797
  hostname?: string | undefined;
1798
1798
  pathname?: string | undefined;
1799
1799
  }[] | undefined;
1800
- experimentalLayout?: "fixed" | "none" | "responsive" | "full-width" | undefined;
1800
+ experimentalLayout?: "none" | "fixed" | "responsive" | "full-width" | undefined;
1801
1801
  experimentalObjectFit?: string | undefined;
1802
1802
  experimentalObjectPosition?: string | undefined;
1803
1803
  experimentalBreakpoints?: number[] | undefined;
@@ -1,8 +1,3 @@
1
- export interface Stat {
2
- elapsedTime: number;
3
- heapUsedChange: number;
4
- heapUsedTotal: number;
5
- }
6
1
  /**
7
2
  * Timer to track certain operations' performance. Used by Astro's scripts only.
8
3
  * Set `process.env.ASTRO_TIMER_PATH` truthy to enable.
@@ -13,7 +13,7 @@ export declare function loadTSConfig(root: string | undefined, findUp?: boolean)
13
13
  rawConfig: TSConfig;
14
14
  }>>;
15
15
  export declare function updateTSConfigForFramework(target: TSConfig, framework: frameworkWithTSSettings): TSConfig;
16
- export type StripEnums<T extends Record<string, any>> = {
16
+ type StripEnums<T extends Record<string, any>> = {
17
17
  [K in keyof T]: T[K] extends boolean ? T[K] : T[K] extends string ? T[K] : T[K] extends object ? T[K] : T[K] extends Array<any> ? T[K] : T[K] extends undefined ? undefined : any;
18
18
  };
19
19
  export interface TSConfig {
@@ -38,10 +38,6 @@ export declare const ROUTE_TYPE_HEADER = "X-Astro-Route-Type";
38
38
  * The value of the `component` field of the default 404 page, which is used when there is no user-provided 404.astro page.
39
39
  */
40
40
  export declare const DEFAULT_404_COMPONENT = "astro-default-404.astro";
41
- /**
42
- * The value of the `component` field of the default 500 page, which is used when there is no user-provided 404.astro page.
43
- */
44
- export declare const DEFAULT_500_COMPONENT = "astro-default-500.astro";
45
41
  /**
46
42
  * A response with one of these status codes will create a redirect response.
47
43
  */
@@ -1,11 +1,10 @@
1
- const ASTRO_VERSION = "5.7.3";
1
+ const ASTRO_VERSION = "5.7.5";
2
2
  const REROUTE_DIRECTIVE_HEADER = "X-Astro-Reroute";
3
3
  const REWRITE_DIRECTIVE_HEADER_KEY = "X-Astro-Rewrite";
4
4
  const REWRITE_DIRECTIVE_HEADER_VALUE = "yes";
5
5
  const NOOP_MIDDLEWARE_HEADER = "X-Astro-Noop";
6
6
  const ROUTE_TYPE_HEADER = "X-Astro-Route-Type";
7
7
  const DEFAULT_404_COMPONENT = "astro-default-404.astro";
8
- const DEFAULT_500_COMPONENT = "astro-default-500.astro";
9
8
  const REDIRECT_STATUS_CODES = [301, 302, 303, 307, 308, 300, 304];
10
9
  const REROUTABLE_STATUS_CODES = [404, 500];
11
10
  const clientAddressSymbol = Symbol.for("astro.clientAddress");
@@ -24,7 +23,6 @@ const MIDDLEWARE_PATH_SEGMENT_NAME = "middleware";
24
23
  export {
25
24
  ASTRO_VERSION,
26
25
  DEFAULT_404_COMPONENT,
27
- DEFAULT_500_COMPONENT,
28
26
  MIDDLEWARE_PATH_SEGMENT_NAME,
29
27
  NOOP_MIDDLEWARE_HEADER,
30
28
  REDIRECT_STATUS_CODES,
@@ -1,3 +1,3 @@
1
1
  export { AstroCookies } from './cookies.js';
2
- export { attachCookiesToResponse, getSetCookiesFromResponse, responseHasCookies, } from './response.js';
2
+ export { attachCookiesToResponse, getSetCookiesFromResponse, } from './response.js';
3
3
  export type { AstroCookieSetOptions, AstroCookieGetOptions } from './cookies.js';