@vocollege/app 0.0.96 → 0.0.97

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.
@@ -307,9 +307,7 @@ var VoAuth = /** @class */ (function (_super) {
307
307
  var _this = this;
308
308
  if (forceRedirect === void 0) { forceRedirect = false; }
309
309
  if (forceLoad === void 0) { forceLoad = false; }
310
- console.log("VoAuth.check() 1 -");
311
310
  this.checkConfig();
312
- console.log("VoAuth.check() 2 -");
313
311
  return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
314
312
  var currentCookies, cookieName, token, error_3;
315
313
  return __generator(this, function (_a) {
@@ -330,9 +328,7 @@ var VoAuth = /** @class */ (function (_super) {
330
328
  });
331
329
  }
332
330
  }
333
- console.log("VoAuth.check() before");
334
331
  token = this.getToken();
335
- console.log("VoAuth.check() token", token);
336
332
  if (!token) return [3 /*break*/, 5];
337
333
  _a.label = 1;
338
334
  case 1:
@@ -9,12 +9,9 @@ var VoBase = /** @class */ (function () {
9
9
  this.configKey = key;
10
10
  }
11
11
  VoBase.prototype.checkConfig = function () {
12
- console.log("VoBase.checkConfig() VoConfig.get", VoConfig_1.default.get);
13
- // if (VoConfig.get.BASE_URL === "") {
14
- // throw new Error(
15
- // "VoApp is not configured properly. You need to initiate it with VoApp.configure() method."
16
- // );
17
- // }
12
+ if (VoConfig_1.default.get.BASE_URL === "") {
13
+ throw new Error("VoApp is not configured properly. You need to initiate it with VoApp.configure() method.");
14
+ }
18
15
  };
19
16
  Object.defineProperty(VoBase.prototype, "getUrl", {
20
17
  get: function () {
@@ -48,7 +48,6 @@ var VoRouter = /** @class */ (function () {
48
48
  };
49
49
  VoRouter.prototype.redirectToLogout = function () {
50
50
  var webUrl = [];
51
- console.log("redirectToLogout VoConfig.get", VoConfig_1.default.get);
52
51
  if (VoConfig_1.default.get.AUTH_BASE_URL) {
53
52
  webUrl.push(VoConfig_1.default.get.AUTH_BASE_URL + "/logout");
54
53
  var redirectTo = js_cookie_1.default.get("voapp_redirectTo") || VoConfig_1.default.get.BASE_URL;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vocollege/app",
3
- "version": "0.0.96",
3
+ "version": "0.0.97",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -206,12 +206,7 @@ class VoAuth extends VoBase {
206
206
  }
207
207
 
208
208
  check(forceRedirect = false, forceLoad = false): Promise<any> {
209
- console.log("VoAuth.check() 1 -");
210
-
211
209
  this.checkConfig();
212
-
213
- console.log("VoAuth.check() 2 -");
214
-
215
210
  return new Promise(async (resolve, reject) => {
216
211
  // VC-231 | Clear up unnecessary cookies.
217
212
  let currentCookies = JsCookies.get();
@@ -231,13 +226,7 @@ class VoAuth extends VoBase {
231
226
  });
232
227
  }
233
228
  }
234
-
235
- console.log("VoAuth.check() before");
236
-
237
229
  const token = this.getToken();
238
-
239
- console.log("VoAuth.check() token", token);
240
-
241
230
  if (token) {
242
231
  try {
243
232
  this.setSession(token, forceLoad);
@@ -6,13 +6,11 @@ class VoBase {
6
6
  this.configKey = key;
7
7
  }
8
8
  checkConfig() {
9
- console.log("VoBase.checkConfig() VoConfig.get", VoConfig.get);
10
-
11
- // if (VoConfig.get.BASE_URL === "") {
12
- // throw new Error(
13
- // "VoApp is not configured properly. You need to initiate it with VoApp.configure() method."
14
- // );
15
- // }
9
+ if (VoConfig.get.BASE_URL === "") {
10
+ throw new Error(
11
+ "VoApp is not configured properly. You need to initiate it with VoApp.configure() method."
12
+ );
13
+ }
16
14
  }
17
15
  get getUrl() {
18
16
  let envKey = `${this.configKey.toUpperCase()}_BASE_URL`;
@@ -48,9 +48,6 @@ class VoRouter {
48
48
  }
49
49
  redirectToLogout() {
50
50
  const webUrl = [];
51
-
52
- console.log("redirectToLogout VoConfig.get", VoConfig.get);
53
-
54
51
  if (VoConfig.get.AUTH_BASE_URL) {
55
52
  webUrl.push(VoConfig.get.AUTH_BASE_URL + "/logout");
56
53
  let redirectTo = Cookies.get("voapp_redirectTo") || VoConfig.get.BASE_URL;