@makeswift/runtime 0.10.10 → 0.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/Box.cjs.js +1 -0
- package/dist/Box.cjs.js.map +1 -1
- package/dist/Box.es.js +2 -1
- package/dist/Box.es.js.map +1 -1
- package/dist/Button.cjs.js +1 -0
- package/dist/Button.cjs.js.map +1 -1
- package/dist/Button.es.js +2 -1
- package/dist/Button.es.js.map +1 -1
- package/dist/Carousel.cjs.js +1 -0
- package/dist/Carousel.cjs.js.map +1 -1
- package/dist/Carousel.es.js +2 -1
- package/dist/Carousel.es.js.map +1 -1
- package/dist/Countdown.cjs.js +1 -0
- package/dist/Countdown.cjs.js.map +1 -1
- package/dist/Countdown.es.js +2 -1
- package/dist/Countdown.es.js.map +1 -1
- package/dist/Divider.cjs.js +1 -0
- package/dist/Divider.cjs.js.map +1 -1
- package/dist/Divider.es.js +2 -1
- package/dist/Divider.es.js.map +1 -1
- package/dist/Embed.cjs.js +1 -0
- package/dist/Embed.cjs.js.map +1 -1
- package/dist/Embed.es.js +2 -1
- package/dist/Embed.es.js.map +1 -1
- package/dist/Form.cjs.js +1 -0
- package/dist/Form.cjs.js.map +1 -1
- package/dist/Form.es.js +2 -1
- package/dist/Form.es.js.map +1 -1
- package/dist/Image.cjs.js +19 -3
- package/dist/Image.cjs.js.map +1 -1
- package/dist/Image.es.js +20 -4
- package/dist/Image.es.js.map +1 -1
- package/dist/LiveProvider.cjs.js +1 -0
- package/dist/LiveProvider.cjs.js.map +1 -1
- package/dist/LiveProvider.es.js +2 -1
- package/dist/LiveProvider.es.js.map +1 -1
- package/dist/Navigation.cjs.js +1 -0
- package/dist/Navigation.cjs.js.map +1 -1
- package/dist/Navigation.es.js +2 -1
- package/dist/Navigation.es.js.map +1 -1
- package/dist/PreviewProvider.cjs.js +1 -0
- package/dist/PreviewProvider.cjs.js.map +1 -1
- package/dist/PreviewProvider.es.js +2 -1
- package/dist/PreviewProvider.es.js.map +1 -1
- package/dist/ReadOnlyText.cjs.js +1 -0
- package/dist/ReadOnlyText.cjs.js.map +1 -1
- package/dist/ReadOnlyText.es.js +2 -1
- package/dist/ReadOnlyText.es.js.map +1 -1
- package/dist/ReadOnlyTextV2.cjs.js +1 -0
- package/dist/ReadOnlyTextV2.cjs.js.map +1 -1
- package/dist/ReadOnlyTextV2.es.js +2 -1
- package/dist/ReadOnlyTextV2.es.js.map +1 -1
- package/dist/Root.cjs.js +1 -0
- package/dist/Root.cjs.js.map +1 -1
- package/dist/Root.es.js +2 -1
- package/dist/Root.es.js.map +1 -1
- package/dist/SocialLinks.cjs.js +1 -0
- package/dist/SocialLinks.cjs.js.map +1 -1
- package/dist/SocialLinks.es.js +2 -1
- package/dist/SocialLinks.es.js.map +1 -1
- package/dist/Video.cjs.js +1 -0
- package/dist/Video.cjs.js.map +1 -1
- package/dist/Video.es.js +2 -1
- package/dist/Video.es.js.map +1 -1
- package/dist/builder.cjs.js +1 -0
- package/dist/builder.cjs.js.map +1 -1
- package/dist/builder.es.js +1 -0
- package/dist/builder.es.js.map +1 -1
- package/dist/components.cjs.js +1 -0
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.es.js +1 -0
- package/dist/components.es.js.map +1 -1
- package/dist/control-serialization.cjs.js +1 -0
- package/dist/control-serialization.cjs.js.map +1 -1
- package/dist/control-serialization.es.js +2 -1
- package/dist/control-serialization.es.js.map +1 -1
- package/dist/controls.cjs.js +2 -1
- package/dist/controls.cjs.js.map +1 -1
- package/dist/controls.es.js +2 -1
- package/dist/controls.es.js.map +1 -1
- package/dist/index.cjs.js +30 -31
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs2.js +1 -0
- package/dist/index.cjs2.js.map +1 -1
- package/dist/index.cjs8.js +1 -0
- package/dist/index.cjs8.js.map +1 -1
- package/dist/index.cjs9.js +1 -0
- package/dist/index.cjs9.js.map +1 -1
- package/dist/index.es.js +31 -32
- package/dist/index.es.js.map +1 -1
- package/dist/index.es2.js +2 -1
- package/dist/index.es2.js.map +1 -1
- package/dist/index.es4.js +1 -1
- package/dist/index.es5.js +1 -1
- package/dist/index.es6.js +1 -1
- package/dist/index.es8.js +2 -1
- package/dist/index.es8.js.map +1 -1
- package/dist/index.es9.js +2 -1
- package/dist/index.es9.js.map +1 -1
- package/dist/main.cjs.js +1 -0
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +1 -0
- package/dist/main.es.js.map +1 -1
- package/dist/next.cjs.js +1 -0
- package/dist/next.cjs.js.map +1 -1
- package/dist/next.es.js +1 -0
- package/dist/next.es.js.map +1 -1
- package/dist/prop-controllers.cjs.js +2 -0
- package/dist/prop-controllers.cjs.js.map +1 -1
- package/dist/prop-controllers.es.js +2 -1
- package/dist/prop-controllers.es.js.map +1 -1
- package/dist/react-page.cjs.js +16 -13
- package/dist/react-page.cjs.js.map +1 -1
- package/dist/react-page.es.js +19 -17
- package/dist/react-page.es.js.map +1 -1
- package/dist/react.cjs.js +1 -0
- package/dist/react.cjs.js.map +1 -1
- package/dist/react.es.js +1 -0
- package/dist/react.es.js.map +1 -1
- package/dist/slate.cjs.js +1 -0
- package/dist/slate.cjs.js.map +1 -1
- package/dist/slate.es.js +2 -1
- package/dist/slate.es.js.map +1 -1
- package/dist/toText.cjs.js +1 -0
- package/dist/toText.cjs.js.map +1 -1
- package/dist/toText.es.js +2 -1
- package/dist/toText.es.js.map +1 -1
- package/dist/types/src/components/builtin/Image/Image.d.ts.map +1 -1
- package/dist/types/src/next/api-handler/handlers/manifest.d.ts +3 -2
- package/dist/types/src/next/api-handler/handlers/manifest.d.ts.map +1 -1
- package/dist/types/src/next/api-handler/index.d.ts +2 -2
- package/dist/types/src/next/api-handler/index.d.ts.map +1 -1
- package/dist/types/src/next/client.d.ts +4 -2
- package/dist/types/src/next/client.d.ts.map +1 -1
- package/dist/types/src/next/index.d.ts.map +1 -1
- package/dist/types/src/next/preview-mode.d.ts +3 -3
- package/dist/types/src/prop-controllers/copy/image.d.ts +2 -2
- package/dist/types/src/prop-controllers/copy/image.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/descriptors.d.ts +16 -1
- package/dist/types/src/prop-controllers/descriptors.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/index.d.ts +2 -1
- package/dist/types/src/prop-controllers/index.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/introspection.d.ts.map +1 -1
- package/dist/types/types/locale.d.ts +1 -1
- package/package.json +2 -1
package/dist/index.es.js
CHANGED
|
@@ -38,13 +38,14 @@ import * as React from "react";
|
|
|
38
38
|
import { useEffect, createContext, useContext, useState, useMemo, useRef, Children, createElement, forwardRef, memo, useId, useCallback, useImperativeHandle, Component, Suspense } from "react";
|
|
39
39
|
import { useSyncExternalStoreWithSelector } from "use-sync-external-store/shim/with-selector";
|
|
40
40
|
import dynamic from "next/dynamic";
|
|
41
|
-
import {
|
|
41
|
+
import { b as deepEqual, e as createDocumentReference, g as getPropControllerDescriptors, f as isElementReference, h as getDefaultLocale, j as getLocales, k as getSwatchIds, l as getFileIds, m as getTypographyIds, n as getTableIds, o as getPageIds, p as getElementChildren, E as ElementID, B as Backgrounds, W as Width, q as ResponsiveIconRadioGroup, M as Margin, P as Padding, r as Border, s as BorderRadius, S as Shadows, G as GapY, t as GapX, u as ResponsiveSelect, v as ResponsiveNumber, w as Checkbox, x as Grid, y as TextInput, L as Link, z as ResponsiveColor, A as TextStyle, C as ComponentIcon, I as Images, N as Number$1, D as Date$1, F as Font, H as ResponsiveLength, J as TextArea, K as Table, O as TableFormFields, Q as Image, U as ResponsiveOpacity, V as NavigationLinks, X as SocialLinks, Y as RichText, Z as Video, _ as useStyle, $ as getBorderSwatchIds, a0 as getBoxShadowsSwatchIds, a1 as getResponsiveColorSwatchIds, a2 as StyleControlProperty, a3 as ImageControlValueFormat, a4 as isPropControllersHandle, a5 as isRichTextV1Data, a6 as isNonNullable$1, a7 as TypographyControlType, a8 as StyleControlType, a9 as RichTextV2ControlType, aa as RichTextControlType, ab as SlotControlType, ac as StyleV2ControlType, ad as ListControlType, ae as ShapeControlType, af as LinkControlType, ag as ImageControlType, ah as IconRadioGroupControlType, ai as ColorControlType, aj as SelectControlType, ak as getComponentPropControllerDescriptors, al as getPropControllers, am as Types, an as BorderPropControllerFormat, ao as ShadowsPropControllerFormat, ap as BorderRadiusPropControllerFormat, aq as MarginPropControllerFormat, ar as PaddingPropControllerFormat, as as WidthPropControllerFormat, at as configureStore$1, au as copyElementTree, av as getBreakpoints, aw as parseLocalesInput, ax as getDocument, ay as getElementId, az as getIsInBuilder, aA as getReactComponent, aB as getBuilderEditMode, aC as getIsPreview } from "./react-page.es.js";
|
|
42
42
|
import { A as ActionTypes, o as apiResourceFulfilled, p as registerComponentEffect, q as registerReactComponentEffect, t as registerComponentHandleEffect, v as mountComponentEffect } from "./actions.es.js";
|
|
43
43
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
44
44
|
import { T as TextAreaControlType, a as TextInputControlType, N as NumberControlType, C as CheckboxControlType } from "./text-input.es.js";
|
|
45
45
|
import { C as ComboboxControlType } from "./combobox.es.js";
|
|
46
46
|
import { v4 } from "uuid";
|
|
47
47
|
import "slate";
|
|
48
|
+
import "ts-pattern";
|
|
48
49
|
import { useSyncExternalStore } from "use-sync-external-store/shim";
|
|
49
50
|
import { createStore, applyMiddleware } from "redux";
|
|
50
51
|
import thunk from "redux-thunk";
|
|
@@ -669,12 +670,12 @@ const makeswiftSiteVersionSchema = z.enum(["Live", "Working"]);
|
|
|
669
670
|
const MakeswiftSiteVersion = makeswiftSiteVersionSchema.Enum;
|
|
670
671
|
const makeswiftPreviewDataSchema = z.object({
|
|
671
672
|
makeswift: z.literal(true),
|
|
672
|
-
|
|
673
|
+
siteVersion: makeswiftSiteVersionSchema
|
|
673
674
|
});
|
|
674
675
|
function getMakeswiftSiteVersion(previewData) {
|
|
675
676
|
const result = makeswiftPreviewDataSchema.safeParse(previewData);
|
|
676
677
|
if (result.success)
|
|
677
|
-
return result.data.
|
|
678
|
+
return result.data.siteVersion;
|
|
678
679
|
return null;
|
|
679
680
|
}
|
|
680
681
|
function PreviewModeScript({
|
|
@@ -772,7 +773,7 @@ class Makeswift {
|
|
|
772
773
|
constructor(apiKey, {
|
|
773
774
|
apiOrigin = "https://api.makeswift.com",
|
|
774
775
|
runtime = ReactRuntime,
|
|
775
|
-
|
|
776
|
+
siteVersion
|
|
776
777
|
} = {}) {
|
|
777
778
|
__publicField(this, "apiKey");
|
|
778
779
|
__publicField(this, "apiOrigin");
|
|
@@ -791,7 +792,11 @@ Received "${apiKey}" instead.`);
|
|
|
791
792
|
}
|
|
792
793
|
this.graphqlClient = new GraphQLClient(new URL("graphql", apiOrigin).href);
|
|
793
794
|
this.runtime = runtime;
|
|
794
|
-
this.siteVersion =
|
|
795
|
+
this.siteVersion = siteVersion != null ? siteVersion : null;
|
|
796
|
+
}
|
|
797
|
+
static getSiteVersion(previewData) {
|
|
798
|
+
var _a;
|
|
799
|
+
return (_a = getMakeswiftSiteVersion(previewData)) != null ? _a : MakeswiftSiteVersion.Live;
|
|
795
800
|
}
|
|
796
801
|
async fetch(path, init) {
|
|
797
802
|
var _a;
|
|
@@ -805,8 +810,7 @@ Received "${apiKey}" instead.`);
|
|
|
805
810
|
return response;
|
|
806
811
|
}
|
|
807
812
|
async getPages() {
|
|
808
|
-
const
|
|
809
|
-
const response = await this.fetch(`/${isUsingVersioning ? "v3" : "v2"}/pages`, {
|
|
813
|
+
const response = await this.fetch(`/${this.siteVersion == null ? "v2" : "v3"}/pages`, {
|
|
810
814
|
headers: {
|
|
811
815
|
"Makeswift-Site-Version": MakeswiftSiteVersion.Live
|
|
812
816
|
}
|
|
@@ -820,8 +824,7 @@ Received "${apiKey}" instead.`);
|
|
|
820
824
|
}
|
|
821
825
|
async getTypographies(typographyIds, preview) {
|
|
822
826
|
var _a;
|
|
823
|
-
const
|
|
824
|
-
const url = new URL(`${isUsingVersioning ? "v2" : "v1"}/typographies/bulk`, this.apiOrigin);
|
|
827
|
+
const url = new URL(`${this.siteVersion == null ? "v1" : "v2"}/typographies/bulk`, this.apiOrigin);
|
|
825
828
|
typographyIds.forEach((id) => {
|
|
826
829
|
url.searchParams.append("ids", id);
|
|
827
830
|
});
|
|
@@ -839,8 +842,7 @@ Received "${apiKey}" instead.`);
|
|
|
839
842
|
}
|
|
840
843
|
async getSwatches(ids, preview) {
|
|
841
844
|
var _a;
|
|
842
|
-
const
|
|
843
|
-
const url = new URL(`${isUsingVersioning ? "v2" : "v1"}/swatches/bulk`, this.apiOrigin);
|
|
845
|
+
const url = new URL(`${this.siteVersion == null ? "v1" : "v2"}/swatches/bulk`, this.apiOrigin);
|
|
844
846
|
ids.forEach((id) => {
|
|
845
847
|
url.searchParams.append("ids", id);
|
|
846
848
|
});
|
|
@@ -993,7 +995,6 @@ Received "${apiKey}" instead.`);
|
|
|
993
995
|
unstable_locale
|
|
994
996
|
} = {}) {
|
|
995
997
|
var _a, _b, _c;
|
|
996
|
-
const isUsingVersioning = this.siteVersion != null;
|
|
997
998
|
const siteVersion = (_a = this.siteVersion) != null ? _a : previewOverride ? MakeswiftSiteVersion.Working : MakeswiftSiteVersion.Live;
|
|
998
999
|
const defaultLocale = (_b = getDefaultLocale(this.runtime.store.getState())) == null ? void 0 : _b.toString();
|
|
999
1000
|
const locale = unstable_locale === defaultLocale ? null : unstable_locale;
|
|
@@ -1005,7 +1006,7 @@ Received "${apiKey}" instead.`);
|
|
|
1005
1006
|
}
|
|
1006
1007
|
searchParams.set("locale", locale);
|
|
1007
1008
|
}
|
|
1008
|
-
const response = await this.fetch(`/${
|
|
1009
|
+
const response = await this.fetch(`/${this.siteVersion == null ? "v2" : "v3"}/pages/${encodeURIComponent(pathname)}/document?${searchParams.toString()}`, {
|
|
1009
1010
|
headers: { "Makeswift-Site-Version": siteVersion }
|
|
1010
1011
|
});
|
|
1011
1012
|
if (!response.ok) {
|
|
@@ -1029,8 +1030,7 @@ Received "${apiKey}" instead.`);
|
|
|
1029
1030
|
};
|
|
1030
1031
|
}
|
|
1031
1032
|
async getSwatch(swatchId) {
|
|
1032
|
-
const
|
|
1033
|
-
const response = await this.fetch(`${isUsingVersioning ? "v2" : "v1"}/swatches/${swatchId}`);
|
|
1033
|
+
const response = await this.fetch(`${this.siteVersion == null ? "v1" : "v2"}/swatches/${swatchId}`);
|
|
1034
1034
|
if (!response.ok) {
|
|
1035
1035
|
if (response.status !== 404)
|
|
1036
1036
|
console.error("Failed to get swatch", await response.json());
|
|
@@ -1044,8 +1044,7 @@ Received "${apiKey}" instead.`);
|
|
|
1044
1044
|
return result.file;
|
|
1045
1045
|
}
|
|
1046
1046
|
async getTypography(typographyId) {
|
|
1047
|
-
const
|
|
1048
|
-
const response = await this.fetch(`${isUsingVersioning ? "v2" : "v1"}/typographies/${typographyId}`);
|
|
1047
|
+
const response = await this.fetch(`${this.siteVersion == null ? "v1" : "v2"}/typographies/${typographyId}`);
|
|
1049
1048
|
if (!response.ok) {
|
|
1050
1049
|
if (response.status !== 404)
|
|
1051
1050
|
console.error("Failed to get typography", await response.json());
|
|
@@ -1055,8 +1054,7 @@ Received "${apiKey}" instead.`);
|
|
|
1055
1054
|
return typography;
|
|
1056
1055
|
}
|
|
1057
1056
|
async getGlobalElement(globalElementId) {
|
|
1058
|
-
const
|
|
1059
|
-
const response = await this.fetch(`${isUsingVersioning ? "v2" : "v1"}/global-elements/${globalElementId}`);
|
|
1057
|
+
const response = await this.fetch(`${this.siteVersion == null ? "v1" : "v2"}/global-elements/${globalElementId}`);
|
|
1060
1058
|
if (!response.ok) {
|
|
1061
1059
|
if (response.status !== 404)
|
|
1062
1060
|
console.error("Failed to get global element", await response.json());
|
|
@@ -1066,8 +1064,7 @@ Received "${apiKey}" instead.`);
|
|
|
1066
1064
|
return globalElement;
|
|
1067
1065
|
}
|
|
1068
1066
|
async getLocalizedGlobalElement(globalElementId, locale) {
|
|
1069
|
-
const
|
|
1070
|
-
const response = await this.fetch(`${isUsingVersioning ? "v2" : "v1"}/localized-global-elements/${globalElementId}?locale=${locale}`);
|
|
1067
|
+
const response = await this.fetch(`${this.siteVersion == null ? "v1" : "v2"}/localized-global-elements/${globalElementId}?locale=${locale}`);
|
|
1071
1068
|
if (!response.ok) {
|
|
1072
1069
|
if (response.status !== 404)
|
|
1073
1070
|
console.error("Failed to get localized global element", await response.json());
|
|
@@ -1159,8 +1156,8 @@ async function fonts(_req, res, { getFonts } = {}) {
|
|
|
1159
1156
|
const fonts2 = (_a = await (getFonts == null ? void 0 : getFonts())) != null ? _a : [];
|
|
1160
1157
|
return res.json(fonts2);
|
|
1161
1158
|
}
|
|
1162
|
-
const version = "0.10.
|
|
1163
|
-
async function handler(req, res, { apiKey,
|
|
1159
|
+
const version = "0.10.12";
|
|
1160
|
+
async function handler(req, res, { apiKey, siteVersions }) {
|
|
1164
1161
|
if (req.query.secret !== apiKey) {
|
|
1165
1162
|
return res.status(401).json({ message: "Unauthorized" });
|
|
1166
1163
|
}
|
|
@@ -1171,7 +1168,8 @@ async function handler(req, res, { apiKey, unstable_siteVersions }) {
|
|
|
1171
1168
|
clientSideNavigation: true,
|
|
1172
1169
|
elementFromPoint: false,
|
|
1173
1170
|
customBreakpoints: true,
|
|
1174
|
-
|
|
1171
|
+
siteVersions,
|
|
1172
|
+
unstable_siteVersions: siteVersions,
|
|
1175
1173
|
localizedPageSSR: true
|
|
1176
1174
|
});
|
|
1177
1175
|
}
|
|
@@ -1216,7 +1214,7 @@ async function proxyPreviewMode(req, res, { apiKey }) {
|
|
|
1216
1214
|
const secure = process.env["NODE_ENV"] === "production";
|
|
1217
1215
|
const previewData = {
|
|
1218
1216
|
makeswift: true,
|
|
1219
|
-
|
|
1217
|
+
siteVersion: MakeswiftSiteVersion.Working
|
|
1220
1218
|
};
|
|
1221
1219
|
const setCookie = res.setPreviewData(previewData).getHeader("Set-Cookie");
|
|
1222
1220
|
res.removeHeader("Set-Cookie");
|
|
@@ -1261,7 +1259,7 @@ function MakeswiftApiHandler(apiKey, {
|
|
|
1261
1259
|
appOrigin = "https://app.makeswift.com",
|
|
1262
1260
|
apiOrigin = "https://api.makeswift.com",
|
|
1263
1261
|
getFonts,
|
|
1264
|
-
|
|
1262
|
+
siteVersions = false
|
|
1265
1263
|
} = {}) {
|
|
1266
1264
|
const cors = Cors({ origin: appOrigin });
|
|
1267
1265
|
if (typeof apiKey !== "string") {
|
|
@@ -1283,12 +1281,15 @@ Received "${apiKey}" instead.`);
|
|
|
1283
1281
|
Received "${makeswift}" for the \`makeswift\` param instead.
|
|
1284
1282
|
Read more about dynamic catch-all routes here: https://nextjs.org/docs/routing/dynamic-routes#catch-all-routes`);
|
|
1285
1283
|
}
|
|
1286
|
-
const client = new Makeswift(apiKey, {
|
|
1284
|
+
const client = new Makeswift(apiKey, {
|
|
1285
|
+
apiOrigin,
|
|
1286
|
+
siteVersion: siteVersions ? Makeswift.getSiteVersion(req.previewData) : void 0
|
|
1287
|
+
});
|
|
1287
1288
|
const action = "/" + makeswift.join("/");
|
|
1288
1289
|
const matches = (pattern) => match(pattern, { decode: decodeURIComponent })(action);
|
|
1289
1290
|
let m;
|
|
1290
1291
|
if (matches("/manifest"))
|
|
1291
|
-
return handler(req, res, { apiKey,
|
|
1292
|
+
return handler(req, res, { apiKey, siteVersions });
|
|
1292
1293
|
if (matches("/revalidate"))
|
|
1293
1294
|
return revalidate(req, res, { apiKey });
|
|
1294
1295
|
if (matches("/proxy-preview-mode"))
|
|
@@ -1397,8 +1398,7 @@ async function getStaticProps(ctx) {
|
|
|
1397
1398
|
var _a, _b, _c;
|
|
1398
1399
|
deprecationWarning("getStaticProps");
|
|
1399
1400
|
const makeswift = new Makeswift(getApiKey(), {
|
|
1400
|
-
apiOrigin: getApiOrigin()
|
|
1401
|
-
unstable_previewData: ctx.previewData
|
|
1401
|
+
apiOrigin: getApiOrigin()
|
|
1402
1402
|
});
|
|
1403
1403
|
const path = "/" + ((_b = (_a = ctx.params) == null ? void 0 : _a.path) != null ? _b : []).join("/");
|
|
1404
1404
|
const snapshot = await makeswift.getPageSnapshot(path, {
|
|
@@ -1420,8 +1420,7 @@ async function getServerSideProps(ctx) {
|
|
|
1420
1420
|
var _a, _b;
|
|
1421
1421
|
deprecationWarning("getServerSideProps");
|
|
1422
1422
|
const makeswift = new Makeswift(getApiKey(), {
|
|
1423
|
-
apiOrigin: getApiOrigin()
|
|
1424
|
-
unstable_previewData: ctx.previewData
|
|
1423
|
+
apiOrigin: getApiOrigin()
|
|
1425
1424
|
});
|
|
1426
1425
|
const path = "/" + ((_b = (_a = ctx.params) == null ? void 0 : _a.path) != null ? _b : []).join("/");
|
|
1427
1426
|
const snapshot = await makeswift.getPageSnapshot(path, {
|