astro 4.4.5 → 4.4.6
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 +3 -3
- package/components/ViewTransitions.astro +5 -0
- package/dist/@types/astro.d.ts +2 -2
- package/dist/assets/build/generate.js +1 -1
- package/dist/assets/endpoint/generic.js +1 -1
- package/dist/assets/endpoint/node.js +2 -2
- package/dist/assets/utils/metadata.js +1 -1
- package/dist/assets/utils/transformToPath.js +1 -1
- package/dist/cli/add/index.js +4 -4
- package/dist/cli/check/index.js +1 -1
- package/dist/cli/db/index.js +2 -2
- package/dist/cli/info/index.js +2 -2
- package/dist/cli/install-package.js +2 -2
- package/dist/cli/preferences/index.js +5 -5
- package/dist/content/server-listeners.js +1 -1
- package/dist/content/types-generator.js +2 -2
- package/dist/content/utils.d.ts +1 -1
- package/dist/content/utils.js +2 -2
- package/dist/content/vite-plugin-content-imports.js +1 -1
- package/dist/content/vite-plugin-content-virtual-mod.js +1 -1
- package/dist/core/app/common.d.ts +1 -1
- package/dist/core/app/index.js +10 -10
- package/dist/core/app/node.d.ts +1 -1
- package/dist/core/app/node.js +1 -1
- package/dist/core/app/types.d.ts +2 -2
- package/dist/core/base-pipeline.js +1 -1
- package/dist/core/build/generate.js +11 -11
- package/dist/core/build/index.js +2 -2
- package/dist/core/build/pipeline.js +1 -1
- package/dist/core/build/plugins/plugin-manifest.js +3 -3
- package/dist/core/build/plugins/plugin-ssr.js +1 -1
- package/dist/core/build/plugins/util.d.ts +1 -1
- package/dist/core/build/static-build.js +3 -3
- package/dist/core/client-directive/build.js +1 -1
- package/dist/core/compile/compile.js +1 -1
- package/dist/core/config/config.js +1 -1
- package/dist/core/config/settings.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/dev/dev.d.ts +1 -1
- package/dist/core/dev/dev.js +3 -3
- package/dist/core/endpoint/index.d.ts +1 -1
- package/dist/core/endpoint/index.js +2 -2
- package/dist/core/errors/dev/utils.js +2 -2
- package/dist/core/errors/errors-data.js +1 -1
- package/dist/core/logger/vite.d.ts +1 -1
- package/dist/core/logger/vite.js +1 -1
- package/dist/core/messages.js +2 -2
- package/dist/core/middleware/index.js +4 -4
- package/dist/core/middleware/loadMiddleware.js +1 -1
- package/dist/core/preview/index.js +2 -2
- package/dist/core/render/result.d.ts +1 -1
- package/dist/core/render/result.js +5 -5
- package/dist/core/render/route-cache.d.ts +1 -0
- package/dist/core/render/route-cache.js +8 -4
- package/dist/core/render-context.js +11 -11
- package/dist/core/routing/manifest/create.js +2 -2
- package/dist/core/sync/index.js +3 -3
- package/dist/i18n/middleware.js +1 -1
- package/dist/integrations/index.js +1 -1
- package/dist/jsx-runtime/index.js +1 -1
- package/dist/preferences/store.js +2 -2
- package/dist/runtime/server/index.js +1 -1
- package/dist/runtime/server/render/astro/render.js +1 -1
- package/dist/runtime/server/render/page.js +1 -1
- package/dist/runtime/server/scripts.js +1 -1
- package/dist/runtime/server/transition.js +2 -1
- package/dist/vite-plugin-astro-server/base.js +1 -1
- package/dist/vite-plugin-astro-server/error.d.ts +1 -1
- package/dist/vite-plugin-astro-server/error.js +1 -1
- package/dist/vite-plugin-astro-server/pipeline.d.ts +1 -1
- package/dist/vite-plugin-astro-server/pipeline.js +6 -6
- package/dist/vite-plugin-astro-server/plugin.js +6 -6
- package/dist/vite-plugin-astro-server/request.js +1 -1
- package/dist/vite-plugin-astro-server/route.js +2 -2
- package/dist/vite-plugin-env/index.js +1 -1
- package/dist/vite-plugin-inject-env-ts/index.js +1 -1
- package/dist/vite-plugin-markdown/index.js +5 -5
- package/dist/vite-plugin-scanner/index.js +1 -1
- package/dist/vite-plugin-utils/index.js +1 -1
- package/package.json +1 -1
package/components/Code.astro
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
+
import type { ThemePresets } from '@astrojs/markdown-remark';
|
|
2
3
|
import type {
|
|
3
4
|
BuiltinLanguage,
|
|
4
|
-
BuiltinTheme,
|
|
5
5
|
LanguageRegistration,
|
|
6
6
|
SpecialLanguage,
|
|
7
7
|
ThemeRegistration,
|
|
@@ -28,12 +28,12 @@ interface Props {
|
|
|
28
28
|
*
|
|
29
29
|
* @default "github-dark"
|
|
30
30
|
*/
|
|
31
|
-
theme?:
|
|
31
|
+
theme?: ThemePresets | ThemeRegistration | ThemeRegistrationRaw;
|
|
32
32
|
/**
|
|
33
33
|
* Multiple themes to style with -- alternative to "theme" option.
|
|
34
34
|
* Supports all themes found above; see https://github.com/antfu/shikiji#lightdark-dual-themes for more information.
|
|
35
35
|
*/
|
|
36
|
-
experimentalThemes?: Record<string,
|
|
36
|
+
experimentalThemes?: Record<string, ThemePresets | ThemeRegistration | ThemeRegistrationRaw>;
|
|
37
37
|
/**
|
|
38
38
|
* Enable word wrapping.
|
|
39
39
|
* - true: enabled.
|
|
@@ -51,6 +51,11 @@ const { fallback = 'animate' } = Astro.props;
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
if (supportsViewTransitions || getFallback() !== 'none') {
|
|
54
|
+
if (import.meta.env.DEV && window.matchMedia('(prefers-reduced-motion)').matches) {
|
|
55
|
+
console.warn(
|
|
56
|
+
`[transitions]: all view transition animations, including fallback animation, are disabled as this device has the prefer-reduced-motion setting enabled.`
|
|
57
|
+
);
|
|
58
|
+
}
|
|
54
59
|
document.addEventListener('click', (ev) => {
|
|
55
60
|
let link = ev.target;
|
|
56
61
|
if (ev.composed) {
|
package/dist/@types/astro.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
-
import type { MarkdownHeading, MarkdownMetadata, MarkdownRenderingResult, RehypePlugins, RemarkPlugins, RemarkRehype, ShikiConfig } from '@astrojs/markdown-remark';
|
|
4
|
-
import type * as babel from '@babel/core';
|
|
5
3
|
import type { OutgoingHttpHeaders } from 'node:http';
|
|
6
4
|
import type { AddressInfo } from 'node:net';
|
|
5
|
+
import type { MarkdownHeading, MarkdownMetadata, MarkdownRenderingResult, RehypePlugins, RemarkPlugins, RemarkRehype, ShikiConfig } from '@astrojs/markdown-remark';
|
|
6
|
+
import type * as babel from '@babel/core';
|
|
7
7
|
import type * as rollup from 'rollup';
|
|
8
8
|
import type * as vite from 'vite';
|
|
9
9
|
import type { RemotePattern } from '../assets/utils/remotePattern.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { dim, green } from "kleur/colors";
|
|
2
1
|
import fs, { readFileSync } from "node:fs";
|
|
3
2
|
import { basename, join } from "node:path/posix";
|
|
3
|
+
import { dim, green } from "kleur/colors";
|
|
4
4
|
import { getOutDirWithinCwd } from "../../core/build/common.js";
|
|
5
5
|
import { getTimeStat } from "../../core/build/util.js";
|
|
6
6
|
import { AstroError } from "../../core/errors/errors.js";
|
|
@@ -2,8 +2,8 @@ import { isRemotePath } from "@astrojs/internal-helpers/path";
|
|
|
2
2
|
import mime from "mime/lite.js";
|
|
3
3
|
import { getConfiguredImageService } from "../internal.js";
|
|
4
4
|
import { etag } from "../utils/etag.js";
|
|
5
|
-
import { imageConfig } from "astro:assets";
|
|
6
5
|
import { isRemoteAllowed } from "../utils/remotePattern.js";
|
|
6
|
+
import { imageConfig } from "astro:assets";
|
|
7
7
|
async function loadRemoteImage(src) {
|
|
8
8
|
try {
|
|
9
9
|
const res = await fetch(src);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import os from "os";
|
|
1
2
|
import { isRemotePath, removeQueryString } from "@astrojs/internal-helpers/path";
|
|
2
3
|
import { readFile } from "fs/promises";
|
|
3
4
|
import mime from "mime/lite.js";
|
|
4
|
-
import os from "os";
|
|
5
5
|
import { getConfiguredImageService } from "../internal.js";
|
|
6
6
|
import { etag } from "../utils/etag.js";
|
|
7
|
-
import { assetsDir, imageConfig } from "astro:assets";
|
|
8
7
|
import { isRemoteAllowed } from "../utils/remotePattern.js";
|
|
8
|
+
import { assetsDir, imageConfig } from "astro:assets";
|
|
9
9
|
function replaceFileSystemReferences(src) {
|
|
10
10
|
return os.platform().includes("win32") ? src.replace(/^\/@fs\//, "") : src.replace(/^\/@fs/, "");
|
|
11
11
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { lookup as probe } from "../utils/vendor/image-size/lookup.js";
|
|
2
1
|
import { AstroError, AstroErrorData } from "../../core/errors/index.js";
|
|
2
|
+
import { lookup as probe } from "../utils/vendor/image-size/lookup.js";
|
|
3
3
|
async function imageMetadata(data, src) {
|
|
4
4
|
const result = probe(data);
|
|
5
5
|
if (!result.height || !result.width || !result.type) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { deterministicString } from "deterministic-object-hash";
|
|
2
1
|
import { basename, extname } from "node:path";
|
|
2
|
+
import { deterministicString } from "deterministic-object-hash";
|
|
3
3
|
import { removeQueryString } from "../../core/path.js";
|
|
4
4
|
import { shorthash } from "../../runtime/server/shorthash.js";
|
|
5
5
|
import { isESMImportedImage } from "./imageKind.js";
|
package/dist/cli/add/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import fsMod, { existsSync, promises as fs } from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
1
4
|
import boxen from "boxen";
|
|
2
5
|
import { diffWords } from "diff";
|
|
3
6
|
import { execa } from "execa";
|
|
4
7
|
import { bold, cyan, dim, green, magenta, red, yellow } from "kleur/colors";
|
|
5
|
-
import fsMod, { existsSync, promises as fs } from "node:fs";
|
|
6
|
-
import path from "node:path";
|
|
7
|
-
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
8
|
-
import maxSatisfying from "semver/ranges/max-satisfying.js";
|
|
9
8
|
import ora from "ora";
|
|
10
9
|
import preferredPM from "preferred-pm";
|
|
11
10
|
import prompts from "prompts";
|
|
11
|
+
import maxSatisfying from "semver/ranges/max-satisfying.js";
|
|
12
12
|
import {
|
|
13
13
|
loadTSConfig,
|
|
14
14
|
resolveConfig,
|
package/dist/cli/check/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
+
import { ensureProcessNodeEnv } from "../../core/util.js";
|
|
2
3
|
import { createLoggerFromFlags, flagsToAstroInlineConfig } from "../flags.js";
|
|
3
4
|
import { getPackage } from "../install-package.js";
|
|
4
|
-
import { ensureProcessNodeEnv } from "../../core/util.js";
|
|
5
5
|
async function check(flags) {
|
|
6
6
|
ensureProcessNodeEnv("production");
|
|
7
7
|
const logger = createLoggerFromFlags(flags);
|
package/dist/cli/db/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createLoggerFromFlags, flagsToAstroInlineConfig } from "../flags.js";
|
|
2
|
-
import { getPackage } from "../install-package.js";
|
|
3
1
|
import { resolveConfig } from "../../core/config/config.js";
|
|
4
2
|
import { apply as applyPolyfill } from "../../core/polyfill.js";
|
|
3
|
+
import { createLoggerFromFlags, flagsToAstroInlineConfig } from "../flags.js";
|
|
4
|
+
import { getPackage } from "../install-package.js";
|
|
5
5
|
async function db({ flags }) {
|
|
6
6
|
applyPolyfill();
|
|
7
7
|
const logger = createLoggerFromFlags(flags);
|
package/dist/cli/info/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as colors from "kleur/colors";
|
|
2
1
|
import { execSync } from "node:child_process";
|
|
3
2
|
import { arch, platform } from "node:os";
|
|
3
|
+
import * as colors from "kleur/colors";
|
|
4
4
|
import prompts from "prompts";
|
|
5
5
|
import { resolveConfig } from "../../core/config/index.js";
|
|
6
6
|
import { ASTRO_VERSION } from "../../core/constants.js";
|
|
7
|
-
import { flagsToAstroInlineConfig } from "../flags.js";
|
|
8
7
|
import { apply as applyPolyfill } from "../../core/polyfill.js";
|
|
8
|
+
import { flagsToAstroInlineConfig } from "../flags.js";
|
|
9
9
|
async function getInfoOutput({
|
|
10
10
|
userConfig,
|
|
11
11
|
print
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import { sep } from "node:path";
|
|
1
3
|
import boxen from "boxen";
|
|
2
4
|
import { execa } from "execa";
|
|
3
5
|
import { bold, cyan, dim, magenta } from "kleur/colors";
|
|
@@ -6,8 +8,6 @@ import prompts from "prompts";
|
|
|
6
8
|
import resolvePackage from "resolve";
|
|
7
9
|
import whichPm from "which-pm";
|
|
8
10
|
import {} from "../core/logger/core.js";
|
|
9
|
-
import { createRequire } from "node:module";
|
|
10
|
-
import { sep } from "node:path";
|
|
11
11
|
const require2 = createRequire(import.meta.url);
|
|
12
12
|
async function getPackage(packageName, logger, options, otherDeps = []) {
|
|
13
13
|
try {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { bgGreen, black, bold, dim, yellow } from "kleur/colors";
|
|
2
1
|
import { fileURLToPath } from "node:url";
|
|
2
|
+
import { bgGreen, black, bold, dim, yellow } from "kleur/colors";
|
|
3
|
+
import { formatWithOptions } from "node:util";
|
|
3
4
|
import dlv from "dlv";
|
|
5
|
+
import { flattie } from "flattie";
|
|
4
6
|
import { resolveConfig } from "../../core/config/config.js";
|
|
5
7
|
import { createSettings } from "../../core/config/settings.js";
|
|
8
|
+
import { collectErrorMetadata } from "../../core/errors/dev/utils.js";
|
|
6
9
|
import * as msg from "../../core/messages.js";
|
|
10
|
+
import { apply as applyPolyfill } from "../../core/polyfill.js";
|
|
7
11
|
import { DEFAULT_PREFERENCES } from "../../preferences/defaults.js";
|
|
8
12
|
import { coerce, isValidKey } from "../../preferences/index.js";
|
|
9
13
|
import { createLoggerFromFlags, flagsToAstroInlineConfig } from "../flags.js";
|
|
10
|
-
import { flattie } from "flattie";
|
|
11
|
-
import { formatWithOptions } from "node:util";
|
|
12
|
-
import { collectErrorMetadata } from "../../core/errors/dev/utils.js";
|
|
13
|
-
import { apply as applyPolyfill } from "../../core/polyfill.js";
|
|
14
14
|
const PREFERENCES_SUBCOMMANDS = [
|
|
15
15
|
"get",
|
|
16
16
|
"set",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { bold, cyan, underline } from "kleur/colors";
|
|
2
1
|
import path from "node:path";
|
|
3
2
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
3
|
+
import { bold, cyan, underline } from "kleur/colors";
|
|
4
4
|
import { loadTSConfig } from "../core/config/tsconfig.js";
|
|
5
5
|
import { appendForwardSlash } from "../core/path.js";
|
|
6
6
|
import { createContentTypesGenerator } from "./types-generator.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import glob from "fast-glob";
|
|
2
|
-
import { bold, cyan } from "kleur/colors";
|
|
3
1
|
import * as path from "node:path";
|
|
4
2
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
3
|
+
import glob from "fast-glob";
|
|
4
|
+
import { bold, cyan } from "kleur/colors";
|
|
5
5
|
import { normalizePath } from "vite";
|
|
6
6
|
import { AstroError } from "../core/errors/errors.js";
|
|
7
7
|
import { AstroErrorData } from "../core/errors/index.js";
|
package/dist/content/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
import matter from 'gray-matter';
|
|
3
2
|
import fsMod from 'node:fs';
|
|
3
|
+
import matter from 'gray-matter';
|
|
4
4
|
import type { PluginContext } from 'rollup';
|
|
5
5
|
import { type ViteDevServer } from 'vite';
|
|
6
6
|
import { z } from 'zod';
|
package/dist/content/utils.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { slug as githubSlug } from "github-slugger";
|
|
2
|
-
import matter from "gray-matter";
|
|
3
1
|
import fsMod from "node:fs";
|
|
4
2
|
import path from "node:path";
|
|
5
3
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
4
|
+
import { slug as githubSlug } from "github-slugger";
|
|
5
|
+
import matter from "gray-matter";
|
|
6
6
|
import { normalizePath } from "vite";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import { AstroError, AstroErrorData } from "../core/errors/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as devalue from "devalue";
|
|
2
1
|
import { extname } from "node:path";
|
|
3
2
|
import { pathToFileURL } from "node:url";
|
|
3
|
+
import * as devalue from "devalue";
|
|
4
4
|
import { getProxyCode } from "../assets/utils/proxy.js";
|
|
5
5
|
import { AstroError } from "../core/errors/errors.js";
|
|
6
6
|
import { AstroErrorData } from "../core/errors/index.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import glob from "fast-glob";
|
|
2
1
|
import nodeFs from "node:fs";
|
|
3
2
|
import { extname } from "node:path";
|
|
4
3
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
4
|
+
import glob from "fast-glob";
|
|
5
5
|
import pLimit from "p-limit";
|
|
6
6
|
import {} from "vite";
|
|
7
7
|
import { encodeName } from "../core/build/util.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SSRManifest, SerializedSSRManifest } from './types.js';
|
|
2
2
|
export declare function deserializeManifest(serializedManifest: SerializedSSRManifest): SSRManifest;
|
package/dist/core/app/index.js
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
+
import { normalizeTheLocale } from "../../i18n/index.js";
|
|
2
|
+
import {
|
|
3
|
+
REROUTABLE_STATUS_CODES,
|
|
4
|
+
REROUTE_DIRECTIVE_HEADER,
|
|
5
|
+
clientAddressSymbol,
|
|
6
|
+
clientLocalsSymbol,
|
|
7
|
+
responseSentSymbol
|
|
8
|
+
} from "../constants.js";
|
|
1
9
|
import { getSetCookiesFromResponse } from "../cookies/index.js";
|
|
10
|
+
import { AstroError, AstroErrorData } from "../errors/index.js";
|
|
2
11
|
import { consoleLogDestination } from "../logger/console.js";
|
|
3
12
|
import { AstroIntegrationLogger, Logger } from "../logger/core.js";
|
|
4
13
|
import {
|
|
@@ -9,19 +18,10 @@ import {
|
|
|
9
18
|
removeTrailingForwardSlash
|
|
10
19
|
} from "../path.js";
|
|
11
20
|
import { RedirectSinglePageBuiltModule } from "../redirects/index.js";
|
|
21
|
+
import { RenderContext } from "../render-context.js";
|
|
12
22
|
import { createAssetLink } from "../render/ssr-element.js";
|
|
13
23
|
import { matchRoute } from "../routing/match.js";
|
|
14
24
|
import { AppPipeline } from "./pipeline.js";
|
|
15
|
-
import { normalizeTheLocale } from "../../i18n/index.js";
|
|
16
|
-
import { RenderContext } from "../render-context.js";
|
|
17
|
-
import {
|
|
18
|
-
clientAddressSymbol,
|
|
19
|
-
clientLocalsSymbol,
|
|
20
|
-
responseSentSymbol,
|
|
21
|
-
REROUTABLE_STATUS_CODES,
|
|
22
|
-
REROUTE_DIRECTIVE_HEADER
|
|
23
|
-
} from "../constants.js";
|
|
24
|
-
import { AstroError, AstroErrorData } from "../errors/index.js";
|
|
25
25
|
import { deserializeManifest } from "./common.js";
|
|
26
26
|
class App {
|
|
27
27
|
#manifest;
|
package/dist/core/app/node.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
import { App } from './index.js';
|
|
3
2
|
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
4
3
|
import type { RouteData } from '../../@types/astro.js';
|
|
4
|
+
import { App } from './index.js';
|
|
5
5
|
import type { RenderOptions } from './index.js';
|
|
6
6
|
import type { SSRManifest } from './types.js';
|
|
7
7
|
export { apply as applyPolyfills } from '../polyfill.js';
|
package/dist/core/app/node.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
|
-
import { App } from "./index.js";
|
|
3
2
|
import { deserializeManifest } from "./common.js";
|
|
4
3
|
import { createOutgoingHttpHeaders } from "./createOutgoingHttpHeaders.js";
|
|
4
|
+
import { App } from "./index.js";
|
|
5
5
|
import { apply } from "../polyfill.js";
|
|
6
6
|
const clientAddressSymbol = Symbol.for("astro.clientAddress");
|
|
7
7
|
class NodeApp extends App {
|
package/dist/core/app/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Locales, MiddlewareHandler, RouteData,
|
|
2
|
-
import type { SinglePageBuiltModule } from '../build/types.js';
|
|
1
|
+
import type { Locales, MiddlewareHandler, RouteData, SSRComponentMetadata, SSRLoadedRenderer, SSRResult, SerializedRouteData } from '../../@types/astro.js';
|
|
3
2
|
import type { RoutingStrategies } from '../../i18n/utils.js';
|
|
3
|
+
import type { SinglePageBuiltModule } from '../build/types.js';
|
|
4
4
|
export type ComponentPath = string;
|
|
5
5
|
export type StylesheetAsset = {
|
|
6
6
|
type: 'inline';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RouteCache } from "./render/route-cache.js";
|
|
2
1
|
import { createI18nMiddleware } from "../i18n/middleware.js";
|
|
2
|
+
import { RouteCache } from "./render/route-cache.js";
|
|
3
3
|
class Pipeline {
|
|
4
4
|
constructor(logger, manifest, mode, renderers, resolve, serverLike, streaming, adapterName = manifest.adapterName, clientDirectives = manifest.clientDirectives, compressHTML = manifest.compressHTML, i18n = manifest.i18n, middleware = manifest.middleware, routeCache = new RouteCache(logger, mode), site = manifest.site) {
|
|
5
5
|
this.logger = logger;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { bgGreen, black, blue, bold, dim, green, magenta, red } from "kleur/colors";
|
|
2
1
|
import fs from "node:fs";
|
|
3
2
|
import os from "node:os";
|
|
4
3
|
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { bgGreen, black, blue, bold, dim, green, magenta, red } from "kleur/colors";
|
|
5
5
|
import PQueue from "p-queue";
|
|
6
6
|
import {
|
|
7
7
|
generateImagesForPath,
|
|
@@ -16,8 +16,10 @@ import {
|
|
|
16
16
|
removeLeadingForwardSlash,
|
|
17
17
|
removeTrailingForwardSlash
|
|
18
18
|
} from "../../core/path.js";
|
|
19
|
+
import { toRoutingStrategy } from "../../i18n/utils.js";
|
|
19
20
|
import { runHookBuildGenerated } from "../../integrations/index.js";
|
|
20
21
|
import { getOutputDirectory, isServerLikeOutput } from "../../prerender/utils.js";
|
|
22
|
+
import { NoPrerenderedRoutesWithDomains } from "../errors/errors-data.js";
|
|
21
23
|
import { AstroError, AstroErrorData } from "../errors/index.js";
|
|
22
24
|
import { routeIsFallback } from "../redirects/helpers.js";
|
|
23
25
|
import {
|
|
@@ -25,11 +27,11 @@ import {
|
|
|
25
27
|
getRedirectLocationOrThrow,
|
|
26
28
|
routeIsRedirect
|
|
27
29
|
} from "../redirects/index.js";
|
|
30
|
+
import { RenderContext } from "../render-context.js";
|
|
28
31
|
import { callGetStaticPaths } from "../render/route-cache.js";
|
|
29
32
|
import { createRequest } from "../request.js";
|
|
30
33
|
import { matchRoute } from "../routing/match.js";
|
|
31
34
|
import { getOutputFilename } from "../util.js";
|
|
32
|
-
import { BuildPipeline } from "./pipeline.js";
|
|
33
35
|
import { getOutDirWithinCwd, getOutFile, getOutFolder } from "./common.js";
|
|
34
36
|
import {
|
|
35
37
|
cssOrder,
|
|
@@ -37,10 +39,8 @@ import {
|
|
|
37
39
|
getPageDataByComponent,
|
|
38
40
|
mergeInlineCss
|
|
39
41
|
} from "./internal.js";
|
|
42
|
+
import { BuildPipeline } from "./pipeline.js";
|
|
40
43
|
import { getTimeStat, shouldAppendForwardSlash } from "./util.js";
|
|
41
|
-
import { NoPrerenderedRoutesWithDomains } from "../errors/errors-data.js";
|
|
42
|
-
import { RenderContext } from "../render-context.js";
|
|
43
|
-
import { toRoutingStrategy } from "../../i18n/utils.js";
|
|
44
44
|
function createEntryURL(filePath, outFolder) {
|
|
45
45
|
return new URL("./" + filePath + `?time=${Date.now()}`, outFolder);
|
|
46
46
|
}
|
|
@@ -242,12 +242,6 @@ async function getPathsForRoute(route, mod, pipeline, builtPaths) {
|
|
|
242
242
|
if (route.pathname) {
|
|
243
243
|
paths.push(route.pathname);
|
|
244
244
|
builtPaths.add(route.pathname);
|
|
245
|
-
for (const virtualRoute of route.fallbackRoutes) {
|
|
246
|
-
if (virtualRoute.pathname) {
|
|
247
|
-
paths.push(virtualRoute.pathname);
|
|
248
|
-
builtPaths.add(virtualRoute.pathname);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
245
|
} else {
|
|
252
246
|
const staticPaths = await callGetStaticPaths({
|
|
253
247
|
mod,
|
|
@@ -337,6 +331,12 @@ async function generatePath(pathname, pipeline, gopts, route) {
|
|
|
337
331
|
if (route.type === "page") {
|
|
338
332
|
addPageName(pathname, options);
|
|
339
333
|
}
|
|
334
|
+
if (route.type === "fallback" && // If route is index page, continue rendering. The index page should
|
|
335
|
+
// always be rendered
|
|
336
|
+
route.pathname !== "/" && // Check if there is a translated page with the same path
|
|
337
|
+
Object.values(options.allPages).some((val) => pathname.match(val.route.pattern))) {
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
340
|
const url = getUrlForPath(
|
|
341
341
|
pathname,
|
|
342
342
|
config.base,
|
package/dist/core/build/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { blue, bold, green } from "kleur/colors";
|
|
2
1
|
import fs from "node:fs";
|
|
3
2
|
import { performance } from "node:perf_hooks";
|
|
4
3
|
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { blue, bold, green } from "kleur/colors";
|
|
5
5
|
import { injectImageEndpoint } from "../../assets/endpoint/config.js";
|
|
6
6
|
import { telemetry } from "../../events/index.js";
|
|
7
7
|
import { eventCliSession } from "../../events/session.js";
|
|
@@ -19,10 +19,10 @@ import { createVite } from "../create-vite.js";
|
|
|
19
19
|
import { levels, timerMessage } from "../logger/core.js";
|
|
20
20
|
import { apply as applyPolyfill } from "../polyfill.js";
|
|
21
21
|
import { createRouteManifest } from "../routing/index.js";
|
|
22
|
+
import { ensureProcessNodeEnv } from "../util.js";
|
|
22
23
|
import { collectPagesData } from "./page-data.js";
|
|
23
24
|
import { staticBuild, viteBuild } from "./static-build.js";
|
|
24
25
|
import { getTimeStat } from "./util.js";
|
|
25
|
-
import { ensureProcessNodeEnv } from "../util.js";
|
|
26
26
|
async function build(inlineConfig, options = {}) {
|
|
27
27
|
ensureProcessNodeEnv("production");
|
|
28
28
|
applyPolyfill();
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import glob from "fast-glob";
|
|
2
1
|
import { fileURLToPath } from "node:url";
|
|
2
|
+
import glob from "fast-glob";
|
|
3
3
|
import {} from "vite";
|
|
4
|
+
import { normalizeTheLocale } from "../../../i18n/index.js";
|
|
5
|
+
import { toRoutingStrategy } from "../../../i18n/utils.js";
|
|
4
6
|
import { runHookBuildSsr } from "../../../integrations/index.js";
|
|
5
7
|
import { BEFORE_HYDRATION_SCRIPT_ID, PAGE_SCRIPT_ID } from "../../../vite-plugin-scripts/index.js";
|
|
6
8
|
import { joinPaths, prependForwardSlash } from "../../path.js";
|
|
@@ -8,8 +10,6 @@ import { serializeRouteData } from "../../routing/index.js";
|
|
|
8
10
|
import { addRollupInput } from "../add-rollup-input.js";
|
|
9
11
|
import { getOutFile, getOutFolder } from "../common.js";
|
|
10
12
|
import { cssOrder, mergeInlineCss } from "../internal.js";
|
|
11
|
-
import { normalizeTheLocale } from "../../../i18n/index.js";
|
|
12
|
-
import { toRoutingStrategy } from "../../../i18n/utils.js";
|
|
13
13
|
const manifestReplace = "@@ASTRO_MANIFEST_REPLACE@@";
|
|
14
14
|
const replaceExp = new RegExp(`['"]${manifestReplace}['"]`, "g");
|
|
15
15
|
const SSR_MANIFEST_VIRTUAL_MODULE_ID = "@astrojs-manifest";
|
|
@@ -6,10 +6,10 @@ import { routeIsRedirect } from "../../redirects/index.js";
|
|
|
6
6
|
import { addRollupInput } from "../add-rollup-input.js";
|
|
7
7
|
import { eachPageFromAllPages } from "../internal.js";
|
|
8
8
|
import { SSR_MANIFEST_VIRTUAL_MODULE_ID } from "./plugin-manifest.js";
|
|
9
|
+
import { MIDDLEWARE_MODULE_ID } from "./plugin-middleware.js";
|
|
9
10
|
import { ASTRO_PAGE_MODULE_ID } from "./plugin-pages.js";
|
|
10
11
|
import { RENDERERS_MODULE_ID } from "./plugin-renderers.js";
|
|
11
12
|
import { getPathFromVirtualModulePageName, getVirtualModulePageNameFromPath } from "./util.js";
|
|
12
|
-
import { MIDDLEWARE_MODULE_ID } from "./plugin-middleware.js";
|
|
13
13
|
const SSR_VIRTUAL_MODULE_ID = "@astrojs-ssr-virtual-entry";
|
|
14
14
|
const RESOLVED_SSR_VIRTUAL_MODULE_ID = "\0" + SSR_VIRTUAL_MODULE_ID;
|
|
15
15
|
function vitePluginSSR(internals, adapter, options) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BuildOptions,
|
|
1
|
+
import type { BuildOptions, Plugin as VitePlugin, Rollup } from 'vite';
|
|
2
2
|
type OutputOptionsHook = Extract<VitePlugin['outputOptions'], Function>;
|
|
3
3
|
type OutputOptions = Parameters<OutputOptionsHook>[0];
|
|
4
4
|
type ExtendManualChunksHooks = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path, { extname } from "node:path";
|
|
3
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
1
4
|
import { teardown } from "@astrojs/compiler";
|
|
2
5
|
import * as eslexer from "es-module-lexer";
|
|
3
6
|
import glob from "fast-glob";
|
|
4
7
|
import { bgGreen, bgMagenta, black, green } from "kleur/colors";
|
|
5
|
-
import fs from "node:fs";
|
|
6
|
-
import path, { extname } from "node:path";
|
|
7
|
-
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
8
8
|
import * as vite from "vite";
|
|
9
9
|
import { PROPAGATED_ASSET_FLAG } from "../../content/consts.js";
|
|
10
10
|
import { hasAnyContentFlag } from "../../content/utils.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { build } from "esbuild";
|
|
2
1
|
import { fileURLToPath } from "node:url";
|
|
2
|
+
import { build } from "esbuild";
|
|
3
3
|
async function buildClientDirectiveEntrypoint(name, entrypoint, root) {
|
|
4
4
|
const stringifiedName = JSON.stringify(name);
|
|
5
5
|
const stringifiedEntrypoint = JSON.stringify(entrypoint);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { transform } from "@astrojs/compiler";
|
|
2
1
|
import { fileURLToPath } from "node:url";
|
|
2
|
+
import { transform } from "@astrojs/compiler";
|
|
3
3
|
import { normalizePath } from "vite";
|
|
4
4
|
import { AggregateError, CompilerError } from "../errors/errors.js";
|
|
5
5
|
import { AstroErrorData } from "../errors/index.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as colors from "kleur/colors";
|
|
2
1
|
import fs from "node:fs";
|
|
3
2
|
import path from "node:path";
|
|
4
3
|
import { fileURLToPath } from "node:url";
|
|
4
|
+
import * as colors from "kleur/colors";
|
|
5
5
|
import { ZodError } from "zod";
|
|
6
6
|
import { eventConfigError, telemetry } from "../../events/index.js";
|
|
7
7
|
import { trackAstroConfigZodError } from "../errors/errors.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import yaml from "js-yaml";
|
|
2
1
|
import path from "node:path";
|
|
3
2
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
3
|
+
import yaml from "js-yaml";
|
|
4
4
|
import { getContentPaths } from "../../content/index.js";
|
|
5
5
|
import createPreferences from "../../preferences/index.js";
|
|
6
6
|
import { markdownContentEntryType } from "../../vite-plugin-markdown/content-entry-type.js";
|
package/dist/core/constants.js
CHANGED
package/dist/core/dev/dev.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
-
import type * as vite from 'vite';
|
|
4
3
|
import type http from 'node:http';
|
|
5
4
|
import type { AddressInfo } from 'node:net';
|
|
5
|
+
import type * as vite from 'vite';
|
|
6
6
|
import type { AstroInlineConfig } from '../../@types/astro.js';
|
|
7
7
|
export interface DevServer {
|
|
8
8
|
address: AddressInfo;
|
package/dist/core/dev/dev.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { green } from "kleur/colors";
|
|
2
1
|
import fs from "node:fs";
|
|
2
|
+
import { green } from "kleur/colors";
|
|
3
3
|
import { performance } from "perf_hooks";
|
|
4
4
|
import { attachContentServerListeners } from "../../content/index.js";
|
|
5
5
|
import { telemetry } from "../../events/index.js";
|
|
6
6
|
import * as msg from "../messages.js";
|
|
7
|
+
import { ensureProcessNodeEnv } from "../util.js";
|
|
7
8
|
import { startContainer } from "./container.js";
|
|
8
9
|
import { createContainerWithAutomaticRestart } from "./restart.js";
|
|
9
|
-
import { ensureProcessNodeEnv } from "../util.js";
|
|
10
10
|
async function dev(inlineConfig) {
|
|
11
11
|
ensureProcessNodeEnv("development");
|
|
12
12
|
const devStart = performance.now();
|
|
@@ -23,7 +23,7 @@ async function dev(inlineConfig) {
|
|
|
23
23
|
base: restart.container.settings.config.base
|
|
24
24
|
})
|
|
25
25
|
);
|
|
26
|
-
const currentVersion = "4.4.
|
|
26
|
+
const currentVersion = "4.4.6";
|
|
27
27
|
if (currentVersion.includes("-")) {
|
|
28
28
|
logger.warn("SKIP_FORMAT", msg.prerelease({ currentVersion }));
|
|
29
29
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { APIContext, Locales, Params } from '../../@types/astro.js';
|
|
2
|
-
import type { AstroCookies } from '../cookies/index.js';
|
|
3
2
|
import { type RoutingStrategies } from '../../i18n/utils.js';
|
|
3
|
+
import type { AstroCookies } from '../cookies/index.js';
|
|
4
4
|
type CreateAPIContext = {
|
|
5
5
|
request: Request;
|
|
6
6
|
params: Params;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ASTRO_VERSION, clientAddressSymbol, clientLocalsSymbol } from "../constants.js";
|
|
2
|
-
import { AstroError, AstroErrorData } from "../errors/index.js";
|
|
3
1
|
import {
|
|
4
2
|
computeCurrentLocale,
|
|
5
3
|
computePreferredLocale,
|
|
6
4
|
computePreferredLocaleList
|
|
7
5
|
} from "../../i18n/utils.js";
|
|
6
|
+
import { ASTRO_VERSION, clientAddressSymbol, clientLocalsSymbol } from "../constants.js";
|
|
7
|
+
import { AstroError, AstroErrorData } from "../errors/index.js";
|
|
8
8
|
function createAPIContext({
|
|
9
9
|
request,
|
|
10
10
|
params,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { escape } from "html-escaper";
|
|
2
|
-
import { bold, underline } from "kleur/colors";
|
|
3
1
|
import * as fs from "node:fs";
|
|
4
2
|
import { isAbsolute, join } from "node:path";
|
|
5
3
|
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { escape } from "html-escaper";
|
|
5
|
+
import { bold, underline } from "kleur/colors";
|
|
6
6
|
import stripAnsi from "strip-ansi";
|
|
7
7
|
import { normalizePath } from "vite";
|
|
8
8
|
import { removeLeadingForwardSlashWindows } from "../../path.js";
|
|
@@ -259,7 +259,7 @@ const LocalsNotAnObject = {
|
|
|
259
259
|
const MiddlewareCantBeLoaded = {
|
|
260
260
|
name: "MiddlewareCantBeLoaded",
|
|
261
261
|
title: "Can't load the middleware.",
|
|
262
|
-
message: "
|
|
262
|
+
message: "An unknown error was thrown while loading your middleware."
|
|
263
263
|
};
|
|
264
264
|
const LocalImageUsedWrongly = {
|
|
265
265
|
name: "LocalImageUsedWrongly",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { Logger as ViteLogger
|
|
1
|
+
import type { LogLevel, Logger as ViteLogger } from 'vite';
|
|
2
2
|
import { type Logger as AstroLogger } from './core.js';
|
|
3
3
|
export declare function createViteLogger(astroLogger: AstroLogger, viteLogLevel?: LogLevel): ViteLogger;
|
package/dist/core/logger/vite.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { fileURLToPath } from "url";
|
|
2
2
|
import stripAnsi from "strip-ansi";
|
|
3
3
|
import { isAstroError } from "../errors/errors.js";
|
|
4
|
-
import { isLogLevelEnabled } from "./core.js";
|
|
5
4
|
import { serverShortcuts as formatServerShortcuts } from "../messages.js";
|
|
5
|
+
import { isLogLevelEnabled } from "./core.js";
|
|
6
6
|
const PKG_PREFIX = fileURLToPath(new URL("../../../", import.meta.url));
|
|
7
7
|
const E2E_PREFIX = fileURLToPath(new URL("../../../e2e", import.meta.url));
|
|
8
8
|
function isAstroSrcFile(id) {
|
package/dist/core/messages.js
CHANGED
|
@@ -36,7 +36,7 @@ function serverStart({
|
|
|
36
36
|
host,
|
|
37
37
|
base
|
|
38
38
|
}) {
|
|
39
|
-
const version = "4.4.
|
|
39
|
+
const version = "4.4.6";
|
|
40
40
|
const localPrefix = `${dim("\u2503")} Local `;
|
|
41
41
|
const networkPrefix = `${dim("\u2503")} Network `;
|
|
42
42
|
const emptyPrefix = " ".repeat(11);
|
|
@@ -261,7 +261,7 @@ function printHelp({
|
|
|
261
261
|
message.push(
|
|
262
262
|
linebreak(),
|
|
263
263
|
` ${bgGreen(black(` ${commandName} `))} ${green(
|
|
264
|
-
`v${"4.4.
|
|
264
|
+
`v${"4.4.6"}`
|
|
265
265
|
)} ${headline}`
|
|
266
266
|
);
|
|
267
267
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { AstroCookies } from "../cookies/index.js";
|
|
2
|
-
import { sequence } from "./sequence.js";
|
|
3
|
-
import { ASTRO_VERSION } from "../constants.js";
|
|
4
|
-
import { AstroError, AstroErrorData } from "../errors/index.js";
|
|
5
1
|
import {
|
|
6
2
|
computeCurrentLocale,
|
|
7
3
|
computePreferredLocale,
|
|
8
4
|
computePreferredLocaleList
|
|
9
5
|
} from "../../i18n/utils.js";
|
|
6
|
+
import { ASTRO_VERSION } from "../constants.js";
|
|
7
|
+
import { AstroCookies } from "../cookies/index.js";
|
|
8
|
+
import { AstroError, AstroErrorData } from "../errors/index.js";
|
|
9
|
+
import { sequence } from "./sequence.js";
|
|
10
10
|
const clientAddressSymbol = Symbol.for("astro.clientAddress");
|
|
11
11
|
const clientLocalsSymbol = Symbol.for("astro.locals");
|
|
12
12
|
function defineMiddleware(fn) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MIDDLEWARE_MODULE_ID } from "./vite-plugin.js";
|
|
2
1
|
import { MiddlewareCantBeLoaded } from "../errors/errors-data.js";
|
|
3
2
|
import { AstroError } from "../errors/index.js";
|
|
3
|
+
import { MIDDLEWARE_MODULE_ID } from "./vite-plugin.js";
|
|
4
4
|
async function loadMiddleware(moduleLoader) {
|
|
5
5
|
try {
|
|
6
6
|
return await moduleLoader.import(MIDDLEWARE_MODULE_ID);
|
|
@@ -8,10 +8,10 @@ import { runHookConfigDone, runHookConfigSetup } from "../../integrations/index.
|
|
|
8
8
|
import { resolveConfig } from "../config/config.js";
|
|
9
9
|
import { createNodeLogger } from "../config/logging.js";
|
|
10
10
|
import { createSettings } from "../config/settings.js";
|
|
11
|
+
import { apply as applyPolyfills } from "../polyfill.js";
|
|
12
|
+
import { ensureProcessNodeEnv } from "../util.js";
|
|
11
13
|
import createStaticPreviewServer from "./static-preview-server.js";
|
|
12
14
|
import { getResolvedHostForHttpServer } from "./util.js";
|
|
13
|
-
import { ensureProcessNodeEnv } from "../util.js";
|
|
14
|
-
import { apply as applyPolyfills } from "../polyfill.js";
|
|
15
15
|
async function preview(inlineConfig) {
|
|
16
16
|
applyPolyfills();
|
|
17
17
|
ensureProcessNodeEnv("production");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Locales, Params, SSRElement, SSRLoadedRenderer, SSRResult } from '../../@types/astro.js';
|
|
2
|
+
import { type RoutingStrategies } from '../../i18n/utils.js';
|
|
2
3
|
import { AstroCookies } from '../cookies/index.js';
|
|
3
4
|
import type { Logger } from '../logger/core.js';
|
|
4
|
-
import { type RoutingStrategies } from '../../i18n/utils.js';
|
|
5
5
|
export interface CreateResultArgs {
|
|
6
6
|
/**
|
|
7
7
|
* Used to provide better error messages for `Astro.clientAddress`
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { renderSlotToString } from "../../runtime/server/index.js";
|
|
2
|
-
import { renderJSX } from "../../runtime/server/jsx.js";
|
|
3
|
-
import { chunkToString } from "../../runtime/server/render/index.js";
|
|
4
|
-
import { AstroCookies } from "../cookies/index.js";
|
|
5
|
-
import { AstroError, AstroErrorData } from "../errors/index.js";
|
|
6
1
|
import {
|
|
7
2
|
computeCurrentLocale,
|
|
8
3
|
computePreferredLocale,
|
|
9
4
|
computePreferredLocaleList
|
|
10
5
|
} from "../../i18n/utils.js";
|
|
6
|
+
import { renderSlotToString } from "../../runtime/server/index.js";
|
|
7
|
+
import { renderJSX } from "../../runtime/server/jsx.js";
|
|
8
|
+
import { chunkToString } from "../../runtime/server/render/index.js";
|
|
11
9
|
import { clientAddressSymbol, responseSentSymbol } from "../constants.js";
|
|
10
|
+
import { AstroCookies } from "../cookies/index.js";
|
|
11
|
+
import { AstroError, AstroErrorData } from "../errors/index.js";
|
|
12
12
|
function getFunctionExpression(slot) {
|
|
13
13
|
if (!slot)
|
|
14
14
|
return;
|
|
@@ -25,6 +25,7 @@ export declare class RouteCache {
|
|
|
25
25
|
clearAll(): void;
|
|
26
26
|
set(route: RouteData, entry: RouteCacheEntry): void;
|
|
27
27
|
get(route: RouteData): RouteCacheEntry | undefined;
|
|
28
|
+
key(route: RouteData): string;
|
|
28
29
|
}
|
|
29
30
|
export declare function findPathItemByKey(staticPaths: GetStaticPathsResultKeyed, params: Params, route: RouteData, logger: Logger): GetStaticPathsItem | undefined;
|
|
30
31
|
export {};
|
|
@@ -53,13 +53,17 @@ class RouteCache {
|
|
|
53
53
|
this.cache = {};
|
|
54
54
|
}
|
|
55
55
|
set(route, entry) {
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
const key = this.key(route);
|
|
57
|
+
if (this.mode === "production" && this.cache[key]?.staticPaths) {
|
|
58
|
+
this.logger.warn(null, `Internal Warning: route cache overwritten. (${key})`);
|
|
58
59
|
}
|
|
59
|
-
this.cache[
|
|
60
|
+
this.cache[key] = entry;
|
|
60
61
|
}
|
|
61
62
|
get(route) {
|
|
62
|
-
return this.cache[route
|
|
63
|
+
return this.cache[this.key(route)];
|
|
64
|
+
}
|
|
65
|
+
key(route) {
|
|
66
|
+
return `${route.route}_${route.component}`;
|
|
63
67
|
}
|
|
64
68
|
}
|
|
65
69
|
function findPathItemByKey(staticPaths, params, route, logger) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computeCurrentLocale,
|
|
3
|
+
computePreferredLocale,
|
|
4
|
+
computePreferredLocaleList
|
|
5
|
+
} from "../i18n/utils.js";
|
|
1
6
|
import { renderEndpoint } from "../runtime/server/endpoint.js";
|
|
2
|
-
import { attachCookiesToResponse } from "./cookies/index.js";
|
|
3
|
-
import { callMiddleware } from "./middleware/callMiddleware.js";
|
|
4
|
-
import { sequence } from "./middleware/index.js";
|
|
5
|
-
import { AstroCookies } from "./cookies/index.js";
|
|
6
|
-
import { createResult } from "./render/index.js";
|
|
7
7
|
import { renderPage } from "../runtime/server/index.js";
|
|
8
8
|
import {
|
|
9
9
|
ASTRO_VERSION,
|
|
@@ -11,14 +11,14 @@ import {
|
|
|
11
11
|
clientAddressSymbol,
|
|
12
12
|
clientLocalsSymbol
|
|
13
13
|
} from "./constants.js";
|
|
14
|
-
import {
|
|
14
|
+
import { attachCookiesToResponse } from "./cookies/index.js";
|
|
15
|
+
import { AstroCookies } from "./cookies/index.js";
|
|
15
16
|
import { AstroError, AstroErrorData } from "./errors/index.js";
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
computePreferredLocale,
|
|
19
|
-
computePreferredLocaleList
|
|
20
|
-
} from "../i18n/utils.js";
|
|
17
|
+
import { callMiddleware } from "./middleware/callMiddleware.js";
|
|
18
|
+
import { sequence } from "./middleware/index.js";
|
|
21
19
|
import { renderRedirect } from "./redirects/render.js";
|
|
20
|
+
import { createResult } from "./render/index.js";
|
|
21
|
+
import { getParams, getProps } from "./render/index.js";
|
|
22
22
|
class RenderContext {
|
|
23
23
|
constructor(pipeline, locals, middleware, pathname, request, routeData, status, cookies = new AstroCookies(request), params = getParams(routeData, pathname), url = new URL(request.url)) {
|
|
24
24
|
this.pipeline = pipeline;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { bold } from "kleur/colors";
|
|
2
1
|
import { createRequire } from "module";
|
|
3
2
|
import nodeFs from "node:fs";
|
|
4
3
|
import path from "node:path";
|
|
5
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { bold } from "kleur/colors";
|
|
6
|
+
import { toRoutingStrategy } from "../../../i18n/utils.js";
|
|
6
7
|
import { getPrerenderDefault } from "../../../prerender/utils.js";
|
|
7
8
|
import { SUPPORTED_MARKDOWN_FILE_EXTENSIONS } from "../../constants.js";
|
|
8
9
|
import { MissingIndexForInternationalization } from "../../errors/errors-data.js";
|
|
@@ -10,7 +11,6 @@ import { AstroError } from "../../errors/index.js";
|
|
|
10
11
|
import { removeLeadingForwardSlash, slash } from "../../path.js";
|
|
11
12
|
import { resolvePages } from "../../util.js";
|
|
12
13
|
import { getRouteGenerator } from "./generator.js";
|
|
13
|
-
import { toRoutingStrategy } from "../../../i18n/utils.js";
|
|
14
14
|
const require2 = createRequire(import.meta.url);
|
|
15
15
|
function countOccurrences(needle, haystack) {
|
|
16
16
|
let count = 0;
|
package/dist/core/sync/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { dim } from "kleur/colors";
|
|
2
1
|
import fsMod from "node:fs";
|
|
3
2
|
import { performance } from "node:perf_hooks";
|
|
4
3
|
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { dim } from "kleur/colors";
|
|
5
5
|
import { createServer } from "vite";
|
|
6
6
|
import { createContentTypesGenerator } from "../../content/index.js";
|
|
7
7
|
import { globalContentConfigObserver } from "../../content/utils.js";
|
|
@@ -14,10 +14,10 @@ import { resolveConfig } from "../config/config.js";
|
|
|
14
14
|
import { createNodeLogger } from "../config/logging.js";
|
|
15
15
|
import { createSettings } from "../config/settings.js";
|
|
16
16
|
import { createVite } from "../create-vite.js";
|
|
17
|
+
import { collectErrorMetadata } from "../errors/dev/utils.js";
|
|
17
18
|
import { AstroError, AstroErrorData, createSafeError, isAstroError } from "../errors/index.js";
|
|
18
|
-
import { ensureProcessNodeEnv } from "../util.js";
|
|
19
19
|
import { formatErrorMessage } from "../messages.js";
|
|
20
|
-
import {
|
|
20
|
+
import { ensureProcessNodeEnv } from "../util.js";
|
|
21
21
|
async function sync(inlineConfig, options) {
|
|
22
22
|
ensureProcessNodeEnv("production");
|
|
23
23
|
const logger = createNodeLogger(inlineConfig);
|
package/dist/i18n/middleware.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { appendForwardSlash, joinPaths } from "@astrojs/internal-helpers/path";
|
|
2
|
-
import { getPathByLocale, normalizeTheLocale } from "./index.js";
|
|
3
2
|
import { shouldAppendForwardSlash } from "../core/build/util.js";
|
|
4
3
|
import { ROUTE_TYPE_HEADER } from "../core/constants.js";
|
|
4
|
+
import { getPathByLocale, normalizeTheLocale } from "./index.js";
|
|
5
5
|
function pathnameHasLocale(pathname, locales) {
|
|
6
6
|
const segments = pathname.split("/");
|
|
7
7
|
for (const segment of segments) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { bold } from "kleur/colors";
|
|
2
1
|
import fs from "node:fs";
|
|
3
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { bold } from "kleur/colors";
|
|
4
4
|
import { buildClientDirectiveEntrypoint } from "../core/client-directive/index.js";
|
|
5
5
|
import { mergeConfig } from "../core/config/index.js";
|
|
6
6
|
import { isServerLikeOutput } from "../prerender/utils.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fragment,
|
|
1
|
+
import { Fragment, Renderer, markHTMLString } from "../runtime/server/index.js";
|
|
2
2
|
const AstroJSX = "astro:jsx";
|
|
3
3
|
const Empty = Symbol("empty");
|
|
4
4
|
const toSlotName = (slotAttr) => slotAttr;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import dget from "dlv";
|
|
2
|
-
import { dset } from "dset";
|
|
3
1
|
import fs from "node:fs";
|
|
4
2
|
import path from "node:path";
|
|
3
|
+
import dget from "dlv";
|
|
4
|
+
import { dset } from "dset";
|
|
5
5
|
class PreferenceStore {
|
|
6
6
|
constructor(dir, filename = "settings.json") {
|
|
7
7
|
this.dir = dir;
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
} from "./render/index.js";
|
|
33
33
|
import { createTransitionScope, renderTransition } from "./transition.js";
|
|
34
34
|
import { markHTMLString as markHTMLString2 } from "./escape.js";
|
|
35
|
-
import {
|
|
35
|
+
import { Renderer as Renderer2, addAttribute as addAttribute2 } from "./render/index.js";
|
|
36
36
|
function mergeSlots(...slotted) {
|
|
37
37
|
const slots = {};
|
|
38
38
|
for (const slot of slotted) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AstroError, AstroErrorData } from "../../../../core/errors/index.js";
|
|
2
2
|
import { chunkToByteArray, chunkToString, encoder } from "../common.js";
|
|
3
|
+
import { promiseWithResolvers } from "../util.js";
|
|
3
4
|
import { isHeadAndContent } from "./head-and-content.js";
|
|
4
5
|
import { isRenderTemplateResult } from "./render-template.js";
|
|
5
|
-
import { promiseWithResolvers } from "../util.js";
|
|
6
6
|
const DOCTYPE_EXP = /<!doctype html/i;
|
|
7
7
|
async function renderToString(result, componentFactory, props, children, isPage = false, route) {
|
|
8
8
|
const templateResult = await callComponentAsTemplateResultOrResponse(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { renderComponentToString } from "./component.js";
|
|
2
2
|
import { isAstroComponentFactory } from "./astro/index.js";
|
|
3
|
-
import { renderToReadableStream, renderToString
|
|
3
|
+
import { renderToAsyncIterable, renderToReadableStream, renderToString } from "./astro/render.js";
|
|
4
4
|
import { encoder } from "./common.js";
|
|
5
5
|
import { isNode } from "./util.js";
|
|
6
6
|
async function renderPage(result, componentFactory, props, children, streaming, route) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import islandScript from "./astro-island.prebuilt.js";
|
|
2
1
|
import islandScriptDev from "./astro-island.prebuilt-dev.js";
|
|
2
|
+
import islandScript from "./astro-island.prebuilt.js";
|
|
3
3
|
const ISLAND_STYLES = `<style>astro-island,astro-slot,astro-static-slot{display:contents}</style>`;
|
|
4
4
|
function determineIfNeedsHydrationScript(result) {
|
|
5
5
|
if (result._metadata.hasHydrationScript) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import cssesc from "cssesc";
|
|
1
2
|
import { fade, slide } from "../../transitions/index.js";
|
|
2
3
|
import { markHTMLString } from "./escape.js";
|
|
3
|
-
import cssesc from "cssesc";
|
|
4
4
|
const transitionNameMap = /* @__PURE__ */ new WeakMap();
|
|
5
5
|
function incrementTransitionNumber(result) {
|
|
6
6
|
let num = 1;
|
|
@@ -58,6 +58,7 @@ function renderTransition(result, hash, animationName, transitionName) {
|
|
|
58
58
|
sheet.addFallback("old", "animation: none; mix-blend-mode: normal;");
|
|
59
59
|
sheet.addModern("old", "animation: none; opacity: 0; mix-blend-mode: normal;");
|
|
60
60
|
sheet.addAnimationRaw("new", "animation: none; mix-blend-mode: normal;");
|
|
61
|
+
sheet.addModern("group", "animation: none");
|
|
61
62
|
}
|
|
62
63
|
result._metadata.extraHead.push(markHTMLString(`<style>${sheet.toString()}</style>`));
|
|
63
64
|
return scope;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { bold } from "kleur/colors";
|
|
2
1
|
import * as fs from "node:fs";
|
|
3
2
|
import path from "node:path";
|
|
4
3
|
import { appendForwardSlash } from "@astrojs/internal-helpers/path";
|
|
4
|
+
import { bold } from "kleur/colors";
|
|
5
5
|
import notFoundTemplate, { subpathNotUsedTemplate } from "../template/4xx.js";
|
|
6
6
|
import { writeHtmlResponse } from "./response.js";
|
|
7
7
|
function baseMiddleware(settings, logger) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ModuleLoader } from '../core/module-loader/index.js';
|
|
2
1
|
import type { AstroConfig } from '../@types/astro.js';
|
|
2
|
+
import type { ModuleLoader } from '../core/module-loader/index.js';
|
|
3
3
|
import type { DevPipeline } from './pipeline.js';
|
|
4
4
|
export declare function recordServerError(loader: ModuleLoader, config: AstroConfig, { logger }: DevPipeline, _err: unknown): {
|
|
5
5
|
error: Error;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { collectErrorMetadata } from "../core/errors/dev/index.js";
|
|
2
|
-
import {
|
|
2
|
+
import { AstroErrorData, createSafeError } from "../core/errors/index.js";
|
|
3
3
|
import { formatErrorMessage } from "../core/messages.js";
|
|
4
4
|
import { eventError, telemetry } from "../events/index.js";
|
|
5
5
|
function recordServerError(loader, config, { logger }, _err) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { AstroSettings, ComponentInstance, RouteData, SSRLoadedRenderer, SSRManifest } from '../@types/astro.js';
|
|
2
|
+
import type { HeadElements } from '../core/base-pipeline.js';
|
|
2
3
|
import type { Logger } from '../core/logger/core.js';
|
|
3
4
|
import type { ModuleLoader } from '../core/module-loader/index.js';
|
|
4
5
|
import { Pipeline } from '../core/render/index.js';
|
|
5
|
-
import type { HeadElements } from '../core/base-pipeline.js';
|
|
6
6
|
export declare class DevPipeline extends Pipeline {
|
|
7
7
|
readonly loader: ModuleLoader;
|
|
8
8
|
readonly logger: Logger;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import url from "node:url";
|
|
2
|
+
import { getInfoOutput } from "../cli/info/index.js";
|
|
3
|
+
import { ASTRO_VERSION } from "../core/constants.js";
|
|
4
|
+
import { enhanceViteSSRError } from "../core/errors/dev/index.js";
|
|
5
|
+
import { AggregateError, CSSError, MarkdownError } from "../core/errors/index.js";
|
|
2
6
|
import { Pipeline, loadRenderer } from "../core/render/index.js";
|
|
3
7
|
import { isPage, resolveIdToUrl, viteID } from "../core/util.js";
|
|
4
8
|
import { isServerLikeOutput } from "../prerender/utils.js";
|
|
5
|
-
import { createResolve } from "./resolve.js";
|
|
6
|
-
import { AggregateError, CSSError, MarkdownError } from "../core/errors/index.js";
|
|
7
|
-
import { enhanceViteSSRError } from "../core/errors/dev/index.js";
|
|
8
|
-
import { getScriptsForURL } from "./scripts.js";
|
|
9
|
-
import { ASTRO_VERSION } from "../core/constants.js";
|
|
10
|
-
import { getInfoOutput } from "../cli/info/index.js";
|
|
11
9
|
import { PAGE_SCRIPT_ID } from "../vite-plugin-scripts/index.js";
|
|
12
10
|
import { getStylesForURL } from "./css.js";
|
|
13
11
|
import { getComponentMetadata } from "./metadata.js";
|
|
12
|
+
import { createResolve } from "./resolve.js";
|
|
13
|
+
import { getScriptsForURL } from "./scripts.js";
|
|
14
14
|
class DevPipeline extends Pipeline {
|
|
15
15
|
constructor(loader, logger, manifest, settings, config = settings.config) {
|
|
16
16
|
const mode = "development";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
+
import { IncomingMessage } from "node:http";
|
|
3
|
+
import { getViteErrorPayload } from "../core/errors/dev/index.js";
|
|
4
|
+
import { AstroError, AstroErrorData } from "../core/errors/index.js";
|
|
1
5
|
import { patchOverlay } from "../core/errors/overlay.js";
|
|
2
6
|
import { createViteLoader } from "../core/module-loader/index.js";
|
|
3
7
|
import { createRouteManifest } from "../core/routing/index.js";
|
|
8
|
+
import { toRoutingStrategy } from "../i18n/utils.js";
|
|
4
9
|
import { baseMiddleware } from "./base.js";
|
|
5
10
|
import { createController } from "./controller.js";
|
|
11
|
+
import { recordServerError } from "./error.js";
|
|
6
12
|
import { DevPipeline } from "./pipeline.js";
|
|
7
13
|
import { handleRequest } from "./request.js";
|
|
8
|
-
import { AstroError, AstroErrorData } from "../core/errors/index.js";
|
|
9
|
-
import { getViteErrorPayload } from "../core/errors/dev/index.js";
|
|
10
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
11
|
-
import { IncomingMessage } from "node:http";
|
|
12
14
|
import { setRouteError } from "./server-state.js";
|
|
13
|
-
import { recordServerError } from "./error.js";
|
|
14
|
-
import { toRoutingStrategy } from "../i18n/utils.js";
|
|
15
15
|
function createVitePluginAstroServer({
|
|
16
16
|
settings,
|
|
17
17
|
logger,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { collapseDuplicateSlashes, removeTrailingForwardSlash } from "../core/path.js";
|
|
2
2
|
import { isServerLikeOutput } from "../prerender/utils.js";
|
|
3
3
|
import { runWithErrorHandling } from "./controller.js";
|
|
4
|
+
import { recordServerError } from "./error.js";
|
|
4
5
|
import { handle500Response } from "./response.js";
|
|
5
6
|
import { handleRoute, matchRoute } from "./route.js";
|
|
6
|
-
import { recordServerError } from "./error.js";
|
|
7
7
|
async function handleRequest({
|
|
8
8
|
pipeline,
|
|
9
9
|
manifestData,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { REROUTE_DIRECTIVE_HEADER, clientLocalsSymbol } from "../core/constants.js";
|
|
1
2
|
import { AstroErrorData, isAstroError } from "../core/errors/index.js";
|
|
2
3
|
import { req } from "../core/messages.js";
|
|
3
4
|
import { loadMiddleware } from "../core/middleware/loadMiddleware.js";
|
|
5
|
+
import { RenderContext } from "../core/render-context.js";
|
|
4
6
|
import { getProps } from "../core/render/index.js";
|
|
5
7
|
import { createRequest } from "../core/request.js";
|
|
6
8
|
import { matchAllRoutes } from "../core/routing/index.js";
|
|
@@ -8,8 +10,6 @@ import { normalizeTheLocale } from "../i18n/index.js";
|
|
|
8
10
|
import { getSortedPreloadedMatches } from "../prerender/routing.js";
|
|
9
11
|
import { isServerLikeOutput } from "../prerender/utils.js";
|
|
10
12
|
import { handle404Response, writeSSRResult, writeWebResponse } from "./response.js";
|
|
11
|
-
import { REROUTE_DIRECTIVE_HEADER, clientLocalsSymbol } from "../core/constants.js";
|
|
12
|
-
import { RenderContext } from "../core/render-context.js";
|
|
13
13
|
function isLoggedRequest(url) {
|
|
14
14
|
return url !== "/favicon.ico";
|
|
15
15
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { fileURLToPath } from "node:url";
|
|
2
|
-
import { loadEnv } from "vite";
|
|
3
2
|
import { transform } from "esbuild";
|
|
4
3
|
import MagicString from "magic-string";
|
|
4
|
+
import { loadEnv } from "vite";
|
|
5
5
|
const importMetaEnvOnlyRe = /\bimport\.meta\.env\b(?!\.)/;
|
|
6
6
|
const isValidIdentifierRe = /^[_$a-zA-Z][\w$]*$/;
|
|
7
7
|
const exportConstPrerenderRe = /\bexport\s+const\s+prerender\s*=\s*import\.meta\.env\.(.+?)\b/;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { bold } from "kleur/colors";
|
|
2
1
|
import path from "node:path";
|
|
3
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { bold } from "kleur/colors";
|
|
4
4
|
import { normalizePath } from "vite";
|
|
5
5
|
import { getContentPaths, getDotAstroTypeReference } from "../content/index.js";
|
|
6
6
|
import {} from "../core/logger/core.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createMarkdownProcessor,
|
|
3
|
-
InvalidAstroDataError
|
|
4
|
-
} from "@astrojs/markdown-remark";
|
|
5
1
|
import fs from "node:fs";
|
|
6
2
|
import path from "node:path";
|
|
7
3
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
4
|
+
import {
|
|
5
|
+
InvalidAstroDataError,
|
|
6
|
+
createMarkdownProcessor
|
|
7
|
+
} from "@astrojs/markdown-remark";
|
|
8
8
|
import { normalizePath } from "vite";
|
|
9
|
-
import { AstroError, AstroErrorData } from "../core/errors/index.js";
|
|
10
9
|
import { safeParseFrontmatter } from "../content/utils.js";
|
|
10
|
+
import { AstroError, AstroErrorData } from "../core/errors/index.js";
|
|
11
11
|
import { isMarkdownFile } from "../core/util.js";
|
|
12
12
|
import { shorthash } from "../runtime/server/shorthash.js";
|
|
13
13
|
import { getFileInfo } from "../vite-plugin-utils/index.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { bold } from "kleur/colors";
|
|
2
1
|
import { extname } from "node:path";
|
|
2
|
+
import { bold } from "kleur/colors";
|
|
3
3
|
import { normalizePath } from "vite";
|
|
4
4
|
import {} from "../core/logger/core.js";
|
|
5
5
|
import { isEndpoint, isPage, rootRelativePath } from "../core/util.js";
|