astro 4.7.1 → 4.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/client.d.ts +1 -0
  2. package/content-module.template.mjs +2 -0
  3. package/dist/@types/astro.d.ts +219 -3
  4. package/dist/actions/consts.d.ts +3 -0
  5. package/dist/actions/consts.js +8 -0
  6. package/dist/actions/index.d.ts +2 -0
  7. package/dist/actions/index.js +72 -0
  8. package/dist/actions/runtime/middleware.d.ts +7 -0
  9. package/dist/actions/runtime/middleware.js +38 -0
  10. package/dist/actions/runtime/route.d.ts +2 -0
  11. package/dist/actions/runtime/route.js +37 -0
  12. package/dist/actions/runtime/store.d.ts +6 -0
  13. package/dist/actions/runtime/store.js +18 -0
  14. package/dist/actions/runtime/utils.d.ts +4 -0
  15. package/dist/actions/runtime/utils.js +23 -0
  16. package/dist/actions/runtime/virtual/client.d.ts +4 -0
  17. package/dist/actions/runtime/virtual/client.js +20 -0
  18. package/dist/actions/runtime/virtual/server.d.ts +21 -0
  19. package/dist/actions/runtime/virtual/server.js +98 -0
  20. package/dist/actions/runtime/virtual/shared.d.ts +37 -0
  21. package/dist/actions/runtime/virtual/shared.js +104 -0
  22. package/dist/actions/utils.d.ts +2 -0
  23. package/dist/actions/utils.js +18 -0
  24. package/dist/assets/build/generate.js +1 -1
  25. package/dist/assets/internal.js +1 -2
  26. package/dist/assets/services/service.js +2 -4
  27. package/dist/assets/services/sharp.js +2 -4
  28. package/dist/assets/services/squoosh.js +2 -4
  29. package/dist/assets/services/vendor/squoosh/avif/avif_node_dec.js +34 -68
  30. package/dist/assets/services/vendor/squoosh/avif/avif_node_enc.js +39 -78
  31. package/dist/assets/services/vendor/squoosh/mozjpeg/mozjpeg_node_dec.js +32 -64
  32. package/dist/assets/services/vendor/squoosh/mozjpeg/mozjpeg_node_enc.js +32 -64
  33. package/dist/assets/services/vendor/squoosh/png/squoosh_png.js +2 -4
  34. package/dist/assets/services/vendor/squoosh/webp/webp_node_dec.js +29 -58
  35. package/dist/assets/services/vendor/squoosh/webp/webp_node_enc.js +29 -58
  36. package/dist/assets/utils/getAssetsPrefix.js +2 -4
  37. package/dist/assets/utils/remotePattern.js +1 -2
  38. package/dist/assets/utils/remoteProbe.js +1 -2
  39. package/dist/assets/utils/vendor/image-size/types/cur.js +1 -2
  40. package/dist/assets/utils/vendor/image-size/types/icns.js +1 -2
  41. package/dist/assets/utils/vendor/image-size/types/ico.js +2 -4
  42. package/dist/assets/utils/vendor/image-size/types/jp2.js +2 -4
  43. package/dist/assets/utils/vendor/image-size/types/utils.js +4 -8
  44. package/dist/assets/vite-plugin-assets.js +1 -1
  45. package/dist/cli/add/babel.d.ts +1 -1
  46. package/dist/cli/add/imports.js +4 -8
  47. package/dist/cli/add/index.js +23 -46
  48. package/dist/cli/add/wrapper.js +1 -2
  49. package/dist/cli/index.js +1 -2
  50. package/dist/cli/info/index.js +1 -2
  51. package/dist/cli/install-package.js +3 -6
  52. package/dist/cli/throw-and-exit.js +1 -2
  53. package/dist/config/index.d.ts +2 -2
  54. package/dist/config/index.js +2 -2
  55. package/dist/content/index.d.ts +1 -1
  56. package/dist/content/index.js +1 -7
  57. package/dist/content/runtime.d.ts +2 -1
  58. package/dist/content/runtime.js +11 -20
  59. package/dist/content/server-listeners.js +5 -10
  60. package/dist/content/types-generator.js +5 -10
  61. package/dist/content/utils.d.ts +0 -4
  62. package/dist/content/utils.js +4 -15
  63. package/dist/content/vite-plugin-content-assets.d.ts +1 -1
  64. package/dist/content/vite-plugin-content-assets.js +14 -47
  65. package/dist/content/vite-plugin-content-imports.js +6 -11
  66. package/dist/content/vite-plugin-content-virtual-mod.js +7 -14
  67. package/dist/core/app/index.js +11 -46
  68. package/dist/core/app/node.js +4 -3
  69. package/dist/core/app/pipeline.d.ts +7 -2
  70. package/dist/core/app/pipeline.js +70 -2
  71. package/dist/core/app/types.d.ts +1 -0
  72. package/dist/core/base-pipeline.d.ts +16 -1
  73. package/dist/core/build/generate.js +15 -61
  74. package/dist/core/build/index.js +2 -4
  75. package/dist/core/build/internal.d.ts +39 -9
  76. package/dist/core/build/internal.js +43 -54
  77. package/dist/core/build/page-data.js +6 -6
  78. package/dist/core/build/pipeline.d.ts +7 -3
  79. package/dist/core/build/pipeline.js +134 -23
  80. package/dist/core/build/plugins/plugin-analyzer.js +11 -32
  81. package/dist/core/build/plugins/plugin-content.d.ts +1 -0
  82. package/dist/core/build/plugins/plugin-content.js +34 -32
  83. package/dist/core/build/plugins/plugin-css.js +23 -51
  84. package/dist/core/build/plugins/plugin-manifest.js +7 -8
  85. package/dist/core/build/plugins/plugin-pages.d.ts +0 -1
  86. package/dist/core/build/plugins/plugin-pages.js +10 -12
  87. package/dist/core/build/plugins/plugin-ssr.js +15 -13
  88. package/dist/core/build/plugins/util.d.ts +26 -11
  89. package/dist/core/build/plugins/util.js +22 -6
  90. package/dist/core/build/static-build.js +30 -25
  91. package/dist/core/build/types.d.ts +6 -6
  92. package/dist/core/client-directive/build.js +1 -2
  93. package/dist/core/config/config.js +2 -7
  94. package/dist/core/config/logging.js +1 -2
  95. package/dist/core/config/schema.d.ts +92 -60
  96. package/dist/core/config/schema.js +6 -2
  97. package/dist/core/config/settings.js +1 -2
  98. package/dist/core/config/timer.js +4 -8
  99. package/dist/core/constants.js +1 -1
  100. package/dist/core/cookies/cookies.js +3 -6
  101. package/dist/core/dev/dev.js +1 -1
  102. package/dist/core/dev/restart.js +1 -2
  103. package/dist/core/errors/errors-data.d.ts +24 -0
  104. package/dist/core/errors/errors-data.js +13 -2
  105. package/dist/core/errors/errors.js +1 -2
  106. package/dist/core/errors/overlay.js +1 -2
  107. package/dist/core/errors/printer.js +2 -4
  108. package/dist/core/errors/zod-error-map.js +2 -4
  109. package/dist/core/fs/index.js +2 -4
  110. package/dist/core/logger/vite.js +9 -18
  111. package/dist/core/messages.js +2 -2
  112. package/dist/core/middleware/callMiddleware.d.ts +3 -2
  113. package/dist/core/middleware/callMiddleware.js +13 -3
  114. package/dist/core/middleware/index.js +12 -8
  115. package/dist/core/middleware/sequence.js +22 -4
  116. package/dist/core/module-loader/vite.js +1 -2
  117. package/dist/core/render/params-and-props.js +2 -4
  118. package/dist/core/render/slots.js +4 -8
  119. package/dist/core/render-context.d.ts +15 -5
  120. package/dist/core/render-context.js +134 -28
  121. package/dist/core/request.js +1 -2
  122. package/dist/core/routing/manifest/create.js +3 -6
  123. package/dist/core/sync/index.js +10 -3
  124. package/dist/core/util.d.ts +2 -0
  125. package/dist/core/util.js +18 -19
  126. package/dist/i18n/index.js +2 -4
  127. package/dist/i18n/middleware.js +1 -2
  128. package/dist/i18n/utils.js +1 -2
  129. package/dist/i18n/vite-plugin-i18n.js +1 -2
  130. package/dist/integrations/hooks.js +5 -1
  131. package/dist/jsx/babel.d.ts +3 -0
  132. package/dist/jsx/babel.js +9 -18
  133. package/dist/jsx/rehype.d.ts +11 -0
  134. package/dist/jsx/rehype.js +197 -0
  135. package/dist/jsx/server.js +20 -14
  136. package/dist/jsx/transform-options.d.ts +3 -0
  137. package/dist/jsx-runtime/index.js +8 -16
  138. package/dist/preferences/index.js +3 -6
  139. package/dist/preferences/store.js +3 -6
  140. package/dist/prefetch/index.js +8 -16
  141. package/dist/prefetch/vite-plugin-prefetch.js +2 -4
  142. package/dist/prerender/metadata.js +1 -2
  143. package/dist/prerender/routing.js +1 -1
  144. package/dist/prerender/utils.d.ts +0 -1
  145. package/dist/prerender/utils.js +2 -5
  146. package/dist/runtime/client/dev-toolbar/apps/astro.js +5 -10
  147. package/dist/runtime/client/dev-toolbar/apps/audit/index.js +5 -10
  148. package/dist/runtime/client/dev-toolbar/apps/audit/rules/a11y.js +45 -90
  149. package/dist/runtime/client/dev-toolbar/apps/audit/rules/index.js +1 -2
  150. package/dist/runtime/client/dev-toolbar/apps/audit/rules/perf.js +16 -32
  151. package/dist/runtime/client/dev-toolbar/apps/audit/ui/audit-list-window.js +2 -4
  152. package/dist/runtime/client/dev-toolbar/apps/audit/ui/audit-ui.js +3 -6
  153. package/dist/runtime/client/dev-toolbar/apps/utils/highlight.js +1 -2
  154. package/dist/runtime/client/dev-toolbar/apps/utils/window.js +4 -8
  155. package/dist/runtime/client/dev-toolbar/entrypoint.js +8 -11
  156. package/dist/runtime/client/dev-toolbar/helpers.js +2 -4
  157. package/dist/runtime/client/dev-toolbar/toolbar.js +11 -22
  158. package/dist/runtime/client/dev-toolbar/ui-library/badge.js +1 -2
  159. package/dist/runtime/client/dev-toolbar/ui-library/button.d.ts +5 -0
  160. package/dist/runtime/client/dev-toolbar/ui-library/button.js +26 -5
  161. package/dist/runtime/client/dev-toolbar/ui-library/index.d.ts +1 -0
  162. package/dist/runtime/client/dev-toolbar/ui-library/index.js +2 -0
  163. package/dist/runtime/client/dev-toolbar/ui-library/radio-checkbox.d.ts +13 -0
  164. package/dist/runtime/client/dev-toolbar/ui-library/radio-checkbox.js +109 -0
  165. package/dist/runtime/client/visible.js +1 -2
  166. package/dist/runtime/server/astro-component.js +2 -4
  167. package/dist/runtime/server/astro-island.js +7 -14
  168. package/dist/runtime/server/astro-island.prebuilt-dev.d.ts +1 -1
  169. package/dist/runtime/server/astro-island.prebuilt-dev.js +1 -1
  170. package/dist/runtime/server/astro-island.prebuilt.d.ts +1 -1
  171. package/dist/runtime/server/astro-island.prebuilt.js +1 -1
  172. package/dist/runtime/server/index.js +3 -6
  173. package/dist/runtime/server/jsx.js +1 -2
  174. package/dist/runtime/server/render/any.js +1 -2
  175. package/dist/runtime/server/render/astro/instance.js +1 -2
  176. package/dist/runtime/server/render/astro/render.js +5 -10
  177. package/dist/runtime/server/render/component.js +6 -11
  178. package/dist/runtime/server/render/dom.js +1 -2
  179. package/dist/runtime/server/render/page.js +1 -2
  180. package/dist/runtime/server/render/script.js +1 -2
  181. package/dist/runtime/server/render/slot.js +1 -2
  182. package/dist/runtime/server/render/tags.js +2 -4
  183. package/dist/runtime/server/render/util.js +2 -4
  184. package/dist/runtime/server/shorthash.js +1 -2
  185. package/dist/runtime/server/transition.js +4 -8
  186. package/dist/runtime/server/util.js +1 -2
  187. package/dist/transitions/events.d.ts +3 -3
  188. package/dist/transitions/events.js +5 -4
  189. package/dist/transitions/router.js +22 -113
  190. package/dist/transitions/swap-functions.d.ts +12 -0
  191. package/dist/transitions/swap-functions.js +105 -0
  192. package/dist/vite-plugin-astro/compile.js +1 -2
  193. package/dist/vite-plugin-astro/hmr.js +5 -10
  194. package/dist/vite-plugin-astro/index.js +2 -4
  195. package/dist/vite-plugin-astro-server/pipeline.d.ts +8 -3
  196. package/dist/vite-plugin-astro-server/pipeline.js +59 -11
  197. package/dist/vite-plugin-astro-server/plugin.js +6 -6
  198. package/dist/vite-plugin-astro-server/response.js +1 -2
  199. package/dist/vite-plugin-astro-server/route.js +36 -42
  200. package/dist/vite-plugin-astro-server/vite.js +1 -2
  201. package/dist/vite-plugin-config-alias/index.js +7 -14
  202. package/dist/vite-plugin-head/index.js +3 -6
  203. package/dist/vite-plugin-html/index.js +1 -2
  204. package/dist/vite-plugin-html/transform/escape.js +2 -4
  205. package/dist/vite-plugin-html/transform/slots.js +1 -2
  206. package/dist/vite-plugin-html/transform/utils.js +1 -2
  207. package/dist/vite-plugin-inject-env-ts/index.js +37 -11
  208. package/dist/vite-plugin-integrations-container/index.js +3 -6
  209. package/dist/vite-plugin-load-fallback/index.js +1 -2
  210. package/dist/vite-plugin-markdown/index.js +1 -2
  211. package/dist/vite-plugin-mdx/index.d.ts +3 -0
  212. package/dist/vite-plugin-mdx/tag.d.ts +2 -0
  213. package/dist/vite-plugin-mdx/tag.js +3 -6
  214. package/dist/vite-plugin-mdx/transform-jsx.d.ts +3 -0
  215. package/dist/vite-plugin-mdx/transform-jsx.js +1 -2
  216. package/dist/vite-plugin-scanner/index.js +4 -6
  217. package/dist/vite-plugin-scanner/scan.js +2 -4
  218. package/dist/vite-plugin-scripts/page-ssr.js +3 -6
  219. package/package.json +18 -14
  220. package/templates/actions.mjs +61 -0
  221. package/types/actions.d.ts +3 -0
  222. package/types/content.d.ts +2 -2
