@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.es.js CHANGED
@@ -1120,6 +1120,25 @@ Received "${apiKey}" instead.`);
1120
1120
  const result = await this.graphqlClient.request(TableQuery, { tableId });
1121
1121
  return result.table;
1122
1122
  }
1123
+ async getSitemap({
1124
+ limit = 50,
1125
+ after,
1126
+ pathnamePrefix
1127
+ } = {}) {
1128
+ const url = new URL("v1/sitemap", this.apiOrigin);
1129
+ url.searchParams.set("limit", limit.toString());
1130
+ if (after != null)
1131
+ url.searchParams.set("after", after);
1132
+ if (pathnamePrefix != null)
1133
+ url.searchParams.set("pathnamePrefix", pathnamePrefix);
1134
+ const response = await this.fetch(url.pathname + url.search);
1135
+ if (!response.ok) {
1136
+ console.error("Failed to get sitemap", await response.json());
1137
+ throw new Error(`Failed to get sitemap with error: "${response.statusText}"`);
1138
+ }
1139
+ const sitemap = await response.json();
1140
+ return sitemap;
1141
+ }
1123
1142
  }
1124
1143
  class Document$1 extends NextDocument {
1125
1144
  static async getInitialProps(ctx) {
@@ -1175,7 +1194,7 @@ async function fonts(_req, res, { getFonts } = {}) {
1175
1194
  const fonts2 = (_a = await (getFonts == null ? void 0 : getFonts())) != null ? _a : [];
1176
1195
  return res.json(fonts2);
1177
1196
  }
1178
- const version = "0.10.6";
1197
+ const version = "0.10.7";
1179
1198
  async function handler(req, res, { apiKey, unstable_siteVersions }) {
1180
1199
  if (req.query.secret !== apiKey) {
1181
1200
  return res.status(401).json({ message: "Unauthorized" });