@uniformdev/canvas-next-rsc 19.147.1-alpha.3 → 19.149.1-alpha.1

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/handler.js CHANGED
@@ -228,7 +228,6 @@ var getCanvasClient = (options) => {
228
228
  apiHost: env.getApiHost(),
229
229
  apiKey: env.getApiKey(),
230
230
  edgeApiHost: env.getEdgeApiHost(),
231
- disableSWR: typeof options.cache.disableSWR !== "undefined" ? options.cache.disableSWR : true,
232
231
  fetch: (req, init) => {
233
232
  let requestedUrl;
234
233
  if (typeof req === "string") {
@@ -260,7 +259,7 @@ var getCanvasClient = (options) => {
260
259
  cache,
261
260
  headers: {
262
261
  ...init == null ? void 0 : init.headers,
263
- "x-bypass-cache": typeof options.cache.bypassCache !== "undefined" ? options.cache.bypassCache.toString() : "false"
262
+ "x-bypass-cache": "true"
264
263
  },
265
264
  next: {
266
265
  revalidate
@@ -283,7 +282,7 @@ var getProjectMapClient = (options) => {
283
282
  ...init,
284
283
  headers: {
285
284
  ...init == null ? void 0 : init.headers,
286
- "x-bypass-cache": typeof options.cache.bypassCache !== "undefined" ? options.cache.bypassCache.toString() : "false"
285
+ "x-bypass-cache": "true"
287
286
  },
288
287
  cache,
289
288
  next: {
@@ -302,7 +301,6 @@ var getRouteClient = (options) => {
302
301
  projectId: env.getProjectId(),
303
302
  apiKey: env.getApiKey(),
304
303
  edgeApiHost: env.getEdgeApiHost(),
305
- disableSWR: typeof options.cache.disableSWR !== "undefined" ? options.cache.disableSWR : true,
306
304
  fetch: (req, init) => {
307
305
  let requestedUrl;
308
306
  if (typeof req === "string") {
@@ -330,7 +328,7 @@ var getRouteClient = (options) => {
330
328
  ...init,
331
329
  headers: {
332
330
  ...init == null ? void 0 : init.headers,
333
- "x-bypass-cache": typeof options.cache.bypassCache !== "undefined" ? options.cache.bypassCache.toString() : "false"
331
+ "x-bypass-cache": "true"
334
332
  },
335
333
  cache,
336
334
  next: {
@@ -384,7 +382,6 @@ var processCompositionChange = async (compositionId) => {
384
382
  getComposition({ compositionId })
385
383
  ]);
386
384
  const tags = [];
387
- const paths = [];
388
385
  if (composition == null ? void 0 : composition.pattern) {
389
386
  tags.push("route");
390
387
  }
@@ -394,17 +391,12 @@ var processCompositionChange = async (compositionId) => {
394
391
  await processEdgeConfigChange({
395
392
  source_url: node.path
396
393
  });
397
- const result = buildProjectMapNodePaths(node.path);
398
- tags.push(...result.tags);
399
- if (result.paths) {
400
- paths.push(...result.paths);
401
- }
394
+ tags.push(...buildProjectMapNodePaths(node.path));
402
395
  }
403
396
  }
404
397
  tags.push(buildCompositionTag(compositionId));
405
398
  return {
406
- tags,
407
- paths
399
+ tags
408
400
  };
409
401
  };
410
402
  var getComposition = async ({ compositionId }) => {
@@ -427,11 +419,9 @@ var getComposition = async ({ compositionId }) => {
427
419
  };
428
420
  var buildProjectMapNodePaths = (path) => {
429
421
  const tags = [];
430
- const paths = [];
431
422
  const isDynamic = path.includes(":");
432
423
  if (!isDynamic) {
433
424
  tags.push(buildPathTag(path));
434
- paths.push(path);
435
425
  } else {
436
426
  const pieces = path.split("/");
437
427
  const invalidatePieces = [];
@@ -444,12 +434,8 @@ var buildProjectMapNodePaths = (path) => {
444
434
  }
445
435
  const toInvalidate = invalidatePieces.join("/");
446
436
  tags.push(buildPathTag(toInvalidate));
447
- paths.push(toInvalidate);
448
437
  }
449
- return {
450
- tags,
451
- paths
452
- };
438
+ return tags;
453
439
  };
454
440
  var getPathName = (url) => {
455
441
  try {
@@ -464,8 +450,7 @@ var processRedirectChange = async (sourceUrl) => {
464
450
  const pathName = getPathName(sourceUrl);
465
451
  tags.push(buildPathTag(pathName));
466
452
  return {
467
- tags,
468
- paths: [pathName]
453
+ tags
469
454
  };
470
455
  };
471
456
  var processEdgeConfigChange = async ({ source_url }) => {
@@ -572,12 +557,7 @@ var handleProjectMapNodeDelete = async (body) => {
572
557
  return void 0;
573
558
  }
574
559
  const tags = [];
575
- const paths = [];
576
- const result = buildProjectMapNodePaths(parsed.data.path);
577
- tags.push(...result.tags);
578
- if (result.paths) {
579
- paths.push(...result.paths);
580
- }
560
+ tags.push(...buildProjectMapNodePaths(parsed.data.path));
581
561
  const config = getServerConfig();
582
562
  if ((_a = config.experimental) == null ? void 0 : _a.edgeCompositions) {
583
563
  await processEdgeConfigChange({
@@ -585,8 +565,7 @@ var handleProjectMapNodeDelete = async (body) => {
585
565
  });
586
566
  }
587
567
  return {
588
- tags,
589
- paths
568
+ tags
590
569
  };
591
570
  };
592
571
 
@@ -599,12 +578,7 @@ var handleProjectMapNodeInsert = async (body) => {
599
578
  return void 0;
600
579
  }
601
580
  const tags = [];
602
- const paths = [];
603
- const result = buildProjectMapNodePaths(parsed.data.path);
604
- tags.push(...result.tags);
605
- if (result.paths) {
606
- paths.push(...result.paths);
607
- }
581
+ tags.push(...buildProjectMapNodePaths(parsed.data.path));
608
582
  const config = getServerConfig();
609
583
  if ((_a = config.experimental) == null ? void 0 : _a.edgeCompositions) {
610
584
  await processEdgeConfigChange({
@@ -612,8 +586,7 @@ var handleProjectMapNodeInsert = async (body) => {
612
586
  });
613
587
  }
614
588
  return {
615
- tags,
616
- paths
589
+ tags
617
590
  };
618
591
  };
619
592
 
@@ -626,17 +599,8 @@ var handleProjectMapNodeUpdate = async (body) => {
626
599
  return void 0;
627
600
  }
628
601
  const tags = [];
629
- const paths = [];
630
- const currentResult = buildProjectMapNodePaths(parsed.data.path);
631
- tags.push(...currentResult.tags);
632
- if (currentResult.paths) {
633
- paths.push(...currentResult.paths);
634
- }
635
- const previousResult = buildProjectMapNodePaths(parsed.data.previous_path);
636
- tags.push(...previousResult.tags);
637
- if (previousResult.paths) {
638
- paths.push(...previousResult.paths);
639
- }
602
+ tags.push(...buildProjectMapNodePaths(parsed.data.path));
603
+ tags.push(...buildProjectMapNodePaths(parsed.data.previous_path));
640
604
  const config = getServerConfig();
641
605
  if ((_a = config.experimental) == null ? void 0 : _a.edgeCompositions) {
642
606
  await processEdgeConfigChange({
@@ -644,8 +608,7 @@ var handleProjectMapNodeUpdate = async (body) => {
644
608
  });
645
609
  }
646
610
  return {
647
- tags,
648
- paths
611
+ tags
649
612
  };
650
613
  };
651
614
 
@@ -740,7 +703,6 @@ var handleSvixMessage = async (request) => {
740
703
  handleManifestPublished
741
704
  ];
742
705
  let tags = void 0;
743
- let paths = void 0;
744
706
  let jsonBody;
745
707
  try {
746
708
  jsonBody = await request.json();
@@ -753,7 +715,6 @@ var handleSvixMessage = async (request) => {
753
715
  const result = await handler(jsonBody);
754
716
  if (result) {
755
717
  tags = result.tags;
756
- paths = result.paths;
757
718
  break;
758
719
  }
759
720
  }
@@ -763,17 +724,10 @@ var handleSvixMessage = async (request) => {
763
724
  (0, import_cache.revalidateTag)(tag);
764
725
  }
765
726
  }
766
- if (paths == null ? void 0 : paths.length) {
767
- for (let i = 0; i < paths.length; i++) {
768
- const path = paths[i];
769
- (0, import_cache.revalidatePath)(path);
770
- }
771
- }
772
727
  return new Response(
773
728
  JSON.stringify({
774
- handled: typeof tags !== "undefined" || typeof paths !== "undefined",
775
- tags,
776
- paths
729
+ handled: typeof tags !== "undefined",
730
+ tags
777
731
  })
778
732
  );
779
733
  };
package/dist/handler.mjs CHANGED
@@ -142,7 +142,7 @@ var createPreviewOPTIONSRouteHandler = () => {
142
142
 
143
143
  // src/handler/createPreviewPOSTRouteHandler.ts
144
144
  import { SECRET_QUERY_STRING_PARAM as SECRET_QUERY_STRING_PARAM2 } from "@uniformdev/canvas";
145
- import { revalidatePath, revalidateTag } from "next/cache";
145
+ import { revalidateTag } from "next/cache";
146
146
 
147
147
  // src/handler/helpers.ts
148
148
  import { ApiClientError } from "@uniformdev/canvas";
@@ -213,7 +213,6 @@ var getCanvasClient = (options) => {
213
213
  apiHost: env.getApiHost(),
214
214
  apiKey: env.getApiKey(),
215
215
  edgeApiHost: env.getEdgeApiHost(),
216
- disableSWR: typeof options.cache.disableSWR !== "undefined" ? options.cache.disableSWR : true,
217
216
  fetch: (req, init) => {
218
217
  let requestedUrl;
219
218
  if (typeof req === "string") {
@@ -245,7 +244,7 @@ var getCanvasClient = (options) => {
245
244
  cache,
246
245
  headers: {
247
246
  ...init == null ? void 0 : init.headers,
248
- "x-bypass-cache": typeof options.cache.bypassCache !== "undefined" ? options.cache.bypassCache.toString() : "false"
247
+ "x-bypass-cache": "true"
249
248
  },
250
249
  next: {
251
250
  revalidate
@@ -268,7 +267,7 @@ var getProjectMapClient = (options) => {
268
267
  ...init,
269
268
  headers: {
270
269
  ...init == null ? void 0 : init.headers,
271
- "x-bypass-cache": typeof options.cache.bypassCache !== "undefined" ? options.cache.bypassCache.toString() : "false"
270
+ "x-bypass-cache": "true"
272
271
  },
273
272
  cache,
274
273
  next: {
@@ -287,7 +286,6 @@ var getRouteClient = (options) => {
287
286
  projectId: env.getProjectId(),
288
287
  apiKey: env.getApiKey(),
289
288
  edgeApiHost: env.getEdgeApiHost(),
290
- disableSWR: typeof options.cache.disableSWR !== "undefined" ? options.cache.disableSWR : true,
291
289
  fetch: (req, init) => {
292
290
  let requestedUrl;
293
291
  if (typeof req === "string") {
@@ -315,7 +313,7 @@ var getRouteClient = (options) => {
315
313
  ...init,
316
314
  headers: {
317
315
  ...init == null ? void 0 : init.headers,
318
- "x-bypass-cache": typeof options.cache.bypassCache !== "undefined" ? options.cache.bypassCache.toString() : "false"
316
+ "x-bypass-cache": "true"
319
317
  },
320
318
  cache,
321
319
  next: {
@@ -369,7 +367,6 @@ var processCompositionChange = async (compositionId) => {
369
367
  getComposition({ compositionId })
370
368
  ]);
371
369
  const tags = [];
372
- const paths = [];
373
370
  if (composition == null ? void 0 : composition.pattern) {
374
371
  tags.push("route");
375
372
  }
@@ -379,17 +376,12 @@ var processCompositionChange = async (compositionId) => {
379
376
  await processEdgeConfigChange({
380
377
  source_url: node.path
381
378
  });
382
- const result = buildProjectMapNodePaths(node.path);
383
- tags.push(...result.tags);
384
- if (result.paths) {
385
- paths.push(...result.paths);
386
- }
379
+ tags.push(...buildProjectMapNodePaths(node.path));
387
380
  }
388
381
  }
389
382
  tags.push(buildCompositionTag(compositionId));
390
383
  return {
391
- tags,
392
- paths
384
+ tags
393
385
  };
394
386
  };
395
387
  var getComposition = async ({ compositionId }) => {
@@ -412,11 +404,9 @@ var getComposition = async ({ compositionId }) => {
412
404
  };
413
405
  var buildProjectMapNodePaths = (path) => {
414
406
  const tags = [];
415
- const paths = [];
416
407
  const isDynamic = path.includes(":");
417
408
  if (!isDynamic) {
418
409
  tags.push(buildPathTag(path));
419
- paths.push(path);
420
410
  } else {
421
411
  const pieces = path.split("/");
422
412
  const invalidatePieces = [];
@@ -429,12 +419,8 @@ var buildProjectMapNodePaths = (path) => {
429
419
  }
430
420
  const toInvalidate = invalidatePieces.join("/");
431
421
  tags.push(buildPathTag(toInvalidate));
432
- paths.push(toInvalidate);
433
422
  }
434
- return {
435
- tags,
436
- paths
437
- };
423
+ return tags;
438
424
  };
439
425
  var getPathName = (url) => {
440
426
  try {
@@ -449,8 +435,7 @@ var processRedirectChange = async (sourceUrl) => {
449
435
  const pathName = getPathName(sourceUrl);
450
436
  tags.push(buildPathTag(pathName));
451
437
  return {
452
- tags,
453
- paths: [pathName]
438
+ tags
454
439
  };
455
440
  };
456
441
  var processEdgeConfigChange = async ({ source_url }) => {
@@ -557,12 +542,7 @@ var handleProjectMapNodeDelete = async (body) => {
557
542
  return void 0;
558
543
  }
559
544
  const tags = [];
560
- const paths = [];
561
- const result = buildProjectMapNodePaths(parsed.data.path);
562
- tags.push(...result.tags);
563
- if (result.paths) {
564
- paths.push(...result.paths);
565
- }
545
+ tags.push(...buildProjectMapNodePaths(parsed.data.path));
566
546
  const config = getServerConfig();
567
547
  if ((_a = config.experimental) == null ? void 0 : _a.edgeCompositions) {
568
548
  await processEdgeConfigChange({
@@ -570,8 +550,7 @@ var handleProjectMapNodeDelete = async (body) => {
570
550
  });
571
551
  }
572
552
  return {
573
- tags,
574
- paths
553
+ tags
575
554
  };
576
555
  };
577
556
 
@@ -584,12 +563,7 @@ var handleProjectMapNodeInsert = async (body) => {
584
563
  return void 0;
585
564
  }
586
565
  const tags = [];
587
- const paths = [];
588
- const result = buildProjectMapNodePaths(parsed.data.path);
589
- tags.push(...result.tags);
590
- if (result.paths) {
591
- paths.push(...result.paths);
592
- }
566
+ tags.push(...buildProjectMapNodePaths(parsed.data.path));
593
567
  const config = getServerConfig();
594
568
  if ((_a = config.experimental) == null ? void 0 : _a.edgeCompositions) {
595
569
  await processEdgeConfigChange({
@@ -597,8 +571,7 @@ var handleProjectMapNodeInsert = async (body) => {
597
571
  });
598
572
  }
599
573
  return {
600
- tags,
601
- paths
574
+ tags
602
575
  };
603
576
  };
604
577
 
@@ -611,17 +584,8 @@ var handleProjectMapNodeUpdate = async (body) => {
611
584
  return void 0;
612
585
  }
613
586
  const tags = [];
614
- const paths = [];
615
- const currentResult = buildProjectMapNodePaths(parsed.data.path);
616
- tags.push(...currentResult.tags);
617
- if (currentResult.paths) {
618
- paths.push(...currentResult.paths);
619
- }
620
- const previousResult = buildProjectMapNodePaths(parsed.data.previous_path);
621
- tags.push(...previousResult.tags);
622
- if (previousResult.paths) {
623
- paths.push(...previousResult.paths);
624
- }
587
+ tags.push(...buildProjectMapNodePaths(parsed.data.path));
588
+ tags.push(...buildProjectMapNodePaths(parsed.data.previous_path));
625
589
  const config = getServerConfig();
626
590
  if ((_a = config.experimental) == null ? void 0 : _a.edgeCompositions) {
627
591
  await processEdgeConfigChange({
@@ -629,8 +593,7 @@ var handleProjectMapNodeUpdate = async (body) => {
629
593
  });
630
594
  }
631
595
  return {
632
- tags,
633
- paths
596
+ tags
634
597
  };
635
598
  };
636
599
 
@@ -725,7 +688,6 @@ var handleSvixMessage = async (request) => {
725
688
  handleManifestPublished
726
689
  ];
727
690
  let tags = void 0;
728
- let paths = void 0;
729
691
  let jsonBody;
730
692
  try {
731
693
  jsonBody = await request.json();
@@ -738,7 +700,6 @@ var handleSvixMessage = async (request) => {
738
700
  const result = await handler(jsonBody);
739
701
  if (result) {
740
702
  tags = result.tags;
741
- paths = result.paths;
742
703
  break;
743
704
  }
744
705
  }
@@ -748,17 +709,10 @@ var handleSvixMessage = async (request) => {
748
709
  revalidateTag(tag);
749
710
  }
750
711
  }
751
- if (paths == null ? void 0 : paths.length) {
752
- for (let i = 0; i < paths.length; i++) {
753
- const path = paths[i];
754
- revalidatePath(path);
755
- }
756
- }
757
712
  return new Response(
758
713
  JSON.stringify({
759
- handled: typeof tags !== "undefined" || typeof paths !== "undefined",
760
- tags,
761
- paths
714
+ handled: typeof tags !== "undefined",
715
+ tags
762
716
  })
763
717
  );
764
718
  };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CanvasClient, RouteClient, ResolvedRouteGetResponse, RouteGetParameters } from '@uniformdev/canvas';
2
- import { UniformServerConfig, PageParameters, AppDirectoryContextState, AppDirectoryServerContext, PlaygroundParameters } from '@uniformdev/canvas-next-rsc-shared';
2
+ import { CacheMode, PageParameters, AppDirectoryContextState, AppDirectoryServerContext, PlaygroundParameters } from '@uniformdev/canvas-next-rsc-shared';
3
3
  export { PageParameters, PlaygroundParameters } from '@uniformdev/canvas-next-rsc-shared';
4
4
  import { ManifestClient } from '@uniformdev/context/api';
5
5
  import { ProjectMapClient, ProjectMapNode } from '@uniformdev/project-map';
@@ -10,7 +10,7 @@ export { a as UniformComposition, r as resolveComposition } from './UniformCompo
10
10
  import { ClientContextComponent } from '@uniformdev/canvas-next-rsc-client';
11
11
 
12
12
  type GetCanvasClientOptions = {
13
- cache: NonNullable<UniformServerConfig['canvasCache']>;
13
+ cache: CacheMode;
14
14
  };
15
15
  declare const getCanvasClient: (options: GetCanvasClientOptions) => CanvasClient;
16
16
  declare const getDefaultCanvasClient: ({ searchParams, }: {
@@ -18,7 +18,7 @@ declare const getDefaultCanvasClient: ({ searchParams, }: {
18
18
  }) => CanvasClient;
19
19
 
20
20
  type GetManifestClientOptions = {
21
- cache: NonNullable<UniformServerConfig['manifestCache']>;
21
+ cache: CacheMode;
22
22
  };
23
23
  declare const getManifestClient: (options: GetManifestClientOptions) => ManifestClient;
24
24
  declare const getDefaultManifestClient: ({ searchParams, }: {
@@ -183,7 +183,7 @@ declare const getManifest: ({ searchParams }: {
183
183
  }>;
184
184
 
185
185
  type GetProjectMapClientOptions = {
186
- cache: NonNullable<UniformServerConfig['projectMapCache']>;
186
+ cache: CacheMode;
187
187
  };
188
188
  declare const getProjectMapClient: (options: GetProjectMapClientOptions) => ProjectMapClient;
189
189
  declare const getDefaultProjectMapClient: ({ searchParams, }: {
@@ -191,7 +191,7 @@ declare const getDefaultProjectMapClient: ({ searchParams, }: {
191
191
  }) => ProjectMapClient;
192
192
 
193
193
  type GetRouteClientOptions = {
194
- cache: NonNullable<UniformServerConfig['canvasCache']>;
194
+ cache: CacheMode;
195
195
  };
196
196
  declare const getRouteClient: (options: GetRouteClientOptions) => RouteClient;
197
197
  declare const getDefaultRouteClient: ({ searchParams }: {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CanvasClient, RouteClient, ResolvedRouteGetResponse, RouteGetParameters } from '@uniformdev/canvas';
2
- import { UniformServerConfig, PageParameters, AppDirectoryContextState, AppDirectoryServerContext, PlaygroundParameters } from '@uniformdev/canvas-next-rsc-shared';
2
+ import { CacheMode, PageParameters, AppDirectoryContextState, AppDirectoryServerContext, PlaygroundParameters } from '@uniformdev/canvas-next-rsc-shared';
3
3
  export { PageParameters, PlaygroundParameters } from '@uniformdev/canvas-next-rsc-shared';
4
4
  import { ManifestClient } from '@uniformdev/context/api';
5
5
  import { ProjectMapClient, ProjectMapNode } from '@uniformdev/project-map';
@@ -10,7 +10,7 @@ export { a as UniformComposition, r as resolveComposition } from './UniformCompo
10
10
  import { ClientContextComponent } from '@uniformdev/canvas-next-rsc-client';
11
11
 
12
12
  type GetCanvasClientOptions = {
13
- cache: NonNullable<UniformServerConfig['canvasCache']>;
13
+ cache: CacheMode;
14
14
  };
15
15
  declare const getCanvasClient: (options: GetCanvasClientOptions) => CanvasClient;
16
16
  declare const getDefaultCanvasClient: ({ searchParams, }: {
@@ -18,7 +18,7 @@ declare const getDefaultCanvasClient: ({ searchParams, }: {
18
18
  }) => CanvasClient;
19
19
 
20
20
  type GetManifestClientOptions = {
21
- cache: NonNullable<UniformServerConfig['manifestCache']>;
21
+ cache: CacheMode;
22
22
  };
23
23
  declare const getManifestClient: (options: GetManifestClientOptions) => ManifestClient;
24
24
  declare const getDefaultManifestClient: ({ searchParams, }: {
@@ -183,7 +183,7 @@ declare const getManifest: ({ searchParams }: {
183
183
  }>;
184
184
 
185
185
  type GetProjectMapClientOptions = {
186
- cache: NonNullable<UniformServerConfig['projectMapCache']>;
186
+ cache: CacheMode;
187
187
  };
188
188
  declare const getProjectMapClient: (options: GetProjectMapClientOptions) => ProjectMapClient;
189
189
  declare const getDefaultProjectMapClient: ({ searchParams, }: {
@@ -191,7 +191,7 @@ declare const getDefaultProjectMapClient: ({ searchParams, }: {
191
191
  }) => ProjectMapClient;
192
192
 
193
193
  type GetRouteClientOptions = {
194
- cache: NonNullable<UniformServerConfig['canvasCache']>;
194
+ cache: CacheMode;
195
195
  };
196
196
  declare const getRouteClient: (options: GetRouteClientOptions) => RouteClient;
197
197
  declare const getDefaultRouteClient: ({ searchParams }: {
package/dist/index.esm.js CHANGED
@@ -174,7 +174,6 @@ var getCanvasClient = (options) => {
174
174
  apiHost: env.getApiHost(),
175
175
  apiKey: env.getApiKey(),
176
176
  edgeApiHost: env.getEdgeApiHost(),
177
- disableSWR: typeof options.cache.disableSWR !== "undefined" ? options.cache.disableSWR : true,
178
177
  fetch: (req, init) => {
179
178
  let requestedUrl;
180
179
  if (typeof req === "string") {
@@ -206,7 +205,7 @@ var getCanvasClient = (options) => {
206
205
  cache,
207
206
  headers: {
208
207
  ...init == null ? void 0 : init.headers,
209
- "x-bypass-cache": typeof options.cache.bypassCache !== "undefined" ? options.cache.bypassCache.toString() : "false"
208
+ "x-bypass-cache": "true"
210
209
  },
211
210
  next: {
212
211
  revalidate
@@ -238,7 +237,7 @@ var getManifestClient = (options) => {
238
237
  ...init,
239
238
  headers: {
240
239
  ...init == null ? void 0 : init.headers,
241
- "x-bypass-cache": typeof options.cache.bypassCache !== "undefined" ? options.cache.bypassCache.toString() : "false"
240
+ "x-bypass-cache": "true"
242
241
  },
243
242
  cache,
244
243
  next: {
@@ -279,7 +278,7 @@ var getProjectMapClient = (options) => {
279
278
  ...init,
280
279
  headers: {
281
280
  ...init == null ? void 0 : init.headers,
282
- "x-bypass-cache": typeof options.cache.bypassCache !== "undefined" ? options.cache.bypassCache.toString() : "false"
281
+ "x-bypass-cache": "true"
283
282
  },
284
283
  cache,
285
284
  next: {
@@ -307,7 +306,6 @@ var getRouteClient = (options) => {
307
306
  projectId: env.getProjectId(),
308
307
  apiKey: env.getApiKey(),
309
308
  edgeApiHost: env.getEdgeApiHost(),
310
- disableSWR: typeof options.cache.disableSWR !== "undefined" ? options.cache.disableSWR : true,
311
309
  fetch: (req, init) => {
312
310
  let requestedUrl;
313
311
  if (typeof req === "string") {
@@ -335,7 +333,7 @@ var getRouteClient = (options) => {
335
333
  ...init,
336
334
  headers: {
337
335
  ...init == null ? void 0 : init.headers,
338
- "x-bypass-cache": typeof options.cache.bypassCache !== "undefined" ? options.cache.bypassCache.toString() : "false"
336
+ "x-bypass-cache": "true"
339
337
  },
340
338
  cache,
341
339
  next: {
package/dist/index.js CHANGED
@@ -221,7 +221,6 @@ var getCanvasClient = (options) => {
221
221
  apiHost: env.getApiHost(),
222
222
  apiKey: env.getApiKey(),
223
223
  edgeApiHost: env.getEdgeApiHost(),
224
- disableSWR: typeof options.cache.disableSWR !== "undefined" ? options.cache.disableSWR : true,
225
224
  fetch: (req, init) => {
226
225
  let requestedUrl;
227
226
  if (typeof req === "string") {
@@ -253,7 +252,7 @@ var getCanvasClient = (options) => {
253
252
  cache,
254
253
  headers: {
255
254
  ...init == null ? void 0 : init.headers,
256
- "x-bypass-cache": typeof options.cache.bypassCache !== "undefined" ? options.cache.bypassCache.toString() : "false"
255
+ "x-bypass-cache": "true"
257
256
  },
258
257
  next: {
259
258
  revalidate
@@ -285,7 +284,7 @@ var getManifestClient = (options) => {
285
284
  ...init,
286
285
  headers: {
287
286
  ...init == null ? void 0 : init.headers,
288
- "x-bypass-cache": typeof options.cache.bypassCache !== "undefined" ? options.cache.bypassCache.toString() : "false"
287
+ "x-bypass-cache": "true"
289
288
  },
290
289
  cache,
291
290
  next: {
@@ -326,7 +325,7 @@ var getProjectMapClient = (options) => {
326
325
  ...init,
327
326
  headers: {
328
327
  ...init == null ? void 0 : init.headers,
329
- "x-bypass-cache": typeof options.cache.bypassCache !== "undefined" ? options.cache.bypassCache.toString() : "false"
328
+ "x-bypass-cache": "true"
330
329
  },
331
330
  cache,
332
331
  next: {
@@ -354,7 +353,6 @@ var getRouteClient = (options) => {
354
353
  projectId: env.getProjectId(),
355
354
  apiKey: env.getApiKey(),
356
355
  edgeApiHost: env.getEdgeApiHost(),
357
- disableSWR: typeof options.cache.disableSWR !== "undefined" ? options.cache.disableSWR : true,
358
356
  fetch: (req, init) => {
359
357
  let requestedUrl;
360
358
  if (typeof req === "string") {
@@ -382,7 +380,7 @@ var getRouteClient = (options) => {
382
380
  ...init,
383
381
  headers: {
384
382
  ...init == null ? void 0 : init.headers,
385
- "x-bypass-cache": typeof options.cache.bypassCache !== "undefined" ? options.cache.bypassCache.toString() : "false"
383
+ "x-bypass-cache": "true"
386
384
  },
387
385
  cache,
388
386
  next: {
package/dist/index.mjs CHANGED
@@ -174,7 +174,6 @@ var getCanvasClient = (options) => {
174
174
  apiHost: env.getApiHost(),
175
175
  apiKey: env.getApiKey(),
176
176
  edgeApiHost: env.getEdgeApiHost(),
177
- disableSWR: typeof options.cache.disableSWR !== "undefined" ? options.cache.disableSWR : true,
178
177
  fetch: (req, init) => {
179
178
  let requestedUrl;
180
179
  if (typeof req === "string") {
@@ -206,7 +205,7 @@ var getCanvasClient = (options) => {
206
205
  cache,
207
206
  headers: {
208
207
  ...init == null ? void 0 : init.headers,
209
- "x-bypass-cache": typeof options.cache.bypassCache !== "undefined" ? options.cache.bypassCache.toString() : "false"
208
+ "x-bypass-cache": "true"
210
209
  },
211
210
  next: {
212
211
  revalidate
@@ -238,7 +237,7 @@ var getManifestClient = (options) => {
238
237
  ...init,
239
238
  headers: {
240
239
  ...init == null ? void 0 : init.headers,
241
- "x-bypass-cache": typeof options.cache.bypassCache !== "undefined" ? options.cache.bypassCache.toString() : "false"
240
+ "x-bypass-cache": "true"
242
241
  },
243
242
  cache,
244
243
  next: {
@@ -279,7 +278,7 @@ var getProjectMapClient = (options) => {
279
278
  ...init,
280
279
  headers: {
281
280
  ...init == null ? void 0 : init.headers,
282
- "x-bypass-cache": typeof options.cache.bypassCache !== "undefined" ? options.cache.bypassCache.toString() : "false"
281
+ "x-bypass-cache": "true"
283
282
  },
284
283
  cache,
285
284
  next: {
@@ -307,7 +306,6 @@ var getRouteClient = (options) => {
307
306
  projectId: env.getProjectId(),
308
307
  apiKey: env.getApiKey(),
309
308
  edgeApiHost: env.getEdgeApiHost(),
310
- disableSWR: typeof options.cache.disableSWR !== "undefined" ? options.cache.disableSWR : true,
311
309
  fetch: (req, init) => {
312
310
  let requestedUrl;
313
311
  if (typeof req === "string") {
@@ -335,7 +333,7 @@ var getRouteClient = (options) => {
335
333
  ...init,
336
334
  headers: {
337
335
  ...init == null ? void 0 : init.headers,
338
- "x-bypass-cache": typeof options.cache.bypassCache !== "undefined" ? options.cache.bypassCache.toString() : "false"
336
+ "x-bypass-cache": "true"
339
337
  },
340
338
  cache,
341
339
  next: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-next-rsc",
3
- "version": "19.147.1-alpha.3+1af8304702",
3
+ "version": "19.149.1-alpha.1+55ee398800",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "scripts": {
6
6
  "build": "tsup",
@@ -61,15 +61,15 @@
61
61
  "react-dom": "18.2.0"
62
62
  },
63
63
  "dependencies": {
64
- "@uniformdev/canvas": "19.147.1-alpha.3+1af8304702",
65
- "@uniformdev/canvas-next-rsc-client": "^19.147.1-alpha.3+1af8304702",
66
- "@uniformdev/canvas-next-rsc-shared": "^19.147.1-alpha.3+1af8304702",
67
- "@uniformdev/canvas-react": "19.147.1-alpha.3+1af8304702",
68
- "@uniformdev/context": "19.147.1-alpha.3+1af8304702",
69
- "@uniformdev/project-map": "19.147.1-alpha.3+1af8304702",
70
- "@uniformdev/redirect": "19.147.1-alpha.3+1af8304702",
71
- "@uniformdev/richtext": "19.147.1-alpha.3+1af8304702",
72
- "@uniformdev/webhooks": "19.147.1-alpha.3+1af8304702",
64
+ "@uniformdev/canvas": "19.149.1-alpha.1+55ee398800",
65
+ "@uniformdev/canvas-next-rsc-client": "^19.149.1-alpha.1+55ee398800",
66
+ "@uniformdev/canvas-next-rsc-shared": "^19.149.1-alpha.1+55ee398800",
67
+ "@uniformdev/canvas-react": "19.149.1-alpha.1+55ee398800",
68
+ "@uniformdev/context": "19.149.1-alpha.1+55ee398800",
69
+ "@uniformdev/project-map": "19.149.1-alpha.1+55ee398800",
70
+ "@uniformdev/redirect": "19.149.1-alpha.1+55ee398800",
71
+ "@uniformdev/richtext": "19.149.1-alpha.1+55ee398800",
72
+ "@uniformdev/webhooks": "19.149.1-alpha.1+55ee398800",
73
73
  "@vercel/edge-config": "^0.4.0",
74
74
  "encoding": "^0.1.13",
75
75
  "server-only": "^0.0.1",
@@ -86,5 +86,5 @@
86
86
  "publishConfig": {
87
87
  "access": "public"
88
88
  },
89
- "gitHead": "1af830470251c963f96bad096f543cfd3b612ffe"
89
+ "gitHead": "55ee398800ebfebe4d493572e47f5474b6125ddf"
90
90
  }