astro 6.3.4 → 6.3.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.
@@ -124,22 +124,6 @@ async function getImage(options, imageConfig) {
124
124
  }
125
125
  const currentPosition = resolvedOptions.position || "center";
126
126
  resolvedOptions["data-astro-image-pos"] = currentPosition.replace(/\s+/g, "-");
127
- if (resolvedOptions.position) {
128
- if (typeof resolvedOptions.style === "object" && resolvedOptions.style !== null) {
129
- if (!("objectPosition" in resolvedOptions.style)) {
130
- resolvedOptions.style = {
131
- ...resolvedOptions.style,
132
- objectPosition: resolvedOptions.position
133
- };
134
- }
135
- } else {
136
- const existingStyle = typeof resolvedOptions.style === "string" ? resolvedOptions.style : "";
137
- if (!existingStyle.includes("object-position")) {
138
- const positionStyle = `object-position: ${resolvedOptions.position}`;
139
- resolvedOptions.style = existingStyle ? existingStyle.replace(/;?\s*$/, "; ") + positionStyle : positionStyle;
140
- }
141
- }
142
- }
143
127
  }
144
128
  const validatedOptions = service.validateOptions ? await service.validateOptions(resolvedOptions, imageConfig) : resolvedOptions;
145
129
  const srcSetTransforms = service.getSrcSet ? await service.getSrcSet(validatedOptions, imageConfig) : [];
@@ -1,4 +1,20 @@
1
1
  import { cssFitValues } from "../internal.js";
