astro 3.6.2 → 4.0.0-beta.1

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 (135) hide show
  1. package/client.d.ts +19 -20
  2. package/components/Code.astro +0 -20
  3. package/components/ViewTransitions.astro +2 -2
  4. package/dist/@types/astro.d.ts +19 -81
  5. package/dist/assets/build/generate.js +2 -2
  6. package/dist/assets/internal.js +1 -1
  7. package/dist/assets/services/vendor/squoosh/avif/avif_node_dec.js +3 -3
  8. package/dist/assets/services/vendor/squoosh/avif/avif_node_enc.js +3 -3
  9. package/dist/assets/services/vendor/squoosh/mozjpeg/mozjpeg_node_dec.js +3 -3
  10. package/dist/assets/services/vendor/squoosh/mozjpeg/mozjpeg_node_enc.js +3 -3
  11. package/dist/assets/services/vendor/squoosh/webp/webp_node_dec.js +3 -3
  12. package/dist/assets/services/vendor/squoosh/webp/webp_node_enc.js +3 -3
  13. package/dist/cli/add/babel.d.ts +1 -1
  14. package/dist/cli/build/index.js +0 -1
  15. package/dist/cli/flags.js +0 -3
  16. package/dist/cli/info/index.d.ts +5 -0
  17. package/dist/cli/info/index.js +16 -7
  18. package/dist/cli/install-package.js +1 -1
  19. package/dist/cli/telemetry/index.js +6 -6
  20. package/dist/content/server-listeners.js +7 -7
  21. package/dist/content/types-generator.d.ts +1 -4
  22. package/dist/content/types-generator.js +31 -51
  23. package/dist/core/app/index.js +2 -4
  24. package/dist/core/build/buildPipeline.js +3 -3
  25. package/dist/core/build/generate.js +18 -39
  26. package/dist/core/build/index.js +10 -32
  27. package/dist/core/build/internal.js +3 -3
  28. package/dist/core/build/plugin.d.ts +2 -2
  29. package/dist/core/build/plugins/plugin-manifest.js +1 -4
  30. package/dist/core/build/plugins/plugin-pages.js +0 -3
  31. package/dist/core/build/plugins/plugin-renderers.d.ts +1 -1
  32. package/dist/core/build/plugins/plugin-ssr.js +5 -6
  33. package/dist/core/build/static-build.js +4 -7
  34. package/dist/core/build/types.d.ts +1 -1
  35. package/dist/core/build/util.js +1 -1
  36. package/dist/core/config/config.js +1 -2
  37. package/dist/core/config/schema.d.ts +209 -277
  38. package/dist/core/config/schema.js +5 -38
  39. package/dist/core/constants.js +1 -1
  40. package/dist/core/create-vite.d.ts +2 -2
  41. package/dist/core/create-vite.js +12 -1
  42. package/dist/core/dev/dev.js +6 -4
  43. package/dist/core/dev/restart.js +7 -7
  44. package/dist/core/endpoint/index.d.ts +2 -7
  45. package/dist/core/endpoint/index.js +3 -87
  46. package/dist/core/errors/dev/vite.js +0 -1
  47. package/dist/core/logger/console.d.ts +2 -4
  48. package/dist/core/logger/console.js +4 -28
  49. package/dist/core/logger/core.d.ts +17 -5
  50. package/dist/core/logger/core.js +27 -2
  51. package/dist/core/logger/node.d.ts +2 -32
  52. package/dist/core/logger/node.js +8 -69
  53. package/dist/core/messages.d.ts +4 -11
  54. package/dist/core/messages.js +43 -59
  55. package/dist/core/middleware/callMiddleware.d.ts +1 -2
  56. package/dist/core/middleware/callMiddleware.js +1 -12
  57. package/dist/core/middleware/index.d.ts +2 -2
  58. package/dist/core/middleware/sequence.d.ts +2 -2
  59. package/dist/core/pipeline.d.ts +2 -2
  60. package/dist/core/pipeline.js +8 -13
  61. package/dist/core/preview/static-preview-server.js +2 -4
  62. package/dist/core/preview/vite-plugin-astro-preview.js +31 -21
  63. package/dist/core/render/core.js +0 -6
  64. package/dist/core/render/index.d.ts +1 -1
  65. package/dist/core/render/result.js +1 -1
  66. package/dist/core/render/route-cache.js +2 -5
  67. package/dist/core/request.js +3 -3
  68. package/dist/core/routing/manifest/create.js +14 -12
  69. package/dist/core/routing/validation.js +4 -4
  70. package/dist/core/sync/index.js +2 -2
  71. package/dist/i18n/middleware.d.ts +2 -2
  72. package/dist/i18n/vite-plugin-i18n.js +1 -1
  73. package/dist/integrations/astroFeaturesValidation.d.ts +1 -1
  74. package/dist/integrations/astroFeaturesValidation.js +12 -18
  75. package/dist/integrations/index.js +28 -6
  76. package/dist/prefetch/vite-plugin-prefetch.js +3 -3
  77. package/dist/runtime/client/dev-overlay/entrypoint.js +14 -10
  78. package/dist/runtime/client/dev-overlay/overlay.js +1 -1
  79. package/dist/runtime/client/dev-overlay/plugins/astro.d.ts +14 -1
  80. package/dist/runtime/client/dev-overlay/plugins/astro.js +326 -15
  81. package/dist/runtime/client/dev-overlay/plugins/settings.js +26 -2
  82. package/dist/runtime/client/dev-overlay/plugins/utils/icons.d.ts +3 -0
  83. package/dist/runtime/client/dev-overlay/plugins/utils/icons.js +37 -0
  84. package/dist/runtime/client/dev-overlay/plugins/utils/window.d.ts +1 -2
  85. package/dist/runtime/client/dev-overlay/plugins/utils/window.js +25 -29
  86. package/dist/runtime/client/dev-overlay/ui-library/badge.d.ts +9 -0
  87. package/dist/runtime/client/dev-overlay/ui-library/badge.js +67 -0
  88. package/dist/runtime/client/dev-overlay/ui-library/button.d.ts +9 -0
  89. package/dist/runtime/client/dev-overlay/ui-library/button.js +83 -0
  90. package/dist/runtime/client/dev-overlay/ui-library/card.d.ts +1 -3
  91. package/dist/runtime/client/dev-overlay/ui-library/card.js +17 -25
  92. package/dist/runtime/client/dev-overlay/ui-library/highlight.js +1 -0
  93. package/dist/runtime/client/dev-overlay/ui-library/icon.d.ts +10 -0
  94. package/dist/runtime/client/dev-overlay/ui-library/icon.js +36 -0
  95. package/dist/runtime/client/dev-overlay/ui-library/icons.d.ts +21 -6
  96. package/dist/runtime/client/dev-overlay/ui-library/icons.js +22 -7
  97. package/dist/runtime/client/dev-overlay/ui-library/index.d.ts +8 -0
  98. package/dist/runtime/client/dev-overlay/ui-library/index.js +18 -0
  99. package/dist/runtime/client/dev-overlay/ui-library/window.d.ts +0 -4
  100. package/dist/runtime/client/dev-overlay/ui-library/window.js +0 -33
  101. package/dist/runtime/server/endpoint.d.ts +1 -1
  102. package/dist/runtime/server/endpoint.js +11 -22
  103. package/dist/transitions/vite-plugin-transitions.js +4 -4
  104. package/dist/virtual-modules/i18n.d.ts +1 -0
  105. package/dist/virtual-modules/i18n.js +1 -0
  106. package/dist/virtual-modules/middleware.d.ts +1 -0
  107. package/dist/virtual-modules/middleware.js +5 -0
  108. package/dist/virtual-modules/prefetch.d.ts +1 -0
  109. package/dist/virtual-modules/prefetch.js +1 -0
  110. package/dist/virtual-modules/transitions-events.d.ts +1 -0
  111. package/dist/virtual-modules/transitions-events.js +1 -0
  112. package/dist/virtual-modules/transitions-router.d.ts +1 -0
  113. package/dist/virtual-modules/transitions-router.js +1 -0
  114. package/dist/virtual-modules/transitions-types.d.ts +1 -0
  115. package/dist/virtual-modules/transitions-types.js +1 -0
  116. package/dist/virtual-modules/transitions.d.ts +1 -0
  117. package/dist/virtual-modules/transitions.js +1 -0
  118. package/dist/vite-plugin-astro/hmr.js +8 -14
  119. package/dist/vite-plugin-astro/index.js +28 -6
  120. package/dist/vite-plugin-astro-server/base.js +5 -5
  121. package/dist/vite-plugin-astro-server/response.js +1 -1
  122. package/dist/vite-plugin-astro-server/route.js +30 -6
  123. package/dist/vite-plugin-inject-env-ts/index.js +3 -3
  124. package/dist/vite-plugin-integrations-container/index.js +1 -1
  125. package/dist/vite-plugin-load-fallback/index.js +1 -3
  126. package/dist/vite-plugin-scanner/index.js +3 -6
  127. package/dist/vite-plugin-scripts/index.js +1 -1
  128. package/dist/vite-plugin-utils/index.d.ts +1 -0
  129. package/dist/vite-plugin-utils/index.js +5 -0
  130. package/package.json +56 -68
  131. package/dist/core/middleware/namespace.d.ts +0 -1
  132. package/dist/core/middleware/namespace.js +0 -5
  133. package/dist/vite-plugin-astro-server/common.d.ts +0 -2
  134. package/dist/vite-plugin-astro-server/common.js +0 -7
  135. package/import-meta.d.ts +0 -30
