@uniformdev/next-app-router 20.56.0 → 20.56.1-alpha.5

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.
@@ -5615,15 +5615,16 @@ var handleRouteRequest = async ({
5615
5615
  dataClient,
5616
5616
  options
5617
5617
  }) => {
5618
- var _a, _b, _c, _d, _e, _f, _g, _h;
5618
+ var _a, _b, _c, _d, _e, _f, _g;
5619
+ const releaseId = (_b = (_a = options.release) == null ? void 0 : _a.id) != null ? _b : draftModeEnabled ? request.nextUrl.searchParams.get("releaseId") || void 0 : void 0;
5619
5620
  const states = await determineState({
5620
5621
  searchParams: request.nextUrl.searchParams,
5621
5622
  draftModeEnabled
5622
5623
  });
5623
- const requestPath = (_b = await ((_a = options.rewriteRequestPath) == null ? void 0 : _a.call(options, {
5624
+ const requestPath = (_d = await ((_c = options.rewriteRequestPath) == null ? void 0 : _c.call(options, {
5624
5625
  request,
5625
5626
  url: new URL(request.url)
5626
- }))) != null ? _b : {
5627
+ }))) != null ? _d : {
5627
5628
  path: `${request.nextUrl.pathname}${request.nextUrl.search}`
5628
5629
  };
5629
5630
  const serverConfig = getServerConfig();
@@ -5634,7 +5635,7 @@ var handleRouteRequest = async ({
5634
5635
  searchParams: request.nextUrl.searchParams,
5635
5636
  draftModeEnabled,
5636
5637
  dataClient,
5637
- releaseId: (_c = options.release) == null ? void 0 : _c.id,
5638
+ releaseId,
5638
5639
  locale: options.locale
5639
5640
  }),
5640
5641
  createOnDemandContext({
@@ -5646,10 +5647,10 @@ var handleRouteRequest = async ({
5646
5647
  })
5647
5648
  })
5648
5649
  ]);
