@sitecore-jss/sitecore-jss-nextjs 21.2.4-canary.3 → 21.2.5-canary.0

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.
@@ -12,8 +12,11 @@ const utils_1 = require("@sitecore-jss/sitecore-jss/utils");
12
12
  * This is set to http://localhost:3000 by default.
13
13
  * VERCEL_URL is provided by Vercel in case if we are in Preview deployment (deployment based on the custom branch),
14
14
  * preview deployment has unique url, we don't know exact url.
15
+ * Similarly, DEPLOY_URL is provided by Netlify and would give us the deploy URL
15
16
  */
16
17
  const getPublicUrl = () => {
18
+ if (process.env.NETLIFY && process.env.DEPLOY_URL)
19
+ return process.env.DEPLOY_URL;
17
20
  if (process.env.VERCEL_URL)
18
21
  return `https://${process.env.VERCEL_URL}`;
19
22
  let url = process.env.PUBLIC_URL;
@@ -6,8 +6,11 @@ import { isEditorActive, resetEditorChromes } from '@sitecore-jss/sitecore-jss/u
6
6
  * This is set to http://localhost:3000 by default.
7
7
  * VERCEL_URL is provided by Vercel in case if we are in Preview deployment (deployment based on the custom branch),
8
8
  * preview deployment has unique url, we don't know exact url.
9
+ * Similarly, DEPLOY_URL is provided by Netlify and would give us the deploy URL
9
10
  */
10
11
  export const getPublicUrl = () => {
12
+ if (process.env.NETLIFY && process.env.DEPLOY_URL)
13
+ return process.env.DEPLOY_URL;
11
14
  if (process.env.VERCEL_URL)
12
15
  return `https://${process.env.VERCEL_URL}`;
13
16
  let url = process.env.PUBLIC_URL;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitecore-jss/sitecore-jss-nextjs",
3
- "version": "21.2.4-canary.3",
3
+ "version": "21.2.5-canary.0",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "sideEffects": false,
@@ -70,9 +70,9 @@
70
70
  "react-dom": "^18.2.0"
71
71
  },
72
72
  "dependencies": {
73
- "@sitecore-jss/sitecore-jss": "^21.2.4-canary.3",
74
- "@sitecore-jss/sitecore-jss-dev-tools": "^21.2.4-canary.3",
75
- "@sitecore-jss/sitecore-jss-react": "^21.2.4-canary.3",
73
+ "@sitecore-jss/sitecore-jss": "^21.2.5-canary.0",
74
+ "@sitecore-jss/sitecore-jss-dev-tools": "^21.2.5-canary.0",
75
+ "@sitecore-jss/sitecore-jss-react": "^21.2.5-canary.0",
76
76
  "node-html-parser": "^6.1.4",
77
77
  "prop-types": "^15.8.1",
78
78
  "regex-parser": "^2.2.11",
@@ -80,7 +80,7 @@
80
80
  },
81
81
  "description": "",
82
82
  "types": "types/index.d.ts",
83
- "gitHead": "2f3a4297a5d9630272f3052960fc584e879bbd32",
83
+ "gitHead": "95ebc8b8c8ea426d7f534a03ceb7d90c6adb6d0e",
84
84
  "files": [
85
85
  "dist",
86
86
  "types",
@@ -4,6 +4,7 @@
4
4
  * This is set to http://localhost:3000 by default.
5
5
  * VERCEL_URL is provided by Vercel in case if we are in Preview deployment (deployment based on the custom branch),
6
6
  * preview deployment has unique url, we don't know exact url.
7
+ * Similarly, DEPLOY_URL is provided by Netlify and would give us the deploy URL
7
8
  */
8
9
  export declare const getPublicUrl: () => string;
9
10
  /**