astro 2.7.0 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -6
- package/dist/@types/astro.d.ts +0 -14
- package/dist/assets/utils/emitAsset.js +1 -2
- package/dist/content/vite-plugin-content-imports.js +0 -1
- package/dist/content/vite-plugin-content-virtual-mod.js +7 -1
- package/dist/core/build/generate.js +1 -3
- package/dist/core/build/index.js +1 -8
- package/dist/core/build/plugins/plugin-ssr.js +1 -1
- package/dist/core/build/static-build.js +7 -7
- package/dist/core/build/types.d.ts +1 -2
- package/dist/core/compile/compile.js +0 -5
- package/dist/core/compile/style.js +0 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/dev/dev.js +1 -1
- package/dist/core/errors/dev/vite.js +1 -9
- package/dist/core/errors/errors-data.d.ts +0 -71
- package/dist/core/errors/errors-data.js +10 -75
- package/dist/core/errors/errors.d.ts +1 -10
- package/dist/core/errors/errors.js +8 -9
- package/dist/core/errors/index.d.ts +1 -1
- package/dist/core/errors/utils.d.ts +2 -5
- package/dist/core/errors/utils.js +3 -3
- package/dist/core/messages.js +2 -2
- package/dist/core/module-loader/loader.d.ts +4 -0
- package/dist/core/render/dev/vite.js +25 -19
- package/dist/core/render/ssr-element.js +3 -4
- package/dist/core/routing/manifest/create.js +1 -2
- package/dist/core/util.d.ts +1 -0
- package/dist/core/util.js +5 -4
- package/dist/events/error.d.ts +0 -1
- package/dist/events/error.js +1 -5
- package/dist/integrations/index.d.ts +3 -5
- package/dist/integrations/index.js +2 -4
- package/dist/vite-plugin-astro/compile.js +2 -0
- package/dist/vite-plugin-jsx/index.js +2 -0
- package/dist/vite-plugin-load-fallback/index.js +2 -2
- package/dist/vite-plugin-markdown/index.js +0 -2
- package/package.json +3 -5
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ZodError } from 'zod';
|
|
2
2
|
export interface ErrorData {
|
|
3
|
-
code: number;
|
|
4
3
|
title: string;
|
|
5
4
|
message?: string | ((...params: any) => string);
|
|
6
5
|
hint?: string | ((...params: any) => string);
|
|
@@ -24,7 +23,6 @@ export declare const AstroErrorData: {
|
|
|
24
23
|
*/
|
|
25
24
|
readonly UnknownCompilerError: {
|
|
26
25
|
readonly title: "Unknown compiler error.";
|
|
27
|
-
readonly code: 1000;
|
|
28
26
|
readonly hint: "This is almost always a problem with the Astro compiler, not your code. Please open an issue at https://astro.build/issues/compiler.";
|
|
29
27
|
};
|
|
30
28
|
/**
|
|
@@ -40,7 +38,6 @@ export declare const AstroErrorData: {
|
|
|
40
38
|
*/
|
|
41
39
|
readonly StaticRedirectNotAvailable: {
|
|
42
40
|
readonly title: "`Astro.redirect` is not available in static mode.";
|
|
43
|
-
readonly code: 3001;
|
|
44
41
|
readonly message: "Redirects are only available when using `output: 'server'` or `output: 'hybrid'`. Update your Astro config if you need SSR features.";
|
|
45
42
|
readonly hint: "See https://docs.astro.build/en/guides/server-side-rendering/#enabling-ssr-in-your-project for more information on how to enable SSR.";
|
|
46
43
|
};
|
|
@@ -54,7 +51,6 @@ export declare const AstroErrorData: {
|
|
|
54
51
|
*/
|
|
55
52
|
readonly ClientAddressNotAvailable: {
|
|
56
53
|
readonly title: "`Astro.clientAddress` is not available in current adapter.";
|
|
57
|
-
readonly code: 3002;
|
|
58
54
|
readonly message: (adapterName: string) => string;
|
|
59
55
|
};
|
|
60
56
|
/**
|
|
@@ -69,7 +65,6 @@ export declare const AstroErrorData: {
|
|
|
69
65
|
*/
|
|
70
66
|
readonly StaticClientAddressNotAvailable: {
|
|
71
67
|
readonly title: "`Astro.clientAddress` is not available in static mode.";
|
|
72
|
-
readonly code: 3003;
|
|
73
68
|
readonly message: "`Astro.clientAddress` is only available when using `output: 'server'` or `output: 'hybrid'`. Update your Astro config if you need SSR features.";
|
|
74
69
|
readonly hint: "See https://docs.astro.build/en/guides/server-side-rendering/#enabling-ssr-in-your-project for more information on how to enable SSR.";
|
|
75
70
|
};
|
|
@@ -82,7 +77,6 @@ export declare const AstroErrorData: {
|
|
|
82
77
|
*/
|
|
83
78
|
readonly NoMatchingStaticPathFound: {
|
|
84
79
|
readonly title: "No static path found for requested path.";
|
|
85
|
-
readonly code: 3004;
|
|
86
80
|
readonly message: (pathName: string) => string;
|
|
87
81
|
readonly hint: (possibleRoutes: string[]) => string;
|
|
88
82
|
};
|
|
@@ -108,7 +102,6 @@ export declare const AstroErrorData: {
|
|
|
108
102
|
*/
|
|
109
103
|
readonly OnlyResponseCanBeReturned: {
|
|
110
104
|
readonly title: "Invalid type returned by Astro page.";
|
|
111
|
-
readonly code: 3005;
|
|
112
105
|
readonly message: (route: string | undefined, returnedValue: string) => string;
|
|
113
106
|
readonly hint: "See https://docs.astro.build/en/guides/server-side-rendering/#response for more information.";
|
|
114
107
|
};
|
|
@@ -125,7 +118,6 @@ export declare const AstroErrorData: {
|
|
|
125
118
|
*/
|
|
126
119
|
readonly MissingMediaQueryDirective: {
|
|
127
120
|
readonly title: "Missing value for `client:media` directive.";
|
|
128
|
-
readonly code: 3006;
|
|
129
121
|
readonly message: "Media query not provided for `client:media` directive. A media query similar to `client:media=\"(max-width: 600px)\"` must be provided";
|
|
130
122
|
};
|
|
131
123
|
/**
|
|
@@ -141,7 +133,6 @@ export declare const AstroErrorData: {
|
|
|
141
133
|
*/
|
|
142
134
|
readonly NoMatchingRenderer: {
|
|
143
135
|
readonly title: "No matching renderer found.";
|
|
144
|
-
readonly code: 3007;
|
|
145
136
|
readonly message: (componentName: string, componentExtension: string | undefined, plural: boolean, validRenderersCount: number) => string;
|
|
146
137
|
readonly hint: (probableRenderers: string) => string;
|
|
147
138
|
};
|
|
@@ -156,7 +147,6 @@ export declare const AstroErrorData: {
|
|
|
156
147
|
*/
|
|
157
148
|
readonly NoClientEntrypoint: {
|
|
158
149
|
readonly title: "No client entrypoint specified in renderer.";
|
|
159
|
-
readonly code: 3008;
|
|
160
150
|
readonly message: (componentName: string, clientDirective: string, rendererName: string) => string;
|
|
161
151
|
readonly hint: "See https://docs.astro.build/en/reference/integrations-reference/#addrenderer-option for more information on how to configure your renderer.";
|
|
162
152
|
};
|
|
@@ -174,7 +164,6 @@ export declare const AstroErrorData: {
|
|
|
174
164
|
*/
|
|
175
165
|
readonly NoClientOnlyHint: {
|
|
176
166
|
readonly title: "Missing hint on client:only directive.";
|
|
177
|
-
readonly code: 3009;
|
|
178
167
|
readonly message: (componentName: string) => string;
|
|
179
168
|
readonly hint: (probableRenderers: string) => string;
|
|
180
169
|
};
|
|
@@ -199,7 +188,6 @@ export declare const AstroErrorData: {
|
|
|
199
188
|
*/
|
|
200
189
|
readonly InvalidGetStaticPathParam: {
|
|
201
190
|
readonly title: "Invalid value returned by a `getStaticPaths` path.";
|
|
202
|
-
readonly code: 3010;
|
|
203
191
|
readonly message: (paramType: any) => string;
|
|
204
192
|
readonly hint: "See https://docs.astro.build/en/reference/api-reference/#getstaticpaths for more information on getStaticPaths.";
|
|
205
193
|
};
|
|
@@ -222,7 +210,6 @@ export declare const AstroErrorData: {
|
|
|
222
210
|
*/
|
|
223
211
|
readonly InvalidGetStaticPathsReturn: {
|
|
224
212
|
readonly title: "Invalid value returned by getStaticPaths.";
|
|
225
|
-
readonly code: 3011;
|
|
226
213
|
readonly message: (returnType: any) => string;
|
|
227
214
|
readonly hint: "See https://docs.astro.build/en/reference/api-reference/#getstaticpaths for more information on getStaticPaths.";
|
|
228
215
|
};
|
|
@@ -235,7 +222,6 @@ export declare const AstroErrorData: {
|
|
|
235
222
|
*/
|
|
236
223
|
readonly GetStaticPathsRemovedRSSHelper: {
|
|
237
224
|
readonly title: "getStaticPaths RSS helper is not available anymore.";
|
|
238
|
-
readonly code: 3012;
|
|
239
225
|
readonly message: "The RSS helper has been removed from `getStaticPaths`. Try the new @astrojs/rss package instead.";
|
|
240
226
|
readonly hint: "See https://docs.astro.build/en/guides/rss/ for more information.";
|
|
241
227
|
};
|
|
@@ -261,7 +247,6 @@ export declare const AstroErrorData: {
|
|
|
261
247
|
*/
|
|
262
248
|
readonly GetStaticPathsExpectedParams: {
|
|
263
249
|
readonly title: "Missing params property on `getStaticPaths` route.";
|
|
264
|
-
readonly code: 3013;
|
|
265
250
|
readonly message: "Missing or empty required `params` property on `getStaticPaths` route.";
|
|
266
251
|
readonly hint: "See https://docs.astro.build/en/reference/api-reference/#getstaticpaths for more information on getStaticPaths.";
|
|
267
252
|
};
|
|
@@ -301,7 +286,6 @@ export declare const AstroErrorData: {
|
|
|
301
286
|
*/
|
|
302
287
|
readonly GetStaticPathsInvalidRouteParam: {
|
|
303
288
|
readonly title: "Invalid value for `getStaticPaths` route parameter.";
|
|
304
|
-
readonly code: 3014;
|
|
305
289
|
readonly message: (key: string, value: any, valueType: any) => string;
|
|
306
290
|
readonly hint: "See https://docs.astro.build/en/reference/api-reference/#getstaticpaths for more information on getStaticPaths.";
|
|
307
291
|
};
|
|
@@ -316,7 +300,6 @@ export declare const AstroErrorData: {
|
|
|
316
300
|
*/
|
|
317
301
|
readonly GetStaticPathsRequired: {
|
|
318
302
|
readonly title: "`getStaticPaths()` function required for dynamic routes.";
|
|
319
|
-
readonly code: 3015;
|
|
320
303
|
readonly message: "`getStaticPaths()` function is required for dynamic routes. Make sure that you `export` a `getStaticPaths` function from your dynamic route.";
|
|
321
304
|
readonly hint: "See https://docs.astro.build/en/core-concepts/routing/#dynamic-routes for more information on dynamic routes.\n\nAlternatively, set `output: \"server\"` in your Astro config file to switch to a non-static server build. This error can also occur if using `export const prerender = true;`.\nSee https://docs.astro.build/en/guides/server-side-rendering/ for more information on non-static rendering.";
|
|
322
305
|
};
|
|
@@ -329,7 +312,6 @@ export declare const AstroErrorData: {
|
|
|
329
312
|
*/
|
|
330
313
|
readonly ReservedSlotName: {
|
|
331
314
|
readonly title: "Invalid slot name.";
|
|
332
|
-
readonly code: 3016;
|
|
333
315
|
readonly message: (slotName: string) => string;
|
|
334
316
|
};
|
|
335
317
|
/**
|
|
@@ -342,7 +324,6 @@ export declare const AstroErrorData: {
|
|
|
342
324
|
*/
|
|
343
325
|
readonly NoAdapterInstalled: {
|
|
344
326
|
readonly title: "Cannot use Server-side Rendering without an adapter.";
|
|
345
|
-
readonly code: 3017;
|
|
346
327
|
readonly message: "Cannot use `output: 'server'` or `output: 'hybrid'` without an adapter. Please install and configure the appropriate server adapter for your final deployment.";
|
|
347
328
|
readonly hint: "See https://docs.astro.build/en/guides/server-side-rendering/ for more information.";
|
|
348
329
|
};
|
|
@@ -353,7 +334,6 @@ export declare const AstroErrorData: {
|
|
|
353
334
|
*/
|
|
354
335
|
readonly NoMatchingImport: {
|
|
355
336
|
readonly title: "No import found for component.";
|
|
356
|
-
readonly code: 3018;
|
|
357
337
|
readonly message: (componentName: string) => string;
|
|
358
338
|
readonly hint: "Please make sure the component is properly imported.";
|
|
359
339
|
};
|
|
@@ -367,7 +347,6 @@ export declare const AstroErrorData: {
|
|
|
367
347
|
*/
|
|
368
348
|
readonly InvalidPrerenderExport: {
|
|
369
349
|
readonly title: "Invalid prerender export.";
|
|
370
|
-
readonly code: 3019;
|
|
371
350
|
readonly message: (prefix: string, suffix: string, isHydridOuput: boolean) => string;
|
|
372
351
|
readonly hint: "Mutable values declared at runtime are not supported. Please make sure to use exactly `export const prerender = true`.";
|
|
373
352
|
};
|
|
@@ -381,7 +360,6 @@ export declare const AstroErrorData: {
|
|
|
381
360
|
*/
|
|
382
361
|
readonly InvalidComponentArgs: {
|
|
383
362
|
readonly title: "Invalid component arguments.";
|
|
384
|
-
readonly code: 3020;
|
|
385
363
|
readonly message: (name: string) => string;
|
|
386
364
|
readonly hint: "Astro components cannot be rendered directly via function call, such as `Component()` or `{items.map(Component)}`.";
|
|
387
365
|
};
|
|
@@ -394,7 +372,6 @@ export declare const AstroErrorData: {
|
|
|
394
372
|
*/
|
|
395
373
|
readonly PageNumberParamNotFound: {
|
|
396
374
|
readonly title: "Page number param not found.";
|
|
397
|
-
readonly code: 3021;
|
|
398
375
|
readonly message: (paramName: string) => string;
|
|
399
376
|
readonly hint: "Rename your file to `[page].astro` or `[...page].astro`.";
|
|
400
377
|
};
|
|
@@ -411,7 +388,6 @@ export declare const AstroErrorData: {
|
|
|
411
388
|
*/
|
|
412
389
|
readonly ImageMissingAlt: {
|
|
413
390
|
readonly title: "Missing alt property.";
|
|
414
|
-
readonly code: 3022;
|
|
415
391
|
readonly message: "The alt property is required.";
|
|
416
392
|
readonly hint: "The `alt` property is important for the purpose of accessibility, without it users using screen readers or other assistive technologies won't be able to understand what your image is supposed to represent. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-alt for more information.";
|
|
417
393
|
};
|
|
@@ -426,7 +402,6 @@ export declare const AstroErrorData: {
|
|
|
426
402
|
*/
|
|
427
403
|
readonly InvalidImageService: {
|
|
428
404
|
readonly title: "Error while loading image service.";
|
|
429
|
-
readonly code: 3023;
|
|
430
405
|
readonly message: "There was an error loading the configured image service. Please see the stack trace for more information.";
|
|
431
406
|
};
|
|
432
407
|
/**
|
|
@@ -443,7 +418,6 @@ export declare const AstroErrorData: {
|
|
|
443
418
|
*/
|
|
444
419
|
readonly MissingImageDimension: {
|
|
445
420
|
readonly title: "Missing image dimensions";
|
|
446
|
-
readonly code: 3024;
|
|
447
421
|
readonly message: (missingDimension: 'width' | 'height' | 'both', imageURL: string) => string;
|
|
448
422
|
readonly 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).";
|
|
449
423
|
};
|
|
@@ -463,7 +437,6 @@ export declare const AstroErrorData: {
|
|
|
463
437
|
*/
|
|
464
438
|
readonly UnsupportedImageFormat: {
|
|
465
439
|
readonly title: "Unsupported image format";
|
|
466
|
-
readonly code: 3025;
|
|
467
440
|
readonly message: (format: string, imagePath: string, supportedFormats: readonly string[]) => string;
|
|
468
441
|
readonly hint: "If you do not need optimization, using an `img` tag directly instead of the `Image` component might be what you're looking for.";
|
|
469
442
|
};
|
|
@@ -479,7 +452,6 @@ export declare const AstroErrorData: {
|
|
|
479
452
|
*/
|
|
480
453
|
readonly PrerenderDynamicEndpointPathCollide: {
|
|
481
454
|
readonly title: "Prerendered dynamic endpoint has path collision.";
|
|
482
|
-
readonly code: 3026;
|
|
483
455
|
readonly message: (pathname: string) => string;
|
|
484
456
|
readonly hint: (filename: string) => string;
|
|
485
457
|
};
|
|
@@ -504,7 +476,6 @@ export declare const AstroErrorData: {
|
|
|
504
476
|
*/
|
|
505
477
|
readonly ExpectedImage: {
|
|
506
478
|
readonly title: "Expected src to be an image.";
|
|
507
|
-
readonly code: 3027;
|
|
508
479
|
readonly message: (options: string) => string;
|
|
509
480
|
readonly hint: "This error can often happen because of a wrong path. Make sure the path to your image is correct.";
|
|
510
481
|
};
|
|
@@ -526,7 +497,6 @@ export declare const AstroErrorData: {
|
|
|
526
497
|
*/
|
|
527
498
|
readonly ExpectedImageOptions: {
|
|
528
499
|
readonly title: "Expected image options.";
|
|
529
|
-
readonly code: 3028;
|
|
530
500
|
readonly message: (options: string) => string;
|
|
531
501
|
};
|
|
532
502
|
/**
|
|
@@ -542,7 +512,6 @@ export declare const AstroErrorData: {
|
|
|
542
512
|
*/
|
|
543
513
|
readonly MarkdownImageNotFound: {
|
|
544
514
|
readonly title: "Image not found.";
|
|
545
|
-
readonly code: 3029;
|
|
546
515
|
readonly message: (imagePath: string, fullImagePath: string | undefined) => string;
|
|
547
516
|
readonly hint: "This is often caused by a typo in the image path. Please make sure the file exists, and is spelled correctly.";
|
|
548
517
|
};
|
|
@@ -553,7 +522,6 @@ export declare const AstroErrorData: {
|
|
|
553
522
|
*/
|
|
554
523
|
readonly ResponseSentError: {
|
|
555
524
|
readonly title: "Unable to set response.";
|
|
556
|
-
readonly code: 3030;
|
|
557
525
|
readonly message: "The response has already been sent to the browser and cannot be altered.";
|
|
558
526
|
};
|
|
559
527
|
/**
|
|
@@ -572,7 +540,6 @@ export declare const AstroErrorData: {
|
|
|
572
540
|
*/
|
|
573
541
|
readonly MiddlewareNoDataOrNextCalled: {
|
|
574
542
|
readonly title: "The middleware didn't return a response or call `next`.";
|
|
575
|
-
readonly code: 3031;
|
|
576
543
|
readonly message: "The middleware needs to either return a `Response` object or call the `next` function.";
|
|
577
544
|
};
|
|
578
545
|
/**
|
|
@@ -590,7 +557,6 @@ export declare const AstroErrorData: {
|
|
|
590
557
|
*/
|
|
591
558
|
readonly MiddlewareNotAResponse: {
|
|
592
559
|
readonly title: "The middleware returned something that is not a `Response` object.";
|
|
593
|
-
readonly code: 3032;
|
|
594
560
|
readonly message: "Any data returned from middleware must be a valid `Response` object.";
|
|
595
561
|
};
|
|
596
562
|
/**
|
|
@@ -610,7 +576,6 @@ export declare const AstroErrorData: {
|
|
|
610
576
|
*/
|
|
611
577
|
readonly LocalsNotAnObject: {
|
|
612
578
|
readonly title: "Value assigned to `locals` is not accepted.";
|
|
613
|
-
readonly code: 3033;
|
|
614
579
|
readonly message: "`locals` can only be assigned to an object. Other values like numbers, strings, etc. are not accepted.";
|
|
615
580
|
readonly hint: "If you tried to remove some information from the `locals` object, try to use `delete` or set the property to `undefined`.";
|
|
616
581
|
};
|
|
@@ -636,7 +601,6 @@ export declare const AstroErrorData: {
|
|
|
636
601
|
*/
|
|
637
602
|
readonly LocalImageUsedWrongly: {
|
|
638
603
|
readonly title: "ESM imported images must be passed as-is.";
|
|
639
|
-
readonly code: 3034;
|
|
640
604
|
readonly message: (imageFilePath: string) => string;
|
|
641
605
|
};
|
|
642
606
|
/**
|
|
@@ -648,7 +612,6 @@ export declare const AstroErrorData: {
|
|
|
648
612
|
*/
|
|
649
613
|
readonly AstroGlobUsedOutside: {
|
|
650
614
|
readonly title: "Astro.glob() used outside of an Astro file.";
|
|
651
|
-
readonly code: 3035;
|
|
652
615
|
readonly message: (globStr: string) => string;
|
|
653
616
|
readonly hint: "See Vite's documentation on `import.meta.glob` for more information: https://vitejs.dev/guide/features.html#glob-import";
|
|
654
617
|
};
|
|
@@ -661,7 +624,6 @@ export declare const AstroErrorData: {
|
|
|
661
624
|
*/
|
|
662
625
|
readonly AstroGlobNoMatch: {
|
|
663
626
|
readonly title: "Astro.glob() did not match any files.";
|
|
664
|
-
readonly code: 3036;
|
|
665
627
|
readonly message: (globStr: string) => string;
|
|
666
628
|
};
|
|
667
629
|
/**
|
|
@@ -673,7 +635,6 @@ export declare const AstroErrorData: {
|
|
|
673
635
|
*/
|
|
674
636
|
readonly RedirectWithNoLocation: {
|
|
675
637
|
readonly title: "A redirect must be given a location with the `Location` header.";
|
|
676
|
-
readonly code: 3037;
|
|
677
638
|
};
|
|
678
639
|
/**
|
|
679
640
|
* @docs
|
|
@@ -684,7 +645,6 @@ export declare const AstroErrorData: {
|
|
|
684
645
|
*/
|
|
685
646
|
readonly InvalidDynamicRoute: {
|
|
686
647
|
readonly title: "Invalid dynamic route.";
|
|
687
|
-
readonly code: 3038;
|
|
688
648
|
readonly message: (route: string, invalidParam: string, received: string) => string;
|
|
689
649
|
};
|
|
690
650
|
/**
|
|
@@ -698,7 +658,6 @@ export declare const AstroErrorData: {
|
|
|
698
658
|
*/
|
|
699
659
|
readonly UnknownViteError: {
|
|
700
660
|
readonly title: "Unknown Vite Error.";
|
|
701
|
-
readonly code: 4000;
|
|
702
661
|
};
|
|
703
662
|
/**
|
|
704
663
|
* @docs
|
|
@@ -711,7 +670,6 @@ export declare const AstroErrorData: {
|
|
|
711
670
|
*/
|
|
712
671
|
readonly FailedToLoadModuleSSR: {
|
|
713
672
|
readonly title: "Could not import file.";
|
|
714
|
-
readonly code: 4001;
|
|
715
673
|
readonly message: (importName: string) => string;
|
|
716
674
|
readonly hint: "This is often caused by a typo in the import path. Please make sure the file exists.";
|
|
717
675
|
};
|
|
@@ -724,7 +682,6 @@ export declare const AstroErrorData: {
|
|
|
724
682
|
*/
|
|
725
683
|
readonly InvalidGlob: {
|
|
726
684
|
readonly title: "Invalid glob pattern.";
|
|
727
|
-
readonly code: 4002;
|
|
728
685
|
readonly message: (globPattern: string) => string;
|
|
729
686
|
readonly hint: "See https://docs.astro.build/en/guides/imports/#glob-patterns for more information on supported glob patterns.";
|
|
730
687
|
};
|
|
@@ -735,7 +692,6 @@ export declare const AstroErrorData: {
|
|
|
735
692
|
*/
|
|
736
693
|
readonly FailedToFindPageMapSSR: {
|
|
737
694
|
readonly title: "Astro couldn't find the correct page to render";
|
|
738
|
-
readonly code: 4003;
|
|
739
695
|
readonly 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.";
|
|
740
696
|
};
|
|
741
697
|
/**
|
|
@@ -752,7 +708,6 @@ export declare const AstroErrorData: {
|
|
|
752
708
|
*/
|
|
753
709
|
readonly UnknownCSSError: {
|
|
754
710
|
readonly title: "Unknown CSS Error.";
|
|
755
|
-
readonly code: 5000;
|
|
756
711
|
};
|
|
757
712
|
/**
|
|
758
713
|
* @docs
|
|
@@ -765,7 +720,6 @@ export declare const AstroErrorData: {
|
|
|
765
720
|
*/
|
|
766
721
|
readonly CSSSyntaxError: {
|
|
767
722
|
readonly title: "CSS Syntax Error.";
|
|
768
|
-
readonly code: 5001;
|
|
769
723
|
};
|
|
770
724
|
/**
|
|
771
725
|
* @docs
|
|
@@ -779,7 +733,6 @@ export declare const AstroErrorData: {
|
|
|
779
733
|
*/
|
|
780
734
|
readonly UnknownMarkdownError: {
|
|
781
735
|
readonly title: "Unknown Markdown Error.";
|
|
782
|
-
readonly code: 6000;
|
|
783
736
|
};
|
|
784
737
|
/**
|
|
785
738
|
* @docs
|
|
@@ -794,7 +747,6 @@ export declare const AstroErrorData: {
|
|
|
794
747
|
*/
|
|
795
748
|
readonly MarkdownFrontmatterParseError: {
|
|
796
749
|
readonly title: "Failed to parse Markdown frontmatter.";
|
|
797
|
-
readonly code: 6001;
|
|
798
750
|
};
|
|
799
751
|
/**
|
|
800
752
|
* @docs
|
|
@@ -805,7 +757,6 @@ export declare const AstroErrorData: {
|
|
|
805
757
|
*/
|
|
806
758
|
readonly InvalidFrontmatterInjectionError: {
|
|
807
759
|
readonly title: "Invalid frontmatter injection.";
|
|
808
|
-
readonly code: 6003;
|
|
809
760
|
readonly message: "A remark or rehype plugin attempted to inject invalid frontmatter. Ensure \"astro.frontmatter\" is set to a valid JSON object that is not `null` or `undefined`.";
|
|
810
761
|
readonly hint: "See the frontmatter injection docs https://docs.astro.build/en/guides/markdown-content/#modifying-frontmatter-programmatically for more information.";
|
|
811
762
|
};
|
|
@@ -818,7 +769,6 @@ export declare const AstroErrorData: {
|
|
|
818
769
|
*/
|
|
819
770
|
readonly MdxIntegrationMissingError: {
|
|
820
771
|
readonly title: "MDX integration missing.";
|
|
821
|
-
readonly code: 6004;
|
|
822
772
|
readonly message: (file: string) => string;
|
|
823
773
|
readonly hint: "See the MDX integration docs for installation and usage instructions: https://docs.astro.build/en/guides/integrations-guide/mdx/";
|
|
824
774
|
};
|
|
@@ -834,7 +784,6 @@ export declare const AstroErrorData: {
|
|
|
834
784
|
*/
|
|
835
785
|
readonly UnknownConfigError: {
|
|
836
786
|
readonly title: "Unknown configuration error.";
|
|
837
|
-
readonly code: 7000;
|
|
838
787
|
};
|
|
839
788
|
/**
|
|
840
789
|
* @docs
|
|
@@ -845,7 +794,6 @@ export declare const AstroErrorData: {
|
|
|
845
794
|
*/
|
|
846
795
|
readonly ConfigNotFound: {
|
|
847
796
|
readonly title: "Specified configuration file not found.";
|
|
848
|
-
readonly code: 7001;
|
|
849
797
|
readonly message: (configFile: string) => string;
|
|
850
798
|
};
|
|
851
799
|
/**
|
|
@@ -857,7 +805,6 @@ export declare const AstroErrorData: {
|
|
|
857
805
|
*/
|
|
858
806
|
readonly ConfigLegacyKey: {
|
|
859
807
|
readonly title: "Legacy configuration detected.";
|
|
860
|
-
readonly code: 7002;
|
|
861
808
|
readonly message: (legacyConfigKey: string) => string;
|
|
862
809
|
readonly hint: "Please update your configuration to the new format.\nSee https://astro.build/config for more information.";
|
|
863
810
|
};
|
|
@@ -875,7 +822,6 @@ export declare const AstroErrorData: {
|
|
|
875
822
|
*/
|
|
876
823
|
readonly UnknownCLIError: {
|
|
877
824
|
readonly title: "Unknown CLI Error.";
|
|
878
|
-
readonly code: 8000;
|
|
879
825
|
};
|
|
880
826
|
/**
|
|
881
827
|
* @docs
|
|
@@ -886,7 +832,6 @@ export declare const AstroErrorData: {
|
|
|
886
832
|
*/
|
|
887
833
|
readonly GenerateContentTypesError: {
|
|
888
834
|
readonly title: "Failed to generate content types.";
|
|
889
|
-
readonly code: 8001;
|
|
890
835
|
readonly message: (errorMessage: string) => string;
|
|
891
836
|
readonly hint: "Check your `src/content/config.*` file for typos.";
|
|
892
837
|
};
|
|
@@ -905,7 +850,6 @@ export declare const AstroErrorData: {
|
|
|
905
850
|
*/
|
|
906
851
|
readonly UnknownContentCollectionError: {
|
|
907
852
|
readonly title: "Unknown Content Collection Error.";
|
|
908
|
-
readonly code: 9000;
|
|
909
853
|
};
|
|
910
854
|
/**
|
|
911
855
|
* @docs
|
|
@@ -922,7 +866,6 @@ export declare const AstroErrorData: {
|
|
|
922
866
|
*/
|
|
923
867
|
readonly InvalidContentEntryFrontmatterError: {
|
|
924
868
|
readonly title: "Content entry frontmatter does not match schema.";
|
|
925
|
-
readonly code: 9001;
|
|
926
869
|
readonly message: (collection: string, entryId: string, error: ZodError) => string;
|
|
927
870
|
readonly hint: "See https://docs.astro.build/en/guides/content-collections/ for more information on content schemas.";
|
|
928
871
|
};
|
|
@@ -936,7 +879,6 @@ export declare const AstroErrorData: {
|
|
|
936
879
|
*/
|
|
937
880
|
readonly InvalidContentEntrySlugError: {
|
|
938
881
|
readonly title: "Invalid content entry slug.";
|
|
939
|
-
readonly code: 9002;
|
|
940
882
|
readonly message: (collection: string, entryId: string) => string;
|
|
941
883
|
readonly hint: "See https://docs.astro.build/en/guides/content-collections/ for more on the `slug` field.";
|
|
942
884
|
};
|
|
@@ -949,7 +891,6 @@ export declare const AstroErrorData: {
|
|
|
949
891
|
*/
|
|
950
892
|
readonly ContentSchemaContainsSlugError: {
|
|
951
893
|
readonly title: "Content Schema should not contain `slug`.";
|
|
952
|
-
readonly code: 9003;
|
|
953
894
|
readonly message: (collectionName: string) => string;
|
|
954
895
|
readonly hint: "See https://docs.astro.build/en/guides/content-collections/ for more on the `slug` field.";
|
|
955
896
|
};
|
|
@@ -961,7 +902,6 @@ export declare const AstroErrorData: {
|
|
|
961
902
|
*/
|
|
962
903
|
readonly CollectionDoesNotExistError: {
|
|
963
904
|
readonly title: "Collection does not exist";
|
|
964
|
-
readonly code: 9004;
|
|
965
905
|
readonly message: (collectionName: string) => string;
|
|
966
906
|
readonly hint: "See https://docs.astro.build/en/guides/content-collections/ for more on creating collections.";
|
|
967
907
|
};
|
|
@@ -975,7 +915,6 @@ export declare const AstroErrorData: {
|
|
|
975
915
|
*/
|
|
976
916
|
readonly MixedContentDataCollectionError: {
|
|
977
917
|
readonly title: "Content and data cannot be in same collection.";
|
|
978
|
-
readonly code: 9005;
|
|
979
918
|
readonly message: (collection: string) => string;
|
|
980
919
|
readonly hint: "Store data entries in a new collection separate from your content collection.";
|
|
981
920
|
};
|
|
@@ -989,7 +928,6 @@ export declare const AstroErrorData: {
|
|
|
989
928
|
*/
|
|
990
929
|
readonly ContentCollectionTypeMismatchError: {
|
|
991
930
|
readonly title: "Collection contains entries of a different type.";
|
|
992
|
-
readonly code: 9006;
|
|
993
931
|
readonly message: (collection: string, expectedType: string, actualType: string) => string;
|
|
994
932
|
};
|
|
995
933
|
/**
|
|
@@ -1000,7 +938,6 @@ export declare const AstroErrorData: {
|
|
|
1000
938
|
*/
|
|
1001
939
|
readonly DataCollectionEntryParseError: {
|
|
1002
940
|
readonly title: "Data collection entry failed to parse.";
|
|
1003
|
-
readonly code: 9007;
|
|
1004
941
|
readonly message: (entryId: string, errorMessage: string) => string;
|
|
1005
942
|
readonly hint: "Ensure your data entry is an object with valid JSON (for `.json` entries) or YAML (for `.yaml` entries).";
|
|
1006
943
|
};
|
|
@@ -1012,7 +949,6 @@ export declare const AstroErrorData: {
|
|
|
1012
949
|
*/
|
|
1013
950
|
readonly DuplicateContentEntrySlugError: {
|
|
1014
951
|
readonly title: "Duplicate content entry slug.";
|
|
1015
|
-
readonly code: 9008;
|
|
1016
952
|
readonly message: (collection: string, slug: string) => string;
|
|
1017
953
|
};
|
|
1018
954
|
/**
|
|
@@ -1024,17 +960,10 @@ export declare const AstroErrorData: {
|
|
|
1024
960
|
*/
|
|
1025
961
|
readonly UnsupportedConfigTransformError: {
|
|
1026
962
|
readonly title: "Unsupported transform in content config.";
|
|
1027
|
-
readonly code: 9008;
|
|
1028
963
|
readonly message: (parseError: string) => string;
|
|
1029
964
|
readonly hint: "See the devalue library for all supported types: https://github.com/rich-harris/devalue";
|
|
1030
965
|
};
|
|
1031
966
|
readonly UnknownError: {
|
|
1032
967
|
readonly title: "Unknown Error.";
|
|
1033
|
-
readonly code: 99999;
|
|
1034
968
|
};
|
|
1035
969
|
};
|
|
1036
|
-
type ValueOf<T> = T[keyof T];
|
|
1037
|
-
export type AstroErrorCodes = ValueOf<{
|
|
1038
|
-
[T in keyof typeof AstroErrorData]: (typeof AstroErrorData)[T]['code'];
|
|
1039
|
-
}>;
|
|
1040
|
-
export {};
|