astro 7.0.0-alpha.0 → 7.0.0-alpha.2
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/components/Code.astro +1 -1
- package/dist/actions/handler.d.ts +32 -0
- package/dist/actions/handler.js +45 -0
- package/dist/actions/runtime/server.js +1 -1
- package/dist/assets/build/generate.js +1 -1
- package/dist/assets/build/remote.d.ts +3 -2
- package/dist/assets/build/remote.js +16 -9
- package/dist/assets/endpoint/dev.js +1 -1
- package/dist/assets/endpoint/generic.js +8 -20
- package/dist/assets/endpoint/loadImage.d.ts +11 -0
- package/dist/assets/endpoint/loadImage.js +19 -0
- package/dist/assets/endpoint/shared.js +7 -2
- package/dist/assets/fonts/config.d.ts +4 -4
- package/dist/assets/fonts/core/optimize-fallbacks.js +38 -13
- package/dist/assets/fonts/definitions.d.ts +2 -2
- package/dist/assets/fonts/infra/system-fallbacks-provider.d.ts +2 -2
- package/dist/assets/fonts/infra/system-fallbacks-provider.js +46 -9
- package/dist/assets/fonts/types.d.ts +1 -0
- package/dist/assets/index.d.ts +1 -0
- package/dist/assets/index.js +2 -0
- package/dist/assets/internal.js +22 -3
- package/dist/assets/services/service.d.ts +1 -1
- package/dist/assets/services/service.js +9 -9
- package/dist/assets/services/sharp.js +53 -18
- package/dist/assets/utils/generateImageStylesCSS.js +26 -6
- package/dist/assets/utils/index.d.ts +1 -0
- package/dist/assets/utils/index.js +2 -0
- package/dist/assets/utils/inferSourceFormat.d.ts +8 -3
- package/dist/assets/utils/inferSourceFormat.js +15 -4
- package/dist/assets/utils/metadata.js +1 -1
- package/dist/assets/utils/redirectValidation.d.ts +48 -0
- package/dist/assets/utils/redirectValidation.js +48 -0
- package/dist/assets/utils/remoteProbe.js +25 -2
- package/dist/assets/utils/vendor/image-size/types/svg.js +1 -1
- package/dist/cli/add/index.js +7 -58
- package/dist/cli/dev/background.d.ts +16 -0
- package/dist/cli/dev/background.js +116 -0
- package/dist/cli/dev/index.js +82 -3
- package/dist/cli/dev/logs.d.ts +6 -0
- package/dist/cli/dev/logs.js +72 -0
- package/dist/cli/dev/status.d.ts +15 -0
- package/dist/cli/dev/status.js +27 -0
- package/dist/cli/dev/stop.d.ts +12 -0
- package/dist/cli/dev/stop.js +43 -0
- package/dist/cli/infra/build-time-astro-version-provider.js +1 -1
- package/dist/container/index.js +18 -14
- package/dist/content/content-layer.js +16 -11
- package/dist/content/data-store.d.ts +1 -1
- package/dist/content/loaders/types.d.ts +1 -1
- package/dist/content/runtime-assets.d.ts +2 -2
- package/dist/content/runtime.d.ts +1 -1
- package/dist/content/runtime.js +9 -4
- package/dist/content/server-listeners.js +0 -4
- package/dist/content/types-generator.js +5 -1
- package/dist/content/utils.d.ts +1 -1
- package/dist/content/utils.js +1 -1
- package/dist/content/vite-plugin-content-assets.js +1 -0
- package/dist/content/vite-plugin-content-virtual-mod.js +9 -1
- package/dist/core/app/base.d.ts +42 -15
- package/dist/core/app/base.js +151 -375
- package/dist/core/app/dev/app.d.ts +3 -2
- package/dist/core/app/dev/app.js +4 -60
- package/dist/core/app/entrypoints/node.d.ts +1 -1
- package/dist/core/app/entrypoints/node.js +2 -0
- package/dist/core/app/entrypoints/virtual/dev.js +2 -0
- package/dist/core/app/entrypoints/virtual/prod.js +4 -1
- package/dist/core/app/node.d.ts +16 -0
- package/dist/core/app/node.js +59 -13
- package/dist/core/app/prepare-response.d.ts +11 -0
- package/dist/core/app/prepare-response.js +18 -0
- package/dist/core/app/render-options.d.ts +11 -0
- package/dist/core/app/render-options.js +11 -0
- package/dist/core/base-pipeline.d.ts +48 -1
- package/dist/core/base-pipeline.js +63 -8
- package/dist/core/build/app.d.ts +3 -4
- package/dist/core/build/app.js +3 -17
- package/dist/core/build/generate.js +8 -1
- package/dist/core/build/index.d.ts +0 -11
- package/dist/core/build/index.js +0 -3
- package/dist/core/build/internal.d.ts +7 -0
- package/dist/core/build/plugins/plugin-chunk-imports.d.ts +6 -0
- package/dist/core/build/plugins/plugin-chunk-imports.js +29 -17
- package/dist/core/build/plugins/plugin-css.js +40 -1
- package/dist/core/build/plugins/plugin-internals.js +1 -1
- package/dist/core/build/plugins/plugin-manifest.js +11 -1
- package/dist/core/build/static-build.js +22 -141
- package/dist/core/build/types.d.ts +0 -1
- package/dist/core/build/util.js +8 -1
- package/dist/core/build/vite-build-config.d.ts +28 -0
- package/dist/core/build/vite-build-config.js +165 -0
- package/dist/core/cache/handler.d.ts +29 -0
- package/dist/core/cache/handler.js +81 -0
- package/dist/core/compile/style.js +18 -1
- package/dist/core/config/index.d.ts +1 -1
- package/dist/core/config/index.js +4 -1
- package/dist/core/config/merge.js +4 -0
- package/dist/core/config/schemas/base.d.ts +25 -13
- package/dist/core/config/schemas/base.js +39 -10
- package/dist/core/config/schemas/relative.d.ts +76 -49
- package/dist/core/config/schemas/relative.js +2 -3
- package/dist/core/config/settings.js +2 -4
- package/dist/core/config/tsconfig.d.ts +24 -9
- package/dist/core/config/tsconfig.js +54 -45
- package/dist/core/config/validate.js +59 -0
- package/dist/core/constants.d.ts +27 -1
- package/dist/core/constants.js +14 -1
- package/dist/core/cookies/cookies.d.ts +7 -2
- package/dist/core/cookies/cookies.js +11 -4
- package/dist/core/cookies/response.d.ts +1 -1
- package/dist/core/cookies/response.js +1 -2
- package/dist/core/create-vite.js +18 -1
- package/dist/core/csp/config.js +17 -5
- package/dist/core/csp/runtime.js +6 -4
- package/dist/core/dev/dev.d.ts +1 -0
- package/dist/core/dev/dev.js +4 -13
- package/dist/core/dev/lockfile.d.ts +54 -0
- package/dist/core/dev/lockfile.js +93 -0
- package/dist/core/errors/build-handler.d.ts +17 -0
- package/dist/core/errors/build-handler.js +22 -0
- package/dist/core/errors/default-handler.d.ts +14 -0
- package/dist/core/errors/default-handler.js +144 -0
- package/dist/core/errors/dev-handler.d.ts +21 -0
- package/dist/core/errors/dev-handler.js +82 -0
- package/dist/core/errors/errors-data.d.ts +43 -38
- package/dist/core/errors/errors-data.js +79 -73
- package/dist/core/errors/handler.d.ts +9 -0
- package/dist/core/errors/handler.js +0 -0
- package/dist/core/errors/zod-error-map.js +30 -1
- package/dist/core/fetch/default-handler.d.ts +17 -0
- package/dist/core/fetch/default-handler.js +45 -0
- package/dist/core/fetch/fetch-state.d.ts +230 -0
- package/dist/core/fetch/fetch-state.js +896 -0
- package/dist/core/fetch/index.d.ts +61 -0
- package/dist/core/fetch/index.js +121 -0
- package/dist/core/fetch/types.d.ts +25 -0
- package/dist/core/fetch/types.js +0 -0
- package/dist/core/fetch/vite-plugin.d.ts +5 -0
- package/dist/core/fetch/vite-plugin.js +76 -0
- package/dist/core/hono/index.d.ts +21 -0
- package/dist/core/hono/index.js +101 -0
- package/dist/core/i18n/domain.d.ts +12 -0
- package/dist/core/i18n/domain.js +66 -0
- package/dist/core/i18n/handler.d.ts +18 -0
- package/dist/core/i18n/handler.js +122 -0
- package/dist/core/logger/core.d.ts +9 -1
- package/dist/core/logger/core.js +17 -1
- package/dist/core/messages/runtime.d.ts +0 -3
- package/dist/core/messages/runtime.js +1 -9
- package/dist/core/middleware/astro-middleware.d.ts +27 -0
- package/dist/core/middleware/astro-middleware.js +51 -0
- package/dist/core/module-loader/vite.js +1 -2
- package/dist/core/pages/handler.d.ts +20 -0
- package/dist/core/pages/handler.js +75 -0
- package/dist/core/preview/index.js +6 -5
- package/dist/core/preview/static-preview-server.js +5 -2
- package/dist/core/redirects/render.d.ts +2 -2
- package/dist/core/redirects/render.js +7 -8
- package/dist/core/render/params-and-props.js +2 -2
- package/dist/core/render/route-cache.d.ts +1 -0
- package/dist/core/render/route-cache.js +4 -4
- package/dist/core/render/slots.js +9 -2
- package/dist/core/rewrites/handler.d.ts +37 -0
- package/dist/core/rewrites/handler.js +67 -0
- package/dist/core/routing/3xx.js +8 -4
- package/dist/core/routing/create-manifest.js +11 -1
- package/dist/core/routing/handler.d.ts +17 -0
- package/dist/core/routing/handler.js +171 -0
- package/dist/core/routing/match.d.ts +0 -7
- package/dist/core/routing/match.js +0 -5
- package/dist/core/routing/parse-route.js +1 -1
- package/dist/core/routing/pattern.js +1 -1
- package/dist/core/routing/rewrite.js +2 -5
- package/dist/core/routing/router.d.ts +8 -0
- package/dist/core/routing/router.js +28 -0
- package/dist/core/routing/trailing-slash-handler.d.ts +18 -0
- package/dist/core/routing/trailing-slash-handler.js +67 -0
- package/dist/core/routing/validation.js +1 -1
- package/dist/core/server-islands/vite-plugin-server-islands.d.ts +6 -1
- package/dist/core/server-islands/vite-plugin-server-islands.js +13 -3
- package/dist/core/session/config.d.ts +1 -1
- package/dist/core/session/drivers.d.ts +1 -1
- package/dist/core/session/handler.d.ts +11 -0
- package/dist/core/session/handler.js +33 -0
- package/dist/core/session/runtime.js +7 -2
- package/dist/core/util/normalized-url.d.ts +10 -0
- package/dist/core/util/normalized-url.js +24 -0
- package/dist/core/util/pathname.d.ts +10 -1
- package/dist/core/util/pathname.js +13 -4
- package/dist/environments.js +1 -1
- package/dist/events/session.d.ts +8 -0
- package/dist/events/session.js +11 -0
- package/dist/i18n/middleware.d.ts +10 -0
- package/dist/i18n/middleware.js +4 -88
- package/dist/i18n/utils.js +2 -2
- package/dist/jsx/rehype.d.ts +1 -1
- package/dist/manifest/virtual-module.js +3 -1
- package/dist/markdown/index.d.ts +4 -0
- package/dist/markdown/index.js +14 -0
- package/dist/prefetch/index.js +12 -7
- package/dist/prerender/utils.js +5 -1
- package/dist/runtime/client/dev-toolbar/apps/audit/rules/a11y.js +9 -0
- package/dist/runtime/server/astro-island.js +57 -20
- package/dist/runtime/server/astro-island.prebuilt-dev.d.ts +1 -1
- package/dist/runtime/server/astro-island.prebuilt-dev.js +1 -1
- package/dist/runtime/server/astro-island.prebuilt.d.ts +1 -1
- package/dist/runtime/server/astro-island.prebuilt.js +1 -1
- package/dist/runtime/server/jsx.js +1 -1
- package/dist/runtime/server/render/common.js +10 -4
- package/dist/runtime/server/render/component.js +8 -6
- package/dist/runtime/server/render/head.js +1 -5
- package/dist/runtime/server/render/server-islands.js +2 -1
- package/dist/runtime/server/render/util.js +2 -2
- package/dist/runtime/server/scripts.js +6 -0
- package/dist/runtime/server/transition.d.ts +1 -6
- package/dist/runtime/server/transition.js +0 -8
- package/dist/transitions/events.d.ts +0 -14
- package/dist/transitions/events.js +0 -14
- package/dist/transitions/index.d.ts +0 -1
- package/dist/transitions/index.js +0 -2
- package/dist/transitions/vite-plugin-transitions.js +2 -4
- package/dist/types/public/config.d.ts +96 -14
- package/dist/types/public/content.d.ts +5 -5
- package/dist/types/public/index.d.ts +2 -1
- package/dist/types/public/integrations.d.ts +11 -3
- package/dist/types/public/internal.d.ts +1 -1
- package/dist/types/public/manifest.d.ts +1 -1
- package/dist/virtual-modules/i18n.d.ts +2 -2
- package/dist/virtual-modules/i18n.js +1 -1
- package/dist/vite-plugin-app/app.d.ts +13 -6
- package/dist/vite-plugin-app/app.js +51 -89
- package/dist/vite-plugin-app/createAstroServerApp.d.ts +3 -1
- package/dist/vite-plugin-app/createAstroServerApp.js +4 -3
- package/dist/vite-plugin-astro-server/plugin.js +11 -5
- package/dist/vite-plugin-astro-server/route-guard.d.ts +33 -0
- package/dist/vite-plugin-astro-server/route-guard.js +42 -23
- package/dist/vite-plugin-dev-status/index.d.ts +2 -0
- package/dist/vite-plugin-dev-status/index.js +15 -0
- package/dist/vite-plugin-head/index.js +36 -19
- package/dist/vite-plugin-hmr-reload/index.d.ts +1 -1
- package/dist/vite-plugin-hmr-reload/index.js +23 -1
- package/dist/vite-plugin-integrations-container/index.js +15 -6
- package/dist/vite-plugin-markdown/content-entry-type.js +7 -4
- package/dist/vite-plugin-markdown/images.js +9 -11
- package/dist/vite-plugin-markdown/index.js +12 -11
- package/dist/vite-plugin-utils/index.d.ts +1 -0
- package/dist/vite-plugin-utils/index.js +10 -1
- package/package.json +23 -16
- package/templates/content/types.d.ts +1 -0
- package/types/transitions.d.ts +0 -7
- package/dist/core/render-context.d.ts +0 -77
- package/dist/core/render-context.js +0 -826
|
@@ -10,10 +10,10 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
10
10
|
name: z.ZodString;
|
|
11
11
|
hooks: z.ZodDefault<z.ZodObject<{}, z.core.$loose>>;
|
|
12
12
|
}, z.core.$strip>>;
|
|
13
|
-
integrations: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.
|
|
13
|
+
integrations: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodObject<{
|
|
14
14
|
name: z.ZodString;
|
|
15
15
|
hooks: z.ZodDefault<z.ZodObject<{}, z.core.$loose>>;
|
|
16
|
-
}, z.core.$strip
|
|
16
|
+
}, z.core.$strip>>>>>;
|
|
17
17
|
redirects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
18
18
|
status: z.ZodUnion<readonly [z.ZodLiteral<300>, z.ZodLiteral<301>, z.ZodLiteral<302>, z.ZodLiteral<303>, z.ZodLiteral<304>, z.ZodLiteral<307>, z.ZodLiteral<308>]>;
|
|
19
19
|
destination: z.ZodString;
|
|
@@ -21,10 +21,10 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
21
21
|
prefetch: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
22
22
|
prefetchAll: z.ZodOptional<z.ZodBoolean>;
|
|
23
23
|
defaultStrategy: z.ZodOptional<z.ZodEnum<{
|
|
24
|
-
load: "load";
|
|
25
24
|
tap: "tap";
|
|
26
25
|
hover: "hover";
|
|
27
26
|
viewport: "viewport";
|
|
27
|
+
load: "load";
|
|
28
28
|
}>>;
|
|
29
29
|
}, z.core.$strip>]>>;
|
|
30
30
|
image: z.ZodPrefault<z.ZodObject<{
|
|
@@ -36,6 +36,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
36
36
|
entrypoint: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"astro/assets/services/sharp">, z.ZodString]>>;
|
|
37
37
|
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
38
38
|
}, z.core.$strip>>;
|
|
39
|
+
dangerouslyProcessSVG: z.ZodDefault<z.ZodBoolean>;
|
|
39
40
|
domains: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
40
41
|
remotePatterns: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
41
42
|
protocol: z.ZodOptional<z.ZodString>;
|
|
@@ -45,9 +46,9 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
45
46
|
}, z.core.$strip>>>;
|
|
46
47
|
layout: z.ZodOptional<z.ZodEnum<{
|
|
47
48
|
fixed: "fixed";
|
|
48
|
-
none: "none";
|
|
49
49
|
constrained: "constrained";
|
|
50
50
|
"full-width": "full-width";
|
|
51
|
+
none: "none";
|
|
51
52
|
}>>;
|
|
52
53
|
objectFit: z.ZodOptional<z.ZodString>;
|
|
53
54
|
objectPosition: z.ZodOptional<z.ZodString>;
|
|
@@ -136,7 +137,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
136
137
|
"vitesse-black": "vitesse-black";
|
|
137
138
|
"vitesse-dark": "vitesse-dark";
|
|
138
139
|
"vitesse-light": "vitesse-light";
|
|
139
|
-
}>, z.ZodCustom<NonNullable<import("
|
|
140
|
+
}>, z.ZodCustom<NonNullable<(import("shiki").BundledTheme | "css-variables") | import("shiki").ThemeRegistration | import("shiki").ThemeRegistrationRaw | undefined> & import("./base.js").ComplexifyUnionObj, NonNullable<(import("shiki").BundledTheme | "css-variables") | import("shiki").ThemeRegistration | import("shiki").ThemeRegistrationRaw | undefined> & import("./base.js").ComplexifyUnionObj>]>>;
|
|
140
141
|
themes: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEnum<{
|
|
141
142
|
andromeeda: "andromeeda";
|
|
142
143
|
"aurora-x": "aurora-x";
|
|
@@ -203,7 +204,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
203
204
|
"vitesse-black": "vitesse-black";
|
|
204
205
|
"vitesse-dark": "vitesse-dark";
|
|
205
206
|
"vitesse-light": "vitesse-light";
|
|
206
|
-
}>, z.ZodCustom<NonNullable<import("
|
|
207
|
+
}>, z.ZodCustom<NonNullable<(import("shiki").BundledTheme | "css-variables") | import("shiki").ThemeRegistration | import("shiki").ThemeRegistrationRaw | undefined> & import("./base.js").ComplexifyUnionObj, NonNullable<(import("shiki").BundledTheme | "css-variables") | import("shiki").ThemeRegistration | import("shiki").ThemeRegistrationRaw | undefined> & import("./base.js").ComplexifyUnionObj>]>>>>;
|
|
207
208
|
defaultColor: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"light">, z.ZodLiteral<"dark">, z.ZodString, z.ZodLiteral<false>]>>;
|
|
208
209
|
wrap: z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
|
|
209
210
|
transformers: z.ZodDefault<z.ZodArray<z.ZodCustom<import("shiki").ShikiTransformer & import("./base.js").ComplexifyUnionObj, import("shiki").ShikiTransformer & import("./base.js").ComplexifyUnionObj>>>;
|
|
@@ -211,8 +212,14 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
211
212
|
remarkPlugins: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodTuple<[z.ZodString, z.ZodAny], null>, z.ZodCustom<import("@astrojs/markdown-remark").RemarkPlugin & import("./base.js").ComplexifyUnionObj, import("@astrojs/markdown-remark").RemarkPlugin & import("./base.js").ComplexifyUnionObj>, z.ZodTuple<[z.ZodCustom<import("@astrojs/markdown-remark").RemarkPlugin & import("./base.js").ComplexifyUnionObj, import("@astrojs/markdown-remark").RemarkPlugin & import("./base.js").ComplexifyUnionObj>, z.ZodAny], null>]>>>;
|
|
212
213
|
rehypePlugins: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodTuple<[z.ZodString, z.ZodAny], null>, z.ZodCustom<import("@astrojs/markdown-remark").RehypePlugin & import("./base.js").ComplexifyUnionObj, import("@astrojs/markdown-remark").RehypePlugin & import("./base.js").ComplexifyUnionObj>, z.ZodTuple<[z.ZodCustom<import("@astrojs/markdown-remark").RehypePlugin & import("./base.js").ComplexifyUnionObj, import("@astrojs/markdown-remark").RehypePlugin & import("./base.js").ComplexifyUnionObj>, z.ZodAny], null>]>>>;
|
|
213
214
|
remarkRehype: z.ZodDefault<z.ZodCustom<import("./base.js").RemarkRehype, import("./base.js").RemarkRehype>>;
|
|
214
|
-
gfm: z.
|
|
215
|
-
smartypants: z.
|
|
215
|
+
gfm: z.ZodOptional<z.ZodBoolean>;
|
|
216
|
+
smartypants: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodType<import("./base.js").Smartypants, unknown, z.core.$ZodTypeInternals<import("./base.js").Smartypants, unknown>>]>, z.ZodTransform<false | import("./base.js").Smartypants, boolean | import("./base.js").Smartypants>>>;
|
|
217
|
+
processor: z.ZodDefault<z.ZodObject<{
|
|
218
|
+
name: z.ZodString;
|
|
219
|
+
options: z.ZodDefault<z.ZodCustom<object, object>>;
|
|
220
|
+
createRenderer: z.ZodCustom<(shared: import("@astrojs/markdown-remark").AstroMarkdownOptions) => Promise<import("@astrojs/markdown-remark").MarkdownRenderer>, (shared: import("@astrojs/markdown-remark").AstroMarkdownOptions) => Promise<import("@astrojs/markdown-remark").MarkdownRenderer>>;
|
|
221
|
+
createMdxRenderer: z.ZodOptional<z.ZodCustom<((shared: import("@astrojs/markdown-remark").AstroMarkdownOptions, mdx: import("@astrojs/internal-helpers/markdown").MdxRendererOptions) => Promise<import("@astrojs/internal-helpers/markdown").MdxRenderer>) | undefined, ((shared: import("@astrojs/markdown-remark").AstroMarkdownOptions, mdx: import("@astrojs/internal-helpers/markdown").MdxRendererOptions) => Promise<import("@astrojs/internal-helpers/markdown").MdxRenderer>) | undefined>>;
|
|
222
|
+
}, z.core.$strip>>;
|
|
216
223
|
}, z.core.$strip>>;
|
|
217
224
|
vite: z.ZodDefault<z.ZodCustom<import("../../../index.js").ViteUserConfig, import("../../../index.js").ViteUserConfig>>;
|
|
218
225
|
i18n: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
@@ -322,9 +329,9 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
322
329
|
path: z.ZodOptional<z.ZodString>;
|
|
323
330
|
maxAge: z.ZodOptional<z.ZodNumber>;
|
|
324
331
|
sameSite: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
332
|
+
none: "none";
|
|
325
333
|
strict: "strict";
|
|
326
334
|
lax: "lax";
|
|
327
|
-
none: "none";
|
|
328
335
|
}>, z.ZodBoolean]>>;
|
|
329
336
|
secure: z.ZodOptional<z.ZodBoolean>;
|
|
330
337
|
}, z.core.$strip>, z.ZodPipe<z.ZodString, z.ZodTransform<{
|
|
@@ -368,11 +375,11 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
368
375
|
fallbacks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
369
376
|
optimizedFallbacks: z.ZodOptional<z.ZodBoolean>;
|
|
370
377
|
display: z.ZodOptional<z.ZodEnum<{
|
|
371
|
-
optional: "optional";
|
|
372
378
|
auto: "auto";
|
|
379
|
+
optional: "optional";
|
|
380
|
+
fallback: "fallback";
|
|
373
381
|
block: "block";
|
|
374
382
|
swap: "swap";
|
|
375
|
-
fallback: "fallback";
|
|
376
383
|
}>>;
|
|
377
384
|
stretch: z.ZodOptional<z.ZodString>;
|
|
378
385
|
featureSettings: z.ZodOptional<z.ZodString>;
|
|
@@ -381,6 +388,9 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
381
388
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
382
389
|
}, z.core.$strict>>>;
|
|
383
390
|
experimental: z.ZodPrefault<z.ZodObject<{
|
|
391
|
+
advancedRouting: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
392
|
+
fetchFile: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
393
|
+
}, z.core.$strict>]>>>;
|
|
384
394
|
clientPrerender: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
385
395
|
contentIntellisense: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
386
396
|
chromeDevtoolsWorkspace: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -431,19 +441,18 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
431
441
|
redirects: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
432
442
|
inlineStylesheets: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
433
443
|
never: "never";
|
|
434
|
-
auto: "auto";
|
|
435
444
|
always: "always";
|
|
445
|
+
auto: "auto";
|
|
436
446
|
}>>>;
|
|
437
447
|
concurrency: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
438
448
|
}, z.core.$strip>>>;
|
|
439
|
-
server: z.ZodPipe<z.ZodTransform<any, unknown>, z.
|
|
449
|
+
server: z.ZodPrefault<z.ZodPipe<z.ZodTransform<any, unknown>, z.ZodObject<{
|
|
440
450
|
open: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
441
451
|
host: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
442
452
|
port: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
443
453
|
headers: z.ZodOptional<z.ZodCustom<OutgoingHttpHeaders, OutgoingHttpHeaders>>;
|
|
444
|
-
streaming: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
445
454
|
allowedHosts: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodLiteral<true>]>>>;
|
|
446
|
-
}, z.core.$strip
|
|
455
|
+
}, z.core.$strip>>>;
|
|
447
456
|
}, z.core.$strip>, z.ZodTransform<{
|
|
448
457
|
base: string;
|
|
449
458
|
trailingSlash: "never" | "ignore" | "always";
|
|
@@ -468,6 +477,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
468
477
|
entrypoint: string;
|
|
469
478
|
config: Record<string, any>;
|
|
470
479
|
};
|
|
480
|
+
dangerouslyProcessSVG: boolean;
|
|
471
481
|
domains: string[];
|
|
472
482
|
remotePatterns: {
|
|
473
483
|
protocol?: string | undefined;
|
|
@@ -476,7 +486,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
476
486
|
pathname?: string | undefined;
|
|
477
487
|
}[];
|
|
478
488
|
responsiveStyles: boolean;
|
|
479
|
-
layout?: "fixed" | "
|
|
489
|
+
layout?: "fixed" | "constrained" | "full-width" | "none" | undefined;
|
|
480
490
|
objectFit?: string | undefined;
|
|
481
491
|
objectPosition?: string | undefined;
|
|
482
492
|
breakpoints?: number[] | undefined;
|
|
@@ -493,17 +503,23 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
493
503
|
shikiConfig: {
|
|
494
504
|
langs: (import("shiki").LanguageRegistration & import("./base.js").ComplexifyUnionObj)[];
|
|
495
505
|
langAlias: Record<string, string>;
|
|
496
|
-
theme: "andromeeda" | "aurora-x" | "ayu-dark" | "ayu-light" | "ayu-mirage" | "catppuccin-frappe" | "catppuccin-latte" | "catppuccin-macchiato" | "catppuccin-mocha" | "dark-plus" | "dracula" | "dracula-soft" | "everforest-dark" | "everforest-light" | "github-dark" | "github-dark-default" | "github-dark-dimmed" | "github-dark-high-contrast" | "github-light" | "github-light-default" | "github-light-high-contrast" | "gruvbox-dark-hard" | "gruvbox-dark-medium" | "gruvbox-dark-soft" | "gruvbox-light-hard" | "gruvbox-light-medium" | "gruvbox-light-soft" | "horizon" | "horizon-bright" | "houston" | "kanagawa-dragon" | "kanagawa-lotus" | "kanagawa-wave" | "laserwave" | "light-plus" | "material-theme" | "material-theme-darker" | "material-theme-lighter" | "material-theme-ocean" | "material-theme-palenight" | "min-dark" | "min-light" | "monokai" | "night-owl" | "night-owl-light" | "nord" | "one-dark-pro" | "one-light" | "plastic" | "poimandres" | "red" | "rose-pine" | "rose-pine-dawn" | "rose-pine-moon" | "slack-dark" | "slack-ochin" | "snazzy-light" | "solarized-dark" | "solarized-light" | "synthwave-84" | "tokyo-night" | "vesper" | "vitesse-black" | "vitesse-dark" | "vitesse-light" | (NonNullable<import("
|
|
497
|
-
themes: Record<string, "andromeeda" | "aurora-x" | "ayu-dark" | "ayu-light" | "ayu-mirage" | "catppuccin-frappe" | "catppuccin-latte" | "catppuccin-macchiato" | "catppuccin-mocha" | "dark-plus" | "dracula" | "dracula-soft" | "everforest-dark" | "everforest-light" | "github-dark" | "github-dark-default" | "github-dark-dimmed" | "github-dark-high-contrast" | "github-light" | "github-light-default" | "github-light-high-contrast" | "gruvbox-dark-hard" | "gruvbox-dark-medium" | "gruvbox-dark-soft" | "gruvbox-light-hard" | "gruvbox-light-medium" | "gruvbox-light-soft" | "horizon" | "horizon-bright" | "houston" | "kanagawa-dragon" | "kanagawa-lotus" | "kanagawa-wave" | "laserwave" | "light-plus" | "material-theme" | "material-theme-darker" | "material-theme-lighter" | "material-theme-ocean" | "material-theme-palenight" | "min-dark" | "min-light" | "monokai" | "night-owl" | "night-owl-light" | "nord" | "one-dark-pro" | "one-light" | "plastic" | "poimandres" | "red" | "rose-pine" | "rose-pine-dawn" | "rose-pine-moon" | "slack-dark" | "slack-ochin" | "snazzy-light" | "solarized-dark" | "solarized-light" | "synthwave-84" | "tokyo-night" | "vesper" | "vitesse-black" | "vitesse-dark" | "vitesse-light" | (NonNullable<import("
|
|
506
|
+
theme: "andromeeda" | "aurora-x" | "ayu-dark" | "ayu-light" | "ayu-mirage" | "catppuccin-frappe" | "catppuccin-latte" | "catppuccin-macchiato" | "catppuccin-mocha" | "dark-plus" | "dracula" | "dracula-soft" | "everforest-dark" | "everforest-light" | "github-dark" | "github-dark-default" | "github-dark-dimmed" | "github-dark-high-contrast" | "github-light" | "github-light-default" | "github-light-high-contrast" | "gruvbox-dark-hard" | "gruvbox-dark-medium" | "gruvbox-dark-soft" | "gruvbox-light-hard" | "gruvbox-light-medium" | "gruvbox-light-soft" | "horizon" | "horizon-bright" | "houston" | "kanagawa-dragon" | "kanagawa-lotus" | "kanagawa-wave" | "laserwave" | "light-plus" | "material-theme" | "material-theme-darker" | "material-theme-lighter" | "material-theme-ocean" | "material-theme-palenight" | "min-dark" | "min-light" | "monokai" | "night-owl" | "night-owl-light" | "nord" | "one-dark-pro" | "one-light" | "plastic" | "poimandres" | "red" | "rose-pine" | "rose-pine-dawn" | "rose-pine-moon" | "slack-dark" | "slack-ochin" | "snazzy-light" | "solarized-dark" | "solarized-light" | "synthwave-84" | "tokyo-night" | "vesper" | "vitesse-black" | "vitesse-dark" | "vitesse-light" | (NonNullable<(import("shiki").BundledTheme | "css-variables") | import("shiki").ThemeRegistration | import("shiki").ThemeRegistrationRaw | undefined> & import("./base.js").ComplexifyUnionObj);
|
|
507
|
+
themes: Record<string, "andromeeda" | "aurora-x" | "ayu-dark" | "ayu-light" | "ayu-mirage" | "catppuccin-frappe" | "catppuccin-latte" | "catppuccin-macchiato" | "catppuccin-mocha" | "dark-plus" | "dracula" | "dracula-soft" | "everforest-dark" | "everforest-light" | "github-dark" | "github-dark-default" | "github-dark-dimmed" | "github-dark-high-contrast" | "github-light" | "github-light-default" | "github-light-high-contrast" | "gruvbox-dark-hard" | "gruvbox-dark-medium" | "gruvbox-dark-soft" | "gruvbox-light-hard" | "gruvbox-light-medium" | "gruvbox-light-soft" | "horizon" | "horizon-bright" | "houston" | "kanagawa-dragon" | "kanagawa-lotus" | "kanagawa-wave" | "laserwave" | "light-plus" | "material-theme" | "material-theme-darker" | "material-theme-lighter" | "material-theme-ocean" | "material-theme-palenight" | "min-dark" | "min-light" | "monokai" | "night-owl" | "night-owl-light" | "nord" | "one-dark-pro" | "one-light" | "plastic" | "poimandres" | "red" | "rose-pine" | "rose-pine-dawn" | "rose-pine-moon" | "slack-dark" | "slack-ochin" | "snazzy-light" | "solarized-dark" | "solarized-light" | "synthwave-84" | "tokyo-night" | "vesper" | "vitesse-black" | "vitesse-dark" | "vitesse-light" | (NonNullable<(import("shiki").BundledTheme | "css-variables") | import("shiki").ThemeRegistration | import("shiki").ThemeRegistrationRaw | undefined> & import("./base.js").ComplexifyUnionObj)>;
|
|
498
508
|
wrap: boolean | null;
|
|
499
509
|
transformers: (import("shiki").ShikiTransformer & import("./base.js").ComplexifyUnionObj)[];
|
|
500
510
|
defaultColor?: string | false | undefined;
|
|
501
511
|
};
|
|
502
|
-
remarkPlugins: (string | (import("@astrojs/markdown-remark").RemarkPlugin & import("./base.js").ComplexifyUnionObj) | [
|
|
503
|
-
rehypePlugins: (string | (import("@astrojs/markdown-remark").RehypePlugin & import("./base.js").ComplexifyUnionObj) | [
|
|
512
|
+
remarkPlugins: (string | [string, any] | (import("@astrojs/markdown-remark").RemarkPlugin & import("./base.js").ComplexifyUnionObj) | [import("@astrojs/markdown-remark").RemarkPlugin & import("./base.js").ComplexifyUnionObj, any])[];
|
|
513
|
+
rehypePlugins: (string | [string, any] | (import("@astrojs/markdown-remark").RehypePlugin & import("./base.js").ComplexifyUnionObj) | [import("@astrojs/markdown-remark").RehypePlugin & import("./base.js").ComplexifyUnionObj, any])[];
|
|
504
514
|
remarkRehype: import("./base.js").RemarkRehype;
|
|
505
|
-
|
|
506
|
-
|
|
515
|
+
processor: {
|
|
516
|
+
name: string;
|
|
517
|
+
options: object;
|
|
518
|
+
createRenderer: (shared: import("@astrojs/markdown-remark").AstroMarkdownOptions) => Promise<import("@astrojs/markdown-remark").MarkdownRenderer>;
|
|
519
|
+
createMdxRenderer?: ((shared: import("@astrojs/markdown-remark").AstroMarkdownOptions, mdx: import("@astrojs/internal-helpers/markdown").MdxRendererOptions) => Promise<import("@astrojs/internal-helpers/markdown").MdxRenderer>) | undefined;
|
|
520
|
+
};
|
|
521
|
+
gfm?: boolean | undefined;
|
|
522
|
+
smartypants?: false | import("./base.js").Smartypants | undefined;
|
|
507
523
|
};
|
|
508
524
|
vite: import("../../../index.js").ViteUserConfig;
|
|
509
525
|
security: {
|
|
@@ -540,6 +556,11 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
540
556
|
context: "server";
|
|
541
557
|
access: "secret";
|
|
542
558
|
}) & ({
|
|
559
|
+
type: "enum";
|
|
560
|
+
values: string[];
|
|
561
|
+
optional?: boolean | undefined;
|
|
562
|
+
default?: string | undefined;
|
|
563
|
+
} | {
|
|
543
564
|
type: "string";
|
|
544
565
|
optional?: boolean | undefined;
|
|
545
566
|
default?: string | undefined;
|
|
@@ -559,11 +580,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
559
580
|
lt?: number | undefined;
|
|
560
581
|
max?: number | undefined;
|
|
561
582
|
int?: boolean | undefined;
|
|
562
|
-
} | {
|
|
563
|
-
type: "enum";
|
|
564
|
-
values: string[];
|
|
565
|
-
optional?: boolean | undefined;
|
|
566
|
-
default?: string | undefined;
|
|
567
583
|
} | {
|
|
568
584
|
type: "boolean";
|
|
569
585
|
optional?: boolean | undefined;
|
|
@@ -573,6 +589,9 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
573
589
|
};
|
|
574
590
|
prerenderConflictBehavior: "error" | "ignore" | "warn";
|
|
575
591
|
experimental: {
|
|
592
|
+
advancedRouting: boolean | {
|
|
593
|
+
fetchFile: string | null;
|
|
594
|
+
};
|
|
576
595
|
clientPrerender: boolean;
|
|
577
596
|
contentIntellisense: boolean;
|
|
578
597
|
chromeDevtoolsWorkspace: boolean;
|
|
@@ -618,7 +637,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
618
637
|
assets: string;
|
|
619
638
|
serverEntry: string;
|
|
620
639
|
redirects: boolean;
|
|
621
|
-
inlineStylesheets: "never" | "
|
|
640
|
+
inlineStylesheets: "never" | "always" | "auto";
|
|
622
641
|
concurrency: number;
|
|
623
642
|
assetsPrefix?: string | ({
|
|
624
643
|
fallback: string;
|
|
@@ -628,7 +647,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
628
647
|
open: string | boolean;
|
|
629
648
|
host: string | boolean;
|
|
630
649
|
port: number;
|
|
631
|
-
streaming: boolean;
|
|
632
650
|
allowedHosts: true | string[];
|
|
633
651
|
headers?: OutgoingHttpHeaders | undefined;
|
|
634
652
|
};
|
|
@@ -641,7 +659,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
641
659
|
} | undefined;
|
|
642
660
|
prefetch?: boolean | {
|
|
643
661
|
prefetchAll?: boolean | undefined;
|
|
644
|
-
defaultStrategy?: "
|
|
662
|
+
defaultStrategy?: "tap" | "hover" | "viewport" | "load" | undefined;
|
|
645
663
|
} | undefined;
|
|
646
664
|
i18n?: {
|
|
647
665
|
defaultLocale: string;
|
|
@@ -670,7 +688,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
670
688
|
domain?: string | undefined;
|
|
671
689
|
path?: string | undefined;
|
|
672
690
|
maxAge?: number | undefined;
|
|
673
|
-
sameSite?: boolean | "
|
|
691
|
+
sameSite?: boolean | "none" | "strict" | "lax" | undefined;
|
|
674
692
|
secure?: boolean | undefined;
|
|
675
693
|
} | undefined;
|
|
676
694
|
ttl?: number | undefined;
|
|
@@ -685,7 +703,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
685
703
|
formats?: ["woff2" | "woff" | "otf" | "ttf" | "eot", ...("woff2" | "woff" | "otf" | "ttf" | "eot")[]] | undefined;
|
|
686
704
|
fallbacks?: string[] | undefined;
|
|
687
705
|
optimizedFallbacks?: boolean | undefined;
|
|
688
|
-
display?: "
|
|
706
|
+
display?: "auto" | "optional" | "fallback" | "block" | "swap" | undefined;
|
|
689
707
|
stretch?: string | undefined;
|
|
690
708
|
featureSettings?: string | undefined;
|
|
691
709
|
variationSettings?: string | undefined;
|
|
@@ -716,6 +734,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
716
734
|
entrypoint: string;
|
|
717
735
|
config: Record<string, any>;
|
|
718
736
|
};
|
|
737
|
+
dangerouslyProcessSVG: boolean;
|
|
719
738
|
domains: string[];
|
|
720
739
|
remotePatterns: {
|
|
721
740
|
protocol?: string | undefined;
|
|
@@ -724,7 +743,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
724
743
|
pathname?: string | undefined;
|
|
725
744
|
}[];
|
|
726
745
|
responsiveStyles: boolean;
|
|
727
|
-
layout?: "fixed" | "
|
|
746
|
+
layout?: "fixed" | "constrained" | "full-width" | "none" | undefined;
|
|
728
747
|
objectFit?: string | undefined;
|
|
729
748
|
objectPosition?: string | undefined;
|
|
730
749
|
breakpoints?: number[] | undefined;
|
|
@@ -741,17 +760,23 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
741
760
|
shikiConfig: {
|
|
742
761
|
langs: (import("shiki").LanguageRegistration & import("./base.js").ComplexifyUnionObj)[];
|
|
743
762
|
langAlias: Record<string, string>;
|
|
744
|
-
theme: "andromeeda" | "aurora-x" | "ayu-dark" | "ayu-light" | "ayu-mirage" | "catppuccin-frappe" | "catppuccin-latte" | "catppuccin-macchiato" | "catppuccin-mocha" | "dark-plus" | "dracula" | "dracula-soft" | "everforest-dark" | "everforest-light" | "github-dark" | "github-dark-default" | "github-dark-dimmed" | "github-dark-high-contrast" | "github-light" | "github-light-default" | "github-light-high-contrast" | "gruvbox-dark-hard" | "gruvbox-dark-medium" | "gruvbox-dark-soft" | "gruvbox-light-hard" | "gruvbox-light-medium" | "gruvbox-light-soft" | "horizon" | "horizon-bright" | "houston" | "kanagawa-dragon" | "kanagawa-lotus" | "kanagawa-wave" | "laserwave" | "light-plus" | "material-theme" | "material-theme-darker" | "material-theme-lighter" | "material-theme-ocean" | "material-theme-palenight" | "min-dark" | "min-light" | "monokai" | "night-owl" | "night-owl-light" | "nord" | "one-dark-pro" | "one-light" | "plastic" | "poimandres" | "red" | "rose-pine" | "rose-pine-dawn" | "rose-pine-moon" | "slack-dark" | "slack-ochin" | "snazzy-light" | "solarized-dark" | "solarized-light" | "synthwave-84" | "tokyo-night" | "vesper" | "vitesse-black" | "vitesse-dark" | "vitesse-light" | (NonNullable<import("
|
|
745
|
-
themes: Record<string, "andromeeda" | "aurora-x" | "ayu-dark" | "ayu-light" | "ayu-mirage" | "catppuccin-frappe" | "catppuccin-latte" | "catppuccin-macchiato" | "catppuccin-mocha" | "dark-plus" | "dracula" | "dracula-soft" | "everforest-dark" | "everforest-light" | "github-dark" | "github-dark-default" | "github-dark-dimmed" | "github-dark-high-contrast" | "github-light" | "github-light-default" | "github-light-high-contrast" | "gruvbox-dark-hard" | "gruvbox-dark-medium" | "gruvbox-dark-soft" | "gruvbox-light-hard" | "gruvbox-light-medium" | "gruvbox-light-soft" | "horizon" | "horizon-bright" | "houston" | "kanagawa-dragon" | "kanagawa-lotus" | "kanagawa-wave" | "laserwave" | "light-plus" | "material-theme" | "material-theme-darker" | "material-theme-lighter" | "material-theme-ocean" | "material-theme-palenight" | "min-dark" | "min-light" | "monokai" | "night-owl" | "night-owl-light" | "nord" | "one-dark-pro" | "one-light" | "plastic" | "poimandres" | "red" | "rose-pine" | "rose-pine-dawn" | "rose-pine-moon" | "slack-dark" | "slack-ochin" | "snazzy-light" | "solarized-dark" | "solarized-light" | "synthwave-84" | "tokyo-night" | "vesper" | "vitesse-black" | "vitesse-dark" | "vitesse-light" | (NonNullable<import("
|
|
763
|
+
theme: "andromeeda" | "aurora-x" | "ayu-dark" | "ayu-light" | "ayu-mirage" | "catppuccin-frappe" | "catppuccin-latte" | "catppuccin-macchiato" | "catppuccin-mocha" | "dark-plus" | "dracula" | "dracula-soft" | "everforest-dark" | "everforest-light" | "github-dark" | "github-dark-default" | "github-dark-dimmed" | "github-dark-high-contrast" | "github-light" | "github-light-default" | "github-light-high-contrast" | "gruvbox-dark-hard" | "gruvbox-dark-medium" | "gruvbox-dark-soft" | "gruvbox-light-hard" | "gruvbox-light-medium" | "gruvbox-light-soft" | "horizon" | "horizon-bright" | "houston" | "kanagawa-dragon" | "kanagawa-lotus" | "kanagawa-wave" | "laserwave" | "light-plus" | "material-theme" | "material-theme-darker" | "material-theme-lighter" | "material-theme-ocean" | "material-theme-palenight" | "min-dark" | "min-light" | "monokai" | "night-owl" | "night-owl-light" | "nord" | "one-dark-pro" | "one-light" | "plastic" | "poimandres" | "red" | "rose-pine" | "rose-pine-dawn" | "rose-pine-moon" | "slack-dark" | "slack-ochin" | "snazzy-light" | "solarized-dark" | "solarized-light" | "synthwave-84" | "tokyo-night" | "vesper" | "vitesse-black" | "vitesse-dark" | "vitesse-light" | (NonNullable<(import("shiki").BundledTheme | "css-variables") | import("shiki").ThemeRegistration | import("shiki").ThemeRegistrationRaw | undefined> & import("./base.js").ComplexifyUnionObj);
|
|
764
|
+
themes: Record<string, "andromeeda" | "aurora-x" | "ayu-dark" | "ayu-light" | "ayu-mirage" | "catppuccin-frappe" | "catppuccin-latte" | "catppuccin-macchiato" | "catppuccin-mocha" | "dark-plus" | "dracula" | "dracula-soft" | "everforest-dark" | "everforest-light" | "github-dark" | "github-dark-default" | "github-dark-dimmed" | "github-dark-high-contrast" | "github-light" | "github-light-default" | "github-light-high-contrast" | "gruvbox-dark-hard" | "gruvbox-dark-medium" | "gruvbox-dark-soft" | "gruvbox-light-hard" | "gruvbox-light-medium" | "gruvbox-light-soft" | "horizon" | "horizon-bright" | "houston" | "kanagawa-dragon" | "kanagawa-lotus" | "kanagawa-wave" | "laserwave" | "light-plus" | "material-theme" | "material-theme-darker" | "material-theme-lighter" | "material-theme-ocean" | "material-theme-palenight" | "min-dark" | "min-light" | "monokai" | "night-owl" | "night-owl-light" | "nord" | "one-dark-pro" | "one-light" | "plastic" | "poimandres" | "red" | "rose-pine" | "rose-pine-dawn" | "rose-pine-moon" | "slack-dark" | "slack-ochin" | "snazzy-light" | "solarized-dark" | "solarized-light" | "synthwave-84" | "tokyo-night" | "vesper" | "vitesse-black" | "vitesse-dark" | "vitesse-light" | (NonNullable<(import("shiki").BundledTheme | "css-variables") | import("shiki").ThemeRegistration | import("shiki").ThemeRegistrationRaw | undefined> & import("./base.js").ComplexifyUnionObj)>;
|
|
746
765
|
wrap: boolean | null;
|
|
747
766
|
transformers: (import("shiki").ShikiTransformer & import("./base.js").ComplexifyUnionObj)[];
|
|
748
767
|
defaultColor?: string | false | undefined;
|
|
749
768
|
};
|
|
750
|
-
remarkPlugins: (string | (import("@astrojs/markdown-remark").RemarkPlugin & import("./base.js").ComplexifyUnionObj) | [
|
|
751
|
-
rehypePlugins: (string | (import("@astrojs/markdown-remark").RehypePlugin & import("./base.js").ComplexifyUnionObj) | [
|
|
769
|
+
remarkPlugins: (string | [string, any] | (import("@astrojs/markdown-remark").RemarkPlugin & import("./base.js").ComplexifyUnionObj) | [import("@astrojs/markdown-remark").RemarkPlugin & import("./base.js").ComplexifyUnionObj, any])[];
|
|
770
|
+
rehypePlugins: (string | [string, any] | (import("@astrojs/markdown-remark").RehypePlugin & import("./base.js").ComplexifyUnionObj) | [import("@astrojs/markdown-remark").RehypePlugin & import("./base.js").ComplexifyUnionObj, any])[];
|
|
752
771
|
remarkRehype: import("./base.js").RemarkRehype;
|
|
753
|
-
|
|
754
|
-
|
|
772
|
+
processor: {
|
|
773
|
+
name: string;
|
|
774
|
+
options: object;
|
|
775
|
+
createRenderer: (shared: import("@astrojs/markdown-remark").AstroMarkdownOptions) => Promise<import("@astrojs/markdown-remark").MarkdownRenderer>;
|
|
776
|
+
createMdxRenderer?: ((shared: import("@astrojs/markdown-remark").AstroMarkdownOptions, mdx: import("@astrojs/internal-helpers/markdown").MdxRendererOptions) => Promise<import("@astrojs/internal-helpers/markdown").MdxRenderer>) | undefined;
|
|
777
|
+
};
|
|
778
|
+
gfm?: boolean | undefined;
|
|
779
|
+
smartypants?: false | import("./base.js").Smartypants | undefined;
|
|
755
780
|
};
|
|
756
781
|
vite: import("../../../index.js").ViteUserConfig;
|
|
757
782
|
security: {
|
|
@@ -788,6 +813,11 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
788
813
|
context: "server";
|
|
789
814
|
access: "secret";
|
|
790
815
|
}) & ({
|
|
816
|
+
type: "enum";
|
|
817
|
+
values: string[];
|
|
818
|
+
optional?: boolean | undefined;
|
|
819
|
+
default?: string | undefined;
|
|
820
|
+
} | {
|
|
791
821
|
type: "string";
|
|
792
822
|
optional?: boolean | undefined;
|
|
793
823
|
default?: string | undefined;
|
|
@@ -807,11 +837,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
807
837
|
lt?: number | undefined;
|
|
808
838
|
max?: number | undefined;
|
|
809
839
|
int?: boolean | undefined;
|
|
810
|
-
} | {
|
|
811
|
-
type: "enum";
|
|
812
|
-
values: string[];
|
|
813
|
-
optional?: boolean | undefined;
|
|
814
|
-
default?: string | undefined;
|
|
815
840
|
} | {
|
|
816
841
|
type: "boolean";
|
|
817
842
|
optional?: boolean | undefined;
|
|
@@ -821,6 +846,9 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
821
846
|
};
|
|
822
847
|
prerenderConflictBehavior: "error" | "ignore" | "warn";
|
|
823
848
|
experimental: {
|
|
849
|
+
advancedRouting: boolean | {
|
|
850
|
+
fetchFile: string | null;
|
|
851
|
+
};
|
|
824
852
|
clientPrerender: boolean;
|
|
825
853
|
contentIntellisense: boolean;
|
|
826
854
|
chromeDevtoolsWorkspace: boolean;
|
|
@@ -866,7 +894,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
866
894
|
assets: string;
|
|
867
895
|
serverEntry: string;
|
|
868
896
|
redirects: boolean;
|
|
869
|
-
inlineStylesheets: "never" | "
|
|
897
|
+
inlineStylesheets: "never" | "always" | "auto";
|
|
870
898
|
concurrency: number;
|
|
871
899
|
assetsPrefix?: string | ({
|
|
872
900
|
fallback: string;
|
|
@@ -876,7 +904,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
876
904
|
open: string | boolean;
|
|
877
905
|
host: string | boolean;
|
|
878
906
|
port: number;
|
|
879
|
-
streaming: boolean;
|
|
880
907
|
allowedHosts: true | string[];
|
|
881
908
|
headers?: OutgoingHttpHeaders | undefined;
|
|
882
909
|
};
|
|
@@ -889,7 +916,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
889
916
|
} | undefined;
|
|
890
917
|
prefetch?: boolean | {
|
|
891
918
|
prefetchAll?: boolean | undefined;
|
|
892
|
-
defaultStrategy?: "
|
|
919
|
+
defaultStrategy?: "tap" | "hover" | "viewport" | "load" | undefined;
|
|
893
920
|
} | undefined;
|
|
894
921
|
i18n?: {
|
|
895
922
|
defaultLocale: string;
|
|
@@ -918,7 +945,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
918
945
|
domain?: string | undefined;
|
|
919
946
|
path?: string | undefined;
|
|
920
947
|
maxAge?: number | undefined;
|
|
921
|
-
sameSite?: boolean | "
|
|
948
|
+
sameSite?: boolean | "none" | "strict" | "lax" | undefined;
|
|
922
949
|
secure?: boolean | undefined;
|
|
923
950
|
} | undefined;
|
|
924
951
|
ttl?: number | undefined;
|
|
@@ -933,7 +960,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
933
960
|
formats?: ["woff2" | "woff" | "otf" | "ttf" | "eot", ...("woff2" | "woff" | "otf" | "ttf" | "eot")[]] | undefined;
|
|
934
961
|
fallbacks?: string[] | undefined;
|
|
935
962
|
optimizedFallbacks?: boolean | undefined;
|
|
936
|
-
display?: "
|
|
963
|
+
display?: "auto" | "optional" | "fallback" | "block" | "swap" | undefined;
|
|
937
964
|
stretch?: string | undefined;
|
|
938
965
|
featureSettings?: string | undefined;
|
|
939
966
|
variationSettings?: string | undefined;
|
|
@@ -59,10 +59,9 @@ function createRelativeSchema(cmd, fileProtocolRoot) {
|
|
|
59
59
|
host: z.union([z.string(), z.boolean()]).optional().default(ASTRO_CONFIG_DEFAULTS.server.host),
|
|
60
60
|
port: z.number().optional().default(ASTRO_CONFIG_DEFAULTS.server.port),
|
|
61
61
|
headers: z.custom().optional(),
|
|
62
|
-
streaming: z.boolean().optional().default(true),
|
|
63
62
|
allowedHosts: z.union([z.array(z.string()), z.literal(true)]).optional().default(ASTRO_CONFIG_DEFAULTS.server.allowedHosts)
|
|
64
|
-
})
|
|
65
|
-
)
|
|
63
|
+
})
|
|
64
|
+
).prefault({})
|
|
66
65
|
}).transform((config) => {
|
|
67
66
|
if (config.outDir.toString() !== resolveDirAsUrl(ASTRO_CONFIG_DEFAULTS.outDir, fileProtocolRoot).toString()) {
|
|
68
67
|
const outDirPath = fileURLToPath(config.outDir);
|
|
@@ -149,10 +149,8 @@ async function createSettings(config, logLevel, cwd) {
|
|
|
149
149
|
if (cwd) {
|
|
150
150
|
watchFiles.push(fileURLToPath(new URL("./package.json", pathToFileURL(cwd))));
|
|
151
151
|
}
|
|
152
|
-
if (
|
|
153
|
-
watchFiles.push(
|
|
154
|
-
...[tsconfig.tsconfigFile, ...(tsconfig.extended ?? []).map((e) => e.tsconfigFile)]
|
|
155
|
-
);
|
|
152
|
+
if (!tsconfig.error) {
|
|
153
|
+
watchFiles.push(...tsconfig.sources);
|
|
156
154
|
settings.tsConfig = tsconfig.tsconfig;
|
|
157
155
|
settings.tsConfigPath = tsconfig.tsconfigFile;
|
|
158
156
|
}
|
|
@@ -1,17 +1,32 @@
|
|
|
1
|
-
import { type TSConfckParseResult } from 'tsconfck';
|
|
2
1
|
import type { CompilerOptions, TypeAcquisition } from 'typescript';
|
|
3
2
|
export declare const defaultTSConfig: TSConfig;
|
|
4
3
|
export type frameworkWithTSSettings = 'vue' | 'react' | 'preact' | 'solid-js';
|
|
5
4
|
export declare const presets: Map<frameworkWithTSSettings, TSConfig>;
|
|
6
|
-
|
|
5
|
+
export interface TSConfigLoadedResult {
|
|
6
|
+
error?: undefined;
|
|
7
|
+
/** Absolute path of the root tsconfig/jsconfig file that was loaded. */
|
|
8
|
+
tsconfigFile: string;
|
|
9
|
+
/** The merged/resolved config (after `extends` are walked). */
|
|
10
|
+
tsconfig: TSConfig;
|
|
11
|
+
/** The user-written, un-merged config. Used by `astro add` to round-trip. */
|
|
12
|
+
rawConfig: TSConfig;
|
|
13
|
+
/**
|
|
14
|
+
* Every tsconfig file that contributed via `extends`, root-first.
|
|
15
|
+
* Includes `tsconfigFile`. Used to populate the dev-server watch list.
|
|
16
|
+
*/
|
|
17
|
+
sources: string[];
|
|
18
|
+
}
|
|
19
|
+
export type TSConfigResult = TSConfigLoadedResult | {
|
|
20
|
+
error: 'invalid-config';
|
|
21
|
+
message: string;
|
|
22
|
+
} | {
|
|
23
|
+
error: 'missing-config';
|
|
24
|
+
};
|
|
7
25
|
/**
|
|
8
|
-
* Load a tsconfig.json or jsconfig.json
|
|
9
|
-
* @param root The
|
|
10
|
-
* @param findUp Whether to search for the config file in parent directories, by default only the root directory is searched.
|
|
26
|
+
* Load a tsconfig.json or jsconfig.json if the former is not found.
|
|
27
|
+
* @param root The directory to search in, defaults to `process.cwd()`.
|
|
11
28
|
*/
|
|
12
|
-
export declare function loadTSConfig(root: string | undefined
|
|
13
|
-
rawConfig: TSConfig;
|
|
14
|
-
}>>;
|
|
29
|
+
export declare function loadTSConfig(root: string | undefined): Promise<TSConfigResult>;
|
|
15
30
|
export declare function updateTSConfigForFramework(target: TSConfig, framework: frameworkWithTSSettings): TSConfig;
|
|
16
31
|
type StripEnums<T extends Record<string, any>> = {
|
|
17
32
|
[K in keyof T]: T[K] extends boolean ? T[K] : T[K] extends string ? T[K] : T[K] extends object ? T[K] : T[K] extends Array<any> ? T[K] : T[K] extends undefined ? undefined : any;
|
|
@@ -19,7 +34,7 @@ type StripEnums<T extends Record<string, any>> = {
|
|
|
19
34
|
export interface TSConfig {
|
|
20
35
|
compilerOptions?: StripEnums<CompilerOptions>;
|
|
21
36
|
compileOnSave?: boolean;
|
|
22
|
-
extends?: string;
|
|
37
|
+
extends?: string | string[];
|
|
23
38
|
files?: string[];
|
|
24
39
|
include?: string[];
|
|
25
40
|
exclude?: string[];
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
parse,
|
|
6
|
-
TSConfckParseError,
|
|
7
|
-
toJson
|
|
8
|
-
} from "tsconfck";
|
|
1
|
+
import { readFileSync, existsSync } from "node:fs";
|
|
2
|
+
import { join, normalize } from "node:path";
|
|
3
|
+
import { readTsconfig } from "get-tsconfig";
|
|
4
|
+
import { parse as parseJsonc } from "jsonc-parser";
|
|
9
5
|
const defaultTSConfig = { extends: "astro/tsconfigs/base" };
|
|
10
6
|
const presets = /* @__PURE__ */ new Map([
|
|
11
7
|
[
|
|
@@ -48,50 +44,63 @@ const presets = /* @__PURE__ */ new Map([
|
|
|
48
44
|
}
|
|
49
45
|
]
|
|
50
46
|
]);
|
|
51
|
-
async function loadTSConfig(root
|
|
52
|
-
const safeCwd = root
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
configName
|
|
60
|
-
})
|
|
61
|
-
)
|
|
62
|
-
)
|
|
63
|
-
);
|
|
64
|
-
if (tsconfig) {
|
|
65
|
-
const parsedConfig = await safeParse(tsconfig, { root });
|
|
66
|
-
if (typeof parsedConfig === "string") {
|
|
67
|
-
return parsedConfig;
|
|
47
|
+
async function loadTSConfig(root) {
|
|
48
|
+
const safeCwd = root || process.cwd();
|
|
49
|
+
let tsconfigPath;
|
|
50
|
+
for (const configName of ["tsconfig.json", "jsconfig.json"]) {
|
|
51
|
+
const possiblePath = join(safeCwd, configName);
|
|
52
|
+
if (existsSync(possiblePath)) {
|
|
53
|
+
tsconfigPath = possiblePath;
|
|
54
|
+
break;
|
|
68
55
|
}
|
|
69
|
-
const rawConfig = await readFile(tsconfig, "utf-8").then(toJson).then((content) => JSON.parse(content));
|
|
70
|
-
return { ...parsedConfig, rawConfig };
|
|
71
56
|
}
|
|
72
|
-
if (
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
const rawConfig = await readFile(jsconfig, "utf-8").then(toJson).then((content) => JSON.parse(content));
|
|
78
|
-
return { ...parsedConfig, rawConfig };
|
|
57
|
+
if (!tsconfigPath) {
|
|
58
|
+
return {
|
|
59
|
+
error: "missing-config"
|
|
60
|
+
};
|
|
79
61
|
}
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
async function safeParse(tsconfigPath, options = {}) {
|
|
62
|
+
let rawConfig;
|
|
83
63
|
try {
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
64
|
+
const text = readFileSync(tsconfigPath, "utf-8");
|
|
65
|
+
const errors = [];
|
|
66
|
+
const parsed = parseJsonc(text, errors, { allowTrailingComma: true });
|
|
67
|
+
if (errors.length > 0) {
|
|
68
|
+
const first = errors[0];
|
|
69
|
+
return {
|
|
70
|
+
error: "invalid-config",
|
|
71
|
+
message: `Failed to parse ${tsconfigPath}: Malformed JSONC (error code ${first.error}) at offset ${first.offset}`
|
|
72
|
+
};
|
|
87
73
|
}
|
|
88
|
-
|
|
74
|
+
rawConfig = parsed;
|
|
89
75
|
} catch (e) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
76
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
77
|
+
return {
|
|
78
|
+
error: "invalid-config",
|
|
79
|
+
message: `Failed to parse ${tsconfigPath}: ${message}`
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
if (!rawConfig) {
|
|
83
|
+
return {
|
|
84
|
+
error: "invalid-config",
|
|
85
|
+
message: `Failed to parse ${tsconfigPath}: Unknown error`
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
let resolved;
|
|
89
|
+
try {
|
|
90
|
+
resolved = readTsconfig(tsconfigPath);
|
|
91
|
+
} catch (e) {
|
|
92
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
93
|
+
return {
|
|
94
|
+
error: "invalid-config",
|
|
95
|
+
message: `Failed to resolve ${tsconfigPath}: ${message}`
|
|
96
|
+
};
|
|
94
97
|
}
|
|
98
|
+
return {
|
|
99
|
+
tsconfigFile: normalize(resolved.path),
|
|
100
|
+
tsconfig: resolved.config,
|
|
101
|
+
rawConfig,
|
|
102
|
+
sources: (resolved.sources || [resolved.path]).map(normalize)
|
|
103
|
+
};
|
|
95
104
|
}
|
|
96
105
|
function updateTSConfigForFramework(target, framework) {
|
|
97
106
|
if (!presets.has(framework)) {
|