astro 4.0.0-beta.4 → 4.0.0-beta.6

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 (54) hide show
  1. package/LICENSE +0 -2
  2. package/dist/@types/astro.d.ts +112 -149
  3. package/dist/assets/build/generate.d.ts +1 -1
  4. package/dist/assets/build/generate.js +0 -1
  5. package/dist/cli/preferences/index.js +58 -15
  6. package/dist/core/build/buildPipeline.d.ts +1 -1
  7. package/dist/core/build/buildPipeline.js +0 -1
  8. package/dist/core/build/generate.js +7 -7
  9. package/dist/core/build/index.js +1 -1
  10. package/dist/core/build/plugins/plugin-manifest.js +5 -5
  11. package/dist/core/build/util.js +2 -2
  12. package/dist/core/compile/compile.js +2 -2
  13. package/dist/core/config/schema.d.ts +213 -321
  14. package/dist/core/config/schema.js +68 -78
  15. package/dist/core/constants.js +1 -1
  16. package/dist/core/create-vite.js +1 -1
  17. package/dist/core/dev/dev.js +1 -1
  18. package/dist/core/dev/restart.d.ts +1 -1
  19. package/dist/core/dev/restart.js +0 -1
  20. package/dist/core/logger/node.js +0 -1
  21. package/dist/core/messages.js +2 -2
  22. package/dist/core/render/params-and-props.d.ts +1 -1
  23. package/dist/core/render/params-and-props.js +1 -1
  24. package/dist/core/render/route-cache.js +0 -1
  25. package/dist/core/routing/manifest/create.js +1 -2
  26. package/dist/i18n/index.d.ts +4 -4
  27. package/dist/i18n/index.js +4 -4
  28. package/dist/i18n/vite-plugin-i18n.js +1 -1
  29. package/dist/integrations/index.d.ts +1 -1
  30. package/dist/integrations/index.js +0 -1
  31. package/dist/preferences/index.d.ts +10 -2
  32. package/dist/preferences/index.js +14 -4
  33. package/dist/runtime/client/dev-overlay/entrypoint.js +4 -6
  34. package/dist/runtime/client/dev-overlay/overlay.js +7 -28
  35. package/dist/runtime/client/dev-overlay/plugins/audit/a11y.d.ts +26 -0
  36. package/dist/runtime/client/dev-overlay/plugins/audit/a11y.js +537 -0
  37. package/dist/runtime/client/dev-overlay/plugins/{audit.d.ts → audit/index.d.ts} +15 -0
  38. package/dist/runtime/client/dev-overlay/plugins/{audit.js → audit/index.js} +67 -15
  39. package/dist/runtime/client/dev-overlay/plugins/settings.js +16 -9
  40. package/dist/runtime/client/dev-overlay/plugins/utils/highlight.js +3 -0
  41. package/dist/runtime/client/dev-overlay/plugins/xray.d.ts +1 -1
  42. package/dist/runtime/client/dev-overlay/plugins/xray.js +37 -7
  43. package/dist/runtime/client/dev-overlay/ui-library/tooltip.js +8 -3
  44. package/dist/runtime/client/dev-overlay/ui-library/window.js +4 -0
  45. package/dist/runtime/server/render/common.d.ts +1 -1
  46. package/dist/runtime/server/render/common.js +1 -1
  47. package/dist/runtime/server/render/component.d.ts +1 -1
  48. package/dist/runtime/server/render/component.js +1 -1
  49. package/dist/transitions/router.js +33 -46
  50. package/dist/vite-plugin-astro/hmr.d.ts +1 -1
  51. package/dist/vite-plugin-astro/hmr.js +1 -5
  52. package/dist/vite-plugin-astro-server/plugin.js +5 -5
  53. package/dist/vite-plugin-astro-server/route.js +7 -12
  54. package/package.json +3 -1
package/LICENSE CHANGED
@@ -20,7 +20,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
22
22
 
