@makeswift/runtime 0.29.2-canary.0 → 0.29.2-canary.2

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.
@@ -27,7 +27,7 @@ class MakeswiftGraphQLApiClient {
27
27
  graphqlClient;
28
28
  constructor({ endpoint }) {
29
29
  this.graphqlClient = new import_client.GraphQLClient(endpoint, {
30
- "makeswift-runtime-version": "0.29.2-canary.0"
30
+ "makeswift-runtime-version": "0.29.2-canary.2"
31
31
  });
32
32
  }
33
33
  async getUnversionedResources({
@@ -223,7 +223,7 @@ class MakeswiftRestAPIClient {
223
223
  const requestHeaders = new Headers({
224
224
  "x-api-key": this.apiKey,
225
225
  "makeswift-site-api-key": this.apiKey,
226
- "makeswift-runtime-version": "0.29.2-canary.0"
226
+ "makeswift-runtime-version": "0.29.2-canary.2"
227
227
  });
228
228
  if (siteVersion?.token) {
229
229
  requestUrl.searchParams.set("version", siteVersion.version);
@@ -28,7 +28,7 @@ async function manifestHandler(req, { apiKey, manifest }) {
28
28
  return import_request_response.ApiResponse.json({ message: "Unauthorized" }, { status: 401 });
29
29
  }
30
30
  return import_request_response.ApiResponse.json({
31
- version: "0.29.2-canary.0",
31
+ version: "0.29.2-canary.2",
32
32
  interactionMode: true,
33
33
  clientSideNavigation: false,
34
34
  elementFromPoint: false,
@@ -22,7 +22,16 @@ __export(fetch_exports, {
22
22
  });
23
23
  module.exports = __toCommonJS(fetch_exports);
24
24
  var import_cache = require("./cache");
25
- const fetch = (url, init) => globalThis.fetch(url, { ...init, next: { tags: [import_cache.MAKESWIFT_CACHE_TAG] } });
25
+ const fetch = (url, init) => {
26
+ const nextInit = init?.next ?? {};
27
+ return globalThis.fetch(url, {
28
+ ...init,
29
+ next: {
30
+ ...nextInit,
31
+ tags: [...nextInit.tags ?? [], import_cache.MAKESWIFT_CACHE_TAG]
32
+ }
33
+ });
34
+ };
26
35
  // Annotate the CommonJS export names for ESM import in node:
27
36
  0 && (module.exports = {
28
37
  fetch
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/next/fetch.ts"],"sourcesContent":["import { type HttpFetch } from '../api/types'\n\nimport { MAKESWIFT_CACHE_TAG } from './cache'\n\nexport const fetch: HttpFetch = (url, init) =>\n globalThis.fetch(url, { ...init, next: { tags: [MAKESWIFT_CACHE_TAG] } })\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAAoC;AAE7B,MAAM,QAAmB,CAAC,KAAK,SACpC,WAAW,MAAM,KAAK,EAAE,GAAG,MAAM,MAAM,EAAE,MAAM,CAAC,gCAAmB,EAAE,EAAE,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../../src/next/fetch.ts"],"sourcesContent":["import { type HttpFetch } from '../api/types'\n\nimport { MAKESWIFT_CACHE_TAG } from './cache'\n\nexport const fetch: HttpFetch = (url, init) => {\n const nextInit = init?.next ?? {}\n\n return globalThis.fetch(url, {\n ...init,\n next: {\n ...nextInit,\n tags: [...(nextInit.tags ?? []), MAKESWIFT_CACHE_TAG],\n },\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAAoC;AAE7B,MAAM,QAAmB,CAAC,KAAK,SAAS;AAC7C,QAAM,WAAW,MAAM,QAAQ,CAAC;AAEhC,SAAO,WAAW,MAAM,KAAK;AAAA,IAC3B,GAAG;AAAA,IACH,MAAM;AAAA,MACJ,GAAG;AAAA,MACH,MAAM,CAAC,GAAI,SAAS,QAAQ,CAAC,GAAI,gCAAmB;AAAA,IACtD;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -4,7 +4,7 @@ class MakeswiftGraphQLApiClient {
4
4
  graphqlClient;
5
5
  constructor({ endpoint }) {
6
6
  this.graphqlClient = new GraphQLClient(endpoint, {
7
- "makeswift-runtime-version": "0.29.2-canary.0"
7
+ "makeswift-runtime-version": "0.29.2-canary.2"
8
8
  });
9
9
  }
10
10
  async getUnversionedResources({
@@ -188,7 +188,7 @@ class MakeswiftRestAPIClient {
188
188
  const requestHeaders = new Headers({
189
189
  "x-api-key": this.apiKey,
190
190
  "makeswift-site-api-key": this.apiKey,
191
- "makeswift-runtime-version": "0.29.2-canary.0"
191
+ "makeswift-runtime-version": "0.29.2-canary.2"
192
192
  });
193
193
  if (siteVersion?.token) {
194
194
  requestUrl.searchParams.set("version", siteVersion.version);
@@ -8,7 +8,7 @@ async function manifestHandler(req, { apiKey, manifest }) {
8
8
  return ApiResponse.json({ message: "Unauthorized" }, { status: 401 });
9
9
  }
10
10
  return ApiResponse.json({
11
- version: "0.29.2-canary.0",
11
+ version: "0.29.2-canary.2",
12
12
  interactionMode: true,
13
13
  clientSideNavigation: false,
14
14
  elementFromPoint: false,
@@ -1,5 +1,14 @@
1
1
  import { MAKESWIFT_CACHE_TAG } from "./cache";
2
- const fetch = (url, init) => globalThis.fetch(url, { ...init, next: { tags: [MAKESWIFT_CACHE_TAG] } });
2
+ const fetch = (url, init) => {
3
+ const nextInit = init?.next ?? {};
4
+ return globalThis.fetch(url, {
5
+ ...init,
6
+ next: {
7
+ ...nextInit,
8
+ tags: [...nextInit.tags ?? [], MAKESWIFT_CACHE_TAG]
9
+ }
10
+ });
11
+ };
3
12
  export {
4
13
  fetch
5
14
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/next/fetch.ts"],"sourcesContent":["import { type HttpFetch } from '../api/types'\n\nimport { MAKESWIFT_CACHE_TAG } from './cache'\n\nexport const fetch: HttpFetch = (url, init) =>\n globalThis.fetch(url, { ...init, next: { tags: [MAKESWIFT_CACHE_TAG] } })\n"],"mappings":"AAEA,SAAS,2BAA2B;AAE7B,MAAM,QAAmB,CAAC,KAAK,SACpC,WAAW,MAAM,KAAK,EAAE,GAAG,MAAM,MAAM,EAAE,MAAM,CAAC,mBAAmB,EAAE,EAAE,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../../src/next/fetch.ts"],"sourcesContent":["import { type HttpFetch } from '../api/types'\n\nimport { MAKESWIFT_CACHE_TAG } from './cache'\n\nexport const fetch: HttpFetch = (url, init) => {\n const nextInit = init?.next ?? {}\n\n return globalThis.fetch(url, {\n ...init,\n next: {\n ...nextInit,\n tags: [...(nextInit.tags ?? []), MAKESWIFT_CACHE_TAG],\n },\n })\n}\n"],"mappings":"AAEA,SAAS,2BAA2B;AAE7B,MAAM,QAAmB,CAAC,KAAK,SAAS;AAC7C,QAAM,WAAW,MAAM,QAAQ,CAAC;AAEhC,SAAO,WAAW,MAAM,KAAK;AAAA,IAC3B,GAAG;AAAA,IACH,MAAM;AAAA,MACJ,GAAG;AAAA,MACH,MAAM,CAAC,GAAI,SAAS,QAAQ,CAAC,GAAI,mBAAmB;AAAA,IACtD;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/next/fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAI7C,eAAO,MAAM,KAAK,EAAE,SACuD,CAAA"}
1
+ {"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/next/fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAI7C,eAAO,MAAM,KAAK,EAAE,SAUnB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=fetch.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch.test.d.ts","sourceRoot":"","sources":["../../../../src/next/tests/fetch.test.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makeswift/runtime",
3
- "version": "0.29.2-canary.0",
3
+ "version": "0.29.2-canary.2",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "url": "makeswift/makeswift",
@@ -242,9 +242,9 @@
242
242
  "use-sync-external-store": "^1.5.0",
243
243
  "uuid": "^9.0.0",
244
244
  "zod": "^3.21.4",
245
- "@makeswift/controls": "0.1.22",
245
+ "@makeswift/controls": "0.1.23-canary.0",
246
246
  "@makeswift/next-plugin": "0.6.1",
247
- "@makeswift/prop-controllers": "0.4.17-canary.0"
247
+ "@makeswift/prop-controllers": "0.4.17-canary.1"
248
248
  },
249
249
  "devDependencies": {
250
250
  "@graphql-codegen/add": "^3.1.0",