@uniformdev/next-app-router 20.57.1 → 20.57.2-alpha.22

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.
@@ -5631,15 +5631,16 @@ var handleRouteRequest = async ({
5631
5631
  dataClient,
5632
5632
  options
5633
5633
  }) => {
5634
- var _a, _b, _c, _d, _e, _f, _g, _h;
5634
+ var _a, _b, _c, _d, _e, _f, _g;
5635
+ const releaseId = (_b = (_a = options.release) == null ? void 0 : _a.id) != null ? _b : draftModeEnabled ? request.nextUrl.searchParams.get("releaseId") || void 0 : void 0;
5635
5636
  const states = await determineState({
5636
5637
  searchParams: request.nextUrl.searchParams,
5637
5638
  draftModeEnabled
5638
5639
  });
5639
- const requestPath = (_b = await ((_a = options.rewriteRequestPath) == null ? void 0 : _a.call(options, {
5640
+ const requestPath = (_d = await ((_c = options.rewriteRequestPath) == null ? void 0 : _c.call(options, {
5640
5641
  request,
5641
5642
  url: new URL(request.url)
5642
- }))) != null ? _b : {
5643
+ }))) != null ? _d : {
5643
5644
  path: `${request.nextUrl.pathname}${request.nextUrl.search}`
5644
5645
  };
5645
5646
  const serverConfig = getServerConfig();
@@ -5650,7 +5651,7 @@ var handleRouteRequest = async ({
5650
5651
  searchParams: request.nextUrl.searchParams,
5651
5652
  draftModeEnabled,
5652
5653
  dataClient,
5653
- releaseId: (_c = options.release) == null ? void 0 : _c.id,
5654
+ releaseId,
5654
5655
  locale: options.locale
5655
5656
  }),
5656
5657
  createOnDemandContext({
@@ -5662,10 +5663,10 @@ var handleRouteRequest = async ({
5662
5663
  })
5663
5664
  })
5664
5665
  ]);
