@ampless/runtime 1.0.0-beta.63 → 1.0.0-beta.65
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/index.js +4 -4
- package/dist/routes/index.js +4 -3
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -172,9 +172,9 @@ function createSiteSettings(cmsConfig, storage) {
|
|
|
172
172
|
const baseSite = cmsConfig.site;
|
|
173
173
|
return {
|
|
174
174
|
site: {
|
|
175
|
-
name: remote?.site?.name ?? baseSite.name,
|
|
176
|
-
url: remote?.site?.url ?? baseSite.url,
|
|
177
|
-
description: remote?.site?.description ?? baseSite.description
|
|
175
|
+
name: String(remote?.site?.name ?? baseSite.name ?? ""),
|
|
176
|
+
url: String(remote?.site?.url ?? baseSite.url ?? ""),
|
|
177
|
+
description: (remote?.site?.description ?? baseSite.description) != null ? String(remote?.site?.description ?? baseSite.description) : void 0
|
|
178
178
|
},
|
|
179
179
|
media: {
|
|
180
180
|
imageDisplay: remote?.media?.imageDisplay ?? cmsConfig.media?.imageDisplay,
|
|
@@ -221,7 +221,7 @@ function createSeo(cmsConfig, settingsApi) {
|
|
|
221
221
|
async siteMetadata() {
|
|
222
222
|
const settings = await settingsApi.loadSiteSettings();
|
|
223
223
|
const accum = {
|
|
224
|
-
title: settings.site.name,
|
|
224
|
+
title: String(settings.site.name ?? ""),
|
|
225
225
|
description: settings.site.description
|
|
226
226
|
};
|
|
227
227
|
for (const plugin of plugins) {
|
package/dist/routes/index.js
CHANGED
|
@@ -113,9 +113,10 @@ function createStaticRouteHandler(ampless) {
|
|
|
113
113
|
if (restSegments.length === 0) {
|
|
114
114
|
const url = new URL(request.url);
|
|
115
115
|
if (!url.pathname.endsWith("/")) {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
return new Response(null, {
|
|
117
|
+
status: 308,
|
|
118
|
+
headers: { Location: `${url.pathname}/${url.search}` }
|
|
119
|
+
});
|
|
119
120
|
}
|
|
120
121
|
const body2 = post.body ?? null;
|
|
121
122
|
const entrypoint = typeof body2?.entrypoint === "string" && body2.entrypoint ? body2.entrypoint : "index.html";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ampless/runtime",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.65",
|
|
4
4
|
"description": "Public-side runtime for ampless: post fetching, theme dispatch, middleware, public route handlers",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"marked": "^18.0.4",
|
|
52
52
|
"sanitize-html": "^2.17.4",
|
|
53
53
|
"tailwind-merge": "^3.6.0",
|
|
54
|
-
"@ampless/plugin-og-image": "0.2.0-beta.
|
|
55
|
-
"ampless": "1.0.0-beta.
|
|
54
|
+
"@ampless/plugin-og-image": "0.2.0-beta.53",
|
|
55
|
+
"ampless": "1.0.0-beta.53"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@aws-amplify/adapter-nextjs": "^1",
|