astro 5.4.0 → 5.4.1
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/dist/assets/utils/index.d.ts +1 -0
- package/dist/assets/utils/index.js +14 -0
- package/dist/assets/utils/remotePattern.d.ts +3 -0
- package/dist/assets/utils/remotePattern.js +16 -0
- package/dist/content/content-layer.js +3 -3
- package/dist/core/constants.js +1 -1
- package/dist/core/dev/dev.js +1 -1
- package/dist/core/messages.js +2 -2
- package/dist/core/session.d.ts +2 -2
- package/dist/types/public/extendables.d.ts +5 -0
- package/package.json +4 -4
|
@@ -5,3 +5,4 @@ export { getOrigQueryParams } from './queryParams.js';
|
|
|
5
5
|
export { hashTransform, propsToFilename } from './transformToPath.js';
|
|
6
6
|
export { inferRemoteSize } from './remoteProbe.js';
|
|
7
7
|
export { makeSvgComponent } from './svg.js';
|
|
8
|
+
export { isRemoteAllowed, matchHostname, matchPathname, matchPattern, matchPort, matchProtocol, type RemotePattern, } from './remotePattern.js';
|
|
@@ -5,6 +5,14 @@ import { getOrigQueryParams } from "./queryParams.js";
|
|
|
5
5
|
import { hashTransform, propsToFilename } from "./transformToPath.js";
|
|
6
6
|
import { inferRemoteSize } from "./remoteProbe.js";
|
|
7
7
|
import { makeSvgComponent } from "./svg.js";
|
|
8
|
+
import {
|
|
9
|
+
isRemoteAllowed,
|
|
10
|
+
matchHostname,
|
|
11
|
+
matchPathname,
|
|
12
|
+
matchPattern,
|
|
13
|
+
matchPort,
|
|
14
|
+
matchProtocol
|
|
15
|
+
} from "./remotePattern.js";
|
|
8
16
|
export {
|
|
9
17
|
emitESMImage,
|
|
10
18
|
getOrigQueryParams,
|
|
@@ -12,7 +20,13 @@ export {
|
|
|
12
20
|
imageMetadata,
|
|
13
21
|
inferRemoteSize,
|
|
14
22
|
isESMImportedImage,
|
|
23
|
+
isRemoteAllowed,
|
|
15
24
|
isRemoteImage,
|
|
16
25
|
makeSvgComponent,
|
|
26
|
+
matchHostname,
|
|
27
|
+
matchPathname,
|
|
28
|
+
matchPattern,
|
|
29
|
+
matchPort,
|
|
30
|
+
matchProtocol,
|
|
17
31
|
propsToFilename
|
|
18
32
|
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type RemotePattern, isRemoteAllowed, matchHostname, matchPathname, matchPattern, matchPort, matchProtocol } from '@astrojs/internal-helpers/remote';
|
|
2
|
+
export { isRemoteAllowed, matchHostname, matchPort, matchPathname, matchProtocol, matchPattern };
|
|
3
|
+
export type { RemotePattern };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isRemoteAllowed,
|
|
3
|
+
matchHostname,
|
|
4
|
+
matchPathname,
|
|
5
|
+
matchPattern,
|
|
6
|
+
matchPort,
|
|
7
|
+
matchProtocol
|
|
8
|
+
} from "@astrojs/internal-helpers/remote";
|
|
9
|
+
export {
|
|
10
|
+
isRemoteAllowed,
|
|
11
|
+
matchHostname,
|
|
12
|
+
matchPathname,
|
|
13
|
+
matchPattern,
|
|
14
|
+
matchPort,
|
|
15
|
+
matchProtocol
|
|
16
|
+
};
|
|
@@ -153,7 +153,7 @@ ${contentConfig.error.message}`);
|
|
|
153
153
|
logger.info("Content config changed");
|
|
154
154
|
shouldClear = true;
|
|
155
155
|
}
|
|
156
|
-
if (previousAstroVersion && previousAstroVersion !== "5.4.
|
|
156
|
+
if (previousAstroVersion && previousAstroVersion !== "5.4.1") {
|
|
157
157
|
logger.info("Astro version changed");
|
|
158
158
|
shouldClear = true;
|
|
159
159
|
}
|
|
@@ -161,8 +161,8 @@ ${contentConfig.error.message}`);
|
|
|
161
161
|
logger.info("Clearing content store");
|
|
162
162
|
this.#store.clearAll();
|
|
163
163
|
}
|
|
164
|
-
if ("5.4.
|
|
165
|
-
await this.#store.metaStore().set("astro-version", "5.4.
|
|
164
|
+
if ("5.4.1") {
|
|
165
|
+
await this.#store.metaStore().set("astro-version", "5.4.1");
|
|
166
166
|
}
|
|
167
167
|
if (currentConfigDigest) {
|
|
168
168
|
await this.#store.metaStore().set("content-config-digest", currentConfigDigest);
|
package/dist/core/constants.js
CHANGED
package/dist/core/dev/dev.js
CHANGED
|
@@ -22,7 +22,7 @@ async function dev(inlineConfig) {
|
|
|
22
22
|
await telemetry.record([]);
|
|
23
23
|
const restart = await createContainerWithAutomaticRestart({ inlineConfig, fs });
|
|
24
24
|
const logger = restart.container.logger;
|
|
25
|
-
const currentVersion = "5.4.
|
|
25
|
+
const currentVersion = "5.4.1";
|
|
26
26
|
const isPrerelease = currentVersion.includes("-");
|
|
27
27
|
if (!isPrerelease) {
|
|
28
28
|
try {
|
package/dist/core/messages.js
CHANGED
|
@@ -38,7 +38,7 @@ function serverStart({
|
|
|
38
38
|
host,
|
|
39
39
|
base
|
|
40
40
|
}) {
|
|
41
|
-
const version = "5.4.
|
|
41
|
+
const version = "5.4.1";
|
|
42
42
|
const localPrefix = `${dim("\u2503")} Local `;
|
|
43
43
|
const networkPrefix = `${dim("\u2503")} Network `;
|
|
44
44
|
const emptyPrefix = " ".repeat(11);
|
|
@@ -281,7 +281,7 @@ function printHelp({
|
|
|
281
281
|
message.push(
|
|
282
282
|
linebreak(),
|
|
283
283
|
` ${bgGreen(black(` ${commandName} `))} ${green(
|
|
284
|
-
`v${"5.4.
|
|
284
|
+
`v${"5.4.1"}`
|
|
285
285
|
)} ${headline}`
|
|
286
286
|
);
|
|
287
287
|
}
|
package/dist/core/session.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare class AstroSession<TDriver extends SessionDriverName = any> {
|
|
|
8
8
|
/**
|
|
9
9
|
* Gets a session value. Returns `undefined` if the session or value does not exist.
|
|
10
10
|
*/
|
|
11
|
-
get<T =
|
|
11
|
+
get<T = void, K extends string = string>(key: K): Promise<(T extends void ? (K extends keyof App.SessionData ? App.SessionData[K] : any) : T) | undefined>;
|
|
12
12
|
/**
|
|
13
13
|
* Checks if a session value exists.
|
|
14
14
|
*/
|
|
@@ -32,7 +32,7 @@ export declare class AstroSession<TDriver extends SessionDriverName = any> {
|
|
|
32
32
|
/**
|
|
33
33
|
* Sets a session value. The session is created if it does not exist.
|
|
34
34
|
*/
|
|
35
|
-
set<T =
|
|
35
|
+
set<T = void, K extends string = string>(key: K, value: T extends void ? K extends keyof App.SessionData ? App.SessionData[K] : any : NoInfer<T>, { ttl }?: {
|
|
36
36
|
ttl?: number;
|
|
37
37
|
}): void;
|
|
38
38
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astro",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.1",
|
|
4
4
|
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "withastro",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"vendor"
|
|
104
104
|
],
|
|
105
105
|
"dependencies": {
|
|
106
|
-
"@astrojs/compiler": "^2.10.
|
|
106
|
+
"@astrojs/compiler": "^2.10.4",
|
|
107
107
|
"@oslojs/encoding": "^1.1.0",
|
|
108
108
|
"@rollup/pluginutils": "^5.1.4",
|
|
109
109
|
"@types/cookie": "^0.6.0",
|
|
@@ -160,8 +160,8 @@
|
|
|
160
160
|
"zod-to-json-schema": "^3.24.1",
|
|
161
161
|
"zod-to-ts": "^1.2.0",
|
|
162
162
|
"@astrojs/internal-helpers": "0.6.0",
|
|
163
|
-
"@astrojs/
|
|
164
|
-
"@astrojs/
|
|
163
|
+
"@astrojs/telemetry": "3.2.0",
|
|
164
|
+
"@astrojs/markdown-remark": "6.2.0"
|
|
165
165
|
},
|
|
166
166
|
"optionalDependencies": {
|
|
167
167
|
"sharp": "^0.33.3"
|