23
-
24
23
  """
25
24
  This license applies to parts of the `packages/create-astro` and `packages/astro` subdirectories originating from the https://github.com/sveltejs/kit repository:
26
25
 
@@ -33,7 +32,6 @@ The above copyright notice and this permission notice shall be included in all c
33
32
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34
33
  """
35
34
 
36
-
37
35
  """
38
36
  This license applies to parts of the `packages/create-astro` and `packages/astro` subdirectories originating from the https://github.com/vitejs/vite repository:
39
37
 
@@ -1053,34 +1053,6 @@ export interface AstroUserConfig {
1053
1053
  */
1054
1054
  remotePatterns?: Partial<RemotePattern>[];
1055
1055
  };
1056
- /**
1057
- * @docs
1058
- * @kind heading
1059
- * @name Dev Overlay Options
1060
- * @deprecated Use `devToolbar` instead.
1061
- */
1062
- devOverlay?: {
1063
- /**
1064
- * @docs
1065
- * @name devOverlay.enabled
1066
- * @type {boolean}
1067
- * @default `true`
1068
- * @description
1069
- * Whether to enable the dev overlay. This overlay allows you to inspect your page islands, see helpful audits on performance and accessibility, and more.
1070
- *
1071
- * This option is scoped to the entire project, to only disable the overlay for yourself, run `npm run astro preferences disable devOverlay`. To disable the overlay for all your Astro projects, run `npm run astro preferences disable devOverlay --global`.
1072
- */
1073
- enabled: boolean;
1074
- /**
1075
- * @docs
1076
- * @name devOverlay.defaultState
1077
- * @type {'minimized' | 'expanded'}
1078
- * @default `minimized`
1079
- * @description
1080
- * Whether the dev overlay should be expanded or minimized by default.
1081
- */
1082
- defaultState: 'minimized' | 'expanded';
1083
- };
1084
1056
  /**
1085
1057
  * @docs
1086
1058
  * @kind heading
@@ -1098,15 +1070,6 @@ export interface AstroUserConfig {
1098
1070
  * This option is scoped to the entire project, to only disable the toolbar for yourself, run `npm run astro preferences disable devToolbar`. To disable the toolbar for all your Astro projects, run `npm run astro preferences disable devToolbar --global`.
1099
1071
  */
1100
1072
  enabled: boolean;
1101
- /**
1102
- * @docs
1103
- * @name devToolbar.defaultState
1104
- * @type {'minimized' | 'expanded'}
1105
- * @default `minimized`
1106
- * @description
1107
- * Whether the Dev Toolbar should be expanded or minimized by default.
1108
- */
1109
- defaultState: 'minimized' | 'expanded';
1110
1073
  };
1111
1074
  /**
1112
1075
  * @docs
@@ -1302,141 +1265,141 @@ export interface AstroUserConfig {
1302
1265
  * Astro offers experimental flags to give users early access to new features.
1303
1266
  * These flags are not guaranteed to be stable.
1304
1267
  */
1305
- experimental?: {
1268
+ /**
1269
+ * @docs
1270
+ * @name i18n
1271
+ * @type {object}
1272
+ * @version 3.5.0
1273
+ * @type {object}
1274
+ * @description
1275
+ *
1276
+ * Configures experimental i18n routing and allows you to specify some customization options.
1277
+ *
1278
+ * See our guide for more information on [internationalization in Astro](/en/guides/internationalization/)
1279
+ */
1280
+ i18n?: {
1306
1281
  /**
1307
1282
  * @docs
1308
- * @name experimental.optimizeHoistedScript
1309
- * @type {boolean}
1310
- * @default `false`
1311
- * @version 2.10.4
1283
+ * @kind h4
1284
+ * @name i18n.defaultLocale
1285
+ * @type {string}
1286
+ * @version 3.5.0
1287
+ * @description
1288
+ *
1289
+ * The default locale of your website/application. This is a required field.
1290
+ *
1291
+ * No particular language format or syntax is enforced, but we suggest using lower-case and hyphens as needed (e.g. "es", "pt-br") for greatest compatibility.
1292
+ */
1293
+ defaultLocale: string;
1294
+ /**
1295
+ * @docs
1296
+ * @kind h4
1297
+ * @name i18n.locales
1298
+ * @type {Locales}
1299
+ * @version 3.5.0
1300
+ * @description
1301
+ *
1302
+ * A list of all locales supported by the website, including the `defaultLocale`. This is a required field.
1303
+ *
1304
+ * Languages can be listed either as individual codes (e.g. `['en', 'es', 'pt-br']`) or mapped to a shared `path` of codes (e.g. `{ path: "english", codes: ["en", "en-US"]}`). These codes will be used to determine the URL structure of your deployed site.
1305
+ *
1306
+ * No particular language code format or syntax is enforced, but your project folders containing your content files must match exactly the `locales` items in the list. In the case of multiple `codes` pointing to a custom URL path prefix, store your content files in a folder with the same name as the `path` configured.
1307
+ */
1308
+ locales: Locales;
1309
+ /**
1310
+ * @docs
1311
+ * @kind h4
1312
+ * @name i18n.fallback
1313
+ * @type {Record<string, string>}
1314
+ * @version 3.5.0
1312
1315
  * @description
1313
- * Prevents unused components' scripts from being included in a page unexpectedly.
1314
- * The optimization is best-effort and may inversely miss including the used scripts. Make sure to double-check your built pages
1315
- * before publishing.
1316
- * Enable hoisted script analysis optimization by adding the experimental flag:
1316
+ *
1317
+ * The fallback strategy when navigating to pages that do not exist (e.g. a translated page has not been created).
1318
+ *
1319
+ * Use this object to declare a fallback `locale` route for each language you support. If no fallback is specified, then unavailable pages will return a 404.
1320
+ *
1321
+ * ##### Example
1322
+ *
1323
+ * The following example configures your content fallback strategy to redirect unavailable pages in `/pt-br/` to their `es` version, and unavailable pages in `/fr/` to their `en` version. Unavailable `/es/` pages will return a 404.
1317
1324
  *
1318
1325
  * ```js
1319
- * {
1326
+ * export default defineConfig({
1320
1327
  * experimental: {
1321
- * optimizeHoistedScript: true,
1322
- * },
1323
- * }
1328
+ * i18n: {
1329
+ * defaultLocale: "en",
1330
+ * locales: ["en", "fr", "pt-br", "es"],
1331
+ * fallback: {
1332
+ * pt: "es",
1333
+ * fr: "en"
1334
+ * }
1335
+ * }
1336
+ * }
1337
+ * })
1324
1338
  * ```
1325
1339
  */
1326
- optimizeHoistedScript?: boolean;
1340
+ fallback?: Record<string, string>;
1327
1341
  /**
1328
1342
  * @docs
1329
- * @name experimental.i18n
1330
- * @type {object}
1331
- * @version 3.5.0
1332
- * @type {object}
1343
+ * @kind h4
1344
+ * @name i18n.routing
1345
+ * @type {Routing}
1346
+ * @version 3.7.0
1333
1347
  * @description
1334
1348
  *
1335
- * Configures experimental i18n routing and allows you to specify some customization options.
1336
- *
1337
- * See our guide for more information on [internationalization in Astro](/en/guides/internationalization/)
1349
+ * Controls the routing strategy to determine your site URLs. Set this based on your folder/URL path configuration for your default language.
1338
1350
  */
1339
- i18n?: {
1340
- /**
1341
- * @docs
1342
- * @kind h4
1343
- * @name experimental.i18n.defaultLocale
1344
- * @type {string}
1345
- * @version 3.5.0
1346
- * @description
1347
- *
1348
- * The default locale of your website/application. This is a required field.
1349
- *
1350
- * No particular language format or syntax is enforced, but we suggest using lower-case and hyphens as needed (e.g. "es", "pt-br") for greatest compatibility.
1351
- */
1352
- defaultLocale: string;
1351
+ routing?: {
1353
1352
  /**
1354
1353
  * @docs
1355
- * @kind h4
1356
- * @name experimental.i18n.locales
1357
- * @type {Locales}
1358
- * @version 3.5.0
1359
- * @description
1360
- *
1361
- * A list of all locales supported by the website, including the `defaultLocale`. This is a required field.
1362
- *
1363
- * Languages can be listed either as individual codes (e.g. `['en', 'es', 'pt-br']`) or mapped to a shared `path` of codes (e.g. `{ path: "english", codes: ["en", "en-US"]}`). These codes will be used to determine the URL structure of your deployed site.
1364
- *
1365
- * No particular language code format or syntax is enforced, but your project folders containing your content files must match exactly the `locales` items in the list. In the case of multiple `codes` pointing to a custom URL path prefix, store your content files in a folder with the same name as the `path` configured.
1366
- */
1367
- locales: Locales;
1368
- /**
1369
- * @docs
1370
- * @kind h4
1371
- * @name experimental.i18n.fallback
1372
- * @type {Record<string, string>}
1373
- * @version 3.5.0
1354
+ * @name i18n.routing.prefixDefaultLocale
1355
+ * @type {boolean}
1356
+ * @default `false`
1357
+ * @version 3.7.0
1374
1358
  * @description
1375
1359
  *
1376
- * The fallback strategy when navigating to pages that do not exist (e.g. a translated page has not been created).
1377
- *
1378
- * Use this object to declare a fallback `locale` route for each language you support. If no fallback is specified, then unavailable pages will return a 404.
1360
+ * When `false`, only non-default languages will display a language prefix.
1361
+ * The `defaultLocale` will not show a language prefix and content files do not exist in a localized folder.
1362
+ * URLs will be of the form `example.com/[locale]/content/` for all non-default languages, but `example.com/content/` for the default locale.
1379
1363
  *
1380
- * ##### Example
1381
- *
1382
- * The following example configures your content fallback strategy to redirect unavailable pages in `/pt-br/` to their `es` version, and unavailable pages in `/fr/` to their `en` version. Unavailable `/es/` pages will return a 404.
1383
- *
1384
- * ```js
1385
- * export default defineConfig({
1386
- * experimental: {
1387
- * i18n: {
1388
- * defaultLocale: "en",
1389
- * locales: ["en", "fr", "pt-br", "es"],
1390
- * fallback: {
1391
- * pt: "es",
1392
- * fr: "en"
1393
- * }
1394
- * }
1395
- * }
1396
- * })
1397
- * ```
1364
+ * When `true`, all URLs will display a language prefix.
1365
+ * URLs will be of the form `example.com/[locale]/content/` for every route, including the default language.
1366
+ * Localized folders are used for every language, including the default.
1398
1367
  */
1399
- fallback?: Record<string, string>;
1368
+ prefixDefaultLocale: boolean;
1400
1369
  /**
1401
- * @docs
1402
- * @kind h4
1403
- * @name experimental.i18n.routing
1404
- * @type {Routing}
1370
+ * @name i18n.routing.strategy
1371
+ * @type {"pathname"}
1372
+ * @default `"pathname"`
1405
1373
  * @version 3.7.0
1406
1374
  * @description
1407
1375
  *
1408
- * Controls the routing strategy to determine your site URLs. Set this based on your folder/URL path configuration for your default language.
1376
+ * - `"pathanme": The strategy is applied to the pathname of the URLs
1409
1377
  */
1410
- routing?: {
1411
- /**
1412
- * @docs
1413
- * @name experimental.i18n.routing.prefixDefaultLocale
1414
- * @type {boolean}
1415
- * @default `false`
1416
- * @version 3.7.0
1417
- * @description
1418
- *
1419
- * When `false`, only non-default languages will display a language prefix.
1420
- * The `defaultLocale` will not show a language prefix and content files do not exist in a localized folder.
1421
- * URLs will be of the form `example.com/[locale]/content/` for all non-default languages, but `example.com/content/` for the default locale.
1422
- *
1423
- * When `true`, all URLs will display a language prefix.
1424
- * URLs will be of the form `example.com/[locale]/content/` for every route, including the default language.
1425
- * Localized folders are used for every language, including the default.
1426
- */
1427
- prefixDefaultLocale: boolean;
1428
- /**
1429
- * @name experimental.i18n.routing.strategy
1430
- * @type {"pathname"}
1431
- * @default `"pathname"`
1432
- * @version 3.7.0
1433
- * @description
1434
- *
1435
- * - `"pathanme": The strategy is applied to the pathname of the URLs
1436
- */
1437
- strategy: 'pathname';
1438
- };
1378
+ strategy: 'pathname';
1439
1379
  };
1380
+ };
1381
+ experimental?: {
1382
+ /**
1383
+ * @docs
1384
+ * @name experimental.optimizeHoistedScript
1385
+ * @type {boolean}
1386
+ * @default `false`
1387
+ * @version 2.10.4
1388
+ * @description
1389
+ * Prevents unused components' scripts from being included in a page unexpectedly.
1390
+ * The optimization is best-effort and may inversely miss including the used scripts. Make sure to double-check your built pages
1391
+ * before publishing.
1392
+ * Enable hoisted script analysis optimization by adding the experimental flag:
1393
+ *
1394
+ * ```js
1395
+ * {
1396
+ * experimental: {
1397
+ * optimizeHoistedScript: true,
1398
+ * },
1399
+ * }
1400
+ * ```
1401
+ */
1402
+ optimizeHoistedScript?: boolean;
1440
1403
  /**
1441
1404
  * @docs
1442
1405
  * @name experimental.contentCollectionCache
@@ -2287,16 +2250,16 @@ export interface ClientDirectiveConfig {
2287
2250
  name: string;
2288
2251
  entrypoint: string;
2289
2252
  }
2290
- export interface DevOverlayPlugin {
2253
+ export interface DevToolbarApp {
2291
2254
  id: string;
2292
2255
  name: string;
2293
2256
  icon: Icon;
2294
2257
  init?(canvas: ShadowRoot, eventTarget: EventTarget): void | Promise<void>;
2295
2258
  beforeTogglingOff?(canvas: ShadowRoot): boolean | Promise<boolean>;
2296
2259
  }
2260
+ export type DevOverlayPlugin = DevToolbarApp;
2297
2261
  export type DevOverlayMetadata = Window & typeof globalThis & {
2298
2262
  __astro_dev_overlay__: {
2299
- defaultState: AstroConfig['devOverlay']['defaultState'];
2300
2263
  root: string;
2301
2264
  version: string;
2302
2265
  debugInfo: string;
@@ -1,4 +1,4 @@
1
- import PQueue from 'p-queue';
1
+ import type PQueue from 'p-queue';
2
2
  import type { AstroConfig } from '../../@types/astro.js';
3
3
  import type { BuildPipeline } from '../../core/build/buildPipeline.js';
4
4
  import type { Logger } from '../../core/logger/core.js';
@@ -1,7 +1,6 @@
1
1
  import { dim, green } from "kleur/colors";
2
2
  import fs, { readFileSync } from "node:fs";
3
3
  import { basename, join } from "node:path/posix";
4
- import PQueue from "p-queue";
5
4
  import { getOutDirWithinCwd } from "../../core/build/common.js";
6
5
  import { getTimeStat } from "../../core/build/util.js";
7
6
  import { isRemotePath, prependForwardSlash } from "../../core/path.js";
@@ -1,11 +1,14 @@
1
- import { bold } from "kleur/colors";
1
+ import { bgGreen, black, bold, dim } from "kleur/colors";
2
2
  import { fileURLToPath } from "node:url";
3
3
  import dlv from "dlv";
4
4
  import { resolveConfig } from "../../core/config/config.js";
5
5
  import { createSettings } from "../../core/config/settings.js";
6
6
  import * as msg from "../../core/messages.js";
7
7
  import { DEFAULT_PREFERENCES } from "../../preferences/defaults.js";
8
- import { coerce, isValidKey } from "../../preferences/index.js";
8
+ import {
9
+ coerce,
10
+ isValidKey
11
+ } from "../../preferences/index.js";
9
12
  import { createLoggerFromFlags, flagsToAstroInlineConfig } from "../flags.js";
10
13
  import { flattie } from "flattie";
11
14
  import { formatWithOptions } from "node:util";
@@ -157,12 +160,46 @@ async function resetPreference(settings, key, { location }) {
157
160
  return 1;
158
161
  }
159
162
  async function listPreferences(settings, { location, json }) {
160
- const store = await settings.preferences.getAll({ location });
161
163
  if (json) {
162
- console.log(JSON.stringify(store, null, 2));
164
+ const resolved = await settings.preferences.getAll();
165
+ console.log(JSON.stringify(resolved, null, 2));
163
166
  return 0;
164
167
  }
165
- prettyPrint(store);
168
+ const { global, project, defaults } = await settings.preferences.list({ location });
169
+ const flatProject = flattie(project);
170
+ const flatGlobal = flattie(global);
171
+ const flatUser = Object.assign({}, flatGlobal, flatProject);
172
+ for (let key of Object.keys(flatUser)) {
173
+ if (!isValidKey(key)) {
174
+ delete flatUser[key];
175
+ continue;
176
+ }
177
+ }
178
+ const flatDefault = flattie(defaults);
179
+ const userKeys = Object.keys(flatUser);
180
+ if (userKeys.length > 0) {
181
+ const badge = bgGreen(black(` Your Preferences `));
182
+ const table = formatTable(flatUser, ["Preference", "Value"]);
183
+ console.log(["", badge, table].join("\n"));
184
+ } else {
185
+ const badge = bgGreen(black(` Your Preferences `));
186
+ const message = dim("No preferences set");
187
+ console.log(["", badge, "", message].join("\n"));
188
+ }
189
+ const flatUnset = Object.assign({}, flatDefault);
190
+ for (const key of userKeys) {
191
+ delete flatUnset[key];
192
+ }
193
+ const unsetKeys = Object.keys(flatUnset);
194
+ if (unsetKeys.length > 0) {
195
+ const badge = bgGreen(black(` Default Preferences `));
196
+ const table = formatTable(flatUnset, ["Preference", "Value"]);
197
+ console.log(["", badge, table].join("\n"));
198
+ } else {
199
+ const badge = bgGreen(black(` Default Preferences `));
200
+ const message = dim("All preferences have been set");
201
+ console.log(["", badge, "", message].join("\n"));
202
+ }
166
203
  return 0;
167
204
  }
168
205
  function prettyPrint(value) {
@@ -191,17 +228,23 @@ function formatTable(object, columnLabels) {
191
228
  const colALength = [colA, ...Object.keys(object)].reduce(longest, 0) + 3;
192
229
  const colBLength = [colB, ...Object.values(object)].reduce(longest, 0) + 3;
193
230
  function formatRow(i2, a, b, style = (v) => v.toString()) {
194
- return `${chars.v} ${style(a)} ${space(colALength - a.length - 2)} ${chars.v} ${style(
231
+ return `${dim(chars.v)} ${style(a)} ${space(colALength - a.length - 2)} ${dim(chars.v)} ${style(
195
232
  b
196
- )} ${space(colBLength - b.toString().length - 3)} ${chars.v}`;
197
- }
198
- const top = `${chars.topLeft}${chars.h.repeat(colALength + 1)}${chars.hBottom}${chars.h.repeat(
199
- colBLength
200
- )}${chars.topRight}`;
201
- const bottom = `${chars.bottomLeft}${chars.h.repeat(colALength + 1)}${chars.hTop}${chars.h.repeat(
202
- colBLength
203
- )}${chars.bottomRight}`;
204
- const divider = `${chars.vRightThick}${chars.hThick.repeat(colALength + 1)}${chars.hThickCross}${chars.hThick.repeat(colBLength)}${chars.vLeftThick}`;
233
+ )} ${space(colBLength - b.toString().length - 3)} ${dim(chars.v)}`;
234
+ }
235
+ const top = dim(
236
+ `${chars.topLeft}${chars.h.repeat(colALength + 1)}${chars.hBottom}${chars.h.repeat(
237
+ colBLength
238
+ )}${chars.topRight}`
239
+ );
240
+ const bottom = dim(
241
+ `${chars.bottomLeft}${chars.h.repeat(colALength + 1)}${chars.hTop}${chars.h.repeat(
242
+ colBLength
243
+ )}${chars.bottomRight}`
244
+ );
245
+ const divider = dim(
246
+ `${chars.vRightThick}${chars.hThick.repeat(colALength + 1)}${chars.hThickCross}${chars.hThick.repeat(colBLength)}${chars.vLeftThick}`
247
+ );
205
248
  const rows = [top, formatRow(-1, colA, colB, bold), divider];
206
249
  let i = 0;
207
250
  for (const [key, value] of Object.entries(object)) {
@@ -1,6 +1,6 @@
1
1
  import type { AstroConfig, AstroSettings } from '../../@types/astro.js';
2
2
  import type { SSRManifest } from '../app/types.js';
3
- import { Logger } from '../logger/core.js';
3
+ import type { Logger } from '../logger/core.js';
4
4
  import { Pipeline } from '../pipeline.js';
5
5
  import type { BuildInternals } from './internal.js';
6
6
  import type { PageBuildData, StaticBuildOptions } from './types.js';
@@ -1,6 +1,5 @@
1
1
  import { getOutputDirectory, isServerLikeOutput } from "../../prerender/utils.js";
2
2
  import { BEFORE_HYDRATION_SCRIPT_ID } from "../../vite-plugin-scripts/index.js";
3
- import { Logger } from "../logger/core.js";
4
3
  import { Pipeline } from "../pipeline.js";
5
4
  import { routeIsFallback, routeIsRedirect } from "../redirects/helpers.js";
6
5
  import { createEnvironment } from "../render/index.js";
@@ -200,7 +200,7 @@ async function generatePage(pageData, ssrEntry, builtPaths, pipeline) {
200
200
  pipeline.getManifest().base,
201
201
  pipeline.getManifest().trailingSlash
202
202
  );
203
- if (config.experimental.i18n && i18nMiddleware) {
203
+ if (config.i18n && i18nMiddleware) {
204
204
  if (onRequest) {
205
205
  pipeline.setMiddlewareFunction(sequence(i18nMiddleware, onRequest));
206
206
  } else {
@@ -396,7 +396,7 @@ async function generatePath(pathname, pipeline, gopts, route) {
396
396
  logger: pipeline.getLogger(),
397
397
  ssr
398
398
  });
399
- const i18n = pipeline.getConfig().experimental.i18n;
399
+ const i18n = pipeline.getConfig().i18n;
400
400
  const renderContext = await createRenderContext({
401
401
  pathname,
402
402
  request,
@@ -457,12 +457,12 @@ async function generatePath(pathname, pipeline, gopts, route) {
457
457
  }
458
458
  function createBuildManifest(settings, internals, renderers) {
459
459
  let i18nManifest = void 0;
460
- if (settings.config.experimental.i18n) {
460
+ if (settings.config.i18n) {
461
461
  i18nManifest = {
462
- fallback: settings.config.experimental.i18n.fallback,
463
- routing: settings.config.experimental.i18n.routing,
464
- defaultLocale: settings.config.experimental.i18n.defaultLocale,
465
- locales: settings.config.experimental.i18n.locales
462
+ fallback: settings.config.i18n.fallback,
463
+ routing: settings.config.i18n.routing,
464
+ defaultLocale: settings.config.i18n.defaultLocale,
465
+ locales: settings.config.i18n.locales
466
466
  };
467
467
  }
468
468
  return {
@@ -16,7 +16,7 @@ import { resolveConfig } from "../config/config.js";
16
16
  import { createNodeLogger } from "../config/logging.js";
17
17
  import { createSettings } from "../config/settings.js";
18
18
  import { createVite } from "../create-vite.js";
19
- import { Logger, levels, timerMessage } from "../logger/core.js";
19
+ import { levels, timerMessage } from "../logger/core.js";
20
20
  import { apply as applyPolyfill } from "../polyfill.js";
21
21
  import { RouteCache } from "../render/route-cache.js";
22
22
  import { createRouteManifest } from "../routing/index.js";
@@ -180,12 +180,12 @@ function buildManifest(opts, internals, staticFiles) {
180
180
  entryModules[BEFORE_HYDRATION_SCRIPT_ID] = "";
181
181
  }
182
182
  let i18nManifest = void 0;
183
- if (settings.config.experimental.i18n) {
183
+ if (settings.config.i18n) {
184
184
  i18nManifest = {
185
- fallback: settings.config.experimental.i18n.fallback,
186
- routing: settings.config.experimental.i18n.routing,
187
- locales: settings.config.experimental.i18n.locales,
188
- defaultLocale: settings.config.experimental.i18n.defaultLocale
185
+ fallback: settings.config.i18n.fallback,
186
+ routing: settings.config.i18n.routing,
187
+ locales: settings.config.i18n.locales,
188
+ defaultLocale: settings.config.i18n.defaultLocale
189
189
  };
190
190
  }
191
191
  return {
@@ -19,8 +19,8 @@ function shouldAppendForwardSlash(trailingSlash, buildFormat) {
19
19
  }
20
20
  }
21
21
  function i18nHasFallback(config) {
22
- if (config.experimental.i18n && config.experimental.i18n.fallback) {
23
- return Object.keys(config.experimental.i18n.fallback).length > 0;
22
+ if (config.i18n && config.i18n.fallback) {
23
+ return Object.keys(config.i18n.fallback).length > 0;
24
24
  }
25
25
  return false;
26
26
  }
@@ -1,7 +1,7 @@
1
1
  import { transform } from "@astrojs/compiler";
2
2
  import { fileURLToPath } from "node:url";
3
3
  import { normalizePath } from "vite";
4
- import { AggregateError, AstroError, CompilerError } from "../errors/errors.js";
4
+ import { AggregateError, CompilerError } from "../errors/errors.js";
5
5
  import { AstroErrorData } from "../errors/index.js";
6
6
  import { resolvePath } from "../util.js";
7
7
  import { createStylePreprocessor } from "./style.js";
@@ -25,7 +25,7 @@ async function compile({
25
25
  scopedStyleStrategy: astroConfig.scopedStyleStrategy,
26
26
  resultScopedSlot: true,
27
27
  transitionsAnimationURL: "astro/components/viewtransitions.css",
28
- annotateSourceFile: !viteConfig.isProduction && astroConfig.devOverlay && astroConfig.devOverlay.enabled,
28
+ annotateSourceFile: viteConfig.command === "serve" && astroConfig.devToolbar && astroConfig.devToolbar.enabled,
29
29
  preprocessStyle: createStylePreprocessor({
30
30
  filename,
31
31
  viteConfig,