astro 2.10.10 → 2.10.12
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/content/utils.js
CHANGED
|
@@ -142,7 +142,10 @@ function getDataEntryId({
|
|
|
142
142
|
collection
|
|
143
143
|
}) {
|
|
144
144
|
const relativePath = getRelativeEntryPath(entry, collection, contentDir);
|
|
145
|
-
const withoutFileExt = relativePath.replace(
|
|
145
|
+
const withoutFileExt = normalizePath(relativePath).replace(
|
|
146
|
+
new RegExp(path.extname(relativePath) + "$"),
|
|
147
|
+
""
|
|
148
|
+
);
|
|
146
149
|
return withoutFileExt;
|
|
147
150
|
}
|
|
148
151
|
function getContentEntryIdAndSlug({
|
package/dist/core/constants.js
CHANGED
package/dist/core/dev/dev.js
CHANGED
|
@@ -23,7 +23,7 @@ async function dev(inlineConfig) {
|
|
|
23
23
|
base: restart.container.settings.config.base
|
|
24
24
|
})
|
|
25
25
|
);
|
|
26
|
-
const currentVersion = "2.10.
|
|
26
|
+
const currentVersion = "2.10.12";
|
|
27
27
|
if (currentVersion.includes("-")) {
|
|
28
28
|
warn(logging, null, msg.prerelease({ currentVersion }));
|
|
29
29
|
}
|
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.10.
|
|
50
|
+
const version = "2.10.12";
|
|
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.10.
|
|
236
|
+
`v${"2.10.12"}`
|
|
237
237
|
)} ${headline}`
|
|
238
238
|
);
|
|
239
239
|
}
|
|
@@ -191,7 +191,7 @@ async function handleRoute({
|
|
|
191
191
|
await writeWebResponse(incomingResponse, response);
|
|
192
192
|
}
|
|
193
193
|
} else {
|
|
194
|
-
if (result.status === 404) {
|
|
194
|
+
if (result.status === 404 && has404Route(manifestData)) {
|
|
195
195
|
const fourOhFourRoute = await matchRoute("/404", env, manifestData);
|
|
196
196
|
return handleRoute({
|
|
197
197
|
...options,
|
|
@@ -292,6 +292,9 @@ function getStatus(matchedRoute) {
|
|
|
292
292
|
if (matchedRoute.route.route === "/500")
|
|
293
293
|
return 500;
|
|
294
294
|
}
|
|
295
|
+
function has404Route(manifest) {
|
|
296
|
+
return manifest.routes.find((route) => route.route === "/404");
|
|
297
|
+
}
|
|
295
298
|
export {
|
|
296
299
|
handleRoute,
|
|
297
300
|
matchRoute
|