| class BuildTimeAstroVersionProvider { | ||
| // Injected during the build through esbuild define | ||
| version = "6.1.1"; | ||
| version = "6.1.2"; | ||
| } | ||
@@ -5,0 +5,0 @@ export { |
@@ -195,3 +195,3 @@ import { existsSync, promises as fs } from "node:fs"; | ||
| } | ||
| if (previousAstroVersion && previousAstroVersion !== "6.1.1") { | ||
| if (previousAstroVersion && previousAstroVersion !== "6.1.2") { | ||
| logger.info("Astro version changed"); | ||
@@ -204,4 +204,4 @@ shouldClear = true; | ||
| } | ||
| if ("6.1.1") { | ||
| this.#store.metaStore().set("astro-version", "6.1.1"); | ||
| if ("6.1.2") { | ||
| this.#store.metaStore().set("astro-version", "6.1.2"); | ||
| } | ||
@@ -208,0 +208,0 @@ if (currentConfigDigest) { |
@@ -70,2 +70,7 @@ import { fileURLToPath } from "node:url"; | ||
| } | ||
| for (const [, ssrAssets] of internals.ssrAssetsPerEnvironment) { | ||
| for (const asset of ssrAssets) { | ||
| internals.staticFiles.add(asset); | ||
| } | ||
| } | ||
| const staticFiles = internals.staticFiles; | ||
@@ -72,0 +77,0 @@ const encodedKey = await encodeKey(await buildOpts.key); |
@@ -1,2 +0,2 @@ | ||
| const ASTRO_VERSION = "6.1.1"; | ||
| const ASTRO_VERSION = "6.1.2"; | ||
| const ASTRO_GENERATOR = `Astro v${ASTRO_VERSION}`; | ||
@@ -3,0 +3,0 @@ const REROUTE_DIRECTIVE_HEADER = "X-Astro-Reroute"; |
@@ -40,3 +40,3 @@ import fs from "node:fs"; | ||
| const logger = restart.container.logger; | ||
| const currentVersion = "6.1.1"; | ||
| const currentVersion = "6.1.2"; | ||
| const isPrerelease = currentVersion.includes("-"); | ||
@@ -43,0 +43,0 @@ if (!isPrerelease) { |
@@ -580,3 +580,3 @@ const UnknownCompilerError = { | ||
| )}** frontmatter does not match collection schema.`, | ||
| error.message | ||
| ...error.issues.map((issue) => ` **${issue.path.join(".")}**: ${issue.message}`) | ||
| ].join("\n"); | ||
@@ -593,3 +593,3 @@ }, | ||
| `, | ||
| ` **: ${error.message}`, | ||
| ...error.issues.map((issue) => ` **${issue.path.join(".")}**: ${issue.message}`), | ||
| "" | ||
@@ -636,3 +636,3 @@ ].join("\n"); | ||
| `, | ||
| ` **: ${error.message}`, | ||
| ...error.issues.map((issue) => ` **${issue.path.join(".")}**: ${issue.message}`), | ||
| "" | ||
@@ -639,0 +639,0 @@ ].join("\n"); |
@@ -279,3 +279,3 @@ import colors from "piccolore"; | ||
| ` ${bgGreen(black(` ${commandName} `))} ${green( | ||
| `v${"6.1.1"}` | ||
| `v${"6.1.2"}` | ||
| )} ${headline}` | ||
@@ -282,0 +282,0 @@ ); |
@@ -41,2 +41,9 @@ import type { Params } from '../../types/public/common.js'; | ||
| /** | ||
| * Checks whether the passed `value` is serializable. | ||
| * | ||
| * A serializable value contains plain values. For example, `Proxy`, `Set`, `Map`, functions, etc. | ||
| * are not accepted because they can't be serialized. | ||
| */ | ||
| export declare function isLocalsSerializable(value: unknown): boolean; | ||
| /** | ||
| * It attempts to serialize `value` and return it as a string. | ||
@@ -43,0 +50,0 @@ * |
@@ -85,16 +85,20 @@ import { createCallAction, createGetActionResult } from "../../actions/utils.js"; | ||
| function isLocalsSerializable(value) { | ||
| let type = typeof value; | ||
| let plainObject = true; | ||
| if (type === "object" && isPlainObject(value)) { | ||
| for (const [, nestedValue] of Object.entries(value)) { | ||
| if (!isLocalsSerializable(nestedValue)) { | ||
| plainObject = false; | ||
| break; | ||
| } | ||
| const stack = [value]; | ||
| while (stack.length > 0) { | ||
| const current = stack.pop(); | ||
| const type = typeof current; | ||
| if (current === null || type === "string" || type === "number" || type === "boolean") { | ||
| continue; | ||
| } | ||
| } else { | ||
| plainObject = false; | ||
| if (Array.isArray(current)) { | ||
| stack.push(...current); | ||
| continue; | ||
| } | ||
| if (type === "object" && isPlainObject(current)) { | ||
| stack.push(...Object.values(current)); | ||
| continue; | ||
| } | ||
| return false; | ||
| } | ||
| let result = value === null || type === "string" || type === "number" || type === "boolean" || Array.isArray(value) || plainObject; | ||
| return result; | ||
| return true; | ||
| } | ||
@@ -122,4 +126,5 @@ function isPlainObject(value) { | ||
| defineMiddleware, | ||
| isLocalsSerializable, | ||
| sequence, | ||
| trySerializeLocals | ||
| }; |
| import { performance } from "node:perf_hooks"; | ||
| import { fileURLToPath } from "node:url"; | ||
| import { preview } from "vite"; | ||
| import { mergeConfig, preview } from "vite"; | ||
| import * as msg from "../messages/runtime.js"; | ||
@@ -13,3 +13,3 @@ import { getResolvedHostForHttpServer } from "./util.js"; | ||
| try { | ||
| previewServer = await preview({ | ||
| const astroPreviewConfig = { | ||
| configFile: false, | ||
@@ -26,7 +26,14 @@ base: settings.config.base, | ||
| headers: settings.config.server.headers, | ||
| open: settings.config.server.open, | ||
| allowedHosts: settings.config.server.allowedHosts | ||
| open: settings.config.server.open | ||
| }, | ||
| plugins: [vitePluginAstroPreview(settings)] | ||
| }); | ||
| }; | ||
| const { plugins: _plugins, ...userViteConfig } = settings.config.vite ?? {}; | ||
| const mergedViteConfig = mergeConfig(userViteConfig, astroPreviewConfig); | ||
| const { allowedHosts } = settings.config.server; | ||
| if (typeof allowedHosts === "boolean" || Array.isArray(allowedHosts) && allowedHosts.length > 0) { | ||
| mergedViteConfig.preview ??= {}; | ||
| mergedViteConfig.preview.allowedHosts = allowedHosts; | ||
| } | ||
| previewServer = await preview(mergedViteConfig); | ||
| } catch (err) { | ||
@@ -33,0 +40,0 @@ if (err instanceof Error) { |
+9
-4
| { | ||
| "name": "astro", | ||
| "version": "6.1.1", | ||
| "version": "6.1.2", | ||
| "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.", | ||
@@ -156,4 +156,4 @@ "type": "module", | ||
| "zod": "^4.3.6", | ||
| "@astrojs/internal-helpers": "0.8.0", | ||
| "@astrojs/markdown-remark": "7.1.0", | ||
| "@astrojs/internal-helpers": "0.8.0", | ||
| "@astrojs/telemetry": "3.3.0" | ||
@@ -222,5 +222,10 @@ }, | ||
| "test:types": "tsc --project test/types/tsconfig.json", | ||
| "test:unit": "astro-scripts test \"test/units/**/*.test.js\" --teardown ./test/units/teardown.js", | ||
| "test:integration": "astro-scripts test \"test/*.test.js\"" | ||
| "typecheck:tests": "tsc --project tsconfig.test.json", | ||
| "test:unit": "pnpm run test:unit:js && pnpm run test:unit:ts", | ||
| "test:unit:js": "astro-scripts test \"test/units/**/*.test.js\" --teardown ./test/units/teardown.js", | ||
| "test:unit:ts": "astro-scripts test \"test/units/**/*.test.ts\" --strip-types --teardown ./test/units/teardown.js", | ||
| "test:integration": "pnpm run test:integration:js && pnpm run test:integration:ts", | ||
| "test:integration:js": "astro-scripts test \"test/*.test.js\"", | ||
| "test:integration:ts": "astro-scripts test \"test/*.test.ts\" --strip-types" | ||
| } | ||
| } |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 7 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 7 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
2646786
0.06%69856
0.03%