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,6 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import probe from "probe-image-size";
|
|
2
2
|
async function imageMetadata(data) {
|
|
3
|
-
const
|
|
3
|
+
const result = probe.sync(data);
|
|
4
|
+
if (result === null) {
|
|
5
|
+
throw new Error("Failed to probe image size.");
|
|
6
|
+
}
|
|
7
|
+
const { width, height, type, orientation } = result;
|
|
4
8
|
const isPortrait = (orientation || 0) >= 5;
|
|
5
9
|
if (!width || !height || !type) {
|
|
6
10
|
return void 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as vite from 'vite';
|
|
2
|
-
import type { AstroPluginOptions } from '../@types/astro';
|
|
2
|
+
import type { AstroPluginOptions } from '../@types/astro.js';
|
|
3
3
|
export default function assets({ settings, mode, }: AstroPluginOptions & {
|
|
4
4
|
mode: string;
|
|
5
5
|
}): vite.Plugin[];
|
|
@@ -10,7 +10,7 @@ import { VALID_INPUT_FORMATS, VIRTUAL_MODULE_ID, VIRTUAL_SERVICE_ID } from "./co
|
|
|
10
10
|
import { emitESMImage } from "./utils/emitAsset.js";
|
|
11
11
|
import { hashTransform, propsToFilename } from "./utils/transformToPath.js";
|
|
12
12
|
const resolvedVirtualModuleId = "\0" + VIRTUAL_MODULE_ID;
|
|
13
|
-
const assetRegex = new RegExp(
|
|
13
|
+
const assetRegex = new RegExp(`\\.(${VALID_INPUT_FORMATS.join("|")})$`, "i");
|
|
14
14
|
function assets({
|
|
15
15
|
settings,
|
|
16
16
|
mode
|
package/dist/cli/add/babel.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import parser from '@babel/parser';
|
|
2
|
+
import traverse from '@babel/traverse';
|
|
2
3
|
import * as t from '@babel/types';
|
|
3
4
|
export declare const visit: {
|
|
4
|
-
<S>(parent:
|
|
5
|
-
(parent:
|
|
6
|
-
visitors: typeof
|
|
7
|
-
verify: typeof
|
|
8
|
-
explode: typeof
|
|
9
|
-
cheap: (node:
|
|
10
|
-
node: (node:
|
|
11
|
-
clearNode: (node:
|
|
12
|
-
removeProperties: (tree:
|
|
13
|
-
hasType: (tree:
|
|
14
|
-
cache: typeof
|
|
5
|
+
<S>(parent: traverse.Node, opts: traverse.TraverseOptions<S>, scope: traverse.Scope | undefined, state: S, parentPath?: traverse.NodePath<traverse.Node> | undefined): void;
|
|
6
|
+
(parent: traverse.Node, opts?: traverse.TraverseOptions<traverse.Node> | undefined, scope?: traverse.Scope | undefined, state?: any, parentPath?: traverse.NodePath<traverse.Node> | undefined): void;
|
|
7
|
+
visitors: typeof traverse.visitors;
|
|
8
|
+
verify: typeof traverse.visitors.verify;
|
|
9
|
+
explode: typeof traverse.visitors.explode;
|
|
10
|
+
cheap: (node: traverse.Node, enter: (node: traverse.Node) => void) => void;
|
|
11
|
+
node: (node: traverse.Node, opts: traverse.TraverseOptions<traverse.Node>, scope?: traverse.Scope | undefined, state?: any, path?: traverse.NodePath<traverse.Node> | undefined, skipKeys?: Record<string, boolean> | undefined) => void;
|
|
12
|
+
clearNode: (node: traverse.Node, opts?: traverse.RemovePropertiesOptions | undefined) => void;
|
|
13
|
+
removeProperties: (tree: traverse.Node, opts?: traverse.RemovePropertiesOptions | undefined) => traverse.Node;
|
|
14
|
+
hasType: (tree: traverse.Node, type: "CatchClause" | "ClassBody" | "Identifier" | "Program" | "SpreadElement" | "Super" | "SwitchCase" | "TemplateElement" | "VariableDeclarator" | "ArrayExpression" | "ArrowFunctionExpression" | "AssignmentExpression" | "AwaitExpression" | "BinaryExpression" | "CallExpression" | "ClassExpression" | "ConditionalExpression" | "FunctionExpression" | "LogicalExpression" | "MemberExpression" | "MetaProperty" | "NewExpression" | "ObjectExpression" | "SequenceExpression" | "TaggedTemplateExpression" | "TemplateLiteral" | "ThisExpression" | "UnaryExpression" | "UpdateExpression" | "YieldExpression" | "AnyTypeAnnotation" | "ArgumentPlaceholder" | "ArrayPattern" | "ArrayTypeAnnotation" | "AssignmentPattern" | "BigIntLiteral" | "BindExpression" | "BlockStatement" | "BooleanLiteral" | "BooleanLiteralTypeAnnotation" | "BooleanTypeAnnotation" | "BreakStatement" | "ClassAccessorProperty" | "ClassDeclaration" | "ClassImplements" | "ClassMethod" | "ClassPrivateMethod" | "ClassPrivateProperty" | "ClassProperty" | "ContinueStatement" | "DebuggerStatement" | "DecimalLiteral" | "DeclareClass" | "DeclareExportAllDeclaration" | "DeclareExportDeclaration" | "DeclareFunction" | "DeclareInterface" | "DeclareModule" | "DeclareModuleExports" | "DeclareOpaqueType" | "DeclareTypeAlias" | "DeclareVariable" | "DeclaredPredicate" | "Decorator" | "Directive" | "DirectiveLiteral" | "DoExpression" | "DoWhileStatement" | "EmptyStatement" | "EmptyTypeAnnotation" | "EnumBooleanBody" | "EnumBooleanMember" | "EnumDeclaration" | "EnumDefaultedMember" | "EnumNumberBody" | "EnumNumberMember" | "EnumStringBody" | "EnumStringMember" | "EnumSymbolBody" | "ExistsTypeAnnotation" | "ExportAllDeclaration" | "ExportDefaultDeclaration" | "ExportDefaultSpecifier" | "ExportNamedDeclaration" | "ExportNamespaceSpecifier" | "ExportSpecifier" | "ExpressionStatement" | "File" | "ForInStatement" | "ForOfStatement" | "ForStatement" | "FunctionDeclaration" | "FunctionTypeAnnotation" | "FunctionTypeParam" | "GenericTypeAnnotation" | "IfStatement" | "Import" | "ImportAttribute" | "ImportDeclaration" | "ImportDefaultSpecifier" | "ImportNamespaceSpecifier" | "ImportSpecifier" | "IndexedAccessType" | "InferredPredicate" | "InterfaceDeclaration" | "InterfaceExtends" | "InterfaceTypeAnnotation" | "InterpreterDirective" | "IntersectionTypeAnnotation" | "JSXAttribute" | "JSXClosingElement" | "JSXClosingFragment" | "JSXElement" | "JSXEmptyExpression" | "JSXExpressionContainer" | "JSXFragment" | "JSXIdentifier" | "JSXMemberExpression" | "JSXNamespacedName" | "JSXOpeningElement" | "JSXOpeningFragment" | "JSXSpreadAttribute" | "JSXSpreadChild" | "JSXText" | "LabeledStatement" | "MixedTypeAnnotation" | "ModuleExpression" | "Noop" | "NullLiteral" | "NullLiteralTypeAnnotation" | "NullableTypeAnnotation" | "NumberLiteral" | "NumberLiteralTypeAnnotation" | "NumberTypeAnnotation" | "NumericLiteral" | "ObjectMethod" | "ObjectPattern" | "ObjectProperty" | "ObjectTypeAnnotation" | "ObjectTypeCallProperty" | "ObjectTypeIndexer" | "ObjectTypeInternalSlot" | "ObjectTypeProperty" | "ObjectTypeSpreadProperty" | "OpaqueType" | "OptionalCallExpression" | "OptionalIndexedAccessType" | "OptionalMemberExpression" | "ParenthesizedExpression" | "PipelineBareFunction" | "PipelinePrimaryTopicReference" | "PipelineTopicExpression" | "Placeholder" | "PrivateName" | "QualifiedTypeIdentifier" | "RecordExpression" | "RegExpLiteral" | "RegexLiteral" | "RestElement" | "RestProperty" | "ReturnStatement" | "SpreadProperty" | "StaticBlock" | "StringLiteral" | "StringLiteralTypeAnnotation" | "StringTypeAnnotation" | "SwitchStatement" | "SymbolTypeAnnotation" | "TSAnyKeyword" | "TSArrayType" | "TSAsExpression" | "TSBigIntKeyword" | "TSBooleanKeyword" | "TSCallSignatureDeclaration" | "TSConditionalType" | "TSConstructSignatureDeclaration" | "TSConstructorType" | "TSDeclareFunction" | "TSDeclareMethod" | "TSEnumDeclaration" | "TSEnumMember" | "TSExportAssignment" | "TSExpressionWithTypeArguments" | "TSExternalModuleReference" | "TSFunctionType" | "TSImportEqualsDeclaration" | "TSImportType" | "TSIndexSignature" | "TSIndexedAccessType" | "TSInferType" | "TSInstantiationExpression" | "TSInterfaceBody" | "TSInterfaceDeclaration" | "TSIntersectionType" | "TSIntrinsicKeyword" | "TSLiteralType" | "TSMappedType" | "TSMethodSignature" | "TSModuleBlock" | "TSModuleDeclaration" | "TSNamedTupleMember" | "TSNamespaceExportDeclaration" | "TSNeverKeyword" | "TSNonNullExpression" | "TSNullKeyword" | "TSNumberKeyword" | "TSObjectKeyword" | "TSOptionalType" | "TSParameterProperty" | "TSParenthesizedType" | "TSPropertySignature" | "TSQualifiedName" | "TSRestType" | "TSSatisfiesExpression" | "TSStringKeyword" | "TSSymbolKeyword" | "TSThisType" | "TSTupleType" | "TSTypeAliasDeclaration" | "TSTypeAnnotation" | "TSTypeAssertion" | "TSTypeLiteral" | "TSTypeOperator" | "TSTypeParameter" | "TSTypeParameterDeclaration" | "TSTypeParameterInstantiation" | "TSTypePredicate" | "TSTypeQuery" | "TSTypeReference" | "TSUndefinedKeyword" | "TSUnionType" | "TSUnknownKeyword" | "TSVoidKeyword" | "ThisTypeAnnotation" | "ThrowStatement" | "TopicReference" | "TryStatement" | "TupleExpression" | "TupleTypeAnnotation" | "TypeAlias" | "TypeAnnotation" | "TypeCastExpression" | "TypeParameter" | "TypeParameterDeclaration" | "TypeParameterInstantiation" | "TypeofTypeAnnotation" | "UnionTypeAnnotation" | "V8IntrinsicIdentifier" | "VariableDeclaration" | "Variance" | "VoidTypeAnnotation" | "WhileStatement" | "WithStatement", denylistTypes?: string[] | undefined) => boolean;
|
|
15
|
+
cache: typeof traverse.cache;
|
|
15
16
|
};
|
|
16
17
|
export { t };
|
|
17
18
|
export declare function generate(ast: t.File): Promise<string>;
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { UserConfig } from 'vite';
|
|
2
|
-
import type { AstroUserConfig } from '../@types/astro';
|
|
2
|
+
import type { AstroUserConfig } from '../@types/astro.js';
|
|
3
3
|
export declare function defineConfig(config: AstroUserConfig): AstroUserConfig;
|
|
4
4
|
export declare function getViteConfig(inlineConfig: UserConfig): ({ mode, command }: {
|
|
5
5
|
mode: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
import type fsMod from 'node:fs';
|
|
3
3
|
import type { Plugin } from 'vite';
|
|
4
|
-
import type { AstroSettings } from '../@types/astro';
|
|
4
|
+
import type { AstroSettings } from '../@types/astro.js';
|
|
5
5
|
import type { Logger } from '../core/logger/core.js';
|
|
6
6
|
/**
|
|
7
7
|
* Listen for Astro content directory changes and generate types.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
import type fsMod from 'node:fs';
|
|
3
3
|
import { type ViteDevServer } from 'vite';
|
|
4
4
|
import type { AstroSettings } from '../@types/astro.js';
|
|
5
|
-
import type { Logger } from '../core/logger/core';
|
|
5
|
+
import type { Logger } from '../core/logger/core.js';
|
|
6
6
|
import { type ContentObservable } from './utils.js';
|
|
7
7
|
type ChokidarEvent = 'add' | 'addDir' | 'change' | 'unlink' | 'unlinkDir';
|
|
8
8
|
type RawContentEvent = {
|
package/dist/content/utils.d.ts
CHANGED
package/dist/content/utils.js
CHANGED
|
@@ -296,7 +296,7 @@ function getContentPaths({ srcDir, root }, fs = fsMod) {
|
|
|
296
296
|
};
|
|
297
297
|
}
|
|
298
298
|
function search(fs, srcDir) {
|
|
299
|
-
const paths = ["config.mjs", "config.js", "config.ts"].map(
|
|
299
|
+
const paths = ["config.mjs", "config.js", "config.mts", "config.ts"].map(
|
|
300
300
|
(p) => new URL(`./content/${p}`, srcDir)
|
|
301
301
|
);
|
|
302
302
|
for (const file of paths) {
|
|
@@ -2,7 +2,7 @@ import type { Plugin } from 'vite';
|
|
|
2
2
|
import type { AstroSettings } from '../@types/astro.js';
|
|
3
3
|
import { type BuildInternals } from '../core/build/internal.js';
|
|
4
4
|
import type { AstroBuildPlugin } from '../core/build/plugin.js';
|
|
5
|
-
import type { StaticBuildOptions } from '../core/build/types';
|
|
5
|
+
import type { StaticBuildOptions } from '../core/build/types.js';
|
|
6
6
|
export declare function astroContentAssetPropagationPlugin({ mode, settings, }: {
|
|
7
7
|
mode: string;
|
|
8
8
|
settings: AstroSettings;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { SerializedSSRManifest, SSRManifest } from './types';
|
|
1
|
+
import type { SerializedSSRManifest, SSRManifest } from './types.js';
|
|
2
2
|
export declare function deserializeManifest(serializedManifest: SerializedSSRManifest): SSRManifest;
|
package/dist/core/app/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ManifestData, RouteData, SSRManifest } from '../../@types/astro';
|
|
1
|
+
import type { ManifestData, RouteData, SSRManifest } from '../../@types/astro.js';
|
|
2
2
|
import { AstroIntegrationLogger } from '../logger/core.js';
|
|
3
3
|
export { deserializeManifest } from './common.js';
|
|
4
4
|
export interface MatchOptions {
|
package/dist/core/app/node.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import type { RouteData } from '../../@types/astro';
|
|
3
|
-
import type { SSRManifest } from './types';
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
import type { RouteData } from '../../@types/astro.js';
|
|
3
|
+
import type { SSRManifest } from './types.js';
|
|
4
4
|
import { IncomingMessage } from 'node:http';
|
|
5
5
|
import { App, type MatchOptions } from './index.js';
|
|
6
6
|
export { apply as applyPolyfills } from '../polyfill.js';
|
package/dist/core/app/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RouteData, SerializedRouteData, SSRComponentMetadata, SSRLoadedRenderer, SSRResult } from '../../@types/astro';
|
|
2
|
-
import type { SinglePageBuiltModule } from '../build/types';
|
|
1
|
+
import type { RouteData, SerializedRouteData, SSRComponentMetadata, SSRLoadedRenderer, SSRResult } from '../../@types/astro.js';
|
|
2
|
+
import type { SinglePageBuiltModule } from '../build/types.js';
|
|
3
3
|
export type ComponentPath = string;
|
|
4
4
|
export type StylesheetAsset = {
|
|
5
5
|
type: 'inline';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { AstroConfig, AstroSettings } from '../../@types/astro';
|
|
2
|
-
import type { SSRManifest } from '../app/types';
|
|
1
|
+
import type { AstroConfig, AstroSettings } from '../../@types/astro.js';
|
|
2
|
+
import type { SSRManifest } from '../app/types.js';
|
|
3
3
|
import { Logger } from '../logger/core.js';
|
|
4
4
|
import { Pipeline } from '../pipeline.js';
|
|
5
|
-
import type { BuildInternals } from './internal';
|
|
6
|
-
import type { PageBuildData, StaticBuildOptions } from './types';
|
|
5
|
+
import type { BuildInternals } from './internal.js';
|
|
6
|
+
import type { PageBuildData, StaticBuildOptions } from './types.js';
|
|
7
7
|
/**
|
|
8
8
|
* This pipeline is responsible to gather the files emitted by the SSR build and generate the pages by executing these files.
|
|
9
9
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AstroConfig, RouteType } from '../../@types/astro';
|
|
1
|
+
import type { AstroConfig, RouteType } from '../../@types/astro.js';
|
|
2
2
|
export declare function getOutFolder(astroConfig: AstroConfig, pathname: string, routeType: RouteType): URL;
|
|
3
3
|
export declare function getOutFile(astroConfig: AstroConfig, outFolder: URL, pathname: string, routeType: RouteType): URL;
|
|
4
4
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GetModuleInfo } from 'rollup';
|
|
2
|
-
import type { AstroSettings } from '../../@types/astro';
|
|
2
|
+
import type { AstroSettings } from '../../@types/astro.js';
|
|
3
3
|
export declare function shortHashedName(id: string, ctx: {
|
|
4
4
|
getModuleInfo: GetModuleInfo;
|
|
5
5
|
}): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { OutputAsset, OutputChunk } from 'rollup';
|
|
2
|
-
import type { AstroSettings, SSRLoadedRenderer, SSRManifest } from '../../@types/astro';
|
|
2
|
+
import type { AstroSettings, SSRLoadedRenderer, SSRManifest } from '../../@types/astro.js';
|
|
3
3
|
import { type BuildInternals } from '../../core/build/internal.js';
|
|
4
|
-
import type { StaticBuildOptions } from './types';
|
|
4
|
+
import type { StaticBuildOptions } from './types.js';
|
|
5
5
|
export declare function rootRelativeFacadeId(facadeId: string, settings: AstroSettings): string;
|
|
6
6
|
export declare function chunkIsPage(settings: AstroSettings, output: OutputAsset | OutputChunk, internals: BuildInternals): boolean;
|
|
7
7
|
export declare function generatePages(opts: StaticBuildOptions, internals: BuildInternals): Promise<void>;
|
|
@@ -429,6 +429,9 @@ async function generatePath(pathname, gopts, pipeline) {
|
|
|
429
429
|
<body>
|
|
430
430
|
<a href="${location}">Redirecting from <code>${fromPath}</code> to <code>${location}</code></a>
|
|
431
431
|
</body>`;
|
|
432
|
+
if (pipeline.getConfig().compressHTML === true) {
|
|
433
|
+
body = body.replaceAll("\n", "");
|
|
434
|
+
}
|
|
432
435
|
if (pageData.route.type !== "redirect") {
|
|
433
436
|
pageData.route.redirect = location;
|
|
434
437
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Rollup } from 'vite';
|
|
2
|
-
import type { RouteData, SSRResult } from '../../@types/astro';
|
|
3
|
-
import type { PageOptions } from '../../vite-plugin-astro/types';
|
|
4
|
-
import type { PageBuildData, StylesheetAsset, ViteID } from './types';
|
|
2
|
+
import type { RouteData, SSRResult } from '../../@types/astro.js';
|
|
3
|
+
import type { PageOptions } from '../../vite-plugin-astro/types.js';
|
|
4
|
+
import type { PageBuildData, StylesheetAsset, ViteID } from './types.js';
|
|
5
5
|
export interface BuildInternals {
|
|
6
6
|
/**
|
|
7
7
|
* Each CSS module is named with a chunk id derived from the Astro pages they
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { AstroSettings, ManifestData } from '../../@types/astro';
|
|
2
|
-
import type { Logger } from '../logger/core';
|
|
3
|
-
import type { AllPagesData } from './types';
|
|
1
|
+
import type { AstroSettings, ManifestData } from '../../@types/astro.js';
|
|
2
|
+
import type { Logger } from '../logger/core.js';
|
|
3
|
+
import type { AllPagesData } from './types.js';
|
|
4
4
|
export interface CollectPagesDataOptions {
|
|
5
5
|
settings: AstroSettings;
|
|
6
6
|
logger: Logger;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Plugin as VitePlugin } from 'vite';
|
|
2
|
-
import type { BuildInternals } from './internal';
|
|
3
|
-
import type { StaticBuildOptions, ViteBuildReturn } from './types';
|
|
2
|
+
import type { BuildInternals } from './internal.js';
|
|
3
|
+
import type { StaticBuildOptions, ViteBuildReturn } from './types.js';
|
|
4
4
|
type RollupOutputArray = Extract<ViteBuildReturn, Array<any>>;
|
|
5
5
|
type OutputChunkorAsset = RollupOutputArray[number]['output'][number];
|
|
6
6
|
type OutputChunk = Extract<OutputChunkorAsset, {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { AstroBuildPluginContainer } from '../plugin';
|
|
1
|
+
import type { AstroBuildPluginContainer } from '../plugin.js';
|
|
2
2
|
export declare function registerAllPlugins({ internals, options, register }: AstroBuildPluginContainer): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuildInternals } from '../internal';
|
|
2
|
-
import type { AstroBuildPlugin } from '../plugin';
|
|
3
|
-
import type { StaticBuildOptions } from '../types';
|
|
1
|
+
import type { BuildInternals } from '../internal.js';
|
|
2
|
+
import type { AstroBuildPlugin } from '../plugin.js';
|
|
3
|
+
import type { StaticBuildOptions } from '../types.js';
|
|
4
4
|
/***** ASTRO PLUGIN *****/
|
|
5
5
|
export declare function pluginCSS(options: StaticBuildOptions, internals: BuildInternals): AstroBuildPlugin;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Plugin as VitePlugin } from 'vite';
|
|
2
|
-
import type { AstroSettings } from '../../../@types/astro';
|
|
2
|
+
import type { AstroSettings } from '../../../@types/astro.js';
|
|
3
3
|
import type { BuildInternals } from '../internal.js';
|
|
4
|
-
import type { AstroBuildPlugin } from '../plugin';
|
|
5
|
-
import type { StaticBuildOptions } from '../types';
|
|
4
|
+
import type { AstroBuildPlugin } from '../plugin.js';
|
|
5
|
+
import type { StaticBuildOptions } from '../types.js';
|
|
6
6
|
export declare function vitePluginHoistedScripts(settings: AstroSettings, internals: BuildInternals): VitePlugin;
|
|
7
7
|
export declare function pluginHoistedScripts(options: StaticBuildOptions, internals: BuildInternals): AstroBuildPlugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Plugin as VitePlugin } from 'vite';
|
|
2
2
|
import type { BuildInternals } from '../internal.js';
|
|
3
|
-
import type { AstroBuildPlugin } from '../plugin';
|
|
3
|
+
import type { AstroBuildPlugin } from '../plugin.js';
|
|
4
4
|
export declare function vitePluginInternals(input: Set<string>, internals: BuildInternals): VitePlugin;
|
|
5
5
|
export declare function pluginInternals(internals: BuildInternals): AstroBuildPlugin;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { OutputChunk } from 'rollup';
|
|
2
|
-
import type { SerializedSSRManifest } from '../../app/types';
|
|
2
|
+
import type { SerializedSSRManifest } from '../../app/types.js';
|
|
3
3
|
import { type BuildInternals } from '../internal.js';
|
|
4
|
-
import type { AstroBuildPlugin } from '../plugin';
|
|
5
|
-
import type { StaticBuildOptions } from '../types';
|
|
4
|
+
import type { AstroBuildPlugin } from '../plugin.js';
|
|
5
|
+
import type { StaticBuildOptions } from '../types.js';
|
|
6
6
|
export declare const SSR_MANIFEST_VIRTUAL_MODULE_ID = "@astrojs-manifest";
|
|
7
7
|
export declare const RESOLVED_SSR_MANIFEST_VIRTUAL_MODULE_ID: string;
|
|
8
8
|
export declare function pluginManifest(options: StaticBuildOptions, internals: BuildInternals): AstroBuildPlugin;
|
|
@@ -38,8 +38,8 @@ function vitePluginManifest(options, internals) {
|
|
|
38
38
|
`import { deserializeManifest as _deserializeManifest } from 'astro/app'`,
|
|
39
39
|
`import { _privateSetManifestDontUseThis } from 'astro:ssr-manifest'`
|
|
40
40
|
);
|
|
41
|
-
contents.push(`
|
|
42
|
-
const manifest = _deserializeManifest('${manifestReplace}');
|
|
41
|
+
contents.push(`
|
|
42
|
+
const manifest = _deserializeManifest('${manifestReplace}');
|
|
43
43
|
_privateSetManifestDontUseThis(manifest);
|
|
44
44
|
`);
|
|
45
45
|
exports.push("export { manifest }");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Plugin as VitePlugin } from 'vite';
|
|
2
|
-
import type { BuildInternals } from '../internal';
|
|
3
|
-
import type { AstroBuildPlugin } from '../plugin';
|
|
4
|
-
import type { StaticBuildOptions } from '../types';
|
|
2
|
+
import type { BuildInternals } from '../internal.js';
|
|
3
|
+
import type { AstroBuildPlugin } from '../plugin.js';
|
|
4
|
+
import type { StaticBuildOptions } from '../types.js';
|
|
5
5
|
export declare const MIDDLEWARE_MODULE_ID = "@astro-middleware";
|
|
6
6
|
export declare function vitePluginMiddleware(opts: StaticBuildOptions, internals: BuildInternals): VitePlugin;
|
|
7
7
|
export declare function pluginMiddleware(opts: StaticBuildOptions, internals: BuildInternals): AstroBuildPlugin;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { AstroSettings } from '../../../@types/astro';
|
|
1
|
+
import type { AstroSettings } from '../../../@types/astro.js';
|
|
2
2
|
import { type BuildInternals } from '../internal.js';
|
|
3
|
-
import type { AstroBuildPlugin } from '../plugin';
|
|
4
|
-
import type { StaticBuildOptions } from '../types';
|
|
3
|
+
import type { AstroBuildPlugin } from '../plugin.js';
|
|
4
|
+
import type { StaticBuildOptions } from '../types.js';
|
|
5
5
|
export declare const ASTRO_PAGE_MODULE_ID = "@astro-page:";
|
|
6
6
|
export declare const ASTRO_PAGE_RESOLVED_MODULE_ID: string;
|
|
7
7
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { BuildInternals } from '../internal.js';
|
|
2
2
|
import type { AstroBuildPlugin } from '../plugin.js';
|
|
3
|
-
import type { StaticBuildOptions } from '../types';
|
|
3
|
+
import type { StaticBuildOptions } from '../types.js';
|
|
4
4
|
export declare function pluginPrerender(opts: StaticBuildOptions, internals: BuildInternals): AstroBuildPlugin;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Plugin as VitePlugin } from 'vite';
|
|
2
|
-
import type { AstroBuildPlugin } from '../plugin';
|
|
3
|
-
import type { StaticBuildOptions } from '../types';
|
|
2
|
+
import type { AstroBuildPlugin } from '../plugin.js';
|
|
3
|
+
import type { StaticBuildOptions } from '../types.js';
|
|
4
4
|
export declare const RENDERERS_MODULE_ID = "@astro-renderers";
|
|
5
5
|
export declare const RESOLVED_RENDERERS_MODULE_ID: string;
|
|
6
6
|
export declare function vitePluginRenderers(opts: StaticBuildOptions): VitePlugin;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BuildInternals } from '../internal.js';
|
|
2
|
-
import type { AstroBuildPlugin } from '../plugin';
|
|
3
|
-
import type { StaticBuildOptions } from '../types';
|
|
2
|
+
import type { AstroBuildPlugin } from '../plugin.js';
|
|
3
|
+
import type { StaticBuildOptions } from '../types.js';
|
|
4
4
|
export declare const SSR_VIRTUAL_MODULE_ID = "@astrojs-ssr-virtual-entry";
|
|
5
5
|
export declare const RESOLVED_SSR_VIRTUAL_MODULE_ID: string;
|
|
6
6
|
export declare function pluginSSR(options: StaticBuildOptions, internals: BuildInternals): AstroBuildPlugin;
|
|
@@ -190,8 +190,8 @@ function generateSSRCode(config, adapter) {
|
|
|
190
190
|
pageMap = "pageMap";
|
|
191
191
|
}
|
|
192
192
|
contents.push(`import * as adapter from '${adapter.serverEntrypoint}';
|
|
193
|
-
import { renderers } from '${RENDERERS_MODULE_ID}';
|
|
194
|
-
import { manifest as defaultManifest} from '${SSR_MANIFEST_VIRTUAL_MODULE_ID}';
|
|
193
|
+
import { renderers } from '${RENDERERS_MODULE_ID}';
|
|
194
|
+
import { manifest as defaultManifest} from '${SSR_MANIFEST_VIRTUAL_MODULE_ID}';
|
|
195
195
|
const _manifest = Object.assign(defaultManifest, {
|
|
196
196
|
${pageMap},
|
|
197
197
|
renderers,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { RouteData } from '../../@types/astro';
|
|
1
|
+
import type { RouteData } from '../../@types/astro.js';
|
|
2
2
|
import { type BuildInternals } from '../../core/build/internal.js';
|
|
3
|
-
import type { StaticBuildOptions } from './types';
|
|
3
|
+
import type { StaticBuildOptions } from './types.js';
|
|
4
4
|
export declare function viteBuild(opts: StaticBuildOptions): Promise<{
|
|
5
5
|
internals: BuildInternals;
|
|
6
6
|
}>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
1
|
+
import type * as vite from 'vite';
|
|
2
|
+
import type { InlineConfig } from 'vite';
|
|
3
|
+
import type { AstroConfig, AstroSettings, ComponentInstance, ManifestData, MiddlewareHandler, RouteData, RuntimeMode, SSRLoadedRenderer } from '../../@types/astro.js';
|
|
4
|
+
import type { Logger } from '../logger/core.js';
|
|
5
|
+
import type { RouteCache } from '../render/route-cache.js';
|
|
5
6
|
export type ComponentPath = string;
|
|
6
7
|
export type ViteID = string;
|
|
7
8
|
export type PageOutput = AstroConfig['output'];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AstroConfig } from '../../@types/astro';
|
|
1
|
+
import type { AstroConfig } from '../../@types/astro.js';
|
|
2
2
|
import { type CompileProps, type CompileResult } from './compile.js';
|
|
3
3
|
export declare function isCached(config: AstroConfig, filename: string): boolean;
|
|
4
4
|
export declare function getCachedCompileResult(config: AstroConfig, filename: string): CompileResult | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TransformResult } from '@astrojs/compiler';
|
|
2
2
|
import type { ResolvedConfig } from 'vite';
|
|
3
|
-
import type { AstroConfig } from '../../@types/astro';
|
|
3
|
+
import type { AstroConfig } from '../../@types/astro.js';
|
|
4
4
|
export interface CompileProps {
|
|
5
5
|
astroConfig: AstroConfig;
|
|
6
6
|
viteConfig: ResolvedConfig;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { cachedCompilation, getCachedCompileResult, invalidateCompilation, isCached, } from './cache.js';
|
|
2
|
-
export type { CompileProps, CompileResult } from './compile';
|
|
3
|
-
export type { TransformStyle } from './types';
|
|
2
|
+
export type { CompileProps, CompileResult } from './compile.js';
|
|
3
|
+
export type { TransformStyle } from './types.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
import type { Arguments as Flags } from 'yargs-parser';
|
|
3
|
-
import type { AstroConfig, AstroInlineConfig, AstroUserConfig, CLIFlags } from '../../@types/astro';
|
|
3
|
+
import type { AstroConfig, AstroInlineConfig, AstroUserConfig, CLIFlags } from '../../@types/astro.js';
|
|
4
4
|
import fs from 'node:fs';
|
|
5
5
|
/** Turn raw config values into normalized values */
|
|
6
6
|
export declare function validateConfig(userConfig: any, root: string, cmd: string): Promise<AstroConfig>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { resolveConfig, resolveConfigPath, resolveFlags, resolveRoot } from './config.js';
|
|
2
2
|
export { createNodeLogger } from './logging.js';
|
|
3
3
|
export { mergeConfig } from './merge.js';
|
|
4
|
-
export type { AstroConfigType } from './schema';
|
|
4
|
+
export type { AstroConfigType } from './schema.js';
|
|
5
5
|
export { createSettings } from './settings.js';
|
|
6
6
|
export { loadTSConfig, updateTSConfigForFramework } from './tsconfig.js';
|