@@ -75,9 +75,9 @@ export declare const AstroConfigSchema: z.ZodObject<{
75
75
  redirects: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
76
76
  inlineStylesheets: z.ZodDefault<z.ZodOptional<z.ZodEnum<["always", "auto", "never"]>>>;
77
77
  }, "strip", z.ZodTypeAny, {
78
+ server: URL;
78
79
  format: "file" | "directory" | "preserve";
79
80
  client: URL;
80
- server: URL;
81
81
  assets: string;
82
82
  serverEntry: string;
83
83
  redirects: boolean;
@@ -86,9 +86,9 @@ export declare const AstroConfigSchema: z.ZodObject<{
86
86
  fallback: string;
87
87
  } & Record<string, string>) | undefined;
88
88
  }, {
89
+ server?: string | undefined;
89
90
  format?: "file" | "directory" | "preserve" | undefined;
90
91
  client?: string | undefined;
91
- server?: string | undefined;
92
92
  assets?: string | undefined;
93
93
  serverEntry?: string | undefined;
94
94
  redirects?: boolean | undefined;
@@ -337,6 +337,7 @@ export declare const AstroConfigSchema: z.ZodObject<{
337
337
  } | undefined;
338
338
  } | undefined>>;
339
339
  experimental: z.ZodDefault<z.ZodObject<{
340
+ actions: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
340
341
  directRenderScript: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
341
342
  contentCollectionCache: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
342
343
  contentCollectionJsonSchema: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
@@ -360,25 +361,30 @@ export declare const AstroConfigSchema: z.ZodObject<{
360
361
  } | undefined;
361
362
  }>>>;
