@makeswift/runtime 0.10.6 → 0.10.7

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 CHANGED
@@ -1153,6 +1153,25 @@ Received "${apiKey}" instead.`);
1153
1153
  const result = await this.graphqlClient.request(TableQuery, { tableId });
1154
1154
  return result.table;
1155
1155
  }
1156
+ async getSitemap({
1157
+ limit = 50,
1158
+ after,
1159
+ pathnamePrefix
1160
+ } = {}) {
1161
+ const url = new URL("v1/sitemap", this.apiOrigin);
1162
+ url.searchParams.set("limit", limit.toString());
1163
+ if (after != null)
1164
+ url.searchParams.set("after", after);
1165
+ if (pathnamePrefix != null)
1166
+ url.searchParams.set("pathnamePrefix", pathnamePrefix);
1167
+ const response = await this.fetch(url.pathname + url.search);
1168
+ if (!response.ok) {
1169
+ console.error("Failed to get sitemap", await response.json());
1170
+ throw new Error(`Failed to get sitemap with error: "${response.statusText}"`);
1171
+ }
1172
+ const sitemap = await response.json();
1173
+ return sitemap;
1174
+ }
1156
1175
  }
1157
1176
  class Document$1 extends NextDocument__default["default"] {
1158
1177
  static async getInitialProps(ctx) {
@@ -1208,7 +1227,7 @@ async function fonts(_req, res, { getFonts } = {}) {
1208
1227
  const fonts2 = (_a = await (getFonts == null ? void 0 : getFonts())) != null ? _a : [];
1209
1228
  return res.json(fonts2);
1210
1229
  }
1211
- const version = "0.10.6";
1230
+ const version = "0.10.7";
1212
1231
  async function handler(req, res, { apiKey, unstable_siteVersions }) {
1213
1232
  if (req.query.secret !== apiKey) {
1214
1233
  return res.status(401).json({ message: "Unauthorized" });