-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
constants.ts
30 lines (24 loc) · 996 Bytes
/
constants.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// process.env.PACKAGE_VERSION is injected when we build and publish the astro package.
export const ASTRO_VERSION = process.env.PACKAGE_VERSION ?? 'development';
export const REROUTE_DIRECTIVE_HEADER = 'X-Astro-Reroute';
export const ROUTE_TYPE_HEADER = 'X-Astro-Route-Type';
export const DEFAULT_404_COMPONENT = 'astro-default-404';
/**
* A response with one of these status codes will be rewritten
* with the result of rendering the respective error page.
*/
export const REROUTABLE_STATUS_CODES = [404, 500];
export const clientAddressSymbol = Symbol.for('astro.clientAddress');
export const clientLocalsSymbol = Symbol.for('astro.locals');
export const responseSentSymbol = Symbol.for('astro.responseSent');
// possible extensions for markdown files
export const SUPPORTED_MARKDOWN_FILE_EXTENSIONS = [
'.markdown',
'.mdown',
'.mkdn',
'.mkd',
'.mdwn',
'.md',
] as const;
// The folder name where to find the middleware
export const MIDDLEWARE_PATH_SEGMENT_NAME = 'middleware';