@makeswift/runtime 0.11.13 → 0.11.15
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.cjs.js +6 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +6 -4
- package/dist/index.es.js.map +1 -1
- package/dist/react-page.cjs.js.map +1 -1
- package/dist/react-page.es.js.map +1 -1
- package/dist/types/src/controls/list.d.ts +2 -2
- package/dist/types/src/controls/list.d.ts.map +1 -1
- package/dist/types/src/next/client.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -868,10 +868,12 @@ Received "${apiKey}" instead.`);
|
|
|
868
868
|
} = {}) {
|
|
869
869
|
var _a;
|
|
870
870
|
const siteVersion = (_a = this.siteVersion) != null ? _a : previewOverride ? MakeswiftSiteVersion.Working : MakeswiftSiteVersion.Live;
|
|
871
|
-
const
|
|
871
|
+
const url = new URL(`${this.siteVersion == null ? "v1" : "v2"}/pages/${encodeURIComponent(pathname)}`, this.apiOrigin);
|
|
872
872
|
if (localeInput)
|
|
873
|
-
searchParams.set("locale", localeInput);
|
|
874
|
-
const response = await this.fetch(
|
|
873
|
+
url.searchParams.set("locale", localeInput);
|
|
874
|
+
const response = await this.fetch(url.pathname + url.search, {
|
|
875
|
+
headers: { "Makeswift-Site-Version": siteVersion }
|
|
876
|
+
});
|
|
875
877
|
if (!response.ok) {
|
|
876
878
|
if (response.status === 404)
|
|
877
879
|
return null;
|
|
@@ -1249,7 +1251,7 @@ async function fonts(_req, res, { getFonts } = {}) {
|
|
|
1249
1251
|
const fonts2 = (_a = await (getFonts == null ? void 0 : getFonts())) != null ? _a : [];
|
|
1250
1252
|
return res.json(fonts2);
|
|
1251
1253
|
}
|
|
1252
|
-
const version = "0.11.
|
|
1254
|
+
const version = "0.11.15";
|
|
1253
1255
|
async function handler(req, res, { apiKey, siteVersions }) {
|
|
1254
1256
|
if (req.query.secret !== apiKey) {
|
|
1255
1257
|
return res.status(401).json({ message: "Unauthorized" });
|