@frontegg/nextjs 5.11.0-alpha.2943387224 → 5.11.0-alpha.2956772727

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/index.cjs.js CHANGED
@@ -1112,16 +1112,16 @@ var FronteggConfig = /*#__PURE__*/function () {
1112
1112
  }, {
1113
1113
  key: "appUrl",
1114
1114
  get: function get() {
1115
- var _a;
1115
+ var _a, _b;
1116
1116
 
1117
- return (_a = process.env['FRONTEGG_APP_URL']) !== null && _a !== void 0 ? _a : 'http://localhost:3000';
1117
+ return (_b = (_a = process.env['VERCEL_URL']) !== null && _a !== void 0 ? _a : process.env['FRONTEGG_APP_URL']) !== null && _b !== void 0 ? _b : 'http://localhost:3000';
1118
1118
  }
1119
1119
  }, {
1120
1120
  key: "cookieDomain",
1121
1121
  get: function get() {
1122
- var _a;
1122
+ var _a, _b;
1123
1123
 
1124
- return new URL((_a = process.env['FRONTEGG_APP_URL']) !== null && _a !== void 0 ? _a : '').hostname.replace(/:(\d)+$/, '');
1124
+ return new URL((_b = (_a = process.env['VERCEL_URL']) !== null && _a !== void 0 ? _a : process.env['FRONTEGG_APP_URL']) !== null && _b !== void 0 ? _b : '').hostname.replace(/:(\d)+$/, '');
1125
1125
  }
1126
1126
  }, {
1127
1127
  key: "getJwtPublicKey",
@@ -1767,7 +1767,7 @@ var withFronteggApp = function withFronteggApp(app, options) {
1767
1767
 
1768
1768
  app.getInitialProps = function (appContext) {
1769
1769
  return __awaiter(void 0, void 0, void 0, /*#__PURE__*/regenerator.mark(function _callee() {
1770
- var _c, _d, ctx, Component, session;
1770
+ var _c, _d, _e, ctx, Component, session;
1771
1771
 
1772
1772
  return regenerator.wrap(function _callee$(_context) {
1773
1773
  while (1) {
@@ -1787,7 +1787,7 @@ var withFronteggApp = function withFronteggApp(app, options) {
1787
1787
  session = _context.sent;
1788
1788
  appContext.session = session;
1789
1789
 
1790
- if (process.env['FRONTEGG_APP_URL']) {
1790
+ if (!(!process.env['VERCEL_URL'] && !process.env['FRONTEGG_APP_URL'])) {
1791
1791
  _context.next = 8;
1792
1792
  break;
1793
1793
  }
@@ -1857,7 +1857,7 @@ var withFronteggApp = function withFronteggApp(app, options) {
1857
1857
  _context.t9 = _context.t1.assign.call(_context.t1, _context.t6, _context.t8);
1858
1858
  _context.t10 = {
1859
1859
  session: session,
1860
- envAppUrl: process.env['FRONTEGG_APP_URL'],
1860
+ envAppUrl: (_e = process.env['VERCEL_URL']) !== null && _e !== void 0 ? _e : process.env['FRONTEGG_APP_URL'],
1861
1861
  envBaseUrl: process.env['FRONTEGG_BASE_URL'],
1862
1862
  envClientId: process.env['FRONTEGG_CLIENT_ID']
1863
1863
  };
package/index.esm.js CHANGED
@@ -1086,16 +1086,16 @@ var FronteggConfig = /*#__PURE__*/function () {
1086
1086
  }, {
1087
1087
  key: "appUrl",
1088
1088
  get: function get() {
1089
- var _a;
1089
+ var _a, _b;
1090
1090
 
1091
- return (_a = process.env['FRONTEGG_APP_URL']) !== null && _a !== void 0 ? _a : 'http://localhost:3000';
1091
+ return (_b = (_a = process.env['VERCEL_URL']) !== null && _a !== void 0 ? _a : process.env['FRONTEGG_APP_URL']) !== null && _b !== void 0 ? _b : 'http://localhost:3000';
1092
1092
  }
1093
1093
  }, {
1094
1094
  key: "cookieDomain",
1095
1095
  get: function get() {
1096
- var _a;
1096
+ var _a, _b;
1097
1097
 
1098
- return new URL((_a = process.env['FRONTEGG_APP_URL']) !== null && _a !== void 0 ? _a : '').hostname.replace(/:(\d)+$/, '');
1098
+ return new URL((_b = (_a = process.env['VERCEL_URL']) !== null && _a !== void 0 ? _a : process.env['FRONTEGG_APP_URL']) !== null && _b !== void 0 ? _b : '').hostname.replace(/:(\d)+$/, '');
1099
1099
  }
1100
1100
  }, {
1101
1101
  key: "getJwtPublicKey",
@@ -1741,7 +1741,7 @@ var withFronteggApp = function withFronteggApp(app, options) {
1741
1741
 
1742
1742
  app.getInitialProps = function (appContext) {
1743
1743
  return __awaiter(void 0, void 0, void 0, /*#__PURE__*/regenerator.mark(function _callee() {
1744
- var _c, _d, ctx, Component, session;
1744
+ var _c, _d, _e, ctx, Component, session;
1745
1745
 
1746
1746
  return regenerator.wrap(function _callee$(_context) {
1747
1747
  while (1) {
@@ -1761,7 +1761,7 @@ var withFronteggApp = function withFronteggApp(app, options) {
1761
1761
  session = _context.sent;
1762
1762
  appContext.session = session;
1763
1763
 
1764
- if (process.env['FRONTEGG_APP_URL']) {
1764
+ if (!(!process.env['VERCEL_URL'] && !process.env['FRONTEGG_APP_URL'])) {
1765
1765
  _context.next = 8;
1766
1766
  break;
1767
1767
  }
@@ -1831,7 +1831,7 @@ var withFronteggApp = function withFronteggApp(app, options) {
1831
1831
  _context.t9 = _context.t1.assign.call(_context.t1, _context.t6, _context.t8);
1832
1832
  _context.t10 = {
1833
1833
  session: session,
1834
- envAppUrl: process.env['FRONTEGG_APP_URL'],
1834
+ envAppUrl: (_e = process.env['VERCEL_URL']) !== null && _e !== void 0 ? _e : process.env['FRONTEGG_APP_URL'],
1835
1835
  envBaseUrl: process.env['FRONTEGG_BASE_URL'],
1836
1836
  envClientId: process.env['FRONTEGG_CLIENT_ID']
1837
1837
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontegg/nextjs",
3
- "version": "5.11.0-alpha.2943387224",
3
+ "version": "5.11.0-alpha.2956772727",
4
4
  "dependencies": {
5
5
  "@frontegg/admin-portal": "5.80.2",
6
6
  "@frontegg/react-hooks": "5.80.2",