@uniformdev/canvas-next 19.37.1 → 19.38.3-alpha.70

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.
@@ -5,7 +5,7 @@ import * as querystring from 'querystring';
5
5
  import { ParsedUrlQuery } from 'querystring';
6
6
  import * as _uniformdev_canvas from '@uniformdev/canvas';
7
7
  import { CanvasClient, DataResolutionOption } from '@uniformdev/canvas';
8
- export { w as withUniformGetStaticPaths } from '../withUniformGetStaticPaths-6a31a8f8.js';
8
+ export { w as withUniformGetStaticPaths } from '../withUniformGetStaticPaths-77db0164.js';
9
9
  import '@uniformdev/canvas-react';
10
10
  import '@uniformdev/project-map';
11
11
 
@@ -5,7 +5,7 @@ import * as querystring from 'querystring';
5
5
  import { ParsedUrlQuery } from 'querystring';
6
6
  import * as _uniformdev_canvas from '@uniformdev/canvas';
7
7
  import { CanvasClient, DataResolutionOption } from '@uniformdev/canvas';
8
- export { w as withUniformGetStaticPaths } from '../withUniformGetStaticPaths-6a31a8f8.js';
8
+ export { w as withUniformGetStaticPaths } from '../withUniformGetStaticPaths-77db0164.js';
9
9
  import '@uniformdev/canvas-react';
10
10
  import '@uniformdev/project-map';
11
11
 
