astro 4.14.2 → 5.0.0-alpha.0

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 (223) hide show
  1. package/astro-jsx.d.ts +9 -11
  2. package/astro.js +1 -1
  3. package/client.d.ts +4 -16
  4. package/components/Picture.astro +1 -1
  5. package/config.d.ts +4 -4
  6. package/dist/actions/index.d.ts +2 -1
  7. package/dist/actions/runtime/middleware.d.ts +1 -1
  8. package/dist/actions/runtime/route.d.ts +1 -1
  9. package/dist/actions/runtime/utils.d.ts +1 -1
  10. package/dist/actions/utils.d.ts +2 -2
  11. package/dist/actions/utils.js +0 -1
  12. package/dist/assets/build/generate.d.ts +1 -1
  13. package/dist/assets/endpoint/config.d.ts +1 -1
  14. package/dist/assets/endpoint/generic.d.ts +1 -1
  15. package/dist/assets/endpoint/node.d.ts +1 -1
  16. package/dist/assets/internal.d.ts +1 -1
  17. package/dist/assets/services/service.d.ts +1 -1
  18. package/dist/assets/utils/remotePattern.d.ts +1 -1
  19. package/dist/assets/utils/vendor/image-size/types/index.d.ts +2 -2
  20. package/dist/assets/vite-plugin-assets.d.ts +1 -1
  21. package/dist/cli/flags.d.ts +1 -1
  22. package/dist/cli/info/index.d.ts +1 -1
  23. package/dist/cli/preview/index.d.ts +1 -1
  24. package/dist/config/index.d.ts +1 -1
  25. package/dist/config/vite-plugin-content-listen.d.ts +1 -1
  26. package/dist/container/index.d.ts +14 -1
  27. package/dist/container/pipeline.d.ts +3 -1
  28. package/dist/content/content-layer.d.ts +1 -1
  29. package/dist/content/loaders/glob.js +1 -1
  30. package/dist/content/loaders/types.d.ts +2 -1
  31. package/dist/content/server-listeners.d.ts +1 -1
  32. package/dist/content/types-generator.d.ts +1 -1
  33. package/dist/content/utils.d.ts +23 -21
  34. package/dist/content/vite-plugin-content-assets.d.ts +1 -1
  35. package/dist/content/vite-plugin-content-imports.d.ts +1 -1
  36. package/dist/content/vite-plugin-content-virtual-mod.d.ts +1 -1
  37. package/dist/core/app/index.d.ts +2 -1
  38. package/dist/core/app/middlewares.d.ts +1 -1
  39. package/dist/core/app/node.d.ts +1 -1
  40. package/dist/core/app/pipeline.d.ts +3 -1
  41. package/dist/core/app/types.d.ts +5 -1
  42. package/dist/core/base-pipeline.d.ts +4 -1
  43. package/dist/core/build/common.d.ts +2 -1
  44. package/dist/core/build/css-asset-name.d.ts +1 -1
  45. package/dist/core/build/generate.js +3 -19
  46. package/dist/core/build/index.d.ts +1 -1
  47. package/dist/core/build/internal.d.ts +1 -1
  48. package/dist/core/build/page-data.d.ts +1 -1
  49. package/dist/core/build/pipeline.d.ts +5 -3
  50. package/dist/core/build/pipeline.js +12 -24
  51. package/dist/core/build/plugins/index.js +1 -2
  52. package/dist/core/build/plugins/plugin-hoisted-scripts.d.ts +1 -1
  53. package/dist/core/build/plugins/plugin-ssr.d.ts +0 -3
  54. package/dist/core/build/plugins/plugin-ssr.js +4 -104
  55. package/dist/core/build/static-build.d.ts +1 -14
  56. package/dist/core/build/static-build.js +2 -22
  57. package/dist/core/build/types.d.ts +5 -1
  58. package/dist/core/build/util.d.ts +1 -1
  59. package/dist/core/compile/compile.d.ts +1 -1
  60. package/dist/core/config/config.d.ts +1 -1
  61. package/dist/core/config/logging.d.ts +1 -1
  62. package/dist/core/config/schema.d.ts +275 -275
  63. package/dist/core/config/settings.d.ts +2 -1
  64. package/dist/core/config/validate.d.ts +1 -1
  65. package/dist/core/constants.js +1 -1
  66. package/dist/core/create-vite.d.ts +1 -1
  67. package/dist/core/create-vite.js +1 -1
  68. package/dist/core/dev/container.d.ts +2 -1
  69. package/dist/core/dev/dev.d.ts +1 -1
  70. package/dist/core/dev/dev.js +1 -1
  71. package/dist/core/dev/restart.d.ts +1 -1
  72. package/dist/core/errors/dev/vite.d.ts +1 -1
  73. package/dist/core/index.d.ts +1 -1
  74. package/dist/core/messages.js +2 -2
  75. package/dist/core/middleware/callMiddleware.d.ts +2 -1
  76. package/dist/core/middleware/index.d.ts +2 -1
  77. package/dist/core/middleware/sequence.d.ts +1 -1
  78. package/dist/core/middleware/vite-plugin.d.ts +1 -1
  79. package/dist/core/module-loader/loader.d.ts +1 -1
  80. package/dist/core/preview/index.d.ts +2 -1
  81. package/dist/core/preview/static-preview-server.d.ts +1 -1
  82. package/dist/core/preview/vite-plugin-astro-preview.d.ts +1 -1
  83. package/dist/core/redirects/component.d.ts +1 -1
  84. package/dist/core/redirects/helpers.d.ts +5 -1
  85. package/dist/core/render/index.d.ts +2 -1
  86. package/dist/core/render/paginate.d.ts +2 -1
  87. package/dist/core/render/params-and-props.d.ts +3 -1
  88. package/dist/core/render/renderer.d.ts +2 -1
  89. package/dist/core/render/route-cache.d.ts +4 -1
  90. package/dist/core/render/slots.d.ts +1 -1
  91. package/dist/core/render/ssr-element.d.ts +2 -2
  92. package/dist/core/render-context.d.ts +5 -2
  93. package/dist/core/routing/astro-designed-error-pages.d.ts +2 -1
  94. package/dist/core/routing/default.d.ts +2 -1
  95. package/dist/core/routing/manifest/create.d.ts +2 -1
  96. package/dist/core/routing/manifest/generator.d.ts +2 -1
  97. package/dist/core/routing/manifest/pattern.d.ts +2 -1
  98. package/dist/core/routing/manifest/serialization.d.ts +3 -1
  99. package/dist/core/routing/match.d.ts +2 -1
  100. package/dist/core/routing/params.d.ts +2 -1
  101. package/dist/core/routing/priority.d.ts +1 -1
  102. package/dist/core/routing/rewrite.d.ts +3 -1
  103. package/dist/core/routing/validation.d.ts +3 -1
  104. package/dist/core/server-islands/endpoint.d.ts +2 -1
  105. package/dist/core/server-islands/vite-plugin-server-islands.d.ts +1 -1
  106. package/dist/core/sync/index.d.ts +2 -1
  107. package/dist/core/sync/write-files.d.ts +1 -1
  108. package/dist/core/sync/write-files.js +4 -6
  109. package/dist/core/util.d.ts +3 -1
  110. package/dist/env/schema.d.ts +22 -22
  111. package/dist/env/sync.d.ts +1 -1
  112. package/dist/env/vite-plugin-env.d.ts +1 -1
  113. package/dist/events/session.d.ts +1 -1
  114. package/dist/i18n/index.d.ts +4 -2
  115. package/dist/i18n/middleware.d.ts +2 -1
  116. package/dist/i18n/utils.d.ts +1 -1
  117. package/dist/i18n/vite-plugin-i18n.d.ts +2 -1
  118. package/dist/integrations/features-validation.d.ts +4 -3
  119. package/dist/integrations/features-validation.js +0 -6
  120. package/dist/integrations/hooks.d.ts +4 -2
  121. package/dist/integrations/hooks.js +0 -11
  122. package/dist/jsx/renderer.d.ts +1 -1
  123. package/dist/jsx/renderer.js +1 -4
  124. package/dist/jsx/server.d.ts +1 -1
  125. package/dist/jsx/transform-options.d.ts +1 -1
  126. package/dist/preferences/index.d.ts +1 -1
  127. package/dist/prefetch/vite-plugin-prefetch.d.ts +1 -1
  128. package/dist/prerender/routing.d.ts +2 -1
  129. package/dist/prerender/utils.d.ts +1 -1
  130. package/dist/runtime/client/dev-toolbar/toolbar.d.ts +1 -1
  131. package/dist/runtime/client/idle.d.ts +1 -1
  132. package/dist/runtime/client/load.d.ts +1 -1
  133. package/dist/runtime/client/media.d.ts +1 -1
  134. package/dist/runtime/client/media.prebuilt.d.ts +1 -1
  135. package/dist/runtime/client/media.prebuilt.js +1 -1
  136. package/dist/runtime/client/only.d.ts +1 -1
  137. package/dist/runtime/client/visible.d.ts +1 -1
  138. package/dist/runtime/client/visible.prebuilt.d.ts +1 -1
  139. package/dist/runtime/client/visible.prebuilt.js +1 -1
  140. package/dist/runtime/server/astro-component.d.ts +1 -1
  141. package/dist/runtime/server/astro-global.d.ts +1 -1
  142. package/dist/runtime/server/endpoint.d.ts +5 -2
  143. package/dist/runtime/server/hydration.d.ts +1 -1
  144. package/dist/runtime/server/jsx.d.ts +1 -1
  145. package/dist/runtime/server/render/astro/factory.d.ts +1 -1
  146. package/dist/runtime/server/render/astro/instance.d.ts +1 -1
  147. package/dist/runtime/server/render/astro/render.d.ts +1 -1
  148. package/dist/runtime/server/render/common.d.ts +1 -1
  149. package/dist/runtime/server/render/component.d.ts +1 -1
  150. package/dist/runtime/server/render/component.js +2 -13
  151. package/dist/runtime/server/render/dom.d.ts +1 -1
  152. package/dist/runtime/server/render/head.d.ts +1 -1
  153. package/dist/runtime/server/render/page.d.ts +1 -1
  154. package/dist/runtime/server/render/script.d.ts +1 -1
  155. package/dist/runtime/server/render/server-islands.d.ts +1 -1
  156. package/dist/runtime/server/render/slot.d.ts +1 -1
  157. package/dist/runtime/server/render/tags.d.ts +1 -1
  158. package/dist/runtime/server/render/util.d.ts +1 -1
  159. package/dist/runtime/server/render/util.js +5 -11
  160. package/dist/runtime/server/scripts.d.ts +1 -1
  161. package/dist/runtime/server/serialize.d.ts +1 -1
  162. package/dist/runtime/server/transition.d.ts +2 -1
  163. package/dist/toolbar/index.d.ts +1 -1
  164. package/dist/toolbar/vite-plugin-dev-toolbar.d.ts +1 -1
  165. package/dist/transitions/index.d.ts +1 -1
  166. package/dist/transitions/vite-plugin-transitions.d.ts +1 -1
  167. package/dist/types/astro.d.ts +77 -0
  168. package/dist/types/public/common.d.ts +135 -0
  169. package/dist/{@types/astro.d.ts → types/public/config.d.ts} +25 -1379
  170. package/dist/types/public/content.d.ts +103 -0
  171. package/dist/types/public/content.js +0 -0
  172. package/dist/types/public/context.d.ts +450 -0
  173. package/dist/types/public/context.js +0 -0
  174. package/dist/types/public/elements.d.ts +34 -0
  175. package/dist/types/public/elements.js +0 -0
  176. package/dist/types/public/extendables.d.ts +18 -0
  177. package/dist/types/public/extendables.js +0 -0
  178. package/dist/types/public/index.d.ts +20 -0
  179. package/dist/types/public/index.js +0 -0
  180. package/dist/types/public/integrations.d.ts +229 -0
  181. package/dist/types/public/integrations.js +0 -0
  182. package/dist/types/public/internal.d.ts +176 -0
  183. package/dist/types/public/internal.js +0 -0
  184. package/dist/types/public/preview.d.ts +22 -0
  185. package/dist/types/public/preview.js +0 -0
  186. package/dist/types/public/toolbar.d.ts +66 -0
  187. package/dist/types/public/toolbar.js +0 -0
  188. package/dist/types/public/view-transitions.d.ts +27 -0
  189. package/dist/types/public/view-transitions.js +0 -0
  190. package/dist/types/typed-emitter.js +0 -0
  191. package/dist/virtual-modules/container.d.ts +2 -1
  192. package/dist/virtual-modules/i18n.d.ts +3 -1
  193. package/dist/vite-plugin-astro/index.d.ts +1 -1
  194. package/dist/vite-plugin-astro/types.d.ts +1 -1
  195. package/dist/vite-plugin-astro-server/base.d.ts +1 -1
  196. package/dist/vite-plugin-astro-server/error.d.ts +1 -1
  197. package/dist/vite-plugin-astro-server/metadata.d.ts +1 -1
  198. package/dist/vite-plugin-astro-server/pipeline.d.ts +5 -3
  199. package/dist/vite-plugin-astro-server/plugin.d.ts +2 -1
  200. package/dist/vite-plugin-astro-server/request.d.ts +1 -1
  201. package/dist/vite-plugin-astro-server/route.d.ts +2 -1
  202. package/dist/vite-plugin-astro-server/scripts.d.ts +1 -1
  203. package/dist/vite-plugin-config-alias/index.d.ts +1 -1
  204. package/dist/vite-plugin-env/index.d.ts +1 -1
  205. package/dist/vite-plugin-env/index.js +1 -1
  206. package/dist/vite-plugin-integrations-container/index.d.ts +1 -1
  207. package/dist/vite-plugin-markdown/content-entry-type.d.ts +1 -1
  208. package/dist/vite-plugin-markdown/content-entry-type.js +2 -2
  209. package/dist/vite-plugin-markdown/index.d.ts +1 -1
  210. package/dist/vite-plugin-scanner/index.d.ts +1 -1
  211. package/dist/vite-plugin-scanner/scan.d.ts +1 -1
  212. package/dist/vite-plugin-scripts/index.d.ts +1 -1
  213. package/dist/vite-plugin-scripts/page-ssr.d.ts +1 -1
  214. package/dist/vite-plugin-utils/index.d.ts +1 -1
  215. package/env.d.ts +1 -1
  216. package/index.d.ts +1 -1
  217. package/package.json +9 -9
  218. package/templates/actions.mjs +1 -1
  219. package/types.d.ts +1 -1
  220. /package/dist/{@types → types}/astro.js +0 -0
  221. /package/dist/{@types/app.d.js → types/public/common.js} +0 -0
  222. /package/dist/{@types/typed-emitter.js → types/public/config.js} +0 -0
  223. /package/dist/{@types → types}/typed-emitter.d.ts +0 -0
