@makeswift/runtime 0.11.12 → 0.11.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/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 +1 -1
- package/dist/react-page.cjs.js.map +1 -1
- package/dist/react-page.es.js +1 -1
- package/dist/react-page.es.js.map +1 -1
- package/dist/types/src/controls/__tests__/fixtures/shape.d.ts +15 -0
- package/dist/types/src/controls/__tests__/fixtures/shape.d.ts.map +1 -0
- package/dist/types/src/controls/__tests__/translation.test.d.ts +2 -0
- package/dist/types/src/controls/__tests__/translation.test.d.ts.map +1 -0
- package/dist/types/src/next/client.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -835,10 +835,12 @@ Received "${apiKey}" instead.`);
|
|
|
835
835
|
} = {}) {
|
|
836
836
|
var _a;
|
|
837
837
|
const siteVersion = (_a = this.siteVersion) != null ? _a : previewOverride ? MakeswiftSiteVersion.Working : MakeswiftSiteVersion.Live;
|
|
838
|
-
const
|
|
838
|
+
const url = new URL(`${this.siteVersion == null ? "v1" : "v2"}/pages/${encodeURIComponent(pathname)}`, this.apiOrigin);
|
|
839
839
|
if (localeInput)
|
|
840
|
-
searchParams.set("locale", localeInput);
|
|
841
|
-
const response = await this.fetch(
|
|
840
|
+
url.searchParams.set("locale", localeInput);
|
|
841
|
+
const response = await this.fetch(url.pathname + url.search, {
|
|
842
|
+
headers: { "Makeswift-Site-Version": siteVersion }
|
|
843
|
+
});
|
|
842
844
|
if (!response.ok) {
|
|
843
845
|
if (response.status === 404)
|
|
844
846
|
return null;
|
|
@@ -1216,7 +1218,7 @@ async function fonts(_req, res, { getFonts } = {}) {
|
|
|
1216
1218
|
const fonts2 = (_a = await (getFonts == null ? void 0 : getFonts())) != null ? _a : [];
|
|
1217
1219
|
return res.json(fonts2);
|
|
1218
1220
|
}
|
|
1219
|
-
const version = "0.11.
|
|
1221
|
+
const version = "0.11.14";
|
|
1220
1222
|
async function handler(req, res, { apiKey, siteVersions }) {
|
|
1221
1223
|
if (req.query.secret !== apiKey) {
|
|
1222
1224
|
return res.status(401).json({ message: "Unauthorized" });
|