@@ -3,7 +3,7 @@ import { GetServerSidePropsContext, GetServerSidePropsResult, GetServerSideProps
3
3
  import { a as UniformPreviewData } from '../models-092c0912.js';
4
4
  import * as querystring from 'querystring';
5
5
  import { ParsedUrlQuery } from 'querystring';
6
- export { w as withUniformGetStaticPaths } from '../withUniformGetStaticPaths-6a31a8f8.js';
6
+ export { w as withUniformGetStaticPaths } from '../withUniformGetStaticPaths-77db0164.js';
7
7
  import { RouteGetResponseEdgehancedComposition, RouteGetResponseNotFound, RouteGetResponseRedirect, RouteClient, RouteGetParameters, RootComponentInstance } from '@uniformdev/canvas';
8
8
  import '@uniformdev/canvas-react';
9
9
  import '@uniformdev/project-map';
@@ -3,7 +3,7 @@ import { GetServerSidePropsContext, GetServerSidePropsResult, GetServerSideProps
3
3
  import { a as UniformPreviewData } from '../models-092c0912.js';
4
4
  import * as querystring from 'querystring';
5
5
  import { ParsedUrlQuery } from 'querystring';
6
- export { w as withUniformGetStaticPaths } from '../withUniformGetStaticPaths-6a31a8f8.js';
6
+ export { w as withUniformGetStaticPaths } from '../withUniformGetStaticPaths-77db0164.js';
7
7
  import { RouteGetResponseEdgehancedComposition, RouteGetResponseNotFound, RouteGetResponseRedirect, RouteClient, RouteGetParameters, RootComponentInstance } from '@uniformdev/canvas';
8
8
  import '@uniformdev/canvas-react';
9
9
  import '@uniformdev/project-map';
@@ -472,15 +472,16 @@ function createRouteFetcher(options) {
472
472
 
473
473
  // src/route/withUniformGetServerSideProps.ts
474
474
  var withUniformGetServerSideProps2 = (options) => {
475
- const defaultHandleRedirect = (requestUrl, matched) => {
475
+ const defaultHandleRedirect = (requestUrl, matched, context) => {
476
476
  if (matched.redirect.targetStatusCode > 400) {
477
477
  return {
478
478
  notFound: true
479
479
  };
480
480
  }
481
+ const absoluteUrl = `${context.req.headers["x-forwarded-proto"]}://${context.req.headers.host}${requestUrl}`;
481
482
  return {
482
483
  redirect: {
483
- destination: import_redirect.RedirectClient.getTargetVariableExpandedUrl(requestUrl, matched.redirect),
484
+ destination: import_redirect.RedirectClient.getTargetVariableExpandedUrl(absoluteUrl, matched.redirect),
484
485
  statusCode: matched.redirect.targetStatusCode
485
486
  }
486
487
  };
@@ -199,15 +199,16 @@ function createRouteFetcher(options) {
199
199
 
200
200
  // src/route/withUniformGetServerSideProps.ts
201
201
  var withUniformGetServerSideProps = (options) => {
202
- const defaultHandleRedirect = (requestUrl, matched) => {
202
+ const defaultHandleRedirect = (requestUrl, matched, context) => {
203
203
  if (matched.redirect.targetStatusCode > 400) {
204
204
  return {
205
205
  notFound: true
206
206
  };
207
207
  }
208
+ const absoluteUrl = `${context.req.headers["x-forwarded-proto"]}://${context.req.headers.host}${requestUrl}`;
208
209
  return {
209
210
  redirect: {
210
- destination: RedirectClient.getTargetVariableExpandedUrl(requestUrl, matched.redirect),
211
+ destination: RedirectClient.getTargetVariableExpandedUrl(absoluteUrl, matched.redirect),
211
212
  statusCode: matched.redirect.targetStatusCode
212
213
  }
213
214
  };
@@ -25,6 +25,7 @@ declare const withUniformGetStaticPaths: (options?: {
25
25
  expanded?: boolean | undefined;
26
26
  withCompositionData?: boolean | undefined;
27
27
  withCompositionUIStatus?: boolean | undefined;
28
+ withRedirectData?: boolean | undefined;
28
29
  }> | undefined;
29
30
  /** Way to modify list of nodes before building array of paths */
30
31
  callback?: ((nodes: ProjectMapNodeGetResponse['nodes']) => Promise<ProjectMapNodeGetResponse['nodes']>) | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-next",
3
- "version": "19.37.1",
3
+ "version": "19.38.3-alpha.70+55e5a8fe1",
4
4
  "description": "Next.js SDK for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -63,11 +63,11 @@
63
63
  "document": "api-extractor run --local"
64
64
  },
65
65
  "dependencies": {
66
- "@uniformdev/canvas": "19.37.1",
67
- "@uniformdev/canvas-react": "19.37.1",
68
- "@uniformdev/project-map": "19.37.1",
69
- "@uniformdev/redirect": "19.37.1",
70
- "@uniformdev/richtext": "19.37.1",
66
+ "@uniformdev/canvas": "19.38.3-alpha.70+55e5a8fe1",
67
+ "@uniformdev/canvas-react": "19.38.3-alpha.70+55e5a8fe1",
68
+ "@uniformdev/project-map": "19.38.3-alpha.70+55e5a8fe1",
69
+ "@uniformdev/redirect": "19.38.3-alpha.70+55e5a8fe1",
70
+ "@uniformdev/richtext": "19.38.3-alpha.70+55e5a8fe1",
71
71
  "colorette": "2.0.20"
72
72
  },
73
73
  "peerDependencies": {
@@ -76,8 +76,8 @@
76
76
  "react-dom": ">=16"
77
77
  },
78
78
  "devDependencies": {
79
- "@types/react": "18.2.7",
80
- "next": "13.4.2",
79
+ "@types/react": "18.2.18",
80
+ "next": "13.4.12",
81
81
  "react": "18.2.0",
82
82
  "react-dom": "18.2.0"
83
83
  },
@@ -87,5 +87,5 @@
87
87
  "publishConfig": {
88
88
  "access": "public"
89
89
  },
90
- "gitHead": "9de2a3f7515d658d07d7d1fb8ebf4805172e655c"
90
+ "gitHead": "55e5a8fe1d80971a93ea31d3a50cec72e71be70a"
91
91
  }