astro 2.0.12 → 2.0.14
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/core/constants.js
CHANGED
package/dist/core/dev/dev.js
CHANGED
|
@@ -31,7 +31,7 @@ async function dev(settings, options) {
|
|
|
31
31
|
isRestart: options.isRestart
|
|
32
32
|
})
|
|
33
33
|
);
|
|
34
|
-
const currentVersion = "2.0.
|
|
34
|
+
const currentVersion = "2.0.14";
|
|
35
35
|
if (currentVersion.includes("-")) {
|
|
36
36
|
warn(options.logging, null, msg.prerelease({ currentVersion }));
|
|
37
37
|
}
|
package/dist/core/messages.js
CHANGED
|
@@ -47,7 +47,7 @@ function serverStart({
|
|
|
47
47
|
base,
|
|
48
48
|
isRestart = false
|
|
49
49
|
}) {
|
|
50
|
-
const version = "2.0.
|
|
50
|
+
const version = "2.0.14";
|
|
51
51
|
const localPrefix = `${dim("\u2503")} Local `;
|
|
52
52
|
const networkPrefix = `${dim("\u2503")} Network `;
|
|
53
53
|
const emptyPrefix = " ".repeat(11);
|
|
@@ -233,7 +233,7 @@ function printHelp({
|
|
|
233
233
|
message.push(
|
|
234
234
|
linebreak(),
|
|
235
235
|
` ${bgGreen(black(` ${commandName} `))} ${green(
|
|
236
|
-
`v${"2.0.
|
|
236
|
+
`v${"2.0.14"}`
|
|
237
237
|
)} ${headline}`
|
|
238
238
|
);
|
|
239
239
|
}
|
|
@@ -24,7 +24,11 @@ async function* crawlGraph(loader, _id, isRootFile, scanned = /* @__PURE__ */ ne
|
|
|
24
24
|
if (entryIsStyle && !isCSSRequest(importedModulePathname)) {
|
|
25
25
|
continue;
|
|
26
26
|
}
|
|
27
|
-
if (fileExtensionsToSSR.has(
|
|
27
|
+
if (fileExtensionsToSSR.has(
|
|
28
|
+
npath.extname(
|
|
29
|
+
importedModule.id
|
|
30
|
+
)
|
|
31
|
+
)) {
|
|
28
32
|
const mod = loader.getModuleById(importedModule.id);
|
|
29
33
|
if (!(mod == null ? void 0 : mod.ssrModule)) {
|
|
30
34
|
try {
|
|
@@ -12,7 +12,13 @@ const toIdent = (k) => k.trim().replace(/(?:(?!^)\b\w|\s+|[^\w]+)/g, (match, ind
|
|
|
12
12
|
});
|
|
13
13
|
const toAttributeString = (value, shouldEscape = true) => shouldEscape ? String(value).replace(/&/g, "&").replace(/"/g, """) : value;
|
|
14
14
|
const kebab = (k) => k.toLowerCase() === k ? k : k.replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`);
|
|
15
|
-
const toStyleString = (obj) => Object.entries(obj).map(([k, v]) =>
|
|
15
|
+
const toStyleString = (obj) => Object.entries(obj).map(([k, v]) => {
|
|
16
|
+
if (k[0] !== "-" && k[1] !== "-")
|
|
17
|
+
return `${kebab(k)}:${v}`;
|
|
18
|
+
if (kebab(k) !== k)
|
|
19
|
+
return `${kebab(k)}:var(${k});${k}:${v}`;
|
|
20
|
+
return `${k}:${v}`;
|
|
21
|
+
}).join(";");
|
|
16
22
|
function defineScriptVars(vars) {
|
|
17
23
|
let output = "";
|
|
18
24
|
for (const [key, value] of Object.entries(vars)) {
|
|
@@ -38,13 +38,9 @@ function writeHtmlResponse(res, statusCode, html) {
|
|
|
38
38
|
}
|
|
39
39
|
async function writeWebResponse(res, webResponse) {
|
|
40
40
|
const { status, headers, body } = webResponse;
|
|
41
|
-
|
|
42
|
-
if ("
|
|
43
|
-
|
|
44
|
-
res.setHeader(key, value);
|
|
45
|
-
}
|
|
46
|
-
} else {
|
|
47
|
-
_headers = Object.fromEntries(headers.entries());
|
|
41
|
+
const _headers = Object.fromEntries(headers.entries());
|
|
42
|
+
if (headers["getSetCookie"]) {
|
|
43
|
+
_headers["set-cookie"] = headers.getSetCookie();
|
|
48
44
|
}
|
|
49
45
|
const setCookieHeaders = Array.from(getSetCookiesFromResponse(webResponse));
|
|
50
46
|
if (setCookieHeaders.length) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astro",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.14",
|
|
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",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"@astrojs/language-server": "^0.28.3",
|
|
90
90
|
"@astrojs/markdown-remark": "^2.0.1",
|
|
91
91
|
"@astrojs/telemetry": "^2.0.0",
|
|
92
|
-
"@astrojs/webapi": "^2.0.
|
|
92
|
+
"@astrojs/webapi": "^2.0.1",
|
|
93
93
|
"@babel/core": "^7.18.2",
|
|
94
94
|
"@babel/generator": "^7.18.2",
|
|
95
95
|
"@babel/parser": "^7.18.4",
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
"typescript": "*",
|
|
134
134
|
"unist-util-visit": "^4.1.0",
|
|
135
135
|
"vfile": "^5.3.2",
|
|
136
|
-
"vite": "^4.
|
|
136
|
+
"vite": "^4.1.2",
|
|
137
137
|
"vitefu": "^0.2.4",
|
|
138
138
|
"yargs-parser": "^21.0.1",
|
|
139
139
|
"zod": "^3.17.3"
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
"@types/send": "^0.17.1",
|
|
161
161
|
"@types/server-destroy": "^1.0.1",
|
|
162
162
|
"@types/unist": "^2.0.6",
|
|
163
|
-
"astro-scripts": "0.0.
|
|
163
|
+
"astro-scripts": "0.0.11",
|
|
164
164
|
"chai": "^4.3.6",
|
|
165
165
|
"cheerio": "^1.0.0-rc.11",
|
|
166
166
|
"eol": "^0.9.1",
|