5665
- if (!(routeResult == null ? void 0 : routeResult.route) || ((_d = routeResult == null ? void 0 : routeResult.route) == null ? void 0 : _d.type) === "notFound") {
5666
+ if (!(routeResult == null ? void 0 : routeResult.route) || ((_e = routeResult == null ? void 0 : routeResult.route) == null ? void 0 : _e.type) === "notFound") {
5666
5667
  return import_server.NextResponse.rewrite(new URL("/404", request.url));
5667
5668
  }
5668
- if (((_e = routeResult == null ? void 0 : routeResult.route) == null ? void 0 : _e.type) === "redirect") {
5669
+ if (((_f = routeResult == null ? void 0 : routeResult.route) == null ? void 0 : _f.type) === "redirect") {
5669
5670
  return handleRedirect({ request, route: routeResult.route });
5670
5671
  }
5671
5672
  const { route } = routeResult;
@@ -5705,8 +5706,8 @@ var handleRouteRequest = async ({
5705
5706
  state,
5706
5707
  context,
5707
5708
  matchedRoute: route.matchedRoute,
5708
- dynamicInputs: (_f = route.dynamicInputs) != null ? _f : {},
5709
- releaseId: (_g = options.release) == null ? void 0 : _g.id,
5709
+ dynamicInputs: (_g = route.dynamicInputs) != null ? _g : {},
5710
+ releaseId,
5710
5711
  defaultConsent: determineDefaultConsent({
5711
5712
  serverConfig,
5712
5713
  defaultConsent: options.defaultConsent
@@ -5724,7 +5725,7 @@ var handleRouteRequest = async ({
5724
5725
  compositionState: state,
5725
5726
  components,
5726
5727
  keys: requestPath.keys,
5727
- releaseId: (_h = options.release) == null ? void 0 : _h.id,
5728
+ releaseId,
5728
5729
  defaultConsent: determineDefaultConsent({
5729
5730
  serverConfig,
5730
5731
  defaultConsent: options.defaultConsent
@@ -5623,15 +5623,16 @@ var handleRouteRequest = async ({
5623
5623
  dataClient,
5624
5624
  options
5625
5625
  }) => {
5626
- var _a, _b, _c, _d, _e, _f, _g, _h;
5626
+ var _a, _b, _c, _d, _e, _f, _g;
5627
+ const releaseId = (_b = (_a = options.release) == null ? void 0 : _a.id) != null ? _b : draftModeEnabled ? request.nextUrl.searchParams.get("releaseId") || void 0 : void 0;
5627
5628
  const states = await determineState({
5628
5629
  searchParams: request.nextUrl.searchParams,
5629
5630
  draftModeEnabled
5630
5631
  });
5631
- const requestPath = (_b = await ((_a = options.rewriteRequestPath) == null ? void 0 : _a.call(options, {
5632
+ const requestPath = (_d = await ((_c = options.rewriteRequestPath) == null ? void 0 : _c.call(options, {
5632
5633
  request,
5633
5634
  url: new URL(request.url)
5634
- }))) != null ? _b : {
5635
+ }))) != null ? _d : {
5635
5636
  path: `${request.nextUrl.pathname}${request.nextUrl.search}`
5636
5637
  };
5637
5638
  const serverConfig = getServerConfig();
@@ -5642,7 +5643,7 @@ var handleRouteRequest = async ({
5642
5643
  searchParams: request.nextUrl.searchParams,
5643
5644
  draftModeEnabled,
5644
5645
  dataClient,
5645
- releaseId: (_c = options.release) == null ? void 0 : _c.id,
5646
+ releaseId,
5646
5647
  locale: options.locale
5647
5648
  }),
5648
5649
  createOnDemandContext({
@@ -5654,10 +5655,10 @@ var handleRouteRequest = async ({
5654
5655
  })
5655
5656
  })
5656
5657
  ]);
5657
- if (!(routeResult == null ? void 0 : routeResult.route) || ((_d = routeResult == null ? void 0 : routeResult.route) == null ? void 0 : _d.type) === "notFound") {
5658
+ if (!(routeResult == null ? void 0 : routeResult.route) || ((_e = routeResult == null ? void 0 : routeResult.route) == null ? void 0 : _e.type) === "notFound") {
5658
5659
  return NextResponse.rewrite(new URL("/404", request.url));
5659
5660
  }
5660
- if (((_e = routeResult == null ? void 0 : routeResult.route) == null ? void 0 : _e.type) === "redirect") {
5661
+ if (((_f = routeResult == null ? void 0 : routeResult.route) == null ? void 0 : _f.type) === "redirect") {
5661
5662
  return handleRedirect({ request, route: routeResult.route });
5662
5663
  }
5663
5664
  const { route } = routeResult;
@@ -5697,8 +5698,8 @@ var handleRouteRequest = async ({
5697
5698
  state,
5698
5699
  context,
5699
5700
  matchedRoute: route.matchedRoute,
5700
- dynamicInputs: (_f = route.dynamicInputs) != null ? _f : {},
5701
- releaseId: (_g = options.release) == null ? void 0 : _g.id,
5701
+ dynamicInputs: (_g = route.dynamicInputs) != null ? _g : {},
5702
+ releaseId,
5702
5703
  defaultConsent: determineDefaultConsent({
5703
5704
  serverConfig,
5704
5705
  defaultConsent: options.defaultConsent
@@ -5716,7 +5717,7 @@ var handleRouteRequest = async ({
5716
5717
  compositionState: state,
5717
5718
  components,
5718
5719
  keys: requestPath.keys,
5719
- releaseId: (_h = options.release) == null ? void 0 : _h.id,
5720
+ releaseId,
5720
5721
  defaultConsent: determineDefaultConsent({
5721
5722
  serverConfig,
5722
5723
  defaultConsent: options.defaultConsent
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/next-app-router",
3
- "version": "20.57.1",
3
+ "version": "20.57.2-alpha.22+a76473d7ee",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "scripts": {
6
6
  "build": "tsup",
@@ -99,12 +99,12 @@
99
99
  "vitest": "3.2.4"
100
100
  },
101
101
  "dependencies": {
102
- "@uniformdev/canvas-react": "20.57.1",
103
- "@uniformdev/next-app-router-client": "20.57.1",
104
- "@uniformdev/next-app-router-shared": "20.57.1",
105
- "@uniformdev/redirect": "20.57.1",
106
- "@uniformdev/richtext": "20.57.1",
107
- "@uniformdev/webhooks": "20.57.1",
102
+ "@uniformdev/canvas-react": "20.57.2-alpha.22+a76473d7ee",
103
+ "@uniformdev/next-app-router-client": "20.57.2-alpha.22+a76473d7ee",
104
+ "@uniformdev/next-app-router-shared": "20.57.2-alpha.22+a76473d7ee",
105
+ "@uniformdev/redirect": "20.57.2-alpha.22+a76473d7ee",
106
+ "@uniformdev/richtext": "20.57.2-alpha.22+a76473d7ee",
107
+ "@uniformdev/webhooks": "20.57.2-alpha.22+a76473d7ee",
108
108
  "@vercel/functions": "^2.2.2",
109
109
  "encoding": "^0.1.13",
110
110
  "server-only": "^0.0.1",
@@ -121,5 +121,5 @@
121
121
  "publishConfig": {
122
122
  "access": "public"
123
123
  },
124
- "gitHead": "1e3550de803a5532c1facf22ce6513001c847650"
124
+ "gitHead": "a76473d7ee17e2c8745b1f240d670afb90108f36"
125
125
  }