5649
- if (!(routeResult == null ? void 0 : routeResult.route) || ((_d = routeResult == null ? void 0 : routeResult.route) == null ? void 0 : _d.type) === "notFound") {
5650
+ if (!(routeResult == null ? void 0 : routeResult.route) || ((_e = routeResult == null ? void 0 : routeResult.route) == null ? void 0 : _e.type) === "notFound") {
5650
5651
  return import_server.NextResponse.rewrite(new URL("/404", request.url));
5651
5652
  }
5652
- if (((_e = routeResult == null ? void 0 : routeResult.route) == null ? void 0 : _e.type) === "redirect") {
5653
+ if (((_f = routeResult == null ? void 0 : routeResult.route) == null ? void 0 : _f.type) === "redirect") {
5653
5654
  return handleRedirect({ request, route: routeResult.route });
5654
5655
  }
5655
5656
  const { route } = routeResult;
@@ -5689,8 +5690,8 @@ var handleRouteRequest = async ({
5689
5690
  state,
5690
5691
  context,
5691
5692
  matchedRoute: route.matchedRoute,
5692
- dynamicInputs: (_f = route.dynamicInputs) != null ? _f : {},
5693
- releaseId: (_g = options.release) == null ? void 0 : _g.id,
5693
+ dynamicInputs: (_g = route.dynamicInputs) != null ? _g : {},
5694
+ releaseId,
5694
5695
  defaultConsent: determineDefaultConsent({
5695
5696
  serverConfig,
5696
5697
  defaultConsent: options.defaultConsent
@@ -5708,7 +5709,7 @@ var handleRouteRequest = async ({
5708
5709
  compositionState: state,
5709
5710
  components,
5710
5711
  keys: requestPath.keys,
5711
- releaseId: (_h = options.release) == null ? void 0 : _h.id,
5712
+ releaseId,
5712
5713
  defaultConsent: determineDefaultConsent({
5713
5714
  serverConfig,
5714
5715
  defaultConsent: options.defaultConsent
@@ -5607,15 +5607,16 @@ var handleRouteRequest = async ({
5607
5607
  dataClient,
5608
5608
  options
5609
5609
  }) => {
5610
- var _a, _b, _c, _d, _e, _f, _g, _h;
5610
+ var _a, _b, _c, _d, _e, _f, _g;
5611
+ const releaseId = (_b = (_a = options.release) == null ? void 0 : _a.id) != null ? _b : draftModeEnabled ? request.nextUrl.searchParams.get("releaseId") || void 0 : void 0;
5611
5612
  const states = await determineState({
5612
5613
  searchParams: request.nextUrl.searchParams,
5613
5614
  draftModeEnabled
5614
5615
  });
5615
- const requestPath = (_b = await ((_a = options.rewriteRequestPath) == null ? void 0 : _a.call(options, {
5616
+ const requestPath = (_d = await ((_c = options.rewriteRequestPath) == null ? void 0 : _c.call(options, {
5616
5617
  request,
5617
5618
  url: new URL(request.url)
5618
- }))) != null ? _b : {
5619
+ }))) != null ? _d : {
5619
5620
  path: `${request.nextUrl.pathname}${request.nextUrl.search}`
5620
5621
  };
5621
5622
  const serverConfig = getServerConfig();
@@ -5626,7 +5627,7 @@ var handleRouteRequest = async ({
5626
5627
  searchParams: request.nextUrl.searchParams,
5627
5628
  draftModeEnabled,
5628
5629
  dataClient,
5629
- releaseId: (_c = options.release) == null ? void 0 : _c.id,
5630
+ releaseId,
5630
5631
  locale: options.locale
5631
5632
  }),
5632
5633
  createOnDemandContext({
@@ -5638,10 +5639,10 @@ var handleRouteRequest = async ({
5638
5639
  })
5639
5640
  })
5640
5641
  ]);
5641
- if (!(routeResult == null ? void 0 : routeResult.route) || ((_d = routeResult == null ? void 0 : routeResult.route) == null ? void 0 : _d.type) === "notFound") {
5642
+ if (!(routeResult == null ? void 0 : routeResult.route) || ((_e = routeResult == null ? void 0 : routeResult.route) == null ? void 0 : _e.type) === "notFound") {
5642
5643
  return NextResponse.rewrite(new URL("/404", request.url));
5643
5644
  }
5644
- if (((_e = routeResult == null ? void 0 : routeResult.route) == null ? void 0 : _e.type) === "redirect") {
5645
+ if (((_f = routeResult == null ? void 0 : routeResult.route) == null ? void 0 : _f.type) === "redirect") {
5645
5646
  return handleRedirect({ request, route: routeResult.route });
5646
5647
  }
5647
5648
  const { route } = routeResult;
@@ -5681,8 +5682,8 @@ var handleRouteRequest = async ({
5681
5682
  state,
5682
5683
  context,
5683
5684
  matchedRoute: route.matchedRoute,
5684
- dynamicInputs: (_f = route.dynamicInputs) != null ? _f : {},
5685
- releaseId: (_g = options.release) == null ? void 0 : _g.id,
5685
+ dynamicInputs: (_g = route.dynamicInputs) != null ? _g : {},
5686
+ releaseId,
5686
5687
  defaultConsent: determineDefaultConsent({
5687
5688
  serverConfig,
5688
5689
  defaultConsent: options.defaultConsent
@@ -5700,7 +5701,7 @@ var handleRouteRequest = async ({
5700
5701
  compositionState: state,
5701
5702
  components,
5702
5703
  keys: requestPath.keys,
5703
- releaseId: (_h = options.release) == null ? void 0 : _h.id,
5704
+ releaseId,
5704
5705
  defaultConsent: determineDefaultConsent({
5705
5706
  serverConfig,
5706
5707
  defaultConsent: options.defaultConsent
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/next-app-router",
3
- "version": "20.56.0",
3
+ "version": "20.56.1-alpha.5+1bce2eca70",
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.56.0",
103
- "@uniformdev/next-app-router-client": "20.56.0",
104
- "@uniformdev/next-app-router-shared": "20.56.0",
105
- "@uniformdev/redirect": "20.56.0",
106
- "@uniformdev/richtext": "20.56.0",
107
- "@uniformdev/webhooks": "20.56.0",
102
+ "@uniformdev/canvas-react": "20.56.1-alpha.5+1bce2eca70",
103
+ "@uniformdev/next-app-router-client": "20.56.1-alpha.5+1bce2eca70",
104
+ "@uniformdev/next-app-router-shared": "20.56.1-alpha.5+1bce2eca70",
105
+ "@uniformdev/redirect": "20.56.1-alpha.5+1bce2eca70",
106
+ "@uniformdev/richtext": "20.56.1-alpha.5+1bce2eca70",
107
+ "@uniformdev/webhooks": "20.56.1-alpha.5+1bce2eca70",
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": "45d5acb6435efe756dae0c7f211ad86e2596d9fb"
124
+ "gitHead": "1bce2eca70191de304d93909e5cf08740b01fb5a"
125
125
  }