2
+ const POSITION_KEYWORDS = ["top", "bottom", "left", "right", "center"];
3
+ function getPositionEntries() {
4
+ const entries = [];
5
+ for (const kw of POSITION_KEYWORDS) {
6
+ entries.push([kw, kw]);
7
+ }
8
+ for (const a of POSITION_KEYWORDS) {
9
+ for (const b of POSITION_KEYWORDS) {
10
+ if (a === b) continue;
11
+ const cssValue = `${a} ${b}`;
12
+ const dataAttr = `${a}-${b}`;
13
+ entries.push([dataAttr, cssValue]);
14
+ }
15
+ }
16
+ return entries;
17
+ }
2
18
  function generateImageStylesCSS(defaultObjectFit, defaultObjectPosition) {
3
19
  const fitStyles = cssFitValues.map(
4
20
  (fit) => `
@@ -10,11 +26,14 @@ function generateImageStylesCSS(defaultObjectFit, defaultObjectPosition) {
10
26
  :where([data-astro-image]:not([data-astro-image-fit])) {
11
27
  object-fit: ${defaultObjectFit};
12
28
  }` : "";
13
- const positionStyle = defaultObjectPosition ? `
14
- [data-astro-image-pos="${defaultObjectPosition.replace(/\s+/g, "-")}"] {
15
- object-position: ${defaultObjectPosition};
16
- }
17
-
29
+ const positionEntries = getPositionEntries();
30
+ const positionStyles = positionEntries.map(
31
+ ([dataAttr, cssValue]) => `
32
+ [data-astro-image-pos="${dataAttr}"] {
33
+ object-position: ${cssValue};
34
+ }`
35
+ ).join("\n");
36
+ const defaultPositionStyle = defaultObjectPosition ? `
18
37
  :where([data-astro-image]:not([data-astro-image-pos])) {
19
38
  object-position: ${defaultObjectPosition};
20
39
  }` : "";
@@ -30,7 +49,8 @@ function generateImageStylesCSS(defaultObjectFit, defaultObjectPosition) {
30
49
  }
31
50
  ${fitStyles}
32
51
  ${defaultFitStyle}
33
- ${positionStyle}
52
+ ${positionStyles}
53
+ ${defaultPositionStyle}
34
54
  `.trim();
35
55
  }
36
56
  export {
@@ -1,6 +1,6 @@
1
1
  class BuildTimeAstroVersionProvider {
2
2
  // Injected during the build through esbuild define
3
- version = "6.3.4";
3
+ version = "6.3.5";
4
4
  }
5
5
  export {
6
6
  BuildTimeAstroVersionProvider
@@ -191,7 +191,7 @@ ${contentConfig.error.message}`
191
191
  logger.info("Content config changed");
192
192
  shouldClear = true;
193
193
  }
194
- if (previousAstroVersion && previousAstroVersion !== "6.3.4") {
194
+ if (previousAstroVersion && previousAstroVersion !== "6.3.5") {
195
195
  logger.info("Astro version changed");
196
196
  shouldClear = true;
197
197
  }
@@ -199,8 +199,8 @@ ${contentConfig.error.message}`
199
199
  logger.info("Clearing content store");
200
200
  this.#store.clearAll();
201
201
  }
202
- if ("6.3.4") {
203
- this.#store.metaStore().set("astro-version", "6.3.4");
202
+ if ("6.3.5") {
203
+ this.#store.metaStore().set("astro-version", "6.3.5");
204
204
  }
205
205
  if (currentConfigDigest) {
206
206
  this.#store.metaStore().set("content-config-digest", currentConfigDigest);
@@ -1,4 +1,4 @@
1
- const ASTRO_VERSION = "6.3.4";
1
+ const ASTRO_VERSION = "6.3.5";
2
2
  const ASTRO_GENERATOR = `Astro v${ASTRO_VERSION}`;
3
3
  const REROUTE_DIRECTIVE_HEADER = "X-Astro-Reroute";
4
4
  const REWRITE_DIRECTIVE_HEADER_KEY = "X-Astro-Rewrite";
@@ -37,7 +37,7 @@ async function dev(inlineConfig) {
37
37
  await telemetry.record([]);
38
38
  const restart = await createContainerWithAutomaticRestart({ inlineConfig, fs });
39
39
  const logger = restart.container.logger;
40
- const currentVersion = "6.3.4";
40
+ const currentVersion = "6.3.5";
41
41
  const isPrerelease = currentVersion.includes("-");
42
42
  if (!isPrerelease) {
43
43
  try {
@@ -30,7 +30,7 @@ export declare const UnknownCompilerError: {
30
30
  * @docs
31
31
  * @see
32
32
  * - [Official integrations](https://docs.astro.build/en/guides/integrations/#official-integrations)
33
- * - [Astro.clientAddress](https://docs.astro.build/en/reference/api-reference/#clientaddress)
33
+ * - [`Astro.clientAddress`](https://docs.astro.build/en/reference/api-reference/#clientaddress)
34
34
  * @description
35
35
  * The adapter you're using unfortunately does not support `Astro.clientAddress`.
36
36
  */
@@ -43,7 +43,7 @@ export declare const ClientAddressNotAvailable: {
43
43
  * @docs
44
44
  * @see
45
45
  * - [On-demand rendering](https://docs.astro.build/en/guides/on-demand-rendering/)
46
- * - [Astro.clientAddress](https://docs.astro.build/en/reference/api-reference/#clientaddress)
46
+ * - [`Astro.clientAddress`](https://docs.astro.build/en/reference/api-reference/#clientaddress)
47
47
  * @description
48
48
  * The `Astro.clientAddress` property cannot be used inside prerendered routes.
49
49
  */
@@ -56,7 +56,7 @@ export declare const PrerenderClientAddressNotAvailable: {
56
56
  * @docs
57
57
  * @see
58
58
  * - [Enabling SSR in Your Project](https://docs.astro.build/en/guides/on-demand-rendering/)
59
- * - [Astro.clientAddress](https://docs.astro.build/en/reference/api-reference/#clientaddress)
59
+ * - [`Astro.clientAddress`](https://docs.astro.build/en/reference/api-reference/#clientaddress)
60
60
  * @description
61
61
  * The `Astro.clientAddress` property is only available when [Server-side rendering](https://docs.astro.build/en/guides/on-demand-rendering/) is enabled.
62
62
  *
@@ -71,7 +71,7 @@ export declare const StaticClientAddressNotAvailable: {
71
71
  /**
72
72
  * @docs
73
73
  * @see
74
- * - [getStaticPaths()](https://docs.astro.build/en/reference/routing-reference/#getstaticpaths)
74
+ * - [`getStaticPaths()`](https://docs.astro.build/en/reference/routing-reference/#getstaticpaths)
75
75
  * @description
76
76
  * A [dynamic route](https://docs.astro.build/en/guides/routing/#dynamic-routes) was matched, but no corresponding path was found for the requested parameters. This is often caused by a typo in either the generated or the requested path.
77
77
  */
@@ -95,7 +95,7 @@ export declare const NoMatchingStaticPathFound: {
95
95
  * statusText: 'Not found'
96
96
  * });
97
97
  *
98
- * // Alternatively, for redirects, Astro.redirect also returns an instance of Response
98
+ * // Alternatively, for redirects, `Astro.redirect()` also returns an instance of `Response`
99
99
  * return Astro.redirect('/login');
100
100
  * ---
101
101
  * ```
@@ -179,7 +179,7 @@ export declare const NoClientOnlyHint: {
179
179
  * - [`getStaticPaths()`](https://docs.astro.build/en/reference/routing-reference/#getstaticpaths)
180
180
  * - [`params`](https://docs.astro.build/en/reference/api-reference/#params)
181
181
  * @description
182
- * The `params` property in `getStaticPaths`'s return value (an array of objects) should also be an object.
182
+ * The `params` property in `getStaticPaths()`'s return value (an array of objects) should also be an object.
183
183
  *
184
184
  * ```astro title="pages/blog/[id].astro"
185
185
  * ---
@@ -203,7 +203,7 @@ export declare const InvalidGetStaticPathParam: {
203
203
  * @see
204
204
  * - [`getStaticPaths()`](https://docs.astro.build/en/reference/routing-reference/#getstaticpaths)
205
205
  * @description
206
- * `getStaticPaths`'s return value must be an array of objects. In most cases, this error happens because an array of array was returned. Using [`.flatMap()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMap) or a [`.flat()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat) call may be useful.
206
+ * `getStaticPaths()`'s return value must be an array of objects. In most cases, this error happens because an array of arrays was returned. Using [`.flatMap()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMap) or a [`.flat()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat) call may be useful.
207
207
  *
208
208
  * ```ts title="pages/blog/[id].astro"
209
209
  * export async function getStaticPaths() {
@@ -226,7 +226,7 @@ export declare const InvalidGetStaticPathsEntry: {
226
226
  * - [`getStaticPaths()`](https://docs.astro.build/en/reference/routing-reference/#getstaticpaths)
227
227
  * - [`params`](https://docs.astro.build/en/reference/api-reference/#params)
228
228
  * @description
229
- * `getStaticPaths`'s return value must be an array of objects.
229
+ * `getStaticPaths()`'s return value must be an array of objects.
230
230
  *
231
231
  * ```ts title="pages/blog/[id].astro"
232
232
  * export async function getStaticPaths() {
@@ -249,7 +249,7 @@ export declare const InvalidGetStaticPathsReturn: {
249
249
  * - [`getStaticPaths()`](https://docs.astro.build/en/reference/routing-reference/#getstaticpaths)
250
250
  * - [`params`](https://docs.astro.build/en/reference/api-reference/#params)
251
251
  * @description
252
- * Every route specified by `getStaticPaths` require a `params` property specifying the path parameters needed to match the route.
252
+ * Every route specified by `getStaticPaths()` requires a `params` property specifying the path parameters needed to match the route.
253
253
  *
254
254
  * For instance, the following code:
255
255
  * ```astro title="pages/blog/[id].astro"
@@ -315,9 +315,9 @@ export declare const GetStaticPathsInvalidRouteParam: {
315
315
  * @see
316
316
  * - [Dynamic Routes](https://docs.astro.build/en/guides/routing/#dynamic-routes)
317
317
  * - [`getStaticPaths()`](https://docs.astro.build/en/reference/routing-reference/#getstaticpaths)
318
- * - [Server-side Rendering](https://docs.astro.build/en/guides/on-demand-rendering/)
318
+ * - [Server-side rendering](https://docs.astro.build/en/guides/on-demand-rendering/)
319
319
  * @description
320
- * In [Static Mode](https://docs.astro.build/en/guides/routing/#static-ssg-mode), all routes must be determined at build time. As such, dynamic routes must `export` a `getStaticPaths` function returning the different paths to generate.
320
+ * In [Static Mode](https://docs.astro.build/en/guides/routing/#static-ssg-mode), all routes must be determined at build time. As such, dynamic routes must `export` a `getStaticPaths()` function returning the different paths to generate.
321
321
  */
322
322
  export declare const GetStaticPathsRequired: {
323
323
  name: string;
@@ -340,7 +340,7 @@ export declare const ReservedSlotName: {
340
340
  /**
341
341
  * @docs
342
342
  * @see
343
- * - [Server-side Rendering](https://docs.astro.build/en/guides/on-demand-rendering/)
343
+ * - [Server-side rendering](https://docs.astro.build/en/guides/on-demand-rendering/)
344
344
  * @description
345
345
  * To use server-side rendering, an adapter needs to be installed so Astro knows how to generate the proper output for your targeted deployment platform.
346
346
  */
@@ -353,7 +353,7 @@ export declare const NoAdapterInstalled: {
353
353
  /**
354
354
  * @docs
355
355
  * @see
356
- * - [Server-side Rendering](https://docs.astro.build/en/guides/on-demand-rendering/)
356
+ * - [Server-side rendering](https://docs.astro.build/en/guides/on-demand-rendering/)
357
357
  * @description
358
358
  * The currently configured adapter does not support server-side rendering, which is required for the current project setup.
359
359
  *
@@ -370,7 +370,7 @@ export declare const AdapterSupportOutputMismatch: {
370
370
  * @see
371
371
  * - [On-demand Rendering](https://docs.astro.build/en/guides/on-demand-rendering/)
372
372
  * @description
373
- * To use server islands, the same constraints exist as for sever-side rendering, so an adapter is needed.
373
+ * To use server islands, the same constraints exist as for server-side rendering, so an adapter is needed.
374
374
  */
375
375
  export declare const NoAdapterInstalledServerIslands: {
376
376
  name: string;
@@ -400,7 +400,7 @@ export declare const NoMatchingImport: {
400
400
  export declare const InvalidPrerenderExport: {
401
401
  name: string;
402
402
  title: string;
403
- message(prefix: string, suffix: string, isHydridOutput: boolean): string;
403
+ message(prefix: string, suffix: string, isHybridOutput: boolean): string;
404
404
  hint: string;
405
405
  };
406
406
  /**
@@ -648,7 +648,7 @@ export declare const ExpectedNotESMImage: {
648
648
  * @docs
649
649
  * @see
650
650
  * - [Images](https://docs.astro.build/en/guides/images/)
651
- * - [getImage()](https://docs.astro.build/en/reference/modules/astro-assets/#getimage)
651
+ * - [`getImage()`](https://docs.astro.build/en/reference/modules/astro-assets/#getimage)
652
652
  * @description
653
653
  * The `getImage()` function is only available on the server. To use images on the client, either render the `src` from `getImage()` during the server render so it can be used in client-side scripts, or use a standard `<img>` tag.
654
654
  *
@@ -867,7 +867,7 @@ export declare const MiddlewareCantBeLoaded: {
867
867
  * @see
868
868
  * - [Images](https://docs.astro.build/en/guides/images/)
869
869
  * @description
870
- * When using the default image services, `Image`'s and `getImage`'s `src` parameter must be either an imported image or an URL, it cannot be a string of a filepath.
870
+ * When using the default image services, `Image`'s and `getImage`'s `src` parameter must be either an imported image or a URL, it cannot be a string of a filepath.
871
871
  *
872
872
  * For local images from content collections, you can use the [image() schema helper](https://docs.astro.build/en/guides/images/#images-in-content-collections) to resolve the images.
873
873
  *
@@ -923,7 +923,7 @@ export declare const AstroGlobNoMatch: {
923
923
  /**
924
924
  * @docs
925
925
  * @see
926
- * - [Astro.redirect](https://docs.astro.build/en/reference/api-reference/#redirect)
926
+ * - [`Astro.redirect()`](https://docs.astro.build/en/reference/api-reference/#redirect)
927
927
  * @description
928
928
  * A redirect must be given a location with the `Location` header.
929
929
  */
@@ -934,7 +934,7 @@ export declare const RedirectWithNoLocation: {
934
934
  /**
935
935
  * @docs
936
936
  * @see
937
- * - [Astro.redirect](https://docs.astro.build/en/reference/api-reference/#redirect)
937
+ * - [`Astro.redirect()`](https://docs.astro.build/en/reference/api-reference/#redirect)
938
938
  * @description
939
939
  * An external redirect must start with http or https, and must be a valid URL.
940
940
  */
@@ -1051,7 +1051,7 @@ export declare const FailedToFindPageMapSSR: {
1051
1051
  /**
1052
1052
  * @docs
1053
1053
  * @description
1054
- * Astro can't find the requested locale. All supported locales must be configured in [i18n.locales](/en/reference/configuration-reference/#i18nlocales) and have corresponding directories within `src/pages/`.
1054
+ * Astro can't find the requested locale. All supported locales must be configured in [`i18n.locales`](https://docs.astro.build/en/reference/configuration-reference/#i18nlocales) and have corresponding directories within `src/pages/`.
1055
1055
  */
1056
1056
  export declare const MissingLocale: {
1057
1057
  name: string;
@@ -1108,7 +1108,7 @@ export declare const MissingMiddlewareForInternationalization: {
1108
1108
  /**
1109
1109
  * @docs
1110
1110
  * @description
1111
- * An invalid i18n middleware configuration was detected.
1111
+ * An invalid i18n middleware configuration was detected.
1112
1112
  */
1113
1113
  export declare const InvalidI18nMiddlewareConfiguration: {
1114
1114
  name: string;
@@ -1165,7 +1165,7 @@ export declare const i18nNotEnabled: {
1165
1165
  /**
1166
1166
  * @docs
1167
1167
  * @description
1168
- * An i18n utility tried to use the locale from a URL path that does not contain one. You can prevent this error by using pathHasLocale to check URLs for a locale first before using i18n utilities.
1168
+ * An i18n utility tried to use the locale from a URL path that does not contain one. You can prevent this error by using `pathHasLocale` to check URLs for a locale first before using i18n utilities.
1169
1169
  *
1170
1170
  */
1171
1171
  export declare const i18nNoLocaleFoundInPath: {
@@ -1176,7 +1176,7 @@ export declare const i18nNoLocaleFoundInPath: {
1176
1176
  /**
1177
1177
  * @docs
1178
1178
  * @description
1179
- * Astro couldn't find a route matching the one provided by the user
1179
+ * Astro couldn't find a route matching the one provided by the user.
1180
1180
  */
1181
1181
  export declare const RouteNotFound: {
1182
1182
  name: string;
@@ -1291,7 +1291,7 @@ export declare const CannotDetermineWeightAndStyleFromFontFile: {
1291
1291
  /**
1292
1292
  * @docs
1293
1293
  * @description
1294
- * Cannot fetch the given font file
1294
+ * Cannot fetch the given font file.
1295
1295
  * @message
1296
1296
  * An error occurred while fetching font file from the given URL.
1297
1297
  */
@@ -1304,7 +1304,7 @@ export declare const CannotFetchFontFile: {
1304
1304
  /**
1305
1305
  * @docs
1306
1306
  * @description
1307
- * Font family not found
1307
+ * Font family not found.
1308
1308
  * @message
1309
1309
  * No data was found for the `cssVariable` passed to the `<Font />` component.
1310
1310
  */
@@ -1317,7 +1317,7 @@ export declare const FontFamilyNotFound: {
1317
1317
  /**
1318
1318
  * @docs
1319
1319
  * @description
1320
- * Font file URL not found
1320
+ * Font file URL not found.
1321
1321
  * @message
1322
1322
  * The URL passed to the `experimental_getFontFileURL()` function is invalid.
1323
1323
  */
@@ -1340,9 +1340,9 @@ export declare const MissingGetFontFileRequestUrl: {
1340
1340
  /**
1341
1341
  * @docs
1342
1342
  * @description
1343
- * Unavailable Astro global in getStaticPaths
1343
+ * Unavailable Astro global in `getStaticPaths()`.
1344
1344
  * @message
1345
- * The Astro global is not available in getStaticPaths().
1345
+ * The Astro global is not available in `getStaticPaths()`.
1346
1346
  */
1347
1347
  export declare const UnavailableAstroGlobal: {
1348
1348
  name: string;
@@ -1475,7 +1475,7 @@ export declare const UnknownConfigError: {
1475
1475
  * @see
1476
1476
  * - [--config](https://docs.astro.build/en/reference/cli-reference/#--config-path)
1477
1477
  * @description
1478
- * The specified configuration file using `--config` could not be found. Make sure that it exists or that the path is correct
1478
+ * The specified configuration file using `--config` could not be found. Make sure that it exists or that the path is correct.
1479
1479
  */
1480
1480
  export declare const ConfigNotFound: {
1481
1481
  name: string;
@@ -11,7 +11,7 @@ const ClientAddressNotAvailable = {
11
11
  const PrerenderClientAddressNotAvailable = {
12
12
  name: "PrerenderClientAddressNotAvailable",
13
13
  title: "`Astro.clientAddress` cannot be used inside prerendered routes.",
14
- message: (name) => `\`Astro.clientAddress\` cannot be used inside prerendered route ${name}`
14
+ message: (name) => `\`Astro.clientAddress\` cannot be used inside prerendered route ${name}.`
15
15
  };
16
16
  const StaticClientAddressNotAvailable = {
17
17
  name: "StaticClientAddressNotAvailable",
@@ -34,7 +34,7 @@ const OnlyResponseCanBeReturned = {
34
34
  const MissingMediaQueryDirective = {
35
35
  name: "MissingMediaQueryDirective",
36
36
  title: "Missing value for `client:media` directive.",
37
- message: 'Media query not provided for `client:media` directive. A media query similar to `client:media="(max-width: 600px)"` must be provided'
37
+ message: 'Media query not provided for `client:media` directive. A media query similar to `client:media="(max-width: 600px)"` must be provided.'
38
38
  };
39
39
  const NoMatchingRenderer = {
40
40
  name: "NoMatchingRenderer",
@@ -57,42 +57,42 @@ const NoClientOnlyHint = {
57
57
  name: "NoClientOnlyHint",
58
58
  title: "Missing hint on client:only directive.",
59
59
  message: (componentName) => `Unable to render \`${componentName}\`. When using the \`client:only\` hydration strategy, Astro needs a hint to use the correct renderer.`,
60
- hint: (probableRenderers) => `Did you mean to pass \`client:only="${probableRenderers}"\`? See https://docs.astro.build/en/reference/directives-reference/#clientonly for more information on client:only`
60
+ hint: (probableRenderers) => `Did you mean to pass \`client:only="${probableRenderers}"\`? See https://docs.astro.build/en/reference/directives-reference/#clientonly for more information on \`client:only\`.`
61
61
  };
62
62
  const InvalidGetStaticPathParam = {
63
63
  name: "InvalidGetStaticPathParam",
64
- title: "Invalid value returned by a `getStaticPaths` path.",
65
- message: (paramType) => `Invalid params given to \`getStaticPaths\` path. Expected an \`object\`, got \`${paramType}\``,
66
- hint: "See https://docs.astro.build/en/reference/routing-reference/#getstaticpaths for more information on getStaticPaths."
64
+ title: "Invalid value returned by a route from `getStaticPaths()`.",
65
+ message: (paramType) => `Invalid \`params\` value returned by a route from \`getStaticPaths()\`. Expected an \`object\`, got \`${paramType}\`.`,
66
+ hint: "See https://docs.astro.build/en/reference/routing-reference/#getstaticpaths for more information on `getStaticPaths()`."
67
67
  };
68
68
  const InvalidGetStaticPathsEntry = {
69
69
  name: "InvalidGetStaticPathsEntry",
70
- title: "Invalid entry inside getStaticPath's return value",
71
- message: (entryType) => `Invalid entry returned by getStaticPaths. Expected an object, got \`${entryType}\``,
72
- hint: "If you're using a `.map` call, you might be looking for `.flatMap()` instead. See https://docs.astro.build/en/reference/routing-reference/#getstaticpaths for more information on getStaticPaths."
70
+ title: "Invalid entry inside `getStaticPaths()`'s return value.",
71
+ message: (entryType) => `Invalid entry returned by \`getStaticPaths()\`. Expected an object, got \`${entryType}\`.`,
72
+ hint: "If you're using a `.map` call, you might be looking for `.flatMap()` instead. See https://docs.astro.build/en/reference/routing-reference/#getstaticpaths for more information on `getStaticPaths()`."
73
73
  };
74
74
  const InvalidGetStaticPathsReturn = {
75
75
  name: "InvalidGetStaticPathsReturn",
76
- title: "Invalid value returned by getStaticPaths.",
77
- message: (returnType) => `Invalid type returned by \`getStaticPaths\`. Expected an \`array\`, got \`${returnType}\``,
78
- hint: "See https://docs.astro.build/en/reference/routing-reference/#getstaticpaths for more information on getStaticPaths."
76
+ title: "Invalid value returned by `getStaticPaths()`.",
77
+ message: (returnType) => `Invalid type returned by \`getStaticPaths()\`. Expected an \`array\`, got \`${returnType}\`.`,
78
+ hint: "See https://docs.astro.build/en/reference/routing-reference/#getstaticpaths for more information on `getStaticPaths()`."
79
79
  };
80
80
  const GetStaticPathsExpectedParams = {
81
81
  name: "GetStaticPathsExpectedParams",
82
- title: "Missing params property on `getStaticPaths` route.",
83
- message: "Missing or empty required `params` property on `getStaticPaths` route.",
84
- hint: "See https://docs.astro.build/en/reference/routing-reference/#getstaticpaths for more information on getStaticPaths."
82
+ title: "Missing params property on `getStaticPaths()` route.",
83
+ message: "Missing or empty required `params` property on `getStaticPaths()` route.",
84
+ hint: "See https://docs.astro.build/en/reference/routing-reference/#getstaticpaths for more information on `getStaticPaths()`."
85
85
  };
86
86
  const GetStaticPathsInvalidRouteParam = {
87
87
  name: "GetStaticPathsInvalidRouteParam",
88
88
  title: "Invalid route parameter returned by `getStaticPaths()`.",
89
- message: (key, value, valueType) => `Invalid \`getStaticPaths()\` route parameter for \`${key}\`. Expected a string or undefined, received \`${valueType}\` (\`${value}\`)`,
90
- hint: "See https://docs.astro.build/en/reference/routing-reference/#getstaticpaths for more information on getStaticPaths."
89
+ message: (key, value, valueType) => `Invalid \`getStaticPaths()\` route parameter for \`${key}\`. Expected a string or undefined, received \`${valueType}\` (\`${value}\`).`,
90
+ hint: "See https://docs.astro.build/en/reference/routing-reference/#getstaticpaths for more information on `getStaticPaths()`."
91
91
  };
92
92
  const GetStaticPathsRequired = {
93
93
  name: "GetStaticPathsRequired",
94
94
  title: "`getStaticPaths()` function required for dynamic routes.",
95
- message: "`getStaticPaths()` function is required for dynamic routes. Make sure that you `export` a `getStaticPaths` function from your dynamic route.",
95
+ message: "`getStaticPaths()` function is required for dynamic routes. Make sure that you `export` a `getStaticPaths()` function from your dynamic route.",
96
96
  hint: `See https://docs.astro.build/en/guides/routing/#dynamic-routes for more information on dynamic routes.
97
97
 
98
98
  If you meant for this route to be server-rendered, set \`export const prerender = false;\` in the page.`
@@ -104,7 +104,7 @@ const ReservedSlotName = {
104
104
  };
105
105
  const NoAdapterInstalled = {
106
106
  name: "NoAdapterInstalled",
107
- title: "Cannot use Server-side Rendering without an adapter.",
107
+ title: "Cannot use server-side rendering without an adapter.",
108
108
  message: `Cannot use server-rendered pages without an adapter. Please install and configure the appropriate server adapter for your final deployment.`,
109
109
  hint: "See https://docs.astro.build/en/guides/on-demand-rendering/ for more information."
110
110
  };
@@ -115,7 +115,7 @@ const AdapterSupportOutputMismatch = {
115
115
  };
116
116
  const NoAdapterInstalledServerIslands = {
117
117
  name: "NoAdapterInstalledServerIslands",
118
- title: "Cannot use Server Islands without an adapter.",
118
+ title: "Cannot use server islands without an adapter.",
119
119
  message: `Cannot use server islands without an adapter. Please install and configure the appropriate server adapter for your final deployment.`,
120
120
  hint: "See https://docs.astro.build/en/guides/on-demand-rendering/ for more information."
121
121
  };
@@ -128,8 +128,8 @@ const NoMatchingImport = {
128
128
  const InvalidPrerenderExport = {
129
129
  name: "InvalidPrerenderExport",
130
130
  title: "Invalid prerender export.",
131
- message(prefix, suffix, isHydridOutput) {
132
- const defaultExpectedValue = isHydridOutput ? "false" : "true";
131
+ message(prefix, suffix, isHybridOutput) {
132
+ const defaultExpectedValue = isHybridOutput ? "false" : "true";
133
133
  let msg = `A \`prerender\` export has been detected, but its value cannot be statically analyzed.`;
134
134
  if (prefix !== "const") msg += `
135
135
  Expected \`const\` declaration but got \`${prefix}\`.`;
@@ -165,25 +165,25 @@ const InvalidImageService = {
165
165
  };
166
166
  const MissingImageDimension = {
167
167
  name: "MissingImageDimension",
168
- title: "Missing image dimensions",
168
+ title: "Missing image dimensions.",
169
169
  message: (missingDimension, imageURL) => `Missing ${missingDimension === "both" ? "width and height attributes" : `${missingDimension} attribute`} for ${imageURL}. When using remote images, both dimensions are required in order to avoid CLS.`,
170
170
  hint: "If your image is inside your `src` folder, you probably meant to import it instead. See [the Imports guide for more information](https://docs.astro.build/en/guides/imports/#other-assets). You can also use `inferSize={true}` for remote images to get the original dimensions."
171
171
  };
172
172
  const FailedToFetchRemoteImageDimensions = {
173
173
  name: "FailedToFetchRemoteImageDimensions",
174
- title: "Failed to retrieve remote image dimensions",
174
+ title: "Failed to retrieve remote image dimensions.",
175
175
  message: (imageURL) => `Failed to get the dimensions for ${imageURL}.`,
176
176
  hint: "Verify your remote image URL is accurate, and that you are not using `inferSize` with a file located in your `public/` folder."
177
177
  };
178
178
  const RemoteImageNotAllowed = {
179
179
  name: "RemoteImageNotAllowed",
180
- title: "Remote image is not allowed",
180
+ title: "Remote image is not allowed.",
181
181
  message: (imageURL) => `Remote image ${imageURL} is not allowed by your image configuration.`,
182
182
  hint: "Update `image.domains` or `image.remotePatterns`, or remove `inferSize` for this image."
183
183
  };
184
184
  const UnsupportedImageFormat = {
185
185
  name: "UnsupportedImageFormat",
186
- title: "Unsupported image format",
186
+ title: "Unsupported image format.",
187
187
  message: (format, imagePath, supportedFormats) => `Received unsupported format \`${format}\` from \`${imagePath}\`. Currently only ${supportedFormats.join(
188
188
  ", "
189
189
  )} are supported by our image services.`,
@@ -191,12 +191,12 @@ const UnsupportedImageFormat = {
191
191
  };
192
192
  const UnsupportedImageConversion = {
193
193
  name: "UnsupportedImageConversion",
194
- title: "Unsupported image conversion",
194
+ title: "Unsupported image conversion.",
195
195
  message: "Converting between vector (such as SVGs) and raster (such as PNGs and JPEGs) images is not currently supported."
196
196
  };
197
197
  const CannotOptimizeSvg = {
198
198
  name: "CannotOptimizeSvg",
199
- title: "Cannot optimize SVG",
199
+ title: "Cannot optimize SVG.",
200
200
  message: (path, name) => `An error occurred while optimizing SVG file "${path}" with the "${name}" optimizer.`,
201
201
  hint: "Review the included error message provided for guidance."
202
202
  };
@@ -223,7 +223,7 @@ Full serialized options received: \`${fullOptions}\`.`,
223
223
  const ExpectedImageOptions = {
224
224
  name: "ExpectedImageOptions",
225
225
  title: "Expected image options.",
226
- message: (options) => `Expected getImage() parameter to be an object. Received \`${options}\`.`
226
+ message: (options) => `Expected \`getImage()\` parameter to be an object. Received \`${options}\`.`
227
227
  };
228
228
  const ExpectedNotESMImage = {
229
229
  name: "ExpectedNotESMImage",
@@ -235,11 +235,11 @@ const GetImageNotUsedOnServer = {
235
235
  name: "GetImageNotUsedOnServer",
236
236
  title: "`getImage()` must be used on the server.",
237
237
  message: "`getImage()` should only be used on the server. To use images on the client, render the `src` from `getImage()` during the server render, then pass it to the client for usage.",
238
- hint: "See https://docs.astro.build/en/reference/modules/astro-assets/#getimage for more information on getImage()."
238
+ hint: "See https://docs.astro.build/en/reference/modules/astro-assets/#getimage for more information on `getImage()`."
239
239
  };
240
240
  const IncompatibleDescriptorOptions = {
241
241
  name: "IncompatibleDescriptorOptions",
242
- title: "Cannot set both `densities` and `widths`",
242
+ title: "Cannot set both `densities` and `widths`.",
243
243
  message: "Only one of `densities` or `widths` can be specified. In most cases, you'll probably want to use only `widths` if you require specific widths.",
244
244
  hint: "Those attributes are used to construct a `srcset` attribute, which cannot have both `x` and `w` descriptors."
245
245
  };
@@ -307,8 +307,8 @@ const MiddlewareCantBeLoaded = {
307
307
  const LocalImageUsedWrongly = {
308
308
  name: "LocalImageUsedWrongly",
309
309
  title: "Local images must be imported.",
310
- message: (imageFilePath) => `\`Image\`'s and \`getImage\`'s \`src\` parameter must be an imported image or an URL, it cannot be a string filepath. Received \`${imageFilePath}\`.`,
311
- hint: "If you want to use an image from your `src` folder, you need to either import it or if the image is coming from a content collection, use the [image() schema helper](https://docs.astro.build/en/guides/images/#images-in-content-collections). See https://docs.astro.build/en/guides/images/#src-required for more information on the `src` property."
310
+ message: (imageFilePath) => `\`Image\`'s and \`getImage\`'s \`src\` parameter must be an imported image or a URL, it cannot be a string filepath. Received \`${imageFilePath}\`.`,
311
+ hint: "If you want to use an image from your `src` folder, you need to either import it or if the image is coming from a content collection, use the [image() schema helper](https://docs.astro.build/en/guides/images/#images-in-content-collections). See https://docs.astro.build/en/reference/modules/astro-assets/#src-required for more information on the `src` property."
312
312
  };
313
313
  const AstroGlobUsedOutside = {
314
314
  name: "AstroGlobUsedOutside",
@@ -351,7 +351,7 @@ const MissingSharp = {
351
351
  };
352
352
  const UnknownViteError = {
353
353
  name: "UnknownViteError",
354
- title: "Unknown Vite Error."
354
+ title: "Unknown Vite error."
355
355
  };
356
356
  const FailedToLoadModuleSSR = {
357
357
  name: "FailedToLoadModuleSSR",
@@ -367,7 +367,7 @@ const InvalidGlob = {
367
367
  };
368
368
  const FailedToFindPageMapSSR = {
369
369
  name: "FailedToFindPageMapSSR",
370
- title: "Astro couldn't find the correct page to render",
370
+ title: "Astro couldn't find the correct page to render.",
371
371
  message: "Astro couldn't find the correct page to render, probably because it wasn't correctly mapped for SSR usage. This is an internal error. Please file an issue."
372
372
  };
373
373
  const MissingLocale = {
@@ -383,13 +383,13 @@ const MissingIndexForInternationalization = {
383
383
  };
384
384
  const IncorrectStrategyForI18n = {
385
385
  name: "IncorrectStrategyForI18n",
386
- title: "You can't use the current function with the current strategy",
386
+ title: "Function incompatible with the current strategy.",
387
387
  message: (functionName) => `The function \`${functionName}\` can only be used when the \`i18n.routing.strategy\` is set to \`"manual"\`.`
388
388
  };
389
389
  const NoPrerenderedRoutesWithDomains = {
390
390
  name: "NoPrerenderedRoutesWithDomains",
391
391
  title: "Prerendered routes aren't supported when internationalization domains are enabled.",
392
- message: (component) => `Static pages aren't yet supported with multiple domains. To enable this feature, you must disable prerendering for the page ${component}`
392
+ message: (component) => `Static pages aren't yet supported with multiple domains. To enable this feature, you must disable prerendering for the page ${component}.`
393
393
  };
394
394
  const MissingMiddlewareForInternationalization = {
395
395
  name: "MissingMiddlewareForInternationalization",
@@ -398,31 +398,31 @@ const MissingMiddlewareForInternationalization = {
398
398
  };
399
399
  const InvalidI18nMiddlewareConfiguration = {
400
400
  name: "InvalidI18nMiddlewareConfiguration",
401
- title: "Invalid internationalization middleware configuration",
401
+ title: "Invalid internationalization middleware configuration.",
402
402
  message: "The option `redirectToDefaultLocale` can be enabled only when `prefixDefaultLocale` is also set to `true`; otherwise, redirects might cause infinite loops. Enable the option `prefixDefaultLocale` to continue to use `redirectToDefaultLocale`, or ensure both are set to `false`."
403
403
  };
404
404
  const CantRenderPage = {
405
405
  name: "CantRenderPage",
406
406
  title: "Astro can't render the route.",
407
407
  message: "Astro cannot find any content to render for this route. There is no file or redirect associated with this route.",
408
- hint: "If you expect to find a route here, this may be an Astro bug. Please file an issue/restart the dev server"
408
+ hint: "If you expect to find a route here, this may be an Astro bug. Please file an issue/restart the dev server."
409
409
  };
410
410
  const UnhandledRejection = {
411
411
  name: "UnhandledRejection",
412
- title: "Unhandled rejection",
412
+ title: "Unhandled rejection.",
413
413
  message: (stack) => `Astro detected an unhandled rejection. Here's the stack trace:
414
414
  ${stack}`,
415
415
  hint: "Make sure your promises all have an `await` or a `.catch()` handler."
416
416
  };
417
417
  const i18nNotEnabled = {
418
418
  name: "i18nNotEnabled",
419
- title: "i18n Not Enabled",
420
- message: "The `astro:i18n` module cannot be used without enabling i18n in your Astro config.",
419
+ title: "Internationalization routing is not enabled.",
420
+ message: "The `astro:i18n` module cannot be used without enabling `i18n` in your Astro config.",
421
421
  hint: "See https://docs.astro.build/en/guides/internationalization for a guide on setting up i18n."
422
422
  };
423
423
  const i18nNoLocaleFoundInPath = {
424
424
  name: "i18nNoLocaleFoundInPath",
425
- title: "The path doesn't contain any locale",
425
+ title: "The path doesn't contain any locale.",
426
426
  message: "You tried to use an i18n utility on a path that doesn't contain any locale. You can use `pathHasLocale` first to determine if the path has a locale."
427
427
  };
428
428
  const RouteNotFound = {
@@ -432,7 +432,7 @@ const RouteNotFound = {
432
432
  };
433
433
  const EnvInvalidVariables = {
434
434
  name: "EnvInvalidVariables",
435
- title: "Invalid Environment Variables",
435
+ title: "Invalid environment variables.",
436
436
  message: (errors) => `The following environment variables defined in \`env.schema\` are invalid:
437
437
 
438
438
  ${errors.map((err) => `- ${err}`).join("\n")}
@@ -440,7 +440,7 @@ ${errors.map((err) => `- ${err}`).join("\n")}
440
440
  };
441
441
  const EnvPrefixConflictsWithSecret = {
442
442
  name: "EnvPrefixConflictsWithSecret",
443
- title: "envPrefix conflicts with secret environment variables",
443
+ title: "`envPrefix` conflicts with secret environment variables.",
444
444
  message: (conflicts) => `The following environment variables are declared with \`access: "secret"\` in \`env.schema\`, but their names match a prefix in \`vite.envPrefix\`, which would expose them in client-side bundles:
445
445
 
446
446
  ${conflicts.map((c) => `- ${c}`).join("\n")}
@@ -449,13 +449,13 @@ Either remove the conflicting prefixes from \`vite.envPrefix\`, or rename these
449
449
  };
450
450
  const ServerOnlyModule = {
451
451
  name: "ServerOnlyModule",
452
- title: "Module is only available server-side",
452
+ title: "Module is only available server-side.",
453
453
  message: (name) => `The "${name}" module is only available server-side.`
454
454
  };
455
455
  const RewriteWithBodyUsed = {
456
456
  name: "RewriteWithBodyUsed",
457
- title: "Cannot use Astro.rewrite after the request body has been read",
458
- message: "Astro.rewrite() cannot be used if the request body has already been read. If you need to read the body, first clone the request."
457
+ title: "Cannot use `Astro.rewrite()` after the request body has been read.",
458
+ message: "`Astro.rewrite()` cannot be used if the request body has already been read. If you need to read the body, first clone the request."
459
459
  };
460
460
  const ForbiddenRewrite = {
461
461
  name: "ForbiddenRewrite",
@@ -465,7 +465,7 @@ const ForbiddenRewrite = {
465
465
  The static route '${to}' is rendered by the component
466
466
  '${component}', which is marked as prerendered. This is a forbidden operation because during the build, the component '${component}' is compiled to an
467
467
  HTML file, which can't be retrieved at runtime by Astro.`,
468
- hint: (component) => `Add \`export const prerender = false\` to the component '${component}', or use a Astro.redirect().`
468
+ hint: (component) => `Add \`export const prerender = false\` to the component '${component}', or use \`Astro.redirect()\`.`
469
469
  };
470
470
  const UnknownFilesystemError = {
471
471
  name: "UnknownFilesystemError",
@@ -475,30 +475,30 @@ const UnknownFilesystemError = {
475
475
  const CannotExtractFontType = {
476
476
  name: "CannotExtractFontType",
477
477
  title: "Cannot extract the font type from the given URL.",
478
- message: (url) => `An error occurred while trying to extract the font type from ${url}`,
478
+ message: (url) => `An error occurred while trying to extract the font type from ${url}.`,
479
479
  hint: "Open an issue at https://github.com/withastro/astro/issues."
480
480
  };
481
481
  const CannotDetermineWeightAndStyleFromFontFile = {
482
482
  name: "CannotDetermineWeightAndStyleFromFontFile",
483
483
  title: "Cannot determine weight and style from font file.",
484
- message: (family, url) => `An error occurred while determining the \`weight\` and \`style\` from local family "${family}" font file: ${url}`,
484
+ message: (family, url) => `An error occurred while determining the \`weight\` and \`style\` from local family "${family}" font file: ${url}.`,
485
485
  hint: "Update your family config and set `weight` and `style` manually instead."
486
486
  };
487
487
  const CannotFetchFontFile = {
488
488
  name: "CannotFetchFontFile",
489
489
  title: "Cannot fetch the given font file.",
490
- message: (url) => `An error occurred while fetching the font file from ${url}`,
490
+ message: (url) => `An error occurred while fetching the font file from ${url}.`,
491
491
  hint: "This is often caused by connectivity issues. If the error persists, open an issue at https://github.com/withastro/astro/issues."
492
492
  };
493
493
  const FontFamilyNotFound = {
494
494
  name: "FontFamilyNotFound",
495
- title: "Font family not found",
495
+ title: "Font family not found.",
496
496
  message: (family) => `No data was found for the \`"${family}"\` family passed to the \`<Font>\` component.`,
497
497
  hint: "This is often caused by a typo. Check that the `<Font />` component is using a `cssVariable` specified in your config."
498
498
  };
499
499
  const FontFileUrlNotFound = {
500
500
  name: "FontFileUrlNotFound",
501
- title: "Font file URL not found",
501
+ title: "Font file URL not found.",
502
502
  message: (url) => `The \`"${url}"\` URL passed to the \`experimental_getFontFileURL()\` function is invalid.`,
503
503
  hint: "Make sure you pass a valid URL, obtained via the `fontData` object."
504
504
  };
@@ -509,8 +509,8 @@ const MissingGetFontFileRequestUrl = {
509
509
  };
510
510
  const UnavailableAstroGlobal = {
511
511
  name: "UnavailableAstroGlobal",
512
- title: "Unavailable Astro global in getStaticPaths()",
513
- message: (name) => `The Astro global is not available in this scope. Please remove "Astro.${name}" from your getStaticPaths() function.`
512
+ title: "Unavailable Astro global in `getStaticPaths()`.",
513
+ message: (name) => `The Astro global is not available in this scope. Please remove \`Astro.${name}\` from your \`getStaticPaths()\` function.`
514
514
  };
515
515
  const UnableToLoadLogger = {
516
516
  name: "UnableToLoadLogger",
@@ -519,19 +519,19 @@ const UnableToLoadLogger = {
519
519
  };
520
520
  const LoggerConfigurationNotSerializable = {
521
521
  name: "LoggerConfigurationNotSerializable",
522
- title: "The configuration of the logger is not serializable"
522
+ title: "The configuration of the logger is not serializable."
523
523
  };
524
524
  const UnknownCSSError = {
525
525
  name: "UnknownCSSError",
526
- title: "Unknown CSS Error."
526
+ title: "Unknown CSS error."
527
527
  };
528
528
  const CSSSyntaxError = {
529
529
  name: "CSSSyntaxError",
530
- title: "CSS Syntax Error."
530
+ title: "CSS syntax error."
531
531
  };
532
532
  const UnknownMarkdownError = {
533
533
  name: "UnknownMarkdownError",
534
- title: "Unknown Markdown Error."
534
+ title: "Unknown Markdown error."
535
535
  };
536
536
  const MarkdownFrontmatterParseError = {
537
537
  name: "MarkdownFrontmatterParseError",
@@ -566,22 +566,22 @@ const ConfigLegacyKey = {
566
566
  };
567
567
  const UnknownCLIError = {
568
568
  name: "UnknownCLIError",
569
- title: "Unknown CLI Error."
569
+ title: "Unknown CLI error."
570
570
  };
571
571
  const GenerateContentTypesError = {
572
572
  name: "GenerateContentTypesError",
573
573
  title: "Failed to generate content types.",
574
- message: (errorMessage) => `\`astro sync\` command failed to generate content collection types: ${errorMessage}`,
574
+ message: (errorMessage) => `\`astro sync\` command failed to generate content collection types: ${errorMessage}.`,
575
575
  hint: (fileName) => `This error is often caused by a syntax error inside your content, or your content configuration file. Check your ${fileName ?? "content config"} file for typos.`
576
576
  };
577
577
  const UnknownContentCollectionError = {
578
578
  name: "UnknownContentCollectionError",
579
- title: "Unknown Content Collection Error."
579
+ title: "Unknown content collection error."
580
580
  };
581
581
  const RenderUndefinedEntryError = {
582
582
  name: "RenderUndefinedEntryError",
583
583
  title: "Attempted to render an undefined content collection entry.",
584
- hint: "Check if the entry is undefined before passing it to `render()`"
584
+ hint: "Check if the entry is undefined before passing it to `render()`."
585
585
  };
586
586
  const GetEntryDeprecationError = {
587
587
  name: "GetEntryDeprecationError",
@@ -665,7 +665,7 @@ const LiveContentConfigError = {
665
665
  };
666
666
  const ContentLoaderInvalidDataError = {
667
667
  name: "ContentLoaderInvalidDataError",
668
- title: "Content entry is missing an ID",
668
+ title: "Content entry is missing an ID.",
669
669
  message(collection, extra) {
670
670
  return `**${String(collection)}** entry is missing an ID.
671
671
  ${extra}`;
@@ -684,7 +684,7 @@ const InvalidContentEntrySlugError = {
684
684
  };
685
685
  const ContentSchemaContainsSlugError = {
686
686
  name: "ContentSchemaContainsSlugError",
687
- title: "Content Schema should not contain `slug`.",
687
+ title: "Content schema should not contain `slug`.",
688
688
  message: (collectionName) => `A content collection schema should not contain \`slug\` since it is reserved for slug generation. Remove this from your ${collectionName} collection schema.`,
689
689
  hint: "See https://docs.astro.build/en/guides/content-collections/ for more on the `slug` field."
690
690
  };
@@ -727,19 +727,19 @@ Full error: ${parseError}`,
727
727
  };
728
728
  const FileParserNotFound = {
729
729
  name: "FileParserNotFound",
730
- title: "File parser not found",
730
+ title: "File parser not found.",
731
731
  message: (fileName) => `No parser was found for '${fileName}'. Pass a parser function (e.g. \`parser: csv\`) to the \`file\` loader.`
732
732
  };
733
733
  const FileGlobNotSupported = {
734
734
  name: "FileGlobNotSupported",
735
- title: "Glob patterns are not supported in the file loader",
735
+ title: "Glob patterns are not supported in the file loader.",
736
736
  message: "Glob patterns are not supported in the `file` loader. Use the `glob` loader instead.",
737
737
  hint: `See Astro's file loader https://docs.astro.build/en/reference/content-loader-reference/#file-loader for supported usage.`
738
738
  };
739
739
  const ActionsWithoutServerOutputError = {
740
740
  name: "ActionsWithoutServerOutputError",
741
741
  title: "Actions must be used with server output.",
742
- message: "A server is required to create callable backend functions. To deploy routes to a server, add an adapter to your Astro config and configure your route for on-demand rendering",
742
+ message: "A server is required to create callable backend functions. To deploy routes to a server, add an adapter to your Astro config and configure your route for on-demand rendering.",
743
743
  hint: "Add an adapter and enable on-demand rendering: https://docs.astro.build/en/guides/on-demand-rendering/"
744
744
  };
745
745
  const ActionsReturnedInvalidDataError = {
@@ -756,8 +756,8 @@ const ActionNotFoundError = {
756
756
  };
757
757
  const ActionCalledFromServerError = {
758
758
  name: "ActionCalledFromServerError",
759
- title: "Action unexpected called from the server.",
760
- message: "Action called from a server page or endpoint without using `Astro.callAction()`. This wrapper must be used to call actions from server code.",
759
+ title: "Action called from the server without `Astro.callAction()`.",
760
+ message: "Action called from a server-rendered page or endpoint without using `Astro.callAction()`. This wrapper must be used to call actions from server code.",
761
761
  hint: "See the `Astro.callAction()` reference for usage examples: https://docs.astro.build/en/reference/api-reference/#callaction"
762
762
  };
763
763
  const UnknownError = { name: "UnknownError", title: "Unknown Error." };
@@ -276,7 +276,7 @@ function printHelp({
276
276
  message.push(
277
277
  linebreak(),
278
278
  ` ${bgGreen(black(` ${commandName} `))} ${green(
279
- `v${"6.3.4"}`
279
+ `v${"6.3.5"}`
280
280
  )} ${headline}`
281
281
  );
282
282
  }
@@ -1,4 +1,4 @@
1
- import type { Plugin } from 'vite';
1
+ import { type Plugin } from 'vite';
2
2
  /**
3
3
  * The very last Vite plugin to reload the browser if any SSR-only module are updated
4
4
  * which will require a full page reload. This mimics the behaviour of Vite 5 where
@@ -1,3 +1,4 @@
1
+ import { isRunnableDevEnvironment } from "vite";
1
2
  import { VIRTUAL_PAGE_RESOLVED_MODULE_ID } from "../vite-plugin-pages/const.js";
2
3
  import { getDevCssModuleNameFromPageVirtualModuleName } from "../vite-plugin-css/util.js";
3
4
  import { isAstroServerEnvironment } from "../environments.js";
@@ -16,7 +17,7 @@ function hmrReload() {
16
17
  enforce: "post",
17
18
  hotUpdate: {
18
19
  order: "post",
19
- handler({ modules, server, timestamp }) {
20
+ handler({ modules, server, timestamp, file }) {
20
21
  if (!isAstroServerEnvironment(this.environment)) return;
21
22
  let hasSsrOnlyModules = false;
22
23
  let hasSkippedStyleModules = false;
@@ -30,6 +31,12 @@ function hmrReload() {
30
31
  const clientModule = server.environments.client.moduleGraph.getModuleById(mod.id);
31
32
  if (clientModule != null) continue;
32
33
  this.environment.moduleGraph.invalidateModule(mod, invalidatedModules, timestamp, true);
34
+ if (isRunnableDevEnvironment(this.environment)) {
35
+ const runnerModule = this.environment.runner.evaluatedModules.getModuleById(mod.id);
36
+ if (runnerModule) {
37
+ this.environment.runner.evaluatedModules.invalidateModule(runnerModule);
38
+ }
39
+ }
33
40
  hasSsrOnlyModules = true;
34
41
  }
35
42
  for (const invalidatedModule of invalidatedModules) {
@@ -43,6 +50,13 @@ function hmrReload() {
43
50
  }
44
51
  if (hasSsrOnlyModules) {
45
52
  server.ws.send({ type: "full-reload" });
53
+ if (!isRunnableDevEnvironment(this.environment)) {
54
+ this.environment.hot.send({
55
+ type: "full-reload",
56
+ triggeredBy: file,
57
+ path: "*"
58
+ });
59
+ }
46
60
  return [];
47
61
  }
48
62
  if (hasSkippedStyleModules) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro",
3
- "version": "6.3.4",
3
+ "version": "6.3.5",
4
4
  "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
5
5
  "type": "module",
6
6
  "author": "withastro",
@@ -164,9 +164,9 @@
164
164
  "xxhash-wasm": "^1.1.0",
165
165
  "yargs-parser": "^22.0.0",
166
166
  "zod": "^4.3.6",
167
- "@astrojs/internal-helpers": "0.9.1",
167
+ "@astrojs/telemetry": "3.3.2",
168
168
  "@astrojs/markdown-remark": "7.1.2",
169
- "@astrojs/telemetry": "3.3.2"
169
+ "@astrojs/internal-helpers": "0.9.1"
170
170
  },
171
171
  "optionalDependencies": {
172
172
  "sharp": "^0.34.0"