362
363
  i18nDomains: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
364
+ rewriting: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
363
365
  }, "strict", z.ZodTypeAny, {
366
+ actions: boolean;
364
367
  directRenderScript: boolean;
365
368
  contentCollectionCache: boolean;
366
369
  contentCollectionJsonSchema: boolean;
367
370
  clientPrerender: boolean;
368
371
  globalRoutePriority: boolean;
369
372
  i18nDomains: boolean;
373
+ rewriting: boolean;
370
374
  security: {
371
375
  csrfProtection: {
372
376
  origin: boolean;
373
377
  };
374
378
  };
375
379
  }, {
380
+ actions?: boolean | undefined;
376
381
  directRenderScript?: boolean | undefined;
377
382
  contentCollectionCache?: boolean | undefined;
378
383
  contentCollectionJsonSchema?: boolean | undefined;
379
384
  clientPrerender?: boolean | undefined;
380
385
  globalRoutePriority?: boolean | undefined;
381
386
  i18nDomains?: boolean | undefined;
387
+ rewriting?: boolean | undefined;
382
388
  security?: {
383
389
  csrfProtection?: {
384
390
  origin?: boolean | undefined;
@@ -387,6 +393,12 @@ export declare const AstroConfigSchema: z.ZodObject<{
387
393
  }>>;
388
394
  legacy: z.ZodDefault<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
389
395
  }, "strip", z.ZodTypeAny, {
396
+ server: {
397
+ host: string | boolean;
398
+ port: number;
399
+ open: string | boolean;
400
+ headers?: OutgoingHttpHeaders | undefined;
401
+ };
390
402
  image: {
391
403
  service: {
392
404
  entrypoint: string;
@@ -401,12 +413,6 @@ export declare const AstroConfigSchema: z.ZodObject<{
401
413
  }[];
402
414
  endpoint?: string | undefined;
403
415
  };
404
- server: {
405
- host: string | boolean;
406
- port: number;
407
- open: string | boolean;
408
- headers?: OutgoingHttpHeaders | undefined;
409
- };
410
416
  redirects: Record<string, string | {
411
417
  status: 300 | 301 | 302 | 303 | 304 | 307 | 308;
412
418
  destination: string;
@@ -428,9 +434,9 @@ export declare const AstroConfigSchema: z.ZodObject<{
428
434
  };
429
435
  }[];
430
436
  build: {
437
+ server: URL;
431
438
  format: "file" | "directory" | "preserve";
432
439
  client: URL;
433
- server: URL;
434
440
  assets: string;
435
441
  serverEntry: string;
436
442
  redirects: boolean;
@@ -459,12 +465,14 @@ export declare const AstroConfigSchema: z.ZodObject<{
459
465
  };
460
466
  vite: ViteUserConfig;
461
467
  experimental: {
468
+ actions: boolean;
462
469
  directRenderScript: boolean;
463
470
  contentCollectionCache: boolean;
464
471
  contentCollectionJsonSchema: boolean;
465
472
  clientPrerender: boolean;
466
473
  globalRoutePriority: boolean;
467
474
  i18nDomains: boolean;
475
+ rewriting: boolean;
468
476
  security: {
469
477
  csrfProtection: {
470
478
  origin: boolean;
@@ -497,6 +505,8 @@ export declare const AstroConfigSchema: z.ZodObject<{
497
505
  domains?: Record<string, string> | undefined;
498
506
  } | undefined;
499
507
  }, {
508
+ site?: string | undefined;
509
+ server?: unknown;
500
510
  image?: {
501
511
  endpoint?: string | undefined;
502
512
  service?: {
@@ -511,7 +521,6 @@ export declare const AstroConfigSchema: z.ZodObject<{
511
521
  pathname?: string | undefined;
512
522
  }[] | undefined;
513
523
  } | undefined;
514
- server?: unknown;
515
524
  redirects?: Record<string, string | {
516
525
  status: 300 | 301 | 302 | 303 | 304 | 307 | 308;
517
526
  destination: string;
@@ -521,7 +530,6 @@ export declare const AstroConfigSchema: z.ZodObject<{
521
530
  publicDir?: string | undefined;
522
531
  outDir?: string | undefined;
523
532
  cacheDir?: string | undefined;
524
- site?: string | undefined;
525
533
  compressHTML?: boolean | undefined;
526
534
  base?: string | undefined;
527
535
  trailingSlash?: "ignore" | "always" | "never" | undefined;
@@ -533,9 +541,9 @@ export declare const AstroConfigSchema: z.ZodObject<{
533
541
  } | undefined;
534
542
  integrations?: unknown;
535
543
  build?: {
544
+ server?: string | undefined;
536
545
  format?: "file" | "directory" | "preserve" | undefined;
537
546
  client?: string | undefined;
538
- server?: string | undefined;
539
547
  assets?: string | undefined;
540
548
  serverEntry?: string | undefined;
541
549
  redirects?: boolean | undefined;
@@ -581,12 +589,14 @@ export declare const AstroConfigSchema: z.ZodObject<{
581
589
  } | undefined;
582
590
  } | undefined;
583
591
  experimental?: {
592
+ actions?: boolean | undefined;
584
593
  directRenderScript?: boolean | undefined;
585
594
  contentCollectionCache?: boolean | undefined;
586
595
  contentCollectionJsonSchema?: boolean | undefined;
587
596
  clientPrerender?: boolean | undefined;
588
597
  globalRoutePriority?: boolean | undefined;
589
598
  i18nDomains?: boolean | undefined;
599
+ rewriting?: boolean | undefined;
590
600
  security?: {
591
601
  csrfProtection?: {
592
602
  origin?: boolean | undefined;
@@ -657,9 +667,9 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
657
667
  redirects: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
658
668
  inlineStylesheets: z.ZodDefault<z.ZodOptional<z.ZodEnum<["always", "auto", "never"]>>>;
659
669
  }, "strip", z.ZodTypeAny, {
670
+ server: URL;
660
671
  format: "file" | "directory" | "preserve";
661
672
  client: URL;
662
- server: URL;
663
673
  assets: string;
664
674
  serverEntry: string;
665
675
  redirects: boolean;
@@ -668,9 +678,9 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
668
678
  fallback: string;
669
679
  } & Record<string, string>) | undefined;
670
680
  }, {
681
+ server?: string | undefined;
671
682
  format?: "file" | "directory" | "preserve" | undefined;
672
683
  client?: string | undefined;
673
- server?: string | undefined;
674
684
  assets?: string | undefined;
675
685
  serverEntry?: string | undefined;
676
686
  redirects?: boolean | undefined;
@@ -919,6 +929,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
919
929
  } | undefined;
920
930
  } | undefined>>;
921
931
  experimental: z.ZodDefault<z.ZodObject<{
932
+ actions: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
922
933
  directRenderScript: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
923
934
  contentCollectionCache: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
924
935
  contentCollectionJsonSchema: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
@@ -942,25 +953,30 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
942
953
  } | undefined;
943
954
  }>>>;
944
955
  i18nDomains: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
956
+ rewriting: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
945
957
  }, "strict", z.ZodTypeAny, {
958
+ actions: boolean;
946
959
  directRenderScript: boolean;
947
960
  contentCollectionCache: boolean;
948
961
  contentCollectionJsonSchema: boolean;
949
962
  clientPrerender: boolean;
950
963
  globalRoutePriority: boolean;
951
964
  i18nDomains: boolean;
965
+ rewriting: boolean;
952
966
  security: {
953
967
  csrfProtection: {
954
968
  origin: boolean;
955
969
  };
956
970
  };
957
971
  }, {
972
+ actions?: boolean | undefined;
958
973
  directRenderScript?: boolean | undefined;
959
974
  contentCollectionCache?: boolean | undefined;
960
975
  contentCollectionJsonSchema?: boolean | undefined;
961
976
  clientPrerender?: boolean | undefined;
962
977
  globalRoutePriority?: boolean | undefined;
963
978
  i18nDomains?: boolean | undefined;
979
+ rewriting?: boolean | undefined;
964
980
  security?: {
965
981
  csrfProtection?: {
966
982
  origin?: boolean | undefined;
@@ -995,9 +1011,9 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
995
1011
  redirects: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
996
1012
  inlineStylesheets: z.ZodDefault<z.ZodOptional<z.ZodEnum<["always", "auto", "never"]>>>;
997
1013
  }, "strip", z.ZodTypeAny, {
1014
+ server: import("url").URL;
998
1015
  format: "file" | "directory" | "preserve";
999
1016
  client: import("url").URL;
1000
- server: import("url").URL;
1001
1017
  assets: string;
1002
1018
  serverEntry: string;
1003
1019
  redirects: boolean;
@@ -1006,9 +1022,9 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1006
1022
  fallback: string;
1007
1023
  } & Record<string, string>) | undefined;
1008
1024
  }, {
1025
+ server?: string | undefined;
1009
1026
  format?: "file" | "directory" | "preserve" | undefined;
1010
1027
  client?: string | undefined;
1011
- server?: string | undefined;
1012
1028
  assets?: string | undefined;
1013
1029
  serverEntry?: string | undefined;
1014
1030
  redirects?: boolean | undefined;
@@ -1043,6 +1059,13 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1043
1059
  headers?: OutgoingHttpHeaders | undefined;
1044
1060
  }, unknown>;
1045
1061
  }>, "strip", z.ZodTypeAny, {
1062
+ server: {
1063
+ host: string | boolean;
1064
+ port: number;
1065
+ open: string | boolean;
1066
+ streaming: boolean;
1067
+ headers?: OutgoingHttpHeaders | undefined;
1068
+ };
1046
1069
  image: {
1047
1070
  service: {
1048
1071
  entrypoint: string;
@@ -1057,13 +1080,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1057
1080
  }[];
1058
1081
  endpoint?: string | undefined;
1059
1082
  };
1060
- server: {
1061
- host: string | boolean;
1062
- port: number;
1063
- open: string | boolean;
1064
- streaming: boolean;
1065
- headers?: OutgoingHttpHeaders | undefined;
1066
- };
1067
1083
  redirects: Record<string, string | {
1068
1084
  status: 300 | 301 | 302 | 303 | 304 | 307 | 308;
1069
1085
  destination: string;
@@ -1085,9 +1101,9 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1085
1101
  };
1086
1102
  }[];
1087
1103
  build: {
1104
+ server: import("url").URL;
1088
1105
  format: "file" | "directory" | "preserve";
1089
1106
  client: import("url").URL;
1090
- server: import("url").URL;
1091
1107
  assets: string;
1092
1108
  serverEntry: string;
1093
1109
  redirects: boolean;
@@ -1116,12 +1132,14 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1116
1132
  };
1117
1133
  vite: ViteUserConfig;
1118
1134
  experimental: {
1135
+ actions: boolean;
1119
1136
  directRenderScript: boolean;
1120
1137
  contentCollectionCache: boolean;
1121
1138
  contentCollectionJsonSchema: boolean;
1122
1139
  clientPrerender: boolean;
1123
1140
  globalRoutePriority: boolean;
1124
1141
  i18nDomains: boolean;
1142
+ rewriting: boolean;
1125
1143
  security: {
1126
1144
  csrfProtection: {
1127
1145
  origin: boolean;
@@ -1154,6 +1172,8 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1154
1172
  domains?: Record<string, string> | undefined;
1155
1173
  } | undefined;
1156
1174
  }, {
1175
+ site?: string | undefined;
1176
+ server?: unknown;
1157
1177
  image?: {
1158
1178
  endpoint?: string | undefined;
1159
1179
  service?: {
@@ -1168,7 +1188,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1168
1188
  pathname?: string | undefined;
1169
1189
  }[] | undefined;
1170
1190
  } | undefined;
1171
- server?: unknown;
1172
1191
  redirects?: Record<string, string | {
1173
1192
  status: 300 | 301 | 302 | 303 | 304 | 307 | 308;
1174
1193
  destination: string;
@@ -1178,7 +1197,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1178
1197
  publicDir?: string | undefined;
1179
1198
  outDir?: string | undefined;
1180
1199
  cacheDir?: string | undefined;
1181
- site?: string | undefined;
1182
1200
  compressHTML?: boolean | undefined;
1183
1201
  base?: string | undefined;
1184
1202
  trailingSlash?: "ignore" | "always" | "never" | undefined;
@@ -1190,9 +1208,9 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1190
1208
  } | undefined;
1191
1209
  integrations?: unknown;
1192
1210
  build?: {
1211
+ server?: string | undefined;
1193
1212
  format?: "file" | "directory" | "preserve" | undefined;
1194
1213
  client?: string | undefined;
1195
- server?: string | undefined;
1196
1214
  assets?: string | undefined;
1197
1215
  serverEntry?: string | undefined;
1198
1216
  redirects?: boolean | undefined;
@@ -1238,12 +1256,14 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1238
1256
  } | undefined;
1239
1257
  } | undefined;
1240
1258
  experimental?: {
1259
+ actions?: boolean | undefined;
1241
1260
  directRenderScript?: boolean | undefined;
1242
1261
  contentCollectionCache?: boolean | undefined;
1243
1262
  contentCollectionJsonSchema?: boolean | undefined;
1244
1263
  clientPrerender?: boolean | undefined;
1245
1264
  globalRoutePriority?: boolean | undefined;
1246
1265
  i18nDomains?: boolean | undefined;
1266
+ rewriting?: boolean | undefined;
1247
1267
  security?: {
1248
1268
  csrfProtection?: {
1249
1269
  origin?: boolean | undefined;
@@ -1252,6 +1272,13 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1252
1272
  } | undefined;
1253
1273
  legacy?: {} | undefined;
1254
1274
  }>, {
1275
+ server: {
1276
+ host: string | boolean;
1277
+ port: number;
1278
+ open: string | boolean;
1279
+ streaming: boolean;
1280
+ headers?: OutgoingHttpHeaders | undefined;
1281
+ };
1255
1282
  image: {
1256
1283
  service: {
1257
1284
  entrypoint: string;
@@ -1266,13 +1293,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1266
1293
  }[];
1267
1294
  endpoint?: string | undefined;
1268
1295
  };
1269
- server: {
1270
- host: string | boolean;
1271
- port: number;
1272
- open: string | boolean;
1273
- streaming: boolean;
1274
- headers?: OutgoingHttpHeaders | undefined;
1275
- };
1276
1296
  redirects: Record<string, string | {
1277
1297
  status: 300 | 301 | 302 | 303 | 304 | 307 | 308;
1278
1298
  destination: string;
@@ -1294,9 +1314,9 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1294
1314
  };
1295
1315
  }[];
1296
1316
  build: {
1317
+ server: import("url").URL;
1297
1318
  format: "file" | "directory" | "preserve";
1298
1319
  client: import("url").URL;
1299
- server: import("url").URL;
1300
1320
  assets: string;
1301
1321
  serverEntry: string;
1302
1322
  redirects: boolean;
@@ -1325,12 +1345,14 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1325
1345
  };
1326
1346
  vite: ViteUserConfig;
1327
1347
  experimental: {
1348
+ actions: boolean;
1328
1349
  directRenderScript: boolean;
1329
1350
  contentCollectionCache: boolean;
1330
1351
  contentCollectionJsonSchema: boolean;
1331
1352
  clientPrerender: boolean;
1332
1353
  globalRoutePriority: boolean;
1333
1354
  i18nDomains: boolean;
1355
+ rewriting: boolean;
1334
1356
  security: {
1335
1357
  csrfProtection: {
1336
1358
  origin: boolean;
@@ -1363,6 +1385,8 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1363
1385
  domains?: Record<string, string> | undefined;
1364
1386
  } | undefined;
1365
1387
  }, {
1388
+ site?: string | undefined;
1389
+ server?: unknown;
1366
1390
  image?: {
1367
1391
  endpoint?: string | undefined;
1368
1392
  service?: {
@@ -1377,7 +1401,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1377
1401
  pathname?: string | undefined;
1378
1402
  }[] | undefined;
1379
1403
  } | undefined;
1380
- server?: unknown;
1381
1404
  redirects?: Record<string, string | {
1382
1405
  status: 300 | 301 | 302 | 303 | 304 | 307 | 308;
1383
1406
  destination: string;
@@ -1387,7 +1410,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1387
1410
  publicDir?: string | undefined;
1388
1411
  outDir?: string | undefined;
1389
1412
  cacheDir?: string | undefined;
1390
- site?: string | undefined;
1391
1413
  compressHTML?: boolean | undefined;
1392
1414
  base?: string | undefined;
1393
1415
  trailingSlash?: "ignore" | "always" | "never" | undefined;
@@ -1399,9 +1421,9 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1399
1421
  } | undefined;
1400
1422
  integrations?: unknown;
1401
1423
  build?: {
1424
+ server?: string | undefined;
1402
1425
  format?: "file" | "directory" | "preserve" | undefined;
1403
1426
  client?: string | undefined;
1404
- server?: string | undefined;
1405
1427
  assets?: string | undefined;
1406
1428
  serverEntry?: string | undefined;
1407
1429
  redirects?: boolean | undefined;
@@ -1447,12 +1469,14 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1447
1469
  } | undefined;
1448
1470
  } | undefined;
1449
1471
  experimental?: {
1472
+ actions?: boolean | undefined;
1450
1473
  directRenderScript?: boolean | undefined;
1451
1474
  contentCollectionCache?: boolean | undefined;
1452
1475
  contentCollectionJsonSchema?: boolean | undefined;
1453
1476
  clientPrerender?: boolean | undefined;
1454
1477
  globalRoutePriority?: boolean | undefined;
1455
1478
  i18nDomains?: boolean | undefined;
1479
+ rewriting?: boolean | undefined;
1456
1480
  security?: {
1457
1481
  csrfProtection?: {
1458
1482
  origin?: boolean | undefined;
@@ -1461,6 +1485,13 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1461
1485
  } | undefined;
1462
1486
  legacy?: {} | undefined;
1463
1487
  }>, {
1488
+ server: {
1489
+ host: string | boolean;
1490
+ port: number;
1491
+ open: string | boolean;
1492
+ streaming: boolean;
1493
+ headers?: OutgoingHttpHeaders | undefined;
1494
+ };
1464
1495
  image: {
1465
1496
  service: {
1466
1497
  entrypoint: string;
@@ -1475,13 +1506,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1475
1506
  }[];
1476
1507
  endpoint?: string | undefined;
1477
1508
  };
1478
- server: {
1479
- host: string | boolean;
1480
- port: number;
1481
- open: string | boolean;
1482
- streaming: boolean;
1483
- headers?: OutgoingHttpHeaders | undefined;
1484
- };
1485
1509
  redirects: Record<string, string | {
1486
1510
  status: 300 | 301 | 302 | 303 | 304 | 307 | 308;
1487
1511
  destination: string;
@@ -1503,9 +1527,9 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1503
1527
  };
1504
1528
  }[];
1505
1529
  build: {
1530
+ server: import("url").URL;
1506
1531
  format: "file" | "directory" | "preserve";
1507
1532
  client: import("url").URL;
1508
- server: import("url").URL;
1509
1533
  assets: string;
1510
1534
  serverEntry: string;
1511
1535
  redirects: boolean;
@@ -1534,12 +1558,14 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1534
1558
  };
1535
1559
  vite: ViteUserConfig;
1536
1560
  experimental: {
1561
+ actions: boolean;
1537
1562
  directRenderScript: boolean;
1538
1563
  contentCollectionCache: boolean;
1539
1564
  contentCollectionJsonSchema: boolean;
1540
1565
  clientPrerender: boolean;
1541
1566
  globalRoutePriority: boolean;
1542
1567
  i18nDomains: boolean;
1568
+ rewriting: boolean;
1543
1569
  security: {
1544
1570
  csrfProtection: {
1545
1571
  origin: boolean;
@@ -1572,6 +1598,8 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1572
1598
  domains?: Record<string, string> | undefined;
1573
1599
  } | undefined;
1574
1600
  }, {
1601
+ site?: string | undefined;
1602
+ server?: unknown;
1575
1603
  image?: {
1576
1604
  endpoint?: string | undefined;
1577
1605
  service?: {
@@ -1586,7 +1614,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1586
1614
  pathname?: string | undefined;
1587
1615
  }[] | undefined;
1588
1616
  } | undefined;
1589
- server?: unknown;
1590
1617
  redirects?: Record<string, string | {
1591
1618
  status: 300 | 301 | 302 | 303 | 304 | 307 | 308;
1592
1619
  destination: string;
@@ -1596,7 +1623,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1596
1623
  publicDir?: string | undefined;
1597
1624
  outDir?: string | undefined;
1598
1625
  cacheDir?: string | undefined;
1599
- site?: string | undefined;
1600
1626
  compressHTML?: boolean | undefined;
1601
1627
  base?: string | undefined;
1602
1628
  trailingSlash?: "ignore" | "always" | "never" | undefined;
@@ -1608,9 +1634,9 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1608
1634
  } | undefined;
1609
1635
  integrations?: unknown;
1610
1636
  build?: {
1637
+ server?: string | undefined;
1611
1638
  format?: "file" | "directory" | "preserve" | undefined;
1612
1639
  client?: string | undefined;
1613
- server?: string | undefined;
1614
1640
  assets?: string | undefined;
1615
1641
  serverEntry?: string | undefined;
1616
1642
  redirects?: boolean | undefined;
@@ -1656,12 +1682,14 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1656
1682
  } | undefined;
1657
1683
  } | undefined;
1658
1684
  experimental?: {
1685
+ actions?: boolean | undefined;
1659
1686
  directRenderScript?: boolean | undefined;
1660
1687
  contentCollectionCache?: boolean | undefined;
1661
1688
  contentCollectionJsonSchema?: boolean | undefined;
1662
1689
  clientPrerender?: boolean | undefined;
1663
1690
  globalRoutePriority?: boolean | undefined;
1664
1691
  i18nDomains?: boolean | undefined;
1692
+ rewriting?: boolean | undefined;
1665
1693
  security?: {
1666
1694
  csrfProtection?: {
1667
1695
  origin?: boolean | undefined;
@@ -1670,6 +1698,13 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1670
1698
  } | undefined;
1671
1699
  legacy?: {} | undefined;
1672
1700
  }>, {
1701
+ server: {
1702
+ host: string | boolean;
1703
+ port: number;
1704
+ open: string | boolean;
1705
+ streaming: boolean;
1706
+ headers?: OutgoingHttpHeaders | undefined;
1707
+ };
1673
1708
  image: {
1674
1709
  service: {
1675
1710
  entrypoint: string;
@@ -1684,13 +1719,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1684
1719
  }[];
1685
1720
  endpoint?: string | undefined;
1686
1721
  };
1687
- server: {
1688
- host: string | boolean;
1689
- port: number;
1690
- open: string | boolean;
1691
- streaming: boolean;
1692
- headers?: OutgoingHttpHeaders | undefined;
1693
- };
1694
1722
  redirects: Record<string, string | {
1695
1723
  status: 300 | 301 | 302 | 303 | 304 | 307 | 308;
1696
1724
  destination: string;
@@ -1712,9 +1740,9 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1712
1740
  };
1713
1741
  }[];
1714
1742
  build: {
1743
+ server: import("url").URL;
1715
1744
  format: "file" | "directory" | "preserve";
1716
1745
  client: import("url").URL;
1717
- server: import("url").URL;
1718
1746
  assets: string;
1719
1747
  serverEntry: string;
1720
1748
  redirects: boolean;
@@ -1743,12 +1771,14 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1743
1771
  };
1744
1772
  vite: ViteUserConfig;
1745
1773
  experimental: {
1774
+ actions: boolean;
1746
1775
  directRenderScript: boolean;
1747
1776
  contentCollectionCache: boolean;
1748
1777
  contentCollectionJsonSchema: boolean;
1749
1778
  clientPrerender: boolean;
1750
1779
  globalRoutePriority: boolean;
1751
1780
  i18nDomains: boolean;
1781
+ rewriting: boolean;
1752
1782
  security: {
1753
1783
  csrfProtection: {
1754
1784
  origin: boolean;
@@ -1781,6 +1811,8 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1781
1811
  domains?: Record<string, string> | undefined;
1782
1812
  } | undefined;
1783
1813
  }, {
1814
+ site?: string | undefined;
1815
+ server?: unknown;
1784
1816
  image?: {
1785
1817
  endpoint?: string | undefined;
1786
1818
  service?: {
@@ -1795,7 +1827,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1795
1827
  pathname?: string | undefined;
1796
1828
  }[] | undefined;
1797
1829
  } | undefined;
1798
- server?: unknown;
1799
1830
  redirects?: Record<string, string | {
1800
1831
  status: 300 | 301 | 302 | 303 | 304 | 307 | 308;
1801
1832
  destination: string;
@@ -1805,7 +1836,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1805
1836
  publicDir?: string | undefined;
1806
1837
  outDir?: string | undefined;
1807
1838
  cacheDir?: string | undefined;
1808
- site?: string | undefined;
1809
1839
  compressHTML?: boolean | undefined;
1810
1840
  base?: string | undefined;
1811
1841
  trailingSlash?: "ignore" | "always" | "never" | undefined;
@@ -1817,9 +1847,9 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1817
1847
  } | undefined;
1818
1848
  integrations?: unknown;
1819
1849
  build?: {
1850
+ server?: string | undefined;
1820
1851
  format?: "file" | "directory" | "preserve" | undefined;
1821
1852
  client?: string | undefined;
1822
- server?: string | undefined;
1823
1853
  assets?: string | undefined;
1824
1854
  serverEntry?: string | undefined;
1825
1855
  redirects?: boolean | undefined;
@@ -1865,12 +1895,14 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
1865
1895
  } | undefined;
1866
1896
  } | undefined;
1867
1897
  experimental?: {
1898
+ actions?: boolean | undefined;
1868
1899
  directRenderScript?: boolean | undefined;
1869
1900
  contentCollectionCache?: boolean | undefined;
1870
1901
  contentCollectionJsonSchema?: boolean | undefined;
1871
1902
  clientPrerender?: boolean | undefined;
1872
1903
  globalRoutePriority?: boolean | undefined;
1873
1904
  i18nDomains?: boolean | undefined;
1905
+ rewriting?: boolean | undefined;
1874
1906
  security?: {
1875
1907
  csrfProtection?: {
1876
1908
  origin?: boolean | undefined;
@@ -39,13 +39,15 @@ const ASTRO_CONFIG_DEFAULTS = {
39
39
  legacy: {},
40
40
  redirects: {},
41
41
  experimental: {
42
+ actions: false,
42
43
  directRenderScript: false,
43
44
  contentCollectionCache: false,
44
45
  contentCollectionJsonSchema: false,
45
46
  clientPrerender: false,
46
47
  globalRoutePriority: false,
47
48
  i18nDomains: false,
48
- security: {}
49
+ security: {},
50
+ rewriting: false
49
51
  }
50
52
  };
51
53
  const AstroConfigSchema = z.object({
@@ -315,6 +317,7 @@ const AstroConfigSchema = z.object({
315
317
  })
316
318
  ),
317
319
  experimental: z.object({
320
+ actions: z.boolean().optional().default(ASTRO_CONFIG_DEFAULTS.experimental.actions),
318
321
  directRenderScript: z.boolean().optional().default(ASTRO_CONFIG_DEFAULTS.experimental.directRenderScript),
319
322
  contentCollectionCache: z.boolean().optional().default(ASTRO_CONFIG_DEFAULTS.experimental.contentCollectionCache),
320
323
  contentCollectionJsonSchema: z.boolean().optional().default(ASTRO_CONFIG_DEFAULTS.experimental.contentCollectionJsonSchema),
@@ -325,7 +328,8 @@ const AstroConfigSchema = z.object({
325
328
  origin: z.boolean().default(false)
326
329
  }).optional().default({})
327
330
  }).optional().default(ASTRO_CONFIG_DEFAULTS.experimental.security),
328
- i18nDomains: z.boolean().optional().default(ASTRO_CONFIG_DEFAULTS.experimental.i18nDomains)
331
+ i18nDomains: z.boolean().optional().default(ASTRO_CONFIG_DEFAULTS.experimental.i18nDomains),
332
+ rewriting: z.boolean().optional().default(ASTRO_CONFIG_DEFAULTS.experimental.rewriting)
329
333
  }).strict(
330
334
  `Invalid or outdated experimental feature.
331
335
  Check for incorrect spelling or outdated Astro version.
@@ -27,8 +27,7 @@ function createBaseSettings(config) {
27
27
  {
28
28
  extensions: [".json"],
29
29
  getEntryInfo({ contents, fileUrl }) {
30
- if (contents === void 0 || contents === "")
31
- return { data: {} };
30
+ if (contents === void 0 || contents === "") return { data: {} };
32
31
  const pathRelToContentDir = path.relative(
33
32
  fileURLToPath(contentDir),
34
33
  fileURLToPath(fileUrl)