package/astro-jsx.d.ts CHANGED
@@ -17,23 +17,21 @@ declare namespace astroHTML.JSX {
17
17
  children: {};
18
18
  }
19
19
 
20
- interface IntrinsicAttributes
21
- extends AstroBuiltinProps,
22
- AstroBuiltinAttributes,
23
- AstroClientDirectives {
20
+ interface IntrinsicAttributes extends AstroComponentDirectives, AstroBuiltinAttributes {
24
21
  slot?: string | undefined | null;
25
22
  children?: Children;
26
23
  }
27
24
 
28
- type AstroBuiltinProps = import('./dist/@types/astro.js').AstroBuiltinProps;
29
- type AstroClientDirectives = import('./dist/@types/astro.js').AstroClientDirectives;
30
- type AstroBuiltinAttributes = import('./dist/@types/astro.js').AstroBuiltinAttributes;
31
- type AstroDefineVarsAttribute = import('./dist/@types/astro.js').AstroDefineVarsAttribute;
32
- type AstroScriptAttributes = import('./dist/@types/astro.js').AstroScriptAttributes &
25
+ type AstroComponentDirectives =
26
+ import('./dist/types/public/elements.js').AstroComponentDirectives;
27
+ type AstroBuiltinAttributes = import('./dist/types/public/elements.js').AstroBuiltinAttributes;
28
+ type AstroDefineVarsAttribute =
29
+ import('./dist/types/public/elements.js').AstroDefineVarsAttribute;
30
+ type AstroScriptAttributes = import('./dist/types/public/elements.js').AstroScriptAttributes &
33
31
  AstroDefineVarsAttribute;
34
- type AstroStyleAttributes = import('./dist/@types/astro.js').AstroStyleAttributes &
32
+ type AstroStyleAttributes = import('./dist/types/public/elements.js').AstroStyleAttributes &
35
33
  AstroDefineVarsAttribute;
36
- type AstroSlotAttributes = import('./dist/@types/astro.js').AstroSlotAttributes;
34
+ type AstroSlotAttributes = import('./dist/types/public/elements.js').AstroSlotAttributes;
37
35
 
38
36
  // This is an unfortunate use of `any`, but unfortunately we can't make a type that works for every framework
39
37
  // without importing every single framework's types (which comes with its own set of problems).
package/astro.js CHANGED
@@ -12,7 +12,7 @@ const CI_INSTRUCTIONS = {
12
12
  };
13
13
 
14
14
  // Hardcode supported Node.js version so we don't have to read differently in CJS & ESM.
15
- const engines = '>=18.14.1';
15
+ const engines = '>=18.17.1';
16
16
  const skipSemverCheckIfAbove = 19;
17
17
 
18
18
  /** `astro *` */
package/client.d.ts CHANGED
@@ -2,12 +2,6 @@
2
2
  /// <reference path="./types/content.d.ts" />
3
3
  /// <reference path="./types/actions.d.ts" />
4
4
 
5
- // eslint-disable-next-line @typescript-eslint/no-namespace
6
- declare namespace App {
7
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
8
- export interface Locals {}
9
- }
10
-
11
5
  interface ImportMetaEnv {
12
6
  /**
13
7
  * The prefix for Astro-generated asset links if the build.assetsPrefix config option is set. This can be used to create asset links not handled by Astro.
@@ -52,7 +46,7 @@ declare module 'astro:assets' {
52
46
  getImage: (
53
47
  options: import('./dist/assets/types.js').UnresolvedImageTransform,
54
48
  ) => Promise<import('./dist/assets/types.js').GetImageResult>;
55
- imageConfig: import('./dist/@types/astro.js').AstroConfig['image'];
49
+ imageConfig: import('./dist/types/public/config.js').AstroConfig['image'];
56
50
  getConfiguredImageService: typeof import('./dist/assets/index.js').getConfiguredImageService;
57
51
  inferRemoteSize: typeof import('./dist/assets/utils/index.js').inferRemoteSize;
58
52
  Image: typeof import('./components/Image.astro').default;
@@ -172,7 +166,7 @@ declare module 'astro:components' {
172
166
  export * from 'astro/components';
173
167
  }
174
168
 
175
- type MD = import('./dist/@types/astro.js').MarkdownInstance<Record<string, any>>;
169
+ type MD = import('./dist/types/public/content.js').MarkdownInstance<Record<string, any>>;
176
170
  interface ExportedMarkdownModuleEntities {
177
171
  frontmatter: MD['frontmatter'];
178
172
  file: MD['file'];
@@ -191,7 +185,6 @@ declare module '*.md' {
191
185
  file,
192
186
  url,
193
187
  getHeadings,
194
- getHeaders,
195
188
  Content,
196
189
  rawContent,
197
190
  compiledContent,
@@ -206,7 +199,6 @@ declare module '*.markdown' {
206
199
  file,
207
200
  url,
208
201
  getHeadings,
209
- getHeaders,
210
202
  Content,
211
203
  rawContent,
212
204
  compiledContent,
@@ -221,7 +213,6 @@ declare module '*.mkdn' {
221
213
  file,
222
214
  url,
223
215
  getHeadings,
224
- getHeaders,
225
216
  Content,
226
217
  rawContent,
227
218
  compiledContent,
@@ -236,7 +227,6 @@ declare module '*.mkd' {
236
227
  file,
237
228
  url,
238
229
  getHeadings,
239
- getHeaders,
240
230
  Content,
241
231
  rawContent,
242
232
  compiledContent,
@@ -251,7 +241,6 @@ declare module '*.mdwn' {
251
241
  file,
252
242
  url,
253
243
  getHeadings,
254
- getHeaders,
255
244
  Content,
256
245
  rawContent,
257
246
  compiledContent,
@@ -266,7 +255,6 @@ declare module '*.mdown' {
266
255
  file,
267
256
  url,
268
257
  getHeadings,
269
- getHeaders,
270
258
  Content,
271
259
  rawContent,
272
260
  compiledContent,
@@ -275,7 +263,7 @@ declare module '*.mdown' {
275
263
  }
276
264
 
277
265
  declare module '*.mdx' {
278
- type MDX = import('./dist/@types/astro.js').MDXInstance<Record<string, any>>;
266
+ type MDX = import('./dist/types/public/content.js').MDXInstance<Record<string, any>>;
279
267
 
280
268
  export const frontmatter: MDX['frontmatter'];
281
269
  export const file: MDX['file'];
@@ -288,7 +276,7 @@ declare module '*.mdx' {
288
276
  }
289
277
 
290
278
  declare module 'astro:ssr-manifest' {
291
- export const manifest: import('./dist/@types/astro.js').SSRManifest;
279
+ export const manifest: import('./dist/types/public/internal.js').SSRManifest;
292
280
  }
293
281
 
294
282
  // Everything below are Vite's types (apart from image types, which are in `client.d.ts`)
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  import { type LocalImageProps, type RemoteImageProps, getImage } from 'astro:assets';
3
3
  import * as mime from 'mrmime';
4
- import type { GetImageResult, ImageOutputFormat } from '../dist/@types/astro';
5
4
  import { isESMImportedImage, resolveSrc } from '../dist/assets/utils/imageKind';
6
5
  import { AstroError, AstroErrorData } from '../dist/core/errors/index.js';
6
+ import type { GetImageResult, ImageOutputFormat } from '../dist/types/public/index.js';
7
7
  import type { HTMLAttributes } from '../types';
8
8
 
9
9
  type Props = (LocalImageProps | RemoteImageProps) & {
package/config.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  type ViteUserConfig = import('vite').UserConfig;
2
2
  type ViteUserConfigFn = import('vite').UserConfigFn;
3
- type AstroUserConfig = import('./dist/@types/astro.js').AstroUserConfig;
4
- type AstroInlineConfig = import('./dist/@types/astro.js').AstroInlineConfig;
5
- type ImageServiceConfig = import('./dist/@types/astro.js').ImageServiceConfig;
3
+ type AstroUserConfig = import('./dist/types/public/config.js').AstroUserConfig;
4
+ type AstroInlineConfig = import('./dist/types/public/config.js').AstroInlineConfig;
5
+ type ImageServiceConfig = import('./dist/types/public/config.js').ImageServiceConfig;
6
6
  type SharpImageServiceConfig = import('./dist/assets/services/sharp.js').SharpImageServiceConfig;
7
7
  type EnvField = typeof import('./dist/env/config.js').envField;
8
8
 
@@ -42,4 +42,4 @@ export function passthroughImageService(): ImageServiceConfig;
42
42
  /**
43
43
  * Return a valid env field to use in this Astro config for `experimental.env.schema`.
44
44
  */
45
- export const envField: EnvField;
45
+ export declare const envField: EnvField;
@@ -1,6 +1,7 @@
1
1
  import fsMod from 'node:fs';
2
2
  import type { Plugin as VitePlugin } from 'vite';
3
- import type { AstroIntegration, AstroSettings } from '../@types/astro.js';
3
+ import type { AstroSettings } from '../types/astro.js';
4
+ import type { AstroIntegration } from '../types/public/integrations.js';
4
5
  export default function astroActions({ fs, settings, }: {
5
6
  fs?: typeof fsMod;
6
7
  settings: AstroSettings;
@@ -6,4 +6,4 @@ export type ActionPayload = {
6
6
  export type Locals = {
7
7
  _actionPayload: ActionPayload;
8
8
  };
9
- export declare const onRequest: import("../../@types/astro.js").MiddlewareHandler;
9
+ export declare const onRequest: import("../../types/public/common.js").MiddlewareHandler;
@@ -1,2 +1,2 @@
1
- import type { APIRoute } from '../../@types/astro.js';
1
+ import type { APIRoute } from '../../types/public/common.js';
2
2
  export declare const POST: APIRoute;
@@ -1,4 +1,4 @@
1
- import type { APIContext } from '../../@types/astro.js';
1
+ import type { APIContext } from '../../types/public/context.js';
2
2
  export declare const formContentTypes: string[];
3
3
  export declare function hasContentType(contentType: string, expected: string[]): boolean;
4
4
  export type ActionAPIContext = Omit<APIContext, 'getActionResult' | 'callAction' | 'props'>;
@@ -1,6 +1,6 @@
1
- import type { APIContext } from '../@types/astro.js';
1
+ import type { APIContext } from '../types/public/context.js';
2
2
  import type { Locals } from './runtime/middleware.js';
3
- import { type ActionAPIContext } from './runtime/utils.js';
3
+ import type { ActionAPIContext } from './runtime/utils.js';
4
4
  export declare function hasActionPayload(locals: APIContext['locals']): locals is Locals;
5
5
  export declare function createGetActionResult(locals: APIContext['locals']): APIContext['getActionResult'];
6
6
  export declare function createCallAction(context: ActionAPIContext): APIContext['callAction'];
@@ -1,4 +1,3 @@
1
- import {} from "./runtime/utils.js";
2
1
  import { deserializeActionResult, getActionQueryString } from "./runtime/virtual/shared.js";
3
2
  function hasActionPayload(locals) {
4
3
  return "_actionPayload" in locals;
@@ -1,8 +1,8 @@
1
1
  import type PQueue from 'p-queue';
2
- import type { AstroConfig } from '../../@types/astro.js';
3
2
  import type { BuildPipeline } from '../../core/build/pipeline.js';
4
3
  import type { Logger } from '../../core/logger/core.js';
5
4
  import type { MapValue } from '../../type-utils.js';
5
+ import type { AstroConfig } from '../../types/public/config.js';
6
6
  import type { AssetsGlobalStaticImagesList } from '../types.js';
7
7
  type AssetEnv = {
8
8
  logger: Logger;
@@ -1,2 +1,2 @@
1
- import type { AstroSettings } from '../../@types/astro.js';
1
+ import type { AstroSettings } from '../../types/astro.js';
2
2
  export declare function injectImageEndpoint(settings: AstroSettings, mode: 'dev' | 'build'): AstroSettings;
@@ -1,4 +1,4 @@
1
- import type { APIRoute } from '../../@types/astro.js';
1
+ import type { APIRoute } from '../../types/public/common.js';
2
2
  /**
3
3
  * Endpoint used in dev and SSR to serve optimized images by the base image services
4
4
  */
@@ -1,4 +1,4 @@
1
- import type { APIRoute } from '../../@types/astro.js';
1
+ import type { APIRoute } from '../../types/public/common.js';
2
2
  /**
3
3
  * Endpoint used in dev and SSR to serve optimized images by the base image services
4
4
  */
@@ -1,4 +1,4 @@
1
- import type { AstroConfig } from '../@types/astro.js';
1
+ import type { AstroConfig } from '../types/public/config.js';
2
2
  import { type ImageService } from './services/service.js';
3
3
  import { type GetImageResult, type UnresolvedImageTransform } from './types.js';
4
4
  export declare function getConfiguredImageService(): Promise<ImageService>;
@@ -1,4 +1,4 @@
1
- import type { AstroConfig } from '../../@types/astro.js';
1
+ import type { AstroConfig } from '../../types/public/config.js';
2
2
  import type { ImageOutputFormat, ImageTransform, UnresolvedSrcSetValue } from '../types.js';
3
3
  export type ImageService = LocalImageService | ExternalImageService;
4
4
  export declare function isLocalService(service: ImageService | undefined): service is LocalImageService;
@@ -1,4 +1,4 @@
1
- import type { AstroConfig } from '../../@types/astro.js';
1
+ import type { AstroConfig } from '../../types/public/config.js';
2
2
  export type RemotePattern = {
3
3
  hostname?: string;
4
4
  pathname?: string;
@@ -1,3 +1,3 @@
1
- export declare const typeHandlers: Map<"jpg" | "png" | "tiff" | "webp" | "gif" | "svg" | "heif" | "icns" | "ktx" | "bmp" | "cur" | "dds" | "ico" | "j2c" | "jp2" | "pnm" | "psd" | "tga", import("./interface.js").IImage>;
2
- export declare const types: ("jpg" | "png" | "tiff" | "webp" | "gif" | "svg" | "heif" | "icns" | "ktx" | "bmp" | "cur" | "dds" | "ico" | "j2c" | "jp2" | "pnm" | "psd" | "tga")[];
1
+ export declare const typeHandlers: Map<"svg" | "jpg" | "png" | "tiff" | "webp" | "gif" | "heif" | "icns" | "ktx" | "bmp" | "cur" | "dds" | "ico" | "j2c" | "jp2" | "pnm" | "psd" | "tga", import("./interface.js").IImage>;
2
+ export declare const types: ("svg" | "jpg" | "png" | "tiff" | "webp" | "gif" | "heif" | "icns" | "ktx" | "bmp" | "cur" | "dds" | "ico" | "j2c" | "jp2" | "pnm" | "psd" | "tga")[];
3
3
  export type imageType = typeof types[number];
@@ -1,5 +1,5 @@
1
1
  import type * as vite from 'vite';
2
- import type { AstroPluginOptions } from '../@types/astro.js';
2
+ import type { AstroPluginOptions } from '../types/astro.js';
3
3
  export default function assets({ settings, mode, }: AstroPluginOptions & {
4
4
  mode: string;
5
5
  }): vite.Plugin[];
@@ -1,6 +1,6 @@
1
1
  import type { Arguments } from 'yargs-parser';
2
- import type { AstroInlineConfig } from '../@types/astro.js';
3
2
  import { Logger } from '../core/logger/core.js';
3
+ import type { AstroInlineConfig } from '../types/public/config.js';
4
4
  export type Flags = Arguments;
5
5
  export declare function flagsToAstroInlineConfig(flags: Flags): AstroInlineConfig;
6
6
  /**
@@ -1,4 +1,4 @@
1
- import type { AstroConfig, AstroUserConfig } from '../../@types/astro.js';
1
+ import type { AstroConfig, AstroUserConfig } from '../../types/public/config.js';
2
2
  import { type Flags } from '../flags.js';
3
3
  interface InfoOptions {
4
4
  flags: Flags;
@@ -2,5 +2,5 @@ import { type Flags } from '../flags.js';
2
2
  interface PreviewOptions {
3
3
  flags: Flags;
4
4
  }
5
- export declare function preview({ flags }: PreviewOptions): Promise<import("../../@types/astro.js").PreviewServer | undefined>;
5
+ export declare function preview({ flags }: PreviewOptions): Promise<import("../../types/public/preview.js").PreviewServer | undefined>;
6
6
  export {};
@@ -1,5 +1,5 @@
1
1
  import type { UserConfig as ViteUserConfig } from 'vite';
2
- import type { AstroInlineConfig, AstroUserConfig } from '../@types/astro.js';
2
+ import type { AstroInlineConfig, AstroUserConfig } from '../types/public/config.js';
3
3
  export declare function defineConfig(config: AstroUserConfig): AstroUserConfig;
4
4
  export declare function getViteConfig(userViteConfig: ViteUserConfig, inlineAstroConfig?: AstroInlineConfig): ({ mode, command }: {
5
5
  mode: string;
@@ -1,7 +1,7 @@
1
1
  import type fsMod from 'node:fs';
2
2
  import type { Plugin } from 'vite';
3
- import type { AstroSettings } from '../@types/astro.js';
4
3
  import type { Logger } from '../core/logger/core.js';
4
+ import type { AstroSettings } from '../types/astro.js';
5
5
  /**
6
6
  * Listen for Astro content directory changes and generate types.
7
7
  *
@@ -1,5 +1,18 @@
1
- import type { AstroUserConfig, NamedSSRLoadedRendererValue, Props, RouteType, SSRLoadedRenderer, SSRLoadedRendererValue, SSRManifest, SSRResult } from '../@types/astro.js';
2
1
  import type { AstroComponentFactory } from '../runtime/server/index.js';
2
+ import type { Props } from '../types/public/common.js';
3
+ import type { AstroUserConfig } from '../types/public/config.js';
4
+ import type { NamedSSRLoadedRendererValue, RouteType, SSRLoadedRenderer, SSRLoadedRendererValue, SSRManifest, SSRResult } from '../types/public/internal.js';
5
+ /** Public type, used for integrations to define a renderer for the container API */
6
+ export type ContainerRenderer = {
7
+ /**
8
+ * The name of the renderer.
9
+ */
10
+ name: string;
11
+ /**
12
+ * The entrypoint that is used to render a component on the server
13
+ */
14
+ serverEntrypoint: string;
15
+ };
3
16
  /**
4
17
  * Options to be passed when rendering a route
5
18
  */
@@ -1,5 +1,7 @@
1
- import type { ComponentInstance, RewritePayload, RouteData, SSRResult } from '../@types/astro.js';
2
1
  import { type HeadElements, Pipeline } from '../core/base-pipeline.js';
2
+ import type { ComponentInstance } from '../types/astro.js';
3
+ import type { RewritePayload } from '../types/public/common.js';
4
+ import type { RouteData, SSRResult } from '../types/public/internal.js';
3
5
  export declare class ContainerPipeline extends Pipeline {
4
6
  #private;
5
7
  static create({ logger, manifest, renderers, resolve, serverLike, streaming, }: Pick<ContainerPipeline, 'logger' | 'manifest' | 'renderers' | 'resolve' | 'serverLike' | 'streaming'>): ContainerPipeline;
@@ -1,6 +1,6 @@
1
1
  import type { FSWatcher } from 'vite';
2
- import type { AstroSettings } from '../@types/astro.js';
3
2
  import type { Logger } from '../core/logger/core.js';
3
+ import type { AstroSettings } from '../types/astro.js';
4
4
  import type { LoaderContext } from './loaders/types.js';
5
5
  import type { MutableDataStore } from './mutable-data-store.js';
6
6
  export interface ContentLayerOptions {
@@ -80,7 +80,7 @@ function glob(globOptions) {
80
80
  if (entryType.getRenderFunction) {
81
81
  let render = renderFunctionByContentType.get(entryType);
82
82
  if (!render) {
83
- render = await entryType.getRenderFunction(settings);
83
+ render = await entryType.getRenderFunction(settings.config);
84
84
  renderFunctionByContentType.set(entryType, render);
85
85
  }
86
86
  let rendered = void 0;
@@ -1,6 +1,7 @@
1
1
  import type { FSWatcher } from 'vite';
2
2
  import type { ZodSchema } from 'zod';
3
- import type { AstroIntegrationLogger, AstroSettings } from '../../@types/astro.js';
3
+ import type { AstroIntegrationLogger } from '../../core/logger/core.js';
4
+ import type { AstroSettings } from '../../types/astro.js';
4
5
  import type { MetaStore, ScopedDataStore } from '../mutable-data-store.js';
5
6
  export interface ParseDataOptions<TData extends Record<string, unknown>> {
6
7
  /** The ID of the entry. Unique per collection */
@@ -1,7 +1,7 @@
1
1
  import type fsMod from 'node:fs';
2
2
  import type { ViteDevServer } from 'vite';
3
- import type { AstroSettings } from '../@types/astro.js';
4
3
  import type { Logger } from '../core/logger/core.js';
4
+ import type { AstroSettings } from '../types/astro.js';
5
5
  interface ContentServerListenerParams {
6
6
  fs: typeof fsMod;
7
7
  logger: Logger;
@@ -1,7 +1,7 @@
1
1
  import type fsMod from 'node:fs';
2
2
  import { type ViteDevServer } from 'vite';
3
- import type { AstroSettings } from '../@types/astro.js';
4
3
  import type { Logger } from '../core/logger/core.js';
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';
7
7
  type RawContentEvent = {
@@ -3,8 +3,10 @@ import matter from 'gray-matter';
3
3
  import type { PluginContext } from 'rollup';
4
4
  import { type ViteDevServer } from 'vite';
5
5
  import { z } from 'zod';
6
- import type { AstroConfig, AstroSettings, ContentEntryType, DataEntryType } from '../@types/astro.js';
7
6
  import type { Logger } from '../core/logger/core.js';
7
+ import type { AstroSettings } from '../types/astro.js';
8
+ import type { AstroConfig } from '../types/public/config.js';
9
+ import type { ContentEntryType, DataEntryType } from '../types/public/content.js';
8
10
  import { CONTENT_FLAGS } from './consts.js';
9
11
  /**
10
12
  * Amap from a collection + slug to the local file path.
@@ -85,7 +87,6 @@ declare const collectionConfigParser: z.ZodUnion<[z.ZodObject<{
85
87
  schema: z.ZodOptional<z.ZodAny>;
86
88
  render: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], null>, z.ZodUnknown>>;
87
89
  }, "strip", z.ZodTypeAny, {
88
- name: string;
89
90
  load: (args_0: {
90
91
  collection: string;
91
92
  generateDigest: (args_0: any) => unknown;
@@ -96,10 +97,10 @@ declare const collectionConfigParser: z.ZodUnion<[z.ZodObject<{
96
97
  parseData?: any;
97
98
  watcher?: any;
98
99
  }) => unknown;
99
- schema?: any;
100
+ name: string;
100
101
  render?: ((args_0: any) => unknown) | undefined;
102
+ schema?: any;
101
103
  }, {
102
- name: string;
103
104
  load: (args_0: {
104
105
  collection: string;
105
106
  generateDigest: (args_0: any) => unknown;
@@ -110,8 +111,9 @@ declare const collectionConfigParser: z.ZodUnion<[z.ZodObject<{
110
111
  parseData?: any;
111
112
  watcher?: any;
112
113
  }) => unknown;
113
- schema?: any;
114
+ name: string;
114
115
  render?: ((args_0: any) => unknown) | undefined;
116
+ schema?: any;
115
117
  }>]>;
116
118
  }, "strip", z.ZodTypeAny, {
117
119
  type: "content_layer";
@@ -120,7 +122,6 @@ declare const collectionConfigParser: z.ZodUnion<[z.ZodObject<{
120
122
  }, z.ZodUnknown, "strip">[] | Promise<z.objectOutputType<{
121
123
  id: z.ZodString;
122
124
  }, z.ZodUnknown, "strip">[]>) | {
123
- name: string;
124
125
  load: (args_0: {
125
126
  collection: string;
126
127
  generateDigest: (args_0: any) => unknown;
@@ -131,8 +132,9 @@ declare const collectionConfigParser: z.ZodUnion<[z.ZodObject<{
131
132
  parseData?: any;
132
133
  watcher?: any;
133
134
  }) => unknown;
134
- schema?: any;
135
+ name: string;
135
136
  render?: ((args_0: any) => unknown) | undefined;
137
+ schema?: any;
136
138
  };
137
139
  schema?: any;
138
140
  }, {
@@ -142,7 +144,6 @@ declare const collectionConfigParser: z.ZodUnion<[z.ZodObject<{
142
144
  }, z.ZodUnknown, "strip">[] | Promise<z.objectInputType<{
143
145
  id: z.ZodString;
144
146
  }, z.ZodUnknown, "strip">[]>) | {
145
- name: string;
146
147
  load: (args_0: {
147
148
  collection: string;
148
149
  generateDigest: (args_0: any) => unknown;
@@ -153,8 +154,9 @@ declare const collectionConfigParser: z.ZodUnion<[z.ZodObject<{
153
154
  parseData?: any;
154
155
  watcher?: any;
155
156
  }) => unknown;
156
- schema?: any;
157
+ name: string;
157
158
  render?: ((args_0: any) => unknown) | undefined;
159
+ schema?: any;
158
160
  };
159
161
  schema?: any;
160
162
  }>]>;
@@ -225,7 +227,6 @@ declare const contentConfigParser: z.ZodObject<{
225
227
  schema: z.ZodOptional<z.ZodAny>;
226
228
  render: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], null>, z.ZodUnknown>>;
227
229
  }, "strip", z.ZodTypeAny, {
228
- name: string;
229
230
  load: (args_0: {
230
231
  collection: string;
231
232
  generateDigest: (args_0: any) => unknown;
@@ -236,10 +237,10 @@ declare const contentConfigParser: z.ZodObject<{
236
237
  parseData?: any;
237
238
  watcher?: any;
238
239
  }) => unknown;
239
- schema?: any;
240
+ name: string;
240
241
  render?: ((args_0: any) => unknown) | undefined;
242
+ schema?: any;
241
243
  }, {
242
- name: string;
243
244
  load: (args_0: {
244
245
  collection: string;
245
246
  generateDigest: (args_0: any) => unknown;
@@ -250,8 +251,9 @@ declare const contentConfigParser: z.ZodObject<{
250
251
  parseData?: any;
251
252
  watcher?: any;
252
253
  }) => unknown;
253
- schema?: any;
254
+ name: string;
254
255
  render?: ((args_0: any) => unknown) | undefined;
256
+ schema?: any;
255
257
  }>]>;
256
258
  }, "strip", z.ZodTypeAny, {
257
259
  type: "content_layer";
@@ -260,7 +262,6 @@ declare const contentConfigParser: z.ZodObject<{
260
262
  }, z.ZodUnknown, "strip">[] | Promise<z.objectOutputType<{
261
263
  id: z.ZodString;
262
264
  }, z.ZodUnknown, "strip">[]>) | {
263
- name: string;
264
265
  load: (args_0: {
265
266
  collection: string;
266
267
  generateDigest: (args_0: any) => unknown;
@@ -271,8 +272,9 @@ declare const contentConfigParser: z.ZodObject<{
271
272
  parseData?: any;
272
273
  watcher?: any;
273
274
  }) => unknown;
274
- schema?: any;
275
+ name: string;
275
276
  render?: ((args_0: any) => unknown) | undefined;
277
+ schema?: any;
276
278
  };
277
279
  schema?: any;
278
280
  }, {
@@ -282,7 +284,6 @@ declare const contentConfigParser: z.ZodObject<{
282
284
  }, z.ZodUnknown, "strip">[] | Promise<z.objectInputType<{
283
285
  id: z.ZodString;
284
286
  }, z.ZodUnknown, "strip">[]>) | {
285
- name: string;
286
287
  load: (args_0: {
287
288
  collection: string;
288
289
  generateDigest: (args_0: any) => unknown;
@@ -293,8 +294,9 @@ declare const contentConfigParser: z.ZodObject<{
293
294
  parseData?: any;
294
295
  watcher?: any;
295
296
  }) => unknown;
296
- schema?: any;
297
+ name: string;
297
298
  render?: ((args_0: any) => unknown) | undefined;
299
+ schema?: any;
298
300
  };
299
301
  schema?: any;
300
302
  }>]>>;
@@ -312,7 +314,6 @@ declare const contentConfigParser: z.ZodObject<{
312
314
  }, z.ZodUnknown, "strip">[] | Promise<z.objectOutputType<{
313
315
  id: z.ZodString;
314
316
  }, z.ZodUnknown, "strip">[]>) | {
315
- name: string;
316
317
  load: (args_0: {
317
318
  collection: string;
318
319
  generateDigest: (args_0: any) => unknown;
@@ -323,8 +324,9 @@ declare const contentConfigParser: z.ZodObject<{
323
324
  parseData?: any;
324
325
  watcher?: any;
325
326
  }) => unknown;
326
- schema?: any;
327
+ name: string;
327
328
  render?: ((args_0: any) => unknown) | undefined;
329
+ schema?: any;
328
330
  };
329
331
  schema?: any;
330
332
  }>;
@@ -342,7 +344,6 @@ declare const contentConfigParser: z.ZodObject<{
342
344
  }, z.ZodUnknown, "strip">[] | Promise<z.objectInputType<{
343
345
  id: z.ZodString;
344
346
  }, z.ZodUnknown, "strip">[]>) | {
345
- name: string;
346
347
  load: (args_0: {
347
348
  collection: string;
348
349
  generateDigest: (args_0: any) => unknown;
@@ -353,8 +354,9 @@ declare const contentConfigParser: z.ZodObject<{
353
354
  parseData?: any;
354
355
  watcher?: any;
355
356
  }) => unknown;
356
- schema?: any;
357
+ name: string;
357
358
  render?: ((args_0: any) => unknown) | undefined;
359
+ schema?: any;
358
360
  };
359
361
  schema?: any;
360
362
  }>;
@@ -1,8 +1,8 @@
1
1
  import type { Plugin } from 'vite';
2
- import type { AstroSettings } from '../@types/astro.js';
3
2
  import type { BuildInternals } from '../core/build/internal.js';
4
3
  import type { AstroBuildPlugin } from '../core/build/plugin.js';
5
4
  import type { StaticBuildOptions } from '../core/build/types.js';
5
+ import type { AstroSettings } from '../types/astro.js';
6
6
  export declare function astroContentAssetPropagationPlugin({ mode, settings, }: {
7
7
  mode: string;
8
8
  settings: AstroSettings;
@@ -1,7 +1,7 @@
1
1
  import type fsMod from 'node:fs';
2
2
  import type { Plugin } from 'vite';
3
- import type { AstroSettings } from '../@types/astro.js';
4
3
  import type { Logger } from '../core/logger/core.js';
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;
@@ -1,6 +1,6 @@
1
1
  import nodeFs from 'node:fs';
2
2
  import type { Plugin } from 'vite';
3
- import type { AstroSettings } from '../@types/astro.js';
3
+ import type { AstroSettings } from '../types/astro.js';
4
4
  import { type ContentLookupMap } from './utils.js';
5
5
  interface AstroContentVirtualModPluginParams {
6
6
  settings: AstroSettings;
@@ -1,4 +1,5 @@
1
- import type { ManifestData, RouteData, SSRManifest } from '../../@types/astro.js';
1
+ import type { ManifestData } from '../../types/astro.js';
2
+ import type { RouteData, SSRManifest } from '../../types/public/internal.js';
2
3
  import { getSetCookiesFromResponse } from '../cookies/index.js';
3
4
  import { AstroIntegrationLogger } from '../logger/core.js';
4
5
  export { deserializeManifest } from './common.js';
@@ -1,4 +1,4 @@
1
- import type { MiddlewareHandler } from '../../@types/astro.js';
1
+ import type { MiddlewareHandler } from '../../types/public/common.js';
2
2
  /**
3
3
  * Returns a middleware function in charge to check the `origin` header.
4
4
  *