astro 2.0.12 → 2.0.13
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.
|
@@ -27,7 +27,7 @@ function vitePluginSSR(internals, adapter) {
|
|
|
27
27
|
},
|
|
28
28
|
load(id) {
|
|
29
29
|
if (id === resolvedVirtualModuleId) {
|
|
30
|
-
return `import * as
|
|
30
|
+
return `import * as _adapter from '${adapter.serverEntrypoint}';
|
|
31
31
|
import * as _main from '${pagesVirtualModuleId}';
|
|
32
32
|
import { deserializeManifest as _deserializeManifest } from 'astro/app';
|
|
33
33
|
const _manifest = Object.assign(_deserializeManifest('${manifestReplace}'), {
|
|
@@ -36,7 +36,7 @@ const _manifest = Object.assign(_deserializeManifest('${manifestReplace}'), {
|
|
|
36
36
|
});
|
|
37
37
|
const _args = ${adapter.args ? JSON.stringify(adapter.args) : "undefined"};
|
|
38
38
|
export * from '${pagesVirtualModuleId}';
|
|
39
|
-
${adapter.exports ? `const _exports =
|
|
39
|
+
${adapter.exports ? `const _exports = _adapter.createExports(_manifest, _args);
|
|
40
40
|
${adapter.exports.map((name) => {
|
|
41
41
|
if (name === "default") {
|
|
42
42
|
return `const _default = _exports['default'];
|
|
@@ -46,10 +46,12 @@ export { _default as default };`;
|
|
|
46
46
|
}
|
|
47
47
|
}).join("\n")}
|
|
48
48
|
` : ""}
|
|
49
|
+
export const adapter = _adapter
|
|
50
|
+
${adapter.name !== "@astrojs/deno" ? `
|
|
49
51
|
const _start = 'start';
|
|
50
|
-
if(_start in
|
|
51
|
-
|
|
52
|
-
}`;
|
|
52
|
+
if(_start in _adapter) {
|
|
53
|
+
_adapter[_start](_manifest, _args);
|
|
54
|
+
}` : ""}`;
|
|
53
55
|
}
|
|
54
56
|
return void 0;
|
|
55
57
|
},
|
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.13";
|
|
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.13";
|
|
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.13"}`
|
|
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 {
|
|
@@ -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) {
|