package/client.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /// <reference path="./import-meta.d.ts" />
1
+ /// <reference types="vite/types/import-meta.d.ts" />
2
2
 
3
3
  // eslint-disable-next-line @typescript-eslint/no-namespace
4
4
  declare namespace App {
@@ -106,7 +106,7 @@ declare module '*.avif' {
106
106
  }
107
107
 
108
108
  declare module 'astro:transitions' {
109
- type TransitionModule = typeof import('./dist/transitions/index.js');
109
+ type TransitionModule = typeof import('./dist/virtual-modules/transitions.js');
110
110
  export const slide: TransitionModule['slide'];
111
111
  export const fade: TransitionModule['fade'];
112
112
  export const createAnimationScope: TransitionModule['createAnimationScope'];
@@ -116,44 +116,45 @@ declare module 'astro:transitions' {
116
116
  }
117
117
 
118
118
  declare module 'astro:transitions/client' {
119
- type TransitionRouterModule = typeof import('./dist/transitions/router.js');
119
+ type TransitionRouterModule = typeof import('./dist/virtual-modules/transitions-router.js');
120
120
  export const navigate: TransitionRouterModule['navigate'];
121
121
 
122
- type TransitionUtilModule = typeof import('./dist/transitions/util.js');
122
+ type TransitionUtilModule = typeof import('./dist/virtual-modules/transitions-util.js');
123
123
  export const supportsViewTransitions: TransitionUtilModule['supportsViewTransitions'];
124
124
  export const getFallback: TransitionUtilModule['getFallback'];
125
125
  export const transitionEnabledOnThisPage: TransitionUtilModule['transitionEnabledOnThisPage'];
126
126
 
127
- export type Fallback = import('./dist/transitions/types.ts').Fallback;
128
- export type Direction = import('./dist/transitions/types.ts').Direction;
129
- export type NavigationTypeString = import('./dist/transitions/types.ts').NavigationTypeString;
130
- export type Options = import('./dist/transitions/types.ts').Options;
127
+ export type Fallback = import('./dist/virtual-modules/transitions-types.js').Fallback;
128
+ export type Direction = import('./dist/virtual-modules/transitions-types.ts').Direction;
129
+ export type NavigationTypeString =
130
+ import('./dist/virtual-modules/transitions-types.js').NavigationTypeString;
131
+ export type Options = import('./dist/virtual-modules/transitions-types.js').Options;
131
132
 
132
- type EventModule = typeof import('./dist/transitions/events.js');
133
+ type EventModule = typeof import('./dist/virtual-modules/transitions-events.js');
133
134
  export const TRANSITION_BEFORE_PREPARATION: EventModule['TRANSITION_BEFORE_PREPARATION'];
134
135
  export const TRANSITION_AFTER_PREPARATION: EventModule['TRANSITION_AFTER_PREPARATION'];
135
136
  export const TRANSITION_BEFORE_SWAP: EventModule['TRANSITION_BEFORE_SWAP'];
136
137
  export const TRANSITION_AFTER_SWAP: EventModule['TRANSITION_AFTER_SWAP'];
137
138
  export const TRANSITION_PAGE_LOAD: EventModule['TRANSITION_PAGE_LOAD'];
138
139
  export type TransitionBeforePreparationEvent =
139
- import('./dist/transitions/events.ts').TransitionBeforePreparationEvent;
140
+ import('./dist/virtual-modules/transitions-events.js').TransitionBeforePreparationEvent;
140
141
  export type TransitionBeforeSwapEvent =
141
- import('./dist/transitions/events.ts').TransitionBeforeSwapEvent;
142
+ import('./dist/virtual-modules/transitions-events.js').TransitionBeforeSwapEvent;
142
143
  export const isTransitionBeforePreparationEvent: EventModule['isTransitionBeforePreparationEvent'];
143
144
  export const isTransitionBeforeSwapEvent: EventModule['isTransitionBeforeSwapEvent'];
144
145
  }
145
146
 
146
147
  declare module 'astro:prefetch' {
147
- export { prefetch, PrefetchOptions } from 'astro/prefetch';
148
+ export { prefetch, PrefetchOptions } from 'astro/virtual-modules/prefetch.js';
148
149
  }
149
150
 
150
151
  declare module 'astro:i18n' {
151
- export type GetLocaleOptions = import('./dist/i18n/index.js').GetLocaleOptions;
152
+ export type GetLocaleOptions = import('./dist/virtual-modules/i18n.js').GetLocaleOptions;
152
153
 
153
154
  /**
154
155
  * @param {string} locale A locale
155
156
  * @param {string} [path=""] An optional path to add after the `locale`.
156
- * @param {import('./dist/i18n/index.js').GetLocaleOptions} options Customise the generated path
157
+ * @param {import('./dist/virtual-modules/i18n.js').GetLocaleOptions} options Customise the generated path
157
158
  * @return {string}
158
159
  *
159
160
  * Returns a _relative_ path with passed locale.
@@ -182,7 +183,7 @@ declare module 'astro:i18n' {
182
183
  *
183
184
  * @param {string} locale A locale
184
185
  * @param {string} [path=""] An optional path to add after the `locale`.
185
- * @param {import('./dist/i18n/index.js').GetLocaleOptions} options Customise the generated path
186
+ * @param {import('./dist/virtual-modules/i18n.js').GetLocaleOptions} options Customise the generated path
186
187
  * @return {string}
187
188
  *
188
189
  * Returns an absolute path with the passed locale. The behaviour is subject to change based on `site` configuration.
@@ -212,7 +213,7 @@ declare module 'astro:i18n' {
212
213
 
213
214
  /**
214
215
  * @param {string} [path=""] An optional path to add after the `locale`.
215
- * @param {import('./dist/i18n/index.js').GetLocaleOptions} options Customise the generated path
216
+ * @param {import('./dist/virtual-modules/i18n.js').GetLocaleOptions} options Customise the generated path
216
217
  * @return {string[]}
217
218
  *
218
219
  * Works like `getRelativeLocaleUrl` but it emits the relative URLs for ALL locales:
@@ -220,7 +221,7 @@ declare module 'astro:i18n' {
220
221
  export const getRelativeLocaleUrlList: (path?: string, options?: GetLocaleOptions) => string[];
221
222
  /**
222
223
  * @param {string} [path=""] An optional path to add after the `locale`.
223
- * @param {import('./dist/i18n/index.js').GetLocaleOptions} options Customise the generated path
224
+ * @param {import('./dist/virtual-modules/i18n.js').GetLocaleOptions} options Customise the generated path
224
225
  * @return {string[]}
225
226
  *
226
227
  * Works like `getAbsoluteLocaleUrl` but it emits the absolute URLs for ALL locales:
@@ -229,7 +230,7 @@ declare module 'astro:i18n' {
229
230
  }
230
231
 
231
232
  declare module 'astro:middleware' {
232
- export * from 'astro/middleware/namespace';
233
+ export * from 'astro/virtual-modules/middleware.js';
233
234
  }
234
235
 
235
236
  declare module 'astro:components' {
@@ -242,8 +243,6 @@ interface ExportedMarkdownModuleEntities {
242
243
  file: MD['file'];
243
244
  url: MD['url'];
244
245
  getHeadings: MD['getHeadings'];
245
- /** @deprecated Renamed to `getHeadings()` */
246
- getHeaders: () => void;
247
246
  Content: MD['Content'];
248
247
  rawContent: MD['rawContent'];
249
248
  compiledContent: MD['compiledContent'];
@@ -1,7 +1,4 @@
1
1
  ---
2
- import path from 'node:path';
3
- import fs from 'node:fs';
4
- import { fileURLToPath } from 'node:url';
5
2
  import type {
6
3
  BuiltinLanguage,
7
4
  BuiltinTheme,
@@ -64,23 +61,6 @@ const {
64
61
 
65
62
  // shiki -> shikiji compat
66
63
  if (typeof lang === 'object') {
67
- // shikiji does not support `path`
68
- // https://github.com/shikijs/shiki/blob/facb6ff37996129626f8066a5dccb4608e45f649/packages/shiki/src/loader.ts#L98
69
- const langPath = (lang as any).path;
70
- if (langPath) {
71
- // shiki resolves path from within its package directory :shrug:
72
- const astroRoot = fileURLToPath(new URL('../', import.meta.url));
73
- const normalizedPath = path.isAbsolute(langPath) ? langPath : path.resolve(astroRoot, langPath);
74
- try {
75
- const content = fs.readFileSync(normalizedPath, 'utf-8');
76
- const parsed = JSON.parse(content);
77
- Object.assign(lang, parsed);
78
- } catch (e) {
79
- throw new Error(`Unable to find language file at ${normalizedPath}`, {
80
- cause: e,
81
- });
82
- }
83
- }
84
64
  // `id` renamed to `name` (always override)
85
65
  if ((lang as any).id) {
86
66
  lang.name = (lang as any).id;
@@ -29,9 +29,9 @@ const { fallback = 'animate', handleForms } = Astro.props;
29
29
  <script>
30
30
  import type { Options } from 'astro:transitions/client';
31
31
  import { supportsViewTransitions, navigate } from 'astro:transitions/client';
32
- // NOTE: import from `astro/prefetch` as `astro:prefetch` requires the `prefetch` config to be enabled
32
+ // NOTE: import from `astro/virtual-modules/prefetch.js` as `astro:prefetch` requires the `prefetch` config to be enabled
33
33
  // @ts-ignore
34
- import { init } from 'astro/prefetch';
34
+ import { init } from 'astro/virtual-modules/prefetch.js';
35
35
 
36
36
  type Fallback = 'none' | 'animate' | 'swap';
37
37
 
@@ -1,6 +1,5 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
2
  /// <reference types="node" resolution-mode="require"/>
3
- /// <reference types="node" resolution-mode="require"/>
4
3
  import type { MarkdownHeading, MarkdownMetadata, MarkdownRenderingResult, RehypePlugins, RemarkPlugins, RemarkRehype, ShikiConfig } from '@astrojs/markdown-remark';
5
4
  import type * as babel from '@babel/core';
6
5
  import type { OutgoingHttpHeaders } from 'node:http';
@@ -14,14 +13,10 @@ import type { AstroConfigType } from '../core/config/index.js';
14
13
  import type { AstroTimer } from '../core/config/timer.js';
15
14
  import type { TSConfig } from '../core/config/tsconfig.js';
16
15
  import type { AstroCookies } from '../core/cookies/index.js';
17
- import type { ResponseWithEncoding } from '../core/endpoint/index.js';
18
16
  import type { AstroIntegrationLogger, Logger, LoggerLevel } from '../core/logger/core.js';
19
17
  import type { AstroDevOverlay, DevOverlayCanvas } from '../runtime/client/dev-overlay/overlay.js';
20
- import type { DevOverlayHighlight } from '../runtime/client/dev-overlay/ui-library/highlight.js';
21
18
  import type { Icon } from '../runtime/client/dev-overlay/ui-library/icons.js';
22
- import type { DevOverlayToggle } from '../runtime/client/dev-overlay/ui-library/toggle.js';
23
- import type { DevOverlayTooltip } from '../runtime/client/dev-overlay/ui-library/tooltip.js';
24
- import type { DevOverlayWindow } from '../runtime/client/dev-overlay/ui-library/window.js';
19
+ import type { DevOverlayBadge, DevOverlayButton, DevOverlayCard, DevOverlayHighlight, DevOverlayIcon, DevOverlayToggle, DevOverlayTooltip, DevOverlayWindow } from '../runtime/client/dev-overlay/ui-library/index.js';
25
20
  import type { AstroComponentFactory, AstroComponentInstance } from '../runtime/server/index.js';
26
21
  import type { OmitIndexSignature, Simplify } from '../type-utils.js';
27
22
  import type { SUPPORTED_MARKDOWN_FILE_EXTENSIONS } from './../core/constants.js';
@@ -96,7 +91,6 @@ export interface CLIFlags {
96
91
  host?: string | boolean;
97
92
  port?: number;
98
93
  config?: string;
99
- drafts?: boolean;
100
94
  open?: boolean;
101
95
  }
102
96
  /**
@@ -807,31 +801,6 @@ export interface AstroUserConfig {
807
801
  * ```
808
802
  */
809
803
  inlineStylesheets?: 'always' | 'auto' | 'never';
810
- /**
811
- * @docs
812
- * @name build.split
813
- * @type {boolean}
814
- * @default `false`
815
- * @deprecated Deprecated since version 3.0.
816
- * @description
817
- * The build config option `build.split` has been replaced by the adapter configuration option [`functionPerRoute`](/en/reference/adapter-reference/#functionperroute).
818
- *
819
- * Please see your [SSR adapter's documentation](/en/guides/integrations-guide/#official-integrations) for using `functionPerRoute` to define how your SSR code is bundled.
820
- *
821
- */
822
- split?: boolean;
823
- /**
824
- * @docs
825
- * @name build.excludeMiddleware
826
- * @type {boolean}
827
- * @default `false`
828
- * @deprecated Deprecated since version 3.0.
829
- * @description
830
- * The build config option `build.excludeMiddleware` has been replaced by the adapter configuration option [`edgeMiddleware`](/en/reference/adapter-reference/#edgemiddleware).
831
- *
832
- * Please see your [SSR adapter's documentation](/en/guides/integrations-guide/#official-integrations) for using `edgeMiddleware` to define whether or not any SSR middleware code will be bundled when built.
833
- */
834
- excludeMiddleware?: boolean;
835
804
  };
836
805
  /**
837
806
  * @docs
@@ -1089,27 +1058,6 @@ export interface AstroUserConfig {
1089
1058
  * @name Markdown Options
1090
1059
  */
1091
1060
  markdown?: {
1092
- /**
1093
- * @docs
1094
- * @name markdown.drafts
1095
- * @type {boolean}
1096
- * @default `false`
1097
- * @deprecated Deprecated since version 3.0. Use content collections instead.
1098
- * @description
1099
- * Control whether Markdown draft pages should be included in the build.
1100
- *
1101
- * A Markdown page is considered a draft if it includes `draft: true` in its frontmatter. Draft pages are always included & visible during development (`astro dev`) but by default they will not be included in your final build.
1102
- *
1103
- * ```js
1104
- * {
1105
- * markdown: {
1106
- * // Example: Include all drafts in your final build
1107
- * drafts: true,
1108
- * }
1109
- * }
1110
- * ```
1111
- */
1112
- drafts?: boolean;
1113
1061
  /**
1114
1062
  * @docs
1115
1063
  * @name markdown.shikiConfig
@@ -1220,7 +1168,7 @@ export interface AstroUserConfig {
1220
1168
  * {
1221
1169
  * markdown: {
1222
1170
  * // Example: Translate the footnotes text to another language, here are the default English values
1223
- * remarkRehype: { footnoteLabel: "Footnotes", footnoteBackLabel: "Back to content"},
1171
+ * remarkRehype: { footnoteLabel: "Footnotes", footnoteBackLabel: "Back to reference 1"},
1224
1172
  * },
1225
1173
  * };
1226
1174
  * ```
@@ -1460,7 +1408,7 @@ export interface AstroUserConfig {
1460
1408
  export type InjectedScriptStage = 'before-hydration' | 'head-inline' | 'page' | 'page-ssr';
1461
1409
  export interface InjectedRoute {
1462
1410
  pattern: string;
1463
- entryPoint: string;
1411
+ entrypoint: string;
1464
1412
  prerender?: boolean;
1465
1413
  }
1466
1414
  export interface ResolvedInjectedRoute extends InjectedRoute {
@@ -1611,10 +1559,6 @@ export interface ComponentInstance {
1611
1559
  css?: string[];
1612
1560
  partial?: boolean;
1613
1561
  prerender?: boolean;
1614
- /**
1615
- * Only used for logging if deprecated drafts feature is used
1616
- */
1617
- frontmatter?: Record<string, any>;
1618
1562
  getStaticPaths?: (options: GetStaticPathsOptions) => GetStaticPathsResult;
1619
1563
  }
1620
1564
  export interface AstroInstance {
@@ -1858,9 +1802,8 @@ export interface AstroAdapter {
1858
1802
  *
1859
1803
  * If the adapter is not able to handle certain configurations, Astro will throw an error.
1860
1804
  */
1861
- supportedAstroFeatures?: AstroFeatureMap;
1805
+ supportedAstroFeatures: AstroFeatureMap;
1862
1806
  }
1863
- type Body = string;
1864
1807
  export type ValidRedirectStatus = 300 | 301 | 302 | 303 | 304 | 307 | 308;
1865
1808
  interface AstroSharedContext<Props extends Record<string, any> = Record<string, any>, RouteParams extends Record<string, string | undefined> = Record<string, string | undefined>> {
1866
1809
  /**
@@ -1931,7 +1874,7 @@ export interface APIContext<Props extends Record<string, any> = Record<string, a
1931
1874
  * ];
1932
1875
  * }
1933
1876
  *
1934
- * export async function get({ params }) {
1877
+ * export async function GET({ params }) {
1935
1878
  * return {
1936
1879
  * body: `Hello user ${params.id}!`,
1937
1880
  * }
@@ -1954,7 +1897,7 @@ export interface APIContext<Props extends Record<string, any> = Record<string, a
1954
1897
  * ];
1955
1898
  * }
1956
1899
  *
1957
- * export function get({ props }) {
1900
+ * export function GET({ props }) {
1958
1901
  * return {
1959
1902
  * body: `Hello ${props.name}!`,
1960
1903
  * }
@@ -1970,7 +1913,7 @@ export interface APIContext<Props extends Record<string, any> = Record<string, a
1970
1913
  * Example usage:
1971
1914
  * ```ts
1972
1915
  * // src/pages/secret.ts
1973
- * export function get({ redirect }) {
1916
+ * export function GET({ redirect }) {
1974
1917
  * return redirect('/login');
1975
1918
  * }
1976
1919
  * ```
@@ -2002,7 +1945,6 @@ export interface APIContext<Props extends Record<string, any> = Record<string, a
2002
1945
  * ```
2003
1946
  */
2004
1947
  locals: App.Locals;
2005
- ResponseWithEncoding: typeof ResponseWithEncoding;
2006
1948
  /**
2007
1949
  * Available only when `experimental.i18n` enabled and in SSR.
2008
1950
  *
@@ -2034,16 +1976,9 @@ export interface APIContext<Props extends Record<string, any> = Record<string, a
2034
1976
  */
2035
1977
  currentLocale: string | undefined;
2036
1978
  }
2037
- export type EndpointOutput = {
2038
- body: Body;
2039
- encoding?: BufferEncoding;
2040
- } | {
2041
- body: Uint8Array;
2042
- encoding: 'binary';
2043
- };
2044
- export type APIRoute<Props extends Record<string, any> = Record<string, any>> = (context: APIContext<Props>) => EndpointOutput | Response | Promise<EndpointOutput | Response>;
1979
+ export type APIRoute<Props extends Record<string, any> = Record<string, any>> = (context: APIContext<Props>) => Response | Promise<Response>;
2045
1980
  export interface EndpointHandler {
2046
- [method: string]: APIRoute | ((params: Params, request: Request) => EndpointOutput | Response);
1981
+ [method: string]: APIRoute | ((params: Params, request: Request) => Response);
2047
1982
  }
2048
1983
  export type Props = Record<string, unknown>;
2049
1984
  export interface AstroRenderer {
@@ -2141,13 +2076,10 @@ export interface AstroIntegration {
2141
2076
  }) => void | Promise<void>;
2142
2077
  };
2143
2078
  }
2144
- export type MiddlewareNext<R> = () => Promise<R>;
2145
- export type MiddlewareHandler<R> = (context: APIContext, next: MiddlewareNext<R>) => Promise<R> | R | Promise<void> | void;
2146
- export type MiddlewareResponseHandler = MiddlewareHandler<Response>;
2147
- export type MiddlewareEndpointHandler = MiddlewareHandler<Response | EndpointOutput>;
2148
- export type MiddlewareNextResponse = MiddlewareNext<Response>;
2149
- export type AstroMiddlewareInstance<R> = {
2150
- onRequest?: MiddlewareHandler<R>;
2079
+ export type MiddlewareNext = () => Promise<Response>;
2080
+ export type MiddlewareHandler = (context: APIContext, next: MiddlewareNext) => Promise<Response> | Response | Promise<void> | void;
2081
+ export type AstroMiddlewareInstance = {
2082
+ onRequest?: MiddlewareHandler;
2151
2083
  };
2152
2084
  export type AstroIntegrationMiddleware = {
2153
2085
  order: 'pre' | 'post';
@@ -2301,6 +2233,8 @@ export interface DevOverlayPlugin {
2301
2233
  export type DevOverlayMetadata = Window & typeof globalThis & {
2302
2234
  __astro_dev_overlay__: {
2303
2235
  root: string;
2236
+ version: string;
2237
+ debugInfo: string;
2304
2238
  };
2305
2239
  };
2306
2240
  declare global {
@@ -2311,5 +2245,9 @@ declare global {
2311
2245
  'astro-dev-overlay-tooltip': DevOverlayTooltip;
2312
2246
  'astro-dev-overlay-highlight': DevOverlayHighlight;
2313
2247
  'astro-dev-overlay-toggle': DevOverlayToggle;
2248
+ 'astro-dev-overlay-badge': DevOverlayBadge;
2249
+ 'astro-dev-overlay-button': DevOverlayButton;
2250
+ 'astro-dev-overlay-icon': DevOverlayIcon;
2251
+ 'astro-dev-overlay-card': DevOverlayCard;
2314
2252
  }
2315
2253
  }
@@ -18,7 +18,7 @@ async function prepareAssetsGenerationEnv(pipeline, totalCount) {
18
18
  await fs.promises.mkdir(assetsCacheDir, { recursive: true });
19
19
  } catch (err) {
20
20
  logger.warn(
21
- "astro:assets",
21
+ null,
22
22
  `An error was encountered while creating the cache directory. Proceeding without caching. Error: ${err}`
23
23
  );
24
24
  useCache = false;
@@ -138,7 +138,7 @@ async function generateImagesForPath(originalFilePath, transformsAndPath, env, q
138
138
  }
139
139
  } catch (e) {
140
140
  env.logger.warn(
141
- "astro:assets",
141
+ null,
142
142
  `An error was encountered while creating the cache directory. Proceeding without caching. Error: ${e}`
143
143
  );
144
144
  } finally {
@@ -7,7 +7,7 @@ function injectImageEndpoint(settings, mode) {
7
7
  const endpointEntrypoint = settings.config.image.endpoint ?? (mode === "dev" ? "astro/assets/endpoint/node" : "astro/assets/endpoint/generic");
8
8
  settings.injectedRoutes.push({
9
9
  pattern: "/_image",
10
- entryPoint: endpointEntrypoint,
10
+ entrypoint: endpointEntrypoint,
11
11
  prerender: false
12
12
  });
13
13
  return settings;
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from "module";
2
2
  import { dirname, getModuleURL } from "../emscripten-utils.js";
3
3
  const require2 = createRequire(getModuleURL(import.meta.url));
4
- var Module = function() {
4
+ var Module = /* @__PURE__ */ function() {
5
5
  return function(Module2) {
6
6
  Module2 = Module2 || {};
7
7
  var Module2 = typeof Module2 !== "undefined" ? Module2 : {};
@@ -1280,9 +1280,9 @@ var Module = function() {
1280
1280
  if (typeof globalThis === "object") {
1281
1281
  return globalThis;
1282
1282
  }
1283
- return function() {
1283
+ return (/* @__PURE__ */ function() {
1284
1284
  return Function;
1285
- }()("return this")();
1285
+ }())("return this")();
1286
1286
  }
1287
1287
  function __emval_get_global(name) {
1288
1288
  if (name === 0) {
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from "module";
2
2
  import { dirname, getModuleURL } from "../emscripten-utils.js";
3
3
  const require2 = createRequire(getModuleURL(import.meta.url));
4
- var Module = function() {
4
+ var Module = /* @__PURE__ */ function() {
5
5
  return function(Module2) {
6
6
  Module2 = Module2 || {};
7
7
  var Module2 = typeof Module2 !== "undefined" ? Module2 : {};
@@ -1421,9 +1421,9 @@ var Module = function() {
1421
1421
  if (typeof globalThis === "object") {
1422
1422
  return globalThis;
1423
1423
  }
1424
- return function() {
1424
+ return (/* @__PURE__ */ function() {
1425
1425
  return Function;
1426
- }()("return this")();
1426
+ }())("return this")();
1427
1427
  }
1428
1428
  function __emval_get_global(name) {
1429
1429
  if (name === 0) {
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from "module";
2
2
  import { dirname, getModuleURL } from "../emscripten-utils.js";
3
3
  const require2 = createRequire(getModuleURL(import.meta.url));
4
- var Module = function() {
4
+ var Module = /* @__PURE__ */ function() {
5
5
  return function(Module2) {
6
6
  Module2 = Module2 || {};
7
7
  var Module2 = typeof Module2 !== "undefined" ? Module2 : {};
@@ -1292,9 +1292,9 @@ var Module = function() {
1292
1292
  if (typeof globalThis === "object") {
1293
1293
  return globalThis;
1294
1294
  }
1295
- return function() {
1295
+ return (/* @__PURE__ */ function() {
1296
1296
  return Function;
1297
- }()("return this")();
1297
+ }())("return this")();
1298
1298
  }
1299
1299
  function __emval_get_global(name) {
1300
1300
  if (name === 0) {
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from "module";
2
2
  import { dirname, getModuleURL } from "../emscripten-utils.js";
3
3
  const require2 = createRequire(getModuleURL(import.meta.url));
4
- var Module = function() {
4
+ var Module = /* @__PURE__ */ function() {
5
5
  return function(Module2) {
6
6
  Module2 = Module2 || {};
7
7
  var Module2 = typeof Module2 !== "undefined" ? Module2 : {};
@@ -1395,9 +1395,9 @@ var Module = function() {
1395
1395
  if (typeof globalThis === "object") {
1396
1396
  return globalThis;
1397
1397
  }
1398
- return function() {
1398
+ return (/* @__PURE__ */ function() {
1399
1399
  return Function;
1400
- }()("return this")();
1400
+ }())("return this")();
1401
1401
  }
1402
1402
  function __emval_get_global(name) {
1403
1403
  if (name === 0) {
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from "module";
2
2
  import { dirname, getModuleURL } from "../emscripten-utils.js";
3
3
  const require2 = createRequire(getModuleURL(import.meta.url));
4
- var Module = function() {
4
+ var Module = /* @__PURE__ */ function() {
5
5
  return function(Module2) {
6
6
  Module2 = Module2 || {};
7
7
  var Module2 = typeof Module2 !== "undefined" ? Module2 : {};
@@ -1264,9 +1264,9 @@ var Module = function() {
1264
1264
  if (typeof globalThis === "object") {
1265
1265
  return globalThis;
1266
1266
  }
1267
- return function() {
1267
+ return (/* @__PURE__ */ function() {
1268
1268
  return Function;
1269
- }()("return this")();
1269
+ }())("return this")();
1270
1270
  }
1271
1271
  function __emval_get_global(name) {
1272
1272
  if (name === 0) {
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from "module";
2
2
  import { dirname, getModuleURL } from "../emscripten-utils.js";
3
3
  const require2 = createRequire(getModuleURL(import.meta.url));
4
- var Module = function() {
4
+ var Module = /* @__PURE__ */ function() {
5
5
  return function(Module2) {
6
6
  Module2 = Module2 || {};
7
7
  var Module2 = typeof Module2 !== "undefined" ? Module2 : {};
@@ -1435,9 +1435,9 @@ var Module = function() {
1435
1435
  if (typeof globalThis === "object") {
1436
1436
  return globalThis;
1437
1437
  }
1438
- return function() {
1438
+ return (/* @__PURE__ */ function() {
1439
1439
  return Function;
1440
- }()("return this")();
1440
+ }())("return this")();
1441
1441
  }
1442
1442
  function __emval_get_global(name) {
1443
1443
  if (name === 0) {
@@ -11,7 +11,7 @@ export declare const visit: {
11
11
  node: (node: traverse.Node, opts: traverse.TraverseOptions<traverse.Node>, scope?: traverse.Scope | undefined, state?: any, path?: traverse.NodePath<traverse.Node> | undefined, skipKeys?: Record<string, boolean> | undefined) => void;
12
12
  clearNode: (node: traverse.Node, opts?: traverse.RemovePropertiesOptions | undefined) => void;
13
13
  removeProperties: (tree: traverse.Node, opts?: traverse.RemovePropertiesOptions | undefined) => traverse.Node;
14
- hasType: (tree: traverse.Node, type: "CatchClause" | "ClassBody" | "Identifier" | "Program" | "SpreadElement" | "Super" | "SwitchCase" | "TemplateElement" | "VariableDeclarator" | "ArrayExpression" | "ArrowFunctionExpression" | "AssignmentExpression" | "AwaitExpression" | "BinaryExpression" | "CallExpression" | "ClassExpression" | "ConditionalExpression" | "FunctionExpression" | "ImportExpression" | "LogicalExpression" | "MemberExpression" | "MetaProperty" | "NewExpression" | "ObjectExpression" | "SequenceExpression" | "TaggedTemplateExpression" | "TemplateLiteral" | "ThisExpression" | "UnaryExpression" | "UpdateExpression" | "YieldExpression" | "AnyTypeAnnotation" | "ArgumentPlaceholder" | "ArrayPattern" | "ArrayTypeAnnotation" | "AssignmentPattern" | "BigIntLiteral" | "BindExpression" | "BlockStatement" | "BooleanLiteral" | "BooleanLiteralTypeAnnotation" | "BooleanTypeAnnotation" | "BreakStatement" | "ClassAccessorProperty" | "ClassDeclaration" | "ClassImplements" | "ClassMethod" | "ClassPrivateMethod" | "ClassPrivateProperty" | "ClassProperty" | "ContinueStatement" | "DebuggerStatement" | "DecimalLiteral" | "DeclareClass" | "DeclareExportAllDeclaration" | "DeclareExportDeclaration" | "DeclareFunction" | "DeclareInterface" | "DeclareModule" | "DeclareModuleExports" | "DeclareOpaqueType" | "DeclareTypeAlias" | "DeclareVariable" | "DeclaredPredicate" | "Decorator" | "Directive" | "DirectiveLiteral" | "DoExpression" | "DoWhileStatement" | "EmptyStatement" | "EmptyTypeAnnotation" | "EnumBooleanBody" | "EnumBooleanMember" | "EnumDeclaration" | "EnumDefaultedMember" | "EnumNumberBody" | "EnumNumberMember" | "EnumStringBody" | "EnumStringMember" | "EnumSymbolBody" | "ExistsTypeAnnotation" | "ExportAllDeclaration" | "ExportDefaultDeclaration" | "ExportDefaultSpecifier" | "ExportNamedDeclaration" | "ExportNamespaceSpecifier" | "ExportSpecifier" | "ExpressionStatement" | "File" | "ForInStatement" | "ForOfStatement" | "ForStatement" | "FunctionDeclaration" | "FunctionTypeAnnotation" | "FunctionTypeParam" | "GenericTypeAnnotation" | "IfStatement" | "Import" | "ImportAttribute" | "ImportDeclaration" | "ImportDefaultSpecifier" | "ImportNamespaceSpecifier" | "ImportSpecifier" | "IndexedAccessType" | "InferredPredicate" | "InterfaceDeclaration" | "InterfaceExtends" | "InterfaceTypeAnnotation" | "InterpreterDirective" | "IntersectionTypeAnnotation" | "JSXAttribute" | "JSXClosingElement" | "JSXClosingFragment" | "JSXElement" | "JSXEmptyExpression" | "JSXExpressionContainer" | "JSXFragment" | "JSXIdentifier" | "JSXMemberExpression" | "JSXNamespacedName" | "JSXOpeningElement" | "JSXOpeningFragment" | "JSXSpreadAttribute" | "JSXSpreadChild" | "JSXText" | "LabeledStatement" | "MixedTypeAnnotation" | "ModuleExpression" | "Noop" | "NullLiteral" | "NullLiteralTypeAnnotation" | "NullableTypeAnnotation" | "NumberLiteral" | "NumberLiteralTypeAnnotation" | "NumberTypeAnnotation" | "NumericLiteral" | "ObjectMethod" | "ObjectPattern" | "ObjectProperty" | "ObjectTypeAnnotation" | "ObjectTypeCallProperty" | "ObjectTypeIndexer" | "ObjectTypeInternalSlot" | "ObjectTypeProperty" | "ObjectTypeSpreadProperty" | "OpaqueType" | "OptionalCallExpression" | "OptionalIndexedAccessType" | "OptionalMemberExpression" | "ParenthesizedExpression" | "PipelineBareFunction" | "PipelinePrimaryTopicReference" | "PipelineTopicExpression" | "Placeholder" | "PrivateName" | "QualifiedTypeIdentifier" | "RecordExpression" | "RegExpLiteral" | "RegexLiteral" | "RestElement" | "RestProperty" | "ReturnStatement" | "SpreadProperty" | "StaticBlock" | "StringLiteral" | "StringLiteralTypeAnnotation" | "StringTypeAnnotation" | "SwitchStatement" | "SymbolTypeAnnotation" | "TSAnyKeyword" | "TSArrayType" | "TSAsExpression" | "TSBigIntKeyword" | "TSBooleanKeyword" | "TSCallSignatureDeclaration" | "TSConditionalType" | "TSConstructSignatureDeclaration" | "TSConstructorType" | "TSDeclareFunction" | "TSDeclareMethod" | "TSEnumDeclaration" | "TSEnumMember" | "TSExportAssignment" | "TSExpressionWithTypeArguments" | "TSExternalModuleReference" | "TSFunctionType" | "TSImportEqualsDeclaration" | "TSImportType" | "TSIndexSignature" | "TSIndexedAccessType" | "TSInferType" | "TSInstantiationExpression" | "TSInterfaceBody" | "TSInterfaceDeclaration" | "TSIntersectionType" | "TSIntrinsicKeyword" | "TSLiteralType" | "TSMappedType" | "TSMethodSignature" | "TSModuleBlock" | "TSModuleDeclaration" | "TSNamedTupleMember" | "TSNamespaceExportDeclaration" | "TSNeverKeyword" | "TSNonNullExpression" | "TSNullKeyword" | "TSNumberKeyword" | "TSObjectKeyword" | "TSOptionalType" | "TSParameterProperty" | "TSParenthesizedType" | "TSPropertySignature" | "TSQualifiedName" | "TSRestType" | "TSSatisfiesExpression" | "TSStringKeyword" | "TSSymbolKeyword" | "TSThisType" | "TSTupleType" | "TSTypeAliasDeclaration" | "TSTypeAnnotation" | "TSTypeAssertion" | "TSTypeLiteral" | "TSTypeOperator" | "TSTypeParameter" | "TSTypeParameterDeclaration" | "TSTypeParameterInstantiation" | "TSTypePredicate" | "TSTypeQuery" | "TSTypeReference" | "TSUndefinedKeyword" | "TSUnionType" | "TSUnknownKeyword" | "TSVoidKeyword" | "ThisTypeAnnotation" | "ThrowStatement" | "TopicReference" | "TryStatement" | "TupleExpression" | "TupleTypeAnnotation" | "TypeAlias" | "TypeAnnotation" | "TypeCastExpression" | "TypeParameter" | "TypeParameterDeclaration" | "TypeParameterInstantiation" | "TypeofTypeAnnotation" | "UnionTypeAnnotation" | "V8IntrinsicIdentifier" | "VariableDeclaration" | "Variance" | "VoidTypeAnnotation" | "WhileStatement" | "WithStatement", denylistTypes?: string[] | undefined) => boolean;
14
+ hasType: (tree: traverse.Node, type: "CatchClause" | "ClassBody" | "Identifier" | "Program" | "SpreadElement" | "Super" | "SwitchCase" | "TemplateElement" | "VariableDeclarator" | "ArrayExpression" | "ArrowFunctionExpression" | "AssignmentExpression" | "AwaitExpression" | "BinaryExpression" | "CallExpression" | "ClassExpression" | "ConditionalExpression" | "FunctionExpression" | "ImportExpression" | "LogicalExpression" | "MemberExpression" | "MetaProperty" | "NewExpression" | "ObjectExpression" | "SequenceExpression" | "TaggedTemplateExpression" | "TemplateLiteral" | "ThisExpression" | "UnaryExpression" | "UpdateExpression" | "YieldExpression" | "ClassDeclaration" | "FunctionDeclaration" | "ImportDeclaration" | "ExportNamedDeclaration" | "ExportDefaultDeclaration" | "ExportAllDeclaration" | "ExpressionStatement" | "BlockStatement" | "StaticBlock" | "EmptyStatement" | "DebuggerStatement" | "WithStatement" | "ReturnStatement" | "LabeledStatement" | "BreakStatement" | "ContinueStatement" | "IfStatement" | "SwitchStatement" | "ThrowStatement" | "TryStatement" | "WhileStatement" | "DoWhileStatement" | "ForStatement" | "ForInStatement" | "ForOfStatement" | "VariableDeclaration" | "AnyTypeAnnotation" | "ArgumentPlaceholder" | "ArrayPattern" | "ArrayTypeAnnotation" | "AssignmentPattern" | "BigIntLiteral" | "BindExpression" | "BooleanLiteral" | "BooleanLiteralTypeAnnotation" | "BooleanTypeAnnotation" | "ClassAccessorProperty" | "ClassImplements" | "ClassMethod" | "ClassPrivateMethod" | "ClassPrivateProperty" | "ClassProperty" | "DecimalLiteral" | "DeclareClass" | "DeclareExportAllDeclaration" | "DeclareExportDeclaration" | "DeclareFunction" | "DeclareInterface" | "DeclareModule" | "DeclareModuleExports" | "DeclareOpaqueType" | "DeclareTypeAlias" | "DeclareVariable" | "DeclaredPredicate" | "Decorator" | "Directive" | "DirectiveLiteral" | "DoExpression" | "EmptyTypeAnnotation" | "EnumBooleanBody" | "EnumBooleanMember" | "EnumDeclaration" | "EnumDefaultedMember" | "EnumNumberBody" | "EnumNumberMember" | "EnumStringBody" | "EnumStringMember" | "EnumSymbolBody" | "ExistsTypeAnnotation" | "ExportDefaultSpecifier" | "ExportNamespaceSpecifier" | "ExportSpecifier" | "File" | "FunctionTypeAnnotation" | "FunctionTypeParam" | "GenericTypeAnnotation" | "Import" | "ImportAttribute" | "ImportDefaultSpecifier" | "ImportNamespaceSpecifier" | "ImportSpecifier" | "IndexedAccessType" | "InferredPredicate" | "InterfaceDeclaration" | "InterfaceExtends" | "InterfaceTypeAnnotation" | "InterpreterDirective" | "IntersectionTypeAnnotation" | "JSXAttribute" | "JSXClosingElement" | "JSXClosingFragment" | "JSXElement" | "JSXEmptyExpression" | "JSXExpressionContainer" | "JSXFragment" | "JSXIdentifier" | "JSXMemberExpression" | "JSXNamespacedName" | "JSXOpeningElement" | "JSXOpeningFragment" | "JSXSpreadAttribute" | "JSXSpreadChild" | "JSXText" | "MixedTypeAnnotation" | "ModuleExpression" | "Noop" | "NullLiteral" | "NullLiteralTypeAnnotation" | "NullableTypeAnnotation" | "NumberLiteral" | "NumberLiteralTypeAnnotation" | "NumberTypeAnnotation" | "NumericLiteral" | "ObjectMethod" | "ObjectPattern" | "ObjectProperty" | "ObjectTypeAnnotation" | "ObjectTypeCallProperty" | "ObjectTypeIndexer" | "ObjectTypeInternalSlot" | "ObjectTypeProperty" | "ObjectTypeSpreadProperty" | "OpaqueType" | "OptionalCallExpression" | "OptionalIndexedAccessType" | "OptionalMemberExpression" | "ParenthesizedExpression" | "PipelineBareFunction" | "PipelinePrimaryTopicReference" | "PipelineTopicExpression" | "Placeholder" | "PrivateName" | "QualifiedTypeIdentifier" | "RecordExpression" | "RegExpLiteral" | "RegexLiteral" | "RestElement" | "RestProperty" | "SpreadProperty" | "StringLiteral" | "StringLiteralTypeAnnotation" | "StringTypeAnnotation" | "SymbolTypeAnnotation" | "TSAnyKeyword" | "TSArrayType" | "TSAsExpression" | "TSBigIntKeyword" | "TSBooleanKeyword" | "TSCallSignatureDeclaration" | "TSConditionalType" | "TSConstructSignatureDeclaration" | "TSConstructorType" | "TSDeclareFunction" | "TSDeclareMethod" | "TSEnumDeclaration" | "TSEnumMember" | "TSExportAssignment" | "TSExpressionWithTypeArguments" | "TSExternalModuleReference" | "TSFunctionType" | "TSImportEqualsDeclaration" | "TSImportType" | "TSIndexSignature" | "TSIndexedAccessType" | "TSInferType" | "TSInstantiationExpression" | "TSInterfaceBody" | "TSInterfaceDeclaration" | "TSIntersectionType" | "TSIntrinsicKeyword" | "TSLiteralType" | "TSMappedType" | "TSMethodSignature" | "TSModuleBlock" | "TSModuleDeclaration" | "TSNamedTupleMember" | "TSNamespaceExportDeclaration" | "TSNeverKeyword" | "TSNonNullExpression" | "TSNullKeyword" | "TSNumberKeyword" | "TSObjectKeyword" | "TSOptionalType" | "TSParameterProperty" | "TSParenthesizedType" | "TSPropertySignature" | "TSQualifiedName" | "TSRestType" | "TSSatisfiesExpression" | "TSStringKeyword" | "TSSymbolKeyword" | "TSThisType" | "TSTupleType" | "TSTypeAliasDeclaration" | "TSTypeAnnotation" | "TSTypeAssertion" | "TSTypeLiteral" | "TSTypeOperator" | "TSTypeParameter" | "TSTypeParameterDeclaration" | "TSTypeParameterInstantiation" | "TSTypePredicate" | "TSTypeQuery" | "TSTypeReference" | "TSUndefinedKeyword" | "TSUnionType" | "TSUnknownKeyword" | "TSVoidKeyword" | "ThisTypeAnnotation" | "TopicReference" | "TupleExpression" | "TupleTypeAnnotation" | "TypeAlias" | "TypeAnnotation" | "TypeCastExpression" | "TypeParameter" | "TypeParameterDeclaration" | "TypeParameterInstantiation" | "TypeofTypeAnnotation" | "UnionTypeAnnotation" | "V8IntrinsicIdentifier" | "Variance" | "VoidTypeAnnotation", denylistTypes?: string[] | undefined) => boolean;
15
15
  cache: typeof traverse.cache;
16
16
  };
17
17
  export { t };
@@ -8,7 +8,6 @@ async function build({ flags }) {
8
8
  usage: "[...flags]",
9
9
  tables: {
10
10
  Flags: [
11
- ["--drafts", `Include Markdown draft pages in the build.`],
12
11
  ["--outDir <directory>", `Specify the output directory for the build.`],
13
12
  ["--help (-h)", "See all available flags."]
14
13
  ]
package/dist/cli/flags.js CHANGED
@@ -11,9 +11,6 @@ function flagsToAstroInlineConfig(flags) {
11
11
  site: typeof flags.site === "string" ? flags.site : void 0,
12
12
  base: typeof flags.base === "string" ? flags.base : void 0,
13
13
  outDir: typeof flags.outDir === "string" ? flags.outDir : void 0,
14
- markdown: {
15
- drafts: typeof flags.drafts === "boolean" ? flags.drafts : void 0
16
- },
17
14
  server: {
18
15
  port: typeof flags.port === "number" ? flags.port : void 0,
19
16
  host: typeof flags.host === "string" || typeof flags.host === "boolean" ? flags.host : void 0,
@@ -1,6 +1,11 @@
1
1
  import type yargs from 'yargs-parser';
2
+ import type { AstroConfig, AstroUserConfig } from '../../@types/astro.js';
2
3
  interface InfoOptions {
3
4
  flags: yargs.Arguments;
4
5
  }
6
+ export declare function getInfoOutput({ userConfig, print, }: {
7
+ userConfig: AstroUserConfig | AstroConfig;
8
+ print: boolean;
9
+ }): Promise<string>;
5
10
  export declare function printInfo({ flags }: InfoOptions): Promise<void>;
6
11
  export {};