@frontegg/js 6.0.1-alpha.1 → 6.0.1-alpha.4

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.
@@ -4,6 +4,7 @@ import { Metadata } from '@frontegg/types';
4
4
  import { formatName } from '../utils';
5
5
  import { AppHolder } from '../AppHolder';
6
6
  import { fetch as FronteggFetch } from '@frontegg/rest-api';
7
+ import versions from '../version';
7
8
  export class FronteggApp {
8
9
  constructor(_options, name, iframeRendering = false) {
9
10
  var _this$options$store, _this$options$authOpt, _this$options$authOpt2, _this$options$auditsO;
@@ -94,7 +95,7 @@ export class FronteggApp {
94
95
  this.loadLoginBox();
95
96
  }
96
97
 
97
- this.loadScript('http://localhost:3002/index.js', 'FronteggAdminPortal');
98
+ this.loadScript(`https://assets.frontegg.com/admin-box/admin-portal/${versions.cdnVersion}/index.js`, 'FronteggAdminPortal');
98
99
  }
99
100
 
100
101
  updateMetadata(metadata) {
@@ -140,7 +141,7 @@ export class FronteggApp {
140
141
  }
141
142
 
142
143
  async loadLoginBox() {
143
- const FronteggLoginBox = await this.loadScript('http://localhost:3001/index.js', 'FronteggLoginBox');
144
+ const FronteggLoginBox = await this.loadScript(`https://assets.frontegg.com/admin-box/login-box/${versions.cdnVersion}/index.js`, 'FronteggLoginBox');
144
145
  FronteggLoginBox.render(this.loginBoxEl, {
145
146
  injector: this,
146
147
  options: this.options
@@ -155,7 +156,7 @@ export class FronteggApp {
155
156
  }
156
157
 
157
158
  async showAdminPortal() {
158
- const FronteggAdminPortal = await this.loadScript('http://localhost:3002/index.js', 'FronteggAdminPortal');
159
+ const FronteggAdminPortal = await this.loadScript(`https://assets.frontegg.com/admin-box/admin-portal/${versions.cdnVersion}/index.js`, 'FronteggAdminPortal');
159
160
  FronteggAdminPortal.render(this.adminPortalEl, {
160
161
  injector: this,
161
162
  options: this.options
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.0.1-alpha.1
1
+ /** @license Frontegg v6.0.1-alpha.4
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -19,6 +19,8 @@ var _AppHolder = require("../AppHolder");
19
19
 
20
20
  var _restApi = require("@frontegg/rest-api");
21
21
 
22
+ var _version = _interopRequireDefault(require("../version"));
23
+
22
24
  class FronteggApp {
23
25
  constructor(_options, name, iframeRendering = false) {
24
26
  var _this$options$store, _this$options$authOpt, _this$options$authOpt2, _this$options$auditsO;
@@ -110,7 +112,7 @@ class FronteggApp {
110
112
  this.loadLoginBox();
111
113
  }
112
114
 
113
- this.loadScript('http://localhost:3002/index.js', 'FronteggAdminPortal');
115
+ this.loadScript(`https://assets.frontegg.com/admin-box/admin-portal/${_version.default.cdnVersion}/index.js`, 'FronteggAdminPortal');
114
116
  }
115
117
 
116
118
  updateMetadata(metadata) {
@@ -156,7 +158,7 @@ class FronteggApp {
156
158
  }
157
159
 
158
160
  async loadLoginBox() {
159
- const FronteggLoginBox = await this.loadScript('http://localhost:3001/index.js', 'FronteggLoginBox');
161
+ const FronteggLoginBox = await this.loadScript(`https://assets.frontegg.com/admin-box/login-box/${_version.default.cdnVersion}/index.js`, 'FronteggLoginBox');
160
162
  FronteggLoginBox.render(this.loginBoxEl, {
161
163
  injector: this,
162
164
  options: this.options
@@ -171,7 +173,7 @@ class FronteggApp {
171
173
  }
172
174
 
173
175
  async showAdminPortal() {
174
- const FronteggAdminPortal = await this.loadScript('http://localhost:3002/index.js', 'FronteggAdminPortal');
176
+ const FronteggAdminPortal = await this.loadScript(`https://assets.frontegg.com/admin-box/admin-portal/${_version.default.cdnVersion}/index.js`, 'FronteggAdminPortal');
175
177
  FronteggAdminPortal.render(this.adminPortalEl, {
176
178
  injector: this,
177
179
  options: this.options
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.0.1-alpha.1
1
+ /** @license Frontegg v6.0.1-alpha.4
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _default = {
8
+ "cdnVersion": "6.0.1-alpha.4"
9
+ };
10
+ exports.default = _default;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@frontegg/js",
3
- "version": "6.0.1-alpha.1",
3
+ "version": "6.0.1-alpha.4",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {
7
7
  "@babel/runtime": "^7.17.2",
8
- "@frontegg/types": "6.0.1-alpha.1"
8
+ "@frontegg/types": "6.0.1-alpha.4"
9
9
  },
10
10
  "sideEffects": false,
11
11
  "private": false,
package/version.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ cdnVersion: string;
3
+ };
4
+ export default _default;
package/version.js ADDED
@@ -0,0 +1,3 @@
1
+ export default {
2
+ "cdnVersion": "6.0.1-alpha.4"
3
+ };