astro 3.0.12 → 3.1.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.
- package/README.md +2 -2
- package/astro-jsx.d.ts +28 -1
- package/client.d.ts +8 -4
- package/components/ViewTransitions.astro +77 -24
- package/content-types.template.d.ts +6 -1
- package/dist/@types/astro.d.ts +43 -22
- package/dist/assets/build/generate.d.ts +1 -1
- package/dist/assets/build/remote.d.ts +1 -1
- package/dist/assets/consts.d.ts +2 -2
- package/dist/assets/consts.js +4 -10
- package/dist/assets/internal.js +3 -2
- package/dist/assets/services/service.d.ts +1 -1
- package/dist/assets/services/service.js +7 -3
- package/dist/assets/services/vendor/squoosh/avif/avif_node_dec.wasm.d.ts +1 -1
- package/dist/assets/services/vendor/squoosh/avif/avif_node_enc.wasm.d.ts +1 -1
- package/dist/assets/services/vendor/squoosh/codecs.d.ts +4 -4
- package/dist/assets/services/vendor/squoosh/image-pool.d.ts +1 -1
- package/dist/assets/services/vendor/squoosh/image.d.ts +1 -1
- package/dist/assets/services/vendor/squoosh/image_data.d.ts +1 -1
- package/dist/assets/services/vendor/squoosh/impl.d.ts +1 -1
- package/dist/assets/services/vendor/squoosh/mozjpeg/mozjpeg_node_dec.wasm.d.ts +1 -1
- package/dist/assets/services/vendor/squoosh/mozjpeg/mozjpeg_node_enc.wasm.d.ts +1 -1
- package/dist/assets/services/vendor/squoosh/png/squoosh_oxipng_bg.wasm.d.ts +1 -1
- package/dist/assets/services/vendor/squoosh/png/squoosh_png_bg.wasm.d.ts +1 -1
- package/dist/assets/services/vendor/squoosh/resize/squoosh_resize_bg.wasm.d.ts +1 -1
- package/dist/assets/services/vendor/squoosh/rotate/rotate.wasm.d.ts +1 -1
- package/dist/assets/services/vendor/squoosh/utils/workerPool.d.ts +1 -1
- package/dist/assets/services/vendor/squoosh/webp/webp_node_dec.wasm.d.ts +1 -1
- package/dist/assets/services/vendor/squoosh/webp/webp_node_enc.wasm.d.ts +1 -1
- package/dist/assets/utils/metadata.d.ts +1 -1
- package/dist/assets/utils/metadata.js +6 -2
- package/dist/assets/vite-plugin-assets.d.ts +1 -1
- package/dist/assets/vite-plugin-assets.js +1 -1
- package/dist/cli/add/babel.d.ts +12 -11
- package/dist/config/index.d.ts +1 -1
- package/dist/config/vite-plugin-content-listen.d.ts +2 -2
- package/dist/content/server-listeners.d.ts +1 -1
- package/dist/content/types-generator.d.ts +2 -2
- package/dist/content/utils.d.ts +1 -1
- package/dist/content/utils.js +1 -1
- package/dist/content/vite-plugin-content-assets.d.ts +1 -1
- package/dist/content/vite-plugin-content-imports.d.ts +1 -1
- package/dist/content/vite-plugin-content-virtual-mod.d.ts +1 -1
- package/dist/core/app/common.d.ts +1 -1
- package/dist/core/app/index.d.ts +1 -1
- package/dist/core/app/node.d.ts +3 -3
- package/dist/core/app/ssrPipeline.d.ts +1 -1
- package/dist/core/app/types.d.ts +2 -2
- package/dist/core/build/buildPipeline.d.ts +4 -4
- package/dist/core/build/common.d.ts +1 -1
- package/dist/core/build/css-asset-name.d.ts +1 -1
- package/dist/core/build/generate.d.ts +2 -2
- package/dist/core/build/generate.js +3 -0
- package/dist/core/build/index.d.ts +1 -1
- package/dist/core/build/internal.d.ts +3 -3
- package/dist/core/build/page-data.d.ts +3 -3
- package/dist/core/build/plugin.d.ts +2 -2
- package/dist/core/build/plugins/index.d.ts +1 -1
- package/dist/core/build/plugins/plugin-css.d.ts +3 -3
- package/dist/core/build/plugins/plugin-hoisted-scripts.d.ts +3 -3
- package/dist/core/build/plugins/plugin-internals.d.ts +1 -1
- package/dist/core/build/plugins/plugin-manifest.d.ts +3 -3
- package/dist/core/build/plugins/plugin-manifest.js +2 -2
- package/dist/core/build/plugins/plugin-middleware.d.ts +3 -3
- package/dist/core/build/plugins/plugin-pages.d.ts +3 -3
- package/dist/core/build/plugins/plugin-prerender.d.ts +1 -1
- package/dist/core/build/plugins/plugin-renderers.d.ts +2 -2
- package/dist/core/build/plugins/plugin-ssr.d.ts +2 -2
- package/dist/core/build/plugins/plugin-ssr.js +2 -2
- package/dist/core/build/static-build.d.ts +2 -2
- package/dist/core/build/types.d.ts +5 -4
- package/dist/core/compile/cache.d.ts +1 -1
- package/dist/core/compile/compile.d.ts +1 -1
- package/dist/core/compile/index.d.ts +2 -2
- package/dist/core/config/config.d.ts +2 -2
- package/dist/core/config/index.d.ts +1 -1
- package/dist/core/config/schema.d.ts +29 -15
- package/dist/core/config/schema.js +1 -0
- package/dist/core/config/settings.d.ts +1 -1
- package/dist/core/config/vite-load.d.ts +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/cookies/response.d.ts +1 -1
- package/dist/core/create-vite.d.ts +3 -3
- package/dist/core/create-vite.js +1 -1
- package/dist/core/dev/container.d.ts +4 -4
- package/dist/core/dev/dev.d.ts +3 -3
- package/dist/core/dev/dev.js +1 -1
- package/dist/core/dev/restart.d.ts +3 -3
- package/dist/core/endpoint/index.d.ts +3 -3
- package/dist/core/errors/dev/utils.js +4 -4
- package/dist/core/errors/errors-data.d.ts +12 -3
- package/dist/core/errors/errors-data.js +7 -4
- package/dist/core/errors/index.d.ts +1 -1
- package/dist/core/errors/overlay.js +2 -2
- package/dist/core/logger/node.d.ts +1 -1
- package/dist/core/messages.js +2 -2
- package/dist/core/middleware/callMiddleware.d.ts +2 -2
- package/dist/core/middleware/index.d.ts +2 -2
- package/dist/core/middleware/loadMiddleware.d.ts +2 -2
- package/dist/core/middleware/sequence.d.ts +1 -1
- package/dist/core/module-loader/loader.d.ts +2 -2
- package/dist/core/module-loader/vite.d.ts +1 -1
- package/dist/core/pipeline.d.ts +1 -1
- package/dist/core/preview/index.d.ts +1 -1
- package/dist/core/preview/static-preview-server.d.ts +3 -3
- package/dist/core/redirects/component.d.ts +2 -2
- package/dist/core/redirects/helpers.d.ts +1 -1
- package/dist/core/render/context.d.ts +2 -2
- package/dist/core/render/core.d.ts +1 -1
- package/dist/core/render/environment.d.ts +1 -1
- package/dist/core/render/index.d.ts +2 -2
- package/dist/core/render/paginate.d.ts +1 -1
- package/dist/core/render/params-and-props.d.ts +1 -1
- package/dist/core/render/renderer.d.ts +1 -1
- package/dist/core/render/result.d.ts +1 -1
- package/dist/core/render/route-cache.d.ts +1 -1
- package/dist/core/render/ssr-element.d.ts +2 -2
- package/dist/core/render/ssr-element.js +1 -3
- package/dist/core/request.d.ts +2 -2
- package/dist/core/routing/manifest/create.d.ts +3 -3
- package/dist/core/routing/manifest/generator.d.ts +1 -1
- package/dist/core/routing/manifest/serialization.d.ts +1 -1
- package/dist/core/routing/match.d.ts +1 -1
- package/dist/core/routing/params.d.ts +1 -1
- package/dist/core/routing/validation.d.ts +2 -2
- package/dist/core/sync/index.d.ts +2 -2
- package/dist/core/util.d.ts +2 -2
- package/dist/events/session.d.ts +1 -1
- package/dist/integrations/astroFeaturesValidation.d.ts +1 -1
- package/dist/integrations/index.d.ts +3 -3
- package/dist/prerender/metadata.d.ts +1 -1
- package/dist/prerender/routing.d.ts +2 -2
- package/dist/prerender/utils.d.ts +1 -1
- package/dist/runtime/client/hmr.js +1 -1
- package/dist/runtime/client/idle.d.ts +1 -1
- package/dist/runtime/client/load.d.ts +1 -1
- package/dist/runtime/client/media.d.ts +1 -1
- package/dist/runtime/client/only.d.ts +1 -1
- package/dist/runtime/client/visible.d.ts +1 -1
- package/dist/runtime/client/visible.prebuilt.d.ts +1 -1
- package/dist/runtime/client/visible.prebuilt.js +1 -1
- package/dist/runtime/server/astro-component.d.ts +1 -1
- package/dist/runtime/server/astro-global.d.ts +1 -1
- package/dist/runtime/server/astro-island.d.ts +1 -4
- package/dist/runtime/server/endpoint.d.ts +2 -2
- package/dist/runtime/server/hydration.d.ts +1 -1
- package/dist/runtime/server/render/astro/factory.d.ts +3 -3
- package/dist/runtime/server/render/astro/head-and-content.d.ts +1 -1
- package/dist/runtime/server/render/astro/index.d.ts +2 -2
- package/dist/runtime/server/render/astro/instance.d.ts +1 -1
- package/dist/runtime/server/render/astro/render.d.ts +1 -1
- package/dist/runtime/server/render/common.d.ts +1 -1
- package/dist/runtime/server/render/component.d.ts +1 -1
- package/dist/runtime/server/render/dom.d.ts +1 -1
- package/dist/runtime/server/render/head.d.ts +1 -1
- package/dist/runtime/server/render/index.d.ts +2 -2
- package/dist/runtime/server/render/page.d.ts +2 -2
- package/dist/runtime/server/render/tags.d.ts +2 -2
- package/dist/runtime/server/render/tags.js +1 -1
- package/dist/runtime/server/render/util.d.ts +1 -1
- package/dist/runtime/server/scripts.d.ts +1 -1
- package/dist/runtime/server/serialize.d.ts +1 -1
- package/dist/runtime/server/transition.d.ts +1 -1
- package/dist/transitions/index.d.ts +1 -1
- package/dist/type-utils.d.ts +4 -0
- package/dist/vite-plugin-astro/hmr.d.ts +1 -1
- package/dist/vite-plugin-astro/index.d.ts +2 -2
- package/dist/vite-plugin-astro/metadata.d.ts +2 -2
- package/dist/vite-plugin-astro/types.d.ts +1 -1
- package/dist/vite-plugin-astro-server/base.d.ts +1 -1
- package/dist/vite-plugin-astro-server/controller.d.ts +2 -2
- package/dist/vite-plugin-astro-server/css.d.ts +1 -1
- package/dist/vite-plugin-astro-server/devPipeline.d.ts +4 -4
- package/dist/vite-plugin-astro-server/index.d.ts +1 -1
- package/dist/vite-plugin-astro-server/metadata.d.ts +2 -2
- package/dist/vite-plugin-astro-server/plugin.d.ts +2 -2
- package/dist/vite-plugin-astro-server/request.d.ts +4 -4
- package/dist/vite-plugin-astro-server/resolve.d.ts +1 -1
- package/dist/vite-plugin-astro-server/response.d.ts +2 -2
- package/dist/vite-plugin-astro-server/route.d.ts +2 -2
- package/dist/vite-plugin-astro-server/route.js +0 -1
- package/dist/vite-plugin-astro-server/scripts.d.ts +2 -2
- package/dist/vite-plugin-astro-server/vite.d.ts +1 -1
- package/dist/vite-plugin-config-alias/index.d.ts +1 -1
- package/dist/vite-plugin-env/index.d.ts +1 -1
- package/dist/vite-plugin-inject-env-ts/index.d.ts +1 -1
- package/dist/vite-plugin-load-fallback/index.d.ts +1 -1
- package/dist/vite-plugin-markdown/index.d.ts +1 -1
- package/dist/vite-plugin-markdown/index.js +20 -20
- package/dist/vite-plugin-mdx/index.d.ts +1 -1
- package/dist/vite-plugin-utils/index.d.ts +1 -1
- package/package.json +4 -2
- package/types.d.ts +6 -1
- package/dist/assets/vendor/image-size/detector.d.ts +0 -3
- package/dist/assets/vendor/image-size/detector.js +0 -28
- package/dist/assets/vendor/image-size/index.d.ts +0 -11
- package/dist/assets/vendor/image-size/index.js +0 -93
- package/dist/assets/vendor/image-size/readUInt.d.ts +0 -4
- package/dist/assets/vendor/image-size/readUInt.js +0 -9
- package/dist/assets/vendor/image-size/types/bmp.d.ts +0 -2
- package/dist/assets/vendor/image-size/types/bmp.js +0 -14
- package/dist/assets/vendor/image-size/types/cur.d.ts +0 -2
- package/dist/assets/vendor/image-size/types/cur.js +0 -16
- package/dist/assets/vendor/image-size/types/dds.d.ts +0 -2
- package/dist/assets/vendor/image-size/types/dds.js +0 -14
- package/dist/assets/vendor/image-size/types/gif.d.ts +0 -2
- package/dist/assets/vendor/image-size/types/gif.js +0 -16
- package/dist/assets/vendor/image-size/types/icns.d.ts +0 -2
- package/dist/assets/vendor/image-size/types/icns.js +0 -87
- package/dist/assets/vendor/image-size/types/ico.d.ts +0 -2
- package/dist/assets/vendor/image-size/types/ico.js +0 -42
- package/dist/assets/vendor/image-size/types/interface.d.ts +0 -14
- package/dist/assets/vendor/image-size/types/interface.js +0 -0
- package/dist/assets/vendor/image-size/types/j2c.d.ts +0 -2
- package/dist/assets/vendor/image-size/types/j2c.js +0 -14
- package/dist/assets/vendor/image-size/types/jp2.d.ts +0 -2
- package/dist/assets/vendor/image-size/types/jp2.js +0 -56
- package/dist/assets/vendor/image-size/types/jpg.d.ts +0 -2
- package/dist/assets/vendor/image-size/types/jpg.js +0 -95
- package/dist/assets/vendor/image-size/types/ktx.d.ts +0 -2
- package/dist/assets/vendor/image-size/types/ktx.js +0 -15
- package/dist/assets/vendor/image-size/types/png.d.ts +0 -2
- package/dist/assets/vendor/image-size/types/png.js +0 -33
- package/dist/assets/vendor/image-size/types/pnm.d.ts +0 -2
- package/dist/assets/vendor/image-size/types/pnm.js +0 -72
- package/dist/assets/vendor/image-size/types/psd.d.ts +0 -2
- package/dist/assets/vendor/image-size/types/psd.js +0 -14
- package/dist/assets/vendor/image-size/types/svg.d.ts +0 -2
- package/dist/assets/vendor/image-size/types/svg.js +0 -91
- package/dist/assets/vendor/image-size/types/tiff.d.ts +0 -2
- package/dist/assets/vendor/image-size/types/tiff.js +0 -81
- package/dist/assets/vendor/image-size/types/webp.d.ts +0 -2
- package/dist/assets/vendor/image-size/types/webp.js +0 -51
- package/dist/assets/vendor/image-size/types.d.ts +0 -19
- package/dist/assets/vendor/image-size/types.js +0 -37
- package/dist/assets/vendor/queue/queue.d.ts +0 -39
- package/dist/assets/vendor/queue/queue.js +0 -187
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
3
3
|
import type { RehypePlugin, RemarkPlugin, RemarkRehype } from '@astrojs/markdown-remark';
|
|
4
4
|
import type { ILanguageRegistration, IShikiTheme, Theme } from 'shiki';
|
|
5
|
-
import type { ViteUserConfig } from '../../@types/astro';
|
|
5
|
+
import type { ViteUserConfig } from '../../@types/astro.js';
|
|
6
6
|
import type { OutgoingHttpHeaders } from 'node:http';
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
export declare const AstroConfigSchema: z.ZodObject<{
|
|
@@ -69,6 +69,7 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
69
69
|
excludeMiddleware: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
70
70
|
}, "strip", z.ZodTypeAny, {
|
|
71
71
|
assetsPrefix?: string | undefined;
|
|
72
|
+
split: boolean;
|
|
72
73
|
format: "file" | "directory";
|
|
73
74
|
client: URL;
|
|
74
75
|
server: URL;
|
|
@@ -76,9 +77,9 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
76
77
|
serverEntry: string;
|
|
77
78
|
redirects: boolean;
|
|
78
79
|
inlineStylesheets: "always" | "never" | "auto";
|
|
79
|
-
split: boolean;
|
|
80
80
|
excludeMiddleware: boolean;
|
|
81
81
|
}, {
|
|
82
|
+
split?: boolean | undefined;
|
|
82
83
|
format?: "file" | "directory" | undefined;
|
|
83
84
|
client?: string | undefined;
|
|
84
85
|
server?: string | undefined;
|
|
@@ -86,7 +87,6 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
86
87
|
serverEntry?: string | undefined;
|
|
87
88
|
redirects?: boolean | undefined;
|
|
88
89
|
inlineStylesheets?: "always" | "never" | "auto" | undefined;
|
|
89
|
-
split?: boolean | undefined;
|
|
90
90
|
excludeMiddleware?: boolean | undefined;
|
|
91
91
|
assetsPrefix?: string | undefined;
|
|
92
92
|
}>>>;
|
|
@@ -122,6 +122,7 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
122
122
|
destination: string;
|
|
123
123
|
}>]>>>;
|
|
124
124
|
image: z.ZodDefault<z.ZodObject<{
|
|
125
|
+
endpoint: z.ZodOptional<z.ZodString>;
|
|
125
126
|
service: z.ZodDefault<z.ZodObject<{
|
|
126
127
|
entrypoint: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"astro/assets/services/sharp">, z.ZodLiteral<"astro/assets/services/squoosh">, z.ZodString]>>;
|
|
127
128
|
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
@@ -150,6 +151,7 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
150
151
|
pathname?: string | undefined;
|
|
151
152
|
}>, "many">>;
|
|
152
153
|
}, "strip", z.ZodTypeAny, {
|
|
154
|
+
endpoint?: string | undefined;
|
|
153
155
|
service: {
|
|
154
156
|
entrypoint: string;
|
|
155
157
|
config: Record<string, any>;
|
|
@@ -162,6 +164,7 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
162
164
|
pathname?: string | undefined;
|
|
163
165
|
}[];
|
|
164
166
|
}, {
|
|
167
|
+
endpoint?: string | undefined;
|
|
165
168
|
service?: {
|
|
166
169
|
entrypoint?: string | undefined;
|
|
167
170
|
config?: Record<string, any> | undefined;
|
|
@@ -271,6 +274,7 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
271
274
|
}[];
|
|
272
275
|
build: {
|
|
273
276
|
assetsPrefix?: string | undefined;
|
|
277
|
+
split: boolean;
|
|
274
278
|
format: "file" | "directory";
|
|
275
279
|
client: URL;
|
|
276
280
|
server: URL;
|
|
@@ -278,10 +282,10 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
278
282
|
serverEntry: string;
|
|
279
283
|
redirects: boolean;
|
|
280
284
|
inlineStylesheets: "always" | "never" | "auto";
|
|
281
|
-
split: boolean;
|
|
282
285
|
excludeMiddleware: boolean;
|
|
283
286
|
};
|
|
284
287
|
image: {
|
|
288
|
+
endpoint?: string | undefined;
|
|
285
289
|
service: {
|
|
286
290
|
entrypoint: string;
|
|
287
291
|
config: Record<string, any>;
|
|
@@ -338,6 +342,7 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
338
342
|
} | undefined;
|
|
339
343
|
integrations?: unknown;
|
|
340
344
|
build?: {
|
|
345
|
+
split?: boolean | undefined;
|
|
341
346
|
format?: "file" | "directory" | undefined;
|
|
342
347
|
client?: string | undefined;
|
|
343
348
|
server?: string | undefined;
|
|
@@ -345,11 +350,11 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
345
350
|
serverEntry?: string | undefined;
|
|
346
351
|
redirects?: boolean | undefined;
|
|
347
352
|
inlineStylesheets?: "always" | "never" | "auto" | undefined;
|
|
348
|
-
split?: boolean | undefined;
|
|
349
353
|
excludeMiddleware?: boolean | undefined;
|
|
350
354
|
assetsPrefix?: string | undefined;
|
|
351
355
|
} | undefined;
|
|
352
356
|
image?: {
|
|
357
|
+
endpoint?: string | undefined;
|
|
353
358
|
service?: {
|
|
354
359
|
entrypoint?: string | undefined;
|
|
355
360
|
config?: Record<string, any> | undefined;
|
|
@@ -433,6 +438,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
433
438
|
hooks: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">;
|
|
434
439
|
}[], unknown>;
|
|
435
440
|
image: z.ZodDefault<z.ZodObject<{
|
|
441
|
+
endpoint: z.ZodOptional<z.ZodString>;
|
|
436
442
|
service: z.ZodDefault<z.ZodObject<{
|
|
437
443
|
entrypoint: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"astro/assets/services/sharp">, z.ZodLiteral<"astro/assets/services/squoosh">, z.ZodString]>>;
|
|
438
444
|
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
@@ -461,6 +467,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
461
467
|
pathname?: string | undefined;
|
|
462
468
|
}>, "many">>;
|
|
463
469
|
}, "strip", z.ZodTypeAny, {
|
|
470
|
+
endpoint?: string | undefined;
|
|
464
471
|
service: {
|
|
465
472
|
entrypoint: string;
|
|
466
473
|
config: Record<string, any>;
|
|
@@ -473,6 +480,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
473
480
|
pathname?: string | undefined;
|
|
474
481
|
}[];
|
|
475
482
|
}, {
|
|
483
|
+
endpoint?: string | undefined;
|
|
476
484
|
service?: {
|
|
477
485
|
entrypoint?: string | undefined;
|
|
478
486
|
config?: Record<string, any> | undefined;
|
|
@@ -569,6 +577,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
569
577
|
excludeMiddleware: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
570
578
|
}, "strip", z.ZodTypeAny, {
|
|
571
579
|
assetsPrefix?: string | undefined;
|
|
580
|
+
split: boolean;
|
|
572
581
|
format: "file" | "directory";
|
|
573
582
|
client: import("url").URL;
|
|
574
583
|
server: import("url").URL;
|
|
@@ -576,9 +585,9 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
576
585
|
serverEntry: string;
|
|
577
586
|
redirects: boolean;
|
|
578
587
|
inlineStylesheets: "always" | "never" | "auto";
|
|
579
|
-
split: boolean;
|
|
580
588
|
excludeMiddleware: boolean;
|
|
581
589
|
}, {
|
|
590
|
+
split?: boolean | undefined;
|
|
582
591
|
format?: "file" | "directory" | undefined;
|
|
583
592
|
client?: string | undefined;
|
|
584
593
|
server?: string | undefined;
|
|
@@ -586,7 +595,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
586
595
|
serverEntry?: string | undefined;
|
|
587
596
|
redirects?: boolean | undefined;
|
|
588
597
|
inlineStylesheets?: "always" | "never" | "auto" | undefined;
|
|
589
|
-
split?: boolean | undefined;
|
|
590
598
|
excludeMiddleware?: boolean | undefined;
|
|
591
599
|
assetsPrefix?: string | undefined;
|
|
592
600
|
}>>>;
|
|
@@ -648,6 +656,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
648
656
|
}[];
|
|
649
657
|
build: {
|
|
650
658
|
assetsPrefix?: string | undefined;
|
|
659
|
+
split: boolean;
|
|
651
660
|
format: "file" | "directory";
|
|
652
661
|
client: import("url").URL;
|
|
653
662
|
server: import("url").URL;
|
|
@@ -655,10 +664,10 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
655
664
|
serverEntry: string;
|
|
656
665
|
redirects: boolean;
|
|
657
666
|
inlineStylesheets: "always" | "never" | "auto";
|
|
658
|
-
split: boolean;
|
|
659
667
|
excludeMiddleware: boolean;
|
|
660
668
|
};
|
|
661
669
|
image: {
|
|
670
|
+
endpoint?: string | undefined;
|
|
662
671
|
service: {
|
|
663
672
|
entrypoint: string;
|
|
664
673
|
config: Record<string, any>;
|
|
@@ -715,6 +724,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
715
724
|
} | undefined;
|
|
716
725
|
integrations?: unknown;
|
|
717
726
|
build?: {
|
|
727
|
+
split?: boolean | undefined;
|
|
718
728
|
format?: "file" | "directory" | undefined;
|
|
719
729
|
client?: string | undefined;
|
|
720
730
|
server?: string | undefined;
|
|
@@ -722,11 +732,11 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
722
732
|
serverEntry?: string | undefined;
|
|
723
733
|
redirects?: boolean | undefined;
|
|
724
734
|
inlineStylesheets?: "always" | "never" | "auto" | undefined;
|
|
725
|
-
split?: boolean | undefined;
|
|
726
735
|
excludeMiddleware?: boolean | undefined;
|
|
727
736
|
assetsPrefix?: string | undefined;
|
|
728
737
|
} | undefined;
|
|
729
738
|
image?: {
|
|
739
|
+
endpoint?: string | undefined;
|
|
730
740
|
service?: {
|
|
731
741
|
entrypoint?: string | undefined;
|
|
732
742
|
config?: Record<string, any> | undefined;
|
|
@@ -793,6 +803,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
793
803
|
}[];
|
|
794
804
|
build: {
|
|
795
805
|
assetsPrefix?: string | undefined;
|
|
806
|
+
split: boolean;
|
|
796
807
|
format: "file" | "directory";
|
|
797
808
|
client: import("url").URL;
|
|
798
809
|
server: import("url").URL;
|
|
@@ -800,10 +811,10 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
800
811
|
serverEntry: string;
|
|
801
812
|
redirects: boolean;
|
|
802
813
|
inlineStylesheets: "always" | "never" | "auto";
|
|
803
|
-
split: boolean;
|
|
804
814
|
excludeMiddleware: boolean;
|
|
805
815
|
};
|
|
806
816
|
image: {
|
|
817
|
+
endpoint?: string | undefined;
|
|
807
818
|
service: {
|
|
808
819
|
entrypoint: string;
|
|
809
820
|
config: Record<string, any>;
|
|
@@ -860,6 +871,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
860
871
|
} | undefined;
|
|
861
872
|
integrations?: unknown;
|
|
862
873
|
build?: {
|
|
874
|
+
split?: boolean | undefined;
|
|
863
875
|
format?: "file" | "directory" | undefined;
|
|
864
876
|
client?: string | undefined;
|
|
865
877
|
server?: string | undefined;
|
|
@@ -867,11 +879,11 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
867
879
|
serverEntry?: string | undefined;
|
|
868
880
|
redirects?: boolean | undefined;
|
|
869
881
|
inlineStylesheets?: "always" | "never" | "auto" | undefined;
|
|
870
|
-
split?: boolean | undefined;
|
|
871
882
|
excludeMiddleware?: boolean | undefined;
|
|
872
883
|
assetsPrefix?: string | undefined;
|
|
873
884
|
} | undefined;
|
|
874
885
|
image?: {
|
|
886
|
+
endpoint?: string | undefined;
|
|
875
887
|
service?: {
|
|
876
888
|
entrypoint?: string | undefined;
|
|
877
889
|
config?: Record<string, any> | undefined;
|
|
@@ -938,6 +950,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
938
950
|
}[];
|
|
939
951
|
build: {
|
|
940
952
|
assetsPrefix?: string | undefined;
|
|
953
|
+
split: boolean;
|
|
941
954
|
format: "file" | "directory";
|
|
942
955
|
client: import("url").URL;
|
|
943
956
|
server: import("url").URL;
|
|
@@ -945,10 +958,10 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
945
958
|
serverEntry: string;
|
|
946
959
|
redirects: boolean;
|
|
947
960
|
inlineStylesheets: "always" | "never" | "auto";
|
|
948
|
-
split: boolean;
|
|
949
961
|
excludeMiddleware: boolean;
|
|
950
962
|
};
|
|
951
963
|
image: {
|
|
964
|
+
endpoint?: string | undefined;
|
|
952
965
|
service: {
|
|
953
966
|
entrypoint: string;
|
|
954
967
|
config: Record<string, any>;
|
|
@@ -1005,6 +1018,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
1005
1018
|
} | undefined;
|
|
1006
1019
|
integrations?: unknown;
|
|
1007
1020
|
build?: {
|
|
1021
|
+
split?: boolean | undefined;
|
|
1008
1022
|
format?: "file" | "directory" | undefined;
|
|
1009
1023
|
client?: string | undefined;
|
|
1010
1024
|
server?: string | undefined;
|
|
@@ -1012,11 +1026,11 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
1012
1026
|
serverEntry?: string | undefined;
|
|
1013
1027
|
redirects?: boolean | undefined;
|
|
1014
1028
|
inlineStylesheets?: "always" | "never" | "auto" | undefined;
|
|
1015
|
-
split?: boolean | undefined;
|
|
1016
1029
|
excludeMiddleware?: boolean | undefined;
|
|
1017
1030
|
assetsPrefix?: string | undefined;
|
|
1018
1031
|
} | undefined;
|
|
1019
1032
|
image?: {
|
|
1033
|
+
endpoint?: string | undefined;
|
|
1020
1034
|
service?: {
|
|
1021
1035
|
entrypoint?: string | undefined;
|
|
1022
1036
|
config?: Record<string, any> | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { AstroConfig, AstroSettings } from '../../@types/astro';
|
|
1
|
+
import type { AstroConfig, AstroSettings } from '../../@types/astro.js';
|
|
2
2
|
export declare function createBaseSettings(config: AstroConfig): AstroSettings;
|
|
3
3
|
export declare function createSettings(config: AstroConfig, cwd?: string): AstroSettings;
|
package/dist/core/constants.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { AstroCookies } from './cookies';
|
|
1
|
+
import type { AstroCookies } from './cookies.js';
|
|
2
2
|
export declare function attachCookiesToResponse(response: Response, cookies: AstroCookies): void;
|
|
3
3
|
export declare function getSetCookiesFromResponse(response: Response): Generator<string, string[]>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import type { AstroSettings } from '../@types/astro';
|
|
3
|
-
import type { Logger } from './logger/core';
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
import type { AstroSettings } from '../@types/astro.js';
|
|
3
|
+
import type { Logger } from './logger/core.js';
|
|
4
4
|
import nodeFs from 'node:fs';
|
|
5
5
|
import * as vite from 'vite';
|
|
6
6
|
interface CreateViteOptions {
|
package/dist/core/create-vite.js
CHANGED
|
@@ -136,7 +136,7 @@ async function createVite(commandConfig, { settings, logger, mode, command, fs =
|
|
|
136
136
|
{
|
|
137
137
|
// Typings are imported from 'astro' (e.g. import { Type } from 'astro')
|
|
138
138
|
find: /^astro$/,
|
|
139
|
-
replacement: fileURLToPath(new URL("../@types/astro", import.meta.url))
|
|
139
|
+
replacement: fileURLToPath(new URL("../@types/astro.js", import.meta.url))
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
142
|
find: "astro:middleware",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
/// <reference types="node" />
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
4
4
|
import type * as http from 'node:http';
|
|
5
5
|
import type { AddressInfo } from 'node:net';
|
|
6
|
-
import type { AstroInlineConfig, AstroSettings } from '../../@types/astro';
|
|
6
|
+
import type { AstroInlineConfig, AstroSettings } from '../../@types/astro.js';
|
|
7
7
|
import nodeFs from 'node:fs';
|
|
8
8
|
import * as vite from 'vite';
|
|
9
9
|
import type { Logger } from '../logger/core.js';
|
package/dist/core/dev/dev.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
3
3
|
import type http from 'node:http';
|
|
4
4
|
import type { AddressInfo } from 'node:net';
|
|
5
5
|
import type * as vite from 'vite';
|
|
6
|
-
import type { AstroInlineConfig } from '../../@types/astro';
|
|
6
|
+
import type { AstroInlineConfig } from '../../@types/astro.js';
|
|
7
7
|
export interface DevServer {
|
|
8
8
|
address: AddressInfo;
|
|
9
9
|
handle: (req: http.IncomingMessage, res: http.ServerResponse<http.IncomingMessage>) => void;
|
package/dist/core/dev/dev.js
CHANGED
|
@@ -20,7 +20,7 @@ async function dev(inlineConfig) {
|
|
|
20
20
|
base: restart.container.settings.config.base
|
|
21
21
|
})
|
|
22
22
|
);
|
|
23
|
-
const currentVersion = "3.0
|
|
23
|
+
const currentVersion = "3.1.0";
|
|
24
24
|
if (currentVersion.includes("-")) {
|
|
25
25
|
logger.warn(null, msg.prerelease({ currentVersion }));
|
|
26
26
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
import nodeFs from 'node:fs';
|
|
3
|
-
import type { AstroInlineConfig } from '../../@types/astro';
|
|
4
|
-
import type { Container } from './container';
|
|
3
|
+
import type { AstroInlineConfig } from '../../@types/astro.js';
|
|
4
|
+
import type { Container } from './container.js';
|
|
5
5
|
export declare function shouldRestartContainer({ settings, inlineConfig, restartInFlight }: Container, changedFile: string): boolean;
|
|
6
6
|
export declare function restartContainer(container: Container): Promise<Container | Error>;
|
|
7
7
|
export interface CreateContainerWithAutomaticRestart {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import type { APIContext, EndpointHandler, EndpointOutput, MiddlewareHandler, Params } from '../../@types/astro';
|
|
3
|
-
import type { Environment, RenderContext } from '../render/index';
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
import type { APIContext, EndpointHandler, EndpointOutput, MiddlewareHandler, Params } from '../../@types/astro.js';
|
|
3
|
+
import type { Environment, RenderContext } from '../render/index.js';
|
|
4
4
|
type CreateAPIContext = {
|
|
5
5
|
request: Request;
|
|
6
6
|
params: Params;
|
|
@@ -139,14 +139,14 @@ function getDocsForError(err) {
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
function renderErrorMarkdown(markdown, target) {
|
|
142
|
-
const linkRegex = /\[(
|
|
142
|
+
const linkRegex = /\[([^\[]+)\]\((.*)\)/gm;
|
|
143
143
|
const boldRegex = /\*\*(.+)\*\*/gm;
|
|
144
|
-
const urlRegex = /(\b(https?|ftp):\/\/[-A-Z0-9+&@#\\/%?=~_|!:,.;]*[-A-Z0-9+&@#\\/%=~_|])/gim;
|
|
144
|
+
const urlRegex = / (\b(https?|ftp):\/\/[-A-Z0-9+&@#\\/%?=~_|!:,.;]*[-A-Z0-9+&@#\\/%=~_|])/gim;
|
|
145
145
|
const codeRegex = /`([^`]+)`/gim;
|
|
146
146
|
if (target === "html") {
|
|
147
|
-
return escape(markdown).replace(linkRegex, `<a href="$2" target="_blank">$1</a>`).replace(boldRegex, "<b>$1</b>").replace(urlRegex, ' <a href="$1" target="_blank">$1</a>
|
|
147
|
+
return escape(markdown).replace(linkRegex, `<a href="$2" target="_blank">$1</a>`).replace(boldRegex, "<b>$1</b>").replace(urlRegex, ' <a href="$1" target="_blank">$1</a>').replace(codeRegex, "<code>$1</code>");
|
|
148
148
|
} else {
|
|
149
|
-
return markdown.replace(linkRegex, (
|
|
149
|
+
return markdown.replace(linkRegex, (_, m1, m2) => `${bold(m1)} ${underline(m2)}`).replace(urlRegex, (fullMatch) => ` ${underline(fullMatch.trim())}`).replace(boldRegex, (_, m1) => `${bold(m1)}`);
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
export {
|
|
@@ -526,7 +526,7 @@ export declare const PrerenderDynamicEndpointPathCollide: {
|
|
|
526
526
|
export declare const ExpectedImage: {
|
|
527
527
|
name: string;
|
|
528
528
|
title: string;
|
|
529
|
-
message: (
|
|
529
|
+
message: (src: string, typeofOptions: string, fullOptions: string) => string;
|
|
530
530
|
hint: string;
|
|
531
531
|
};
|
|
532
532
|
/**
|
|
@@ -640,7 +640,9 @@ export declare const LocalsNotAnObject: {
|
|
|
640
640
|
* @see
|
|
641
641
|
* - [Images](https://docs.astro.build/en/guides/images/)
|
|
642
642
|
* @description
|
|
643
|
-
* When using the default image services, `Image`'s and `getImage`'s `src` parameter must be either an imported image or an URL, it cannot be a filepath.
|
|
643
|
+
* When using the default image services, `Image`'s and `getImage`'s `src` parameter must be either an imported image or an URL, it cannot be a string of a filepath.
|
|
644
|
+
*
|
|
645
|
+
* For local images from content collections, you can use the [image() schema helper](https://docs.astro.build/en/guides/images/#images-in-content-collections) to resolve the images.
|
|
644
646
|
*
|
|
645
647
|
* ```astro
|
|
646
648
|
* ---
|
|
@@ -651,14 +653,21 @@ export declare const LocalsNotAnObject: {
|
|
|
651
653
|
* <!-- GOOD: `src` is the full imported image. -->
|
|
652
654
|
* <Image src={myImage} alt="Cool image" />
|
|
653
655
|
*
|
|
654
|
-
* <!--
|
|
656
|
+
* <!-- GOOD: `src` is a URL. -->
|
|
657
|
+
* <Image src="https://example.com/my_image.png" alt="Cool image" />
|
|
658
|
+
*
|
|
659
|
+
* <!-- BAD: `src` is an image's `src` path instead of the full image object. -->
|
|
655
660
|
* <Image src={myImage.src} alt="Cool image" />
|
|
661
|
+
*
|
|
662
|
+
* <!-- BAD: `src` is a string filepath. -->
|
|
663
|
+
* <Image src="../my_image.png" alt="Cool image" />
|
|
656
664
|
* ```
|
|
657
665
|
*/
|
|
658
666
|
export declare const LocalImageUsedWrongly: {
|
|
659
667
|
name: string;
|
|
660
668
|
title: string;
|
|
661
669
|
message: (imageFilePath: string) => string;
|
|
670
|
+
hint: string;
|
|
662
671
|
};
|
|
663
672
|
/**
|
|
664
673
|
* @docs
|
|
@@ -184,8 +184,10 @@ const PrerenderDynamicEndpointPathCollide = {
|
|
|
184
184
|
const ExpectedImage = {
|
|
185
185
|
name: "ExpectedImage",
|
|
186
186
|
title: "Expected src to be an image.",
|
|
187
|
-
message: (
|
|
188
|
-
|
|
187
|
+
message: (src, typeofOptions, fullOptions) => `Expected \`src\` property for \`getImage\` or \`<Image />\` to be either an ESM imported image or a string with the path of a remote image. Received \`${src}\` (type: \`${typeofOptions}\`).
|
|
188
|
+
|
|
189
|
+
Full serialized options received: \`${fullOptions}\`.`,
|
|
190
|
+
hint: "This error can often happen because of a wrong path. Make sure the path to your image is correct. If you're passing an async function, make sure to call and await it."
|
|
189
191
|
};
|
|
190
192
|
const ExpectedImageOptions = {
|
|
191
193
|
name: "ExpectedImageOptions",
|
|
@@ -221,8 +223,9 @@ const LocalsNotAnObject = {
|
|
|
221
223
|
};
|
|
222
224
|
const LocalImageUsedWrongly = {
|
|
223
225
|
name: "LocalImageUsedWrongly",
|
|
224
|
-
title: "
|
|
225
|
-
message: (imageFilePath) => `\`Image\`'s and \`getImage\`'s \`src\` parameter must be an imported image or an URL, it cannot be a filepath. Received \`${imageFilePath}
|
|
226
|
+
title: "Local images must be imported.",
|
|
227
|
+
message: (imageFilePath) => `\`Image\`'s and \`getImage\`'s \`src\` parameter must be an imported image or an URL, it cannot be a string filepath. Received \`${imageFilePath}\`.`,
|
|
228
|
+
hint: "If you want to use an image from your `src` folder, you need to either import it or if the image is coming from a content collection, use the [image() schema helper](https://docs.astro.build/en/guides/images/#images-in-content-collections) See https://docs.astro.build/en/guides/images/#src-required for more information on the `src` property."
|
|
226
229
|
};
|
|
227
230
|
const AstroGlobUsedOutside = {
|
|
228
231
|
name: "AstroGlobUsedOutside",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type { ErrorLocation, ErrorWithMetadata } from './errors';
|
|
2
1
|
export * as AstroErrorData from './errors-data.js';
|
|
3
2
|
export { AggregateError, AstroError, AstroUserError, CSSError, CompilerError, MarkdownError, isAstroError, } from './errors.js';
|
|
3
|
+
export type { ErrorLocation, ErrorWithMetadata } from './errors.js';
|
|
4
4
|
export { codeFrame } from './printer.js';
|
|
5
5
|
export { createSafeError, positionAt } from './utils.js';
|
|
@@ -336,7 +336,7 @@ const style = (
|
|
|
336
336
|
#message-content,
|
|
337
337
|
#hint-content {
|
|
338
338
|
white-space: pre-wrap;
|
|
339
|
-
line-height:
|
|
339
|
+
line-height: 26px;
|
|
340
340
|
flex-grow: 1;
|
|
341
341
|
}
|
|
342
342
|
|
|
@@ -369,7 +369,7 @@ const style = (
|
|
|
369
369
|
#message-hints code {
|
|
370
370
|
font-family: var(--font-monospace);
|
|
371
371
|
background-color: var(--border);
|
|
372
|
-
padding: 4px;
|
|
372
|
+
padding: 2px 4px;
|
|
373
373
|
border-radius: var(--roundiness);
|
|
374
374
|
white-space: nowrap;
|
|
375
375
|
}
|
package/dist/core/messages.js
CHANGED
|
@@ -50,7 +50,7 @@ function serverStart({
|
|
|
50
50
|
base,
|
|
51
51
|
isRestart = false
|
|
52
52
|
}) {
|
|
53
|
-
const version = "3.0
|
|
53
|
+
const version = "3.1.0";
|
|
54
54
|
const localPrefix = `${dim("\u2503")} Local `;
|
|
55
55
|
const networkPrefix = `${dim("\u2503")} Network `;
|
|
56
56
|
const emptyPrefix = " ".repeat(11);
|
|
@@ -235,7 +235,7 @@ function printHelp({
|
|
|
235
235
|
message.push(
|
|
236
236
|
linebreak(),
|
|
237
237
|
` ${bgGreen(black(` ${commandName} `))} ${green(
|
|
238
|
-
`v${"3.0
|
|
238
|
+
`v${"3.1.0"}`
|
|
239
239
|
)} ${headline}`
|
|
240
240
|
);
|
|
241
241
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { APIContext, MiddlewareHandler } from '../../@types/astro';
|
|
2
|
-
import type { Environment } from '../render';
|
|
1
|
+
import type { APIContext, MiddlewareHandler } from '../../@types/astro.js';
|
|
2
|
+
import type { Environment } from '../render/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* Utility function that is in charge of calling the middleware.
|
|
5
5
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MiddlewareResponseHandler, Params } from '../../@types/astro';
|
|
1
|
+
import type { MiddlewareResponseHandler, Params } from '../../@types/astro.js';
|
|
2
2
|
import { sequence } from './sequence.js';
|
|
3
3
|
declare function defineMiddleware(fn: MiddlewareResponseHandler): MiddlewareResponseHandler;
|
|
4
4
|
/**
|
|
@@ -17,7 +17,7 @@ export type CreateContext = {
|
|
|
17
17
|
/**
|
|
18
18
|
* Creates a context to be passed to Astro middleware `onRequest` function.
|
|
19
19
|
*/
|
|
20
|
-
declare function createContext({ request, params }: CreateContext): import("../../@types/astro").APIContext<Record<string, any>, Record<string, string | undefined>>;
|
|
20
|
+
declare function createContext({ request, params }: CreateContext): import("../../@types/astro.js").APIContext<Record<string, any>, Record<string, string | undefined>>;
|
|
21
21
|
/**
|
|
22
22
|
* It attempts to serialize `value` and return it as a string.
|
|
23
23
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AstroSettings } from '../../@types/astro';
|
|
2
|
-
import type { ModuleLoader } from '../module-loader';
|
|
1
|
+
import type { AstroSettings } from '../../@types/astro.js';
|
|
2
|
+
import type { ModuleLoader } from '../module-loader/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* It accepts a module loader and the astro settings, and it attempts to load the middlewares defined in the configuration.
|
|
5
5
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
import type * as fs from 'node:fs';
|
|
3
|
-
import type { TypedEventEmitter } from '../../@types/typed-emitter';
|
|
3
|
+
import type { TypedEventEmitter } from '../../@types/typed-emitter.js';
|
|
4
4
|
export type LoaderEvents = {
|
|
5
5
|
'file-add': (msg: [path: string, stats?: fs.Stats | undefined]) => void;
|
|
6
6
|
'file-change': (msg: [path: string, stats?: fs.Stats | undefined]) => void;
|
package/dist/core/pipeline.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComponentInstance, MiddlewareEndpointHandler } from '../@types/astro';
|
|
1
|
+
import type { ComponentInstance, MiddlewareEndpointHandler } from '../@types/astro.js';
|
|
2
2
|
import { type Environment, type RenderContext } from './render/index.js';
|
|
3
3
|
type EndpointResultHandler = (originalRequest: Request, result: Response) => Promise<Response> | Response;
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AstroInlineConfig, PreviewServer } from '../../@types/astro';
|
|
1
|
+
import type { AstroInlineConfig, PreviewServer } from '../../@types/astro.js';
|
|
2
2
|
/**
|
|
3
3
|
* Starts a local server to serve your static dist/ directory. This command is useful for previewing
|
|
4
4
|
* your build locally, before deploying it. It is not designed to be run in production.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
import type http from 'node:http';
|
|
3
|
-
import type { AstroSettings } from '../../@types/astro';
|
|
4
|
-
import type { Logger } from '../logger/core';
|
|
3
|
+
import type { AstroSettings } from '../../@types/astro.js';
|
|
4
|
+
import type { Logger } from '../logger/core.js';
|
|
5
5
|
export interface PreviewServer {
|
|
6
6
|
host?: string;
|
|
7
7
|
port: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComponentInstance } from '../../@types/astro';
|
|
2
|
-
import type { SinglePageBuiltModule } from '../build/types';
|
|
1
|
+
import type { ComponentInstance } from '../../@types/astro.js';
|
|
2
|
+
import type { SinglePageBuiltModule } from '../build/types.js';
|
|
3
3
|
export declare const RedirectComponentInstance: ComponentInstance;
|
|
4
4
|
export declare const RedirectSinglePageBuiltModule: SinglePageBuiltModule;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Params, RedirectRouteData, RouteData, ValidRedirectStatus } from '../../@types/astro';
|
|
1
|
+
import type { Params, RedirectRouteData, RouteData, ValidRedirectStatus } from '../../@types/astro.js';
|
|
2
2
|
export declare function routeIsRedirect(route: RouteData | undefined): route is RedirectRouteData;
|
|
3
3
|
export declare function redirectRouteGenerate(redirectRoute: RouteData, data: Params): string;
|
|
4
4
|
export declare function redirectRouteStatus(redirectRoute: RouteData, method?: string): ValidRedirectStatus;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentInstance, Params, Props, RouteData, SSRElement, SSRResult } from '../../@types/astro';
|
|
2
|
-
import type { Environment } from './environment';
|
|
1
|
+
import type { ComponentInstance, Params, Props, RouteData, SSRElement, SSRResult } from '../../@types/astro.js';
|
|
2
|
+
import type { Environment } from './environment.js';
|
|
3
3
|
/**
|
|
4
4
|
* The RenderContext represents the parts of rendering that are specific to one request.
|
|
5
5
|
*/
|