authscape 1.0.69 → 1.0.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.
package/index.js CHANGED
@@ -62,7 +62,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
62
62
  Object.defineProperty(exports, "__esModule", {
63
63
  value: true
64
64
  });
65
- exports["default"] = void 0;
65
+ exports.apiService = void 0;
66
66
 
67
67
  var _axios = _interopRequireDefault(require("axios"));
68
68
 
@@ -576,8 +576,7 @@ var apiService = function apiService() {
576
576
  };
577
577
  };
578
578
 
579
- var _default = apiService;
580
- exports["default"] = _default;
579
+ exports.apiService = apiService;
581
580
  "use strict";
582
581
 
583
582
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
@@ -585,7 +584,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
585
584
  Object.defineProperty(exports, "__esModule", {
586
585
  value: true
587
586
  });
588
- exports["default"] = AuthorizationComponent;
587
+ exports.AuthorizationComponent = AuthorizationComponent;
589
588
 
590
589
  var _react = _interopRequireWildcard(require("react"));
591
590
 
@@ -672,7 +671,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
672
671
  Object.defineProperty(exports, "__esModule", {
673
672
  value: true
674
673
  });
675
- exports["default"] = void 0;
674
+ exports.authService = void 0;
676
675
 
677
676
  var _react = _interopRequireDefault(require("react"));
678
677
 
@@ -855,14 +854,13 @@ var authService = function authService() {
855
854
  };
856
855
  };
857
856
 
858
- var _default = authService;
859
- exports["default"] = _default;
857
+ exports.authService = authService;
860
858
  "use strict";
861
859
 
862
860
  Object.defineProperty(exports, "__esModule", {
863
861
  value: true
864
862
  });
865
- exports["default"] = void 0;
863
+ exports.Helper = void 0;
866
864
 
867
865
  var _react = _interopRequireDefault(require("react"));
868
866
 
@@ -876,8 +874,7 @@ var Helper = function Helper() {
876
874
  };
877
875
  };
878
876
 
879
- var _default = Helper;
880
- exports["default"] = _default;
877
+ exports.Helper = Helper;
881
878
  "use strict";
882
879
 
883
880
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
@@ -885,7 +882,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
885
882
  Object.defineProperty(exports, "__esModule", {
886
883
  value: true
887
884
  });
888
- exports["default"] = void 0;
885
+ exports.signInValidator = void 0;
889
886
 
890
887
  var _react = _interopRequireWildcard(require("react"));
891
888
 
@@ -990,14 +987,13 @@ var signInValidator = /*#__PURE__*/function () {
990
987
  };
991
988
  }();
992
989
 
993
- var _default = signInValidator;
994
- exports["default"] = _default;
990
+ exports.signInValidator = signInValidator;
995
991
  "use strict";
996
992
 
997
993
  Object.defineProperty(exports, "__esModule", {
998
994
  value: true
999
995
  });
1000
- exports["default"] = void 0;
996
+ exports.Slug = void 0;
1001
997
 
1002
998
  var Slug = function Slug(slug) {
1003
999
  var index = slug.lastIndexOf("-") + 1;
@@ -1010,14 +1006,13 @@ var Slug = function Slug(slug) {
1010
1006
  return null;
1011
1007
  };
1012
1008
 
1013
- var _default = Slug;
1014
- exports["default"] = _default;
1009
+ exports.Slug = Slug;
1015
1010
  "use strict";
1016
1011
 
1017
1012
  Object.defineProperty(exports, "__esModule", {
1018
1013
  value: true
1019
1014
  });
1020
- exports["default"] = void 0;
1015
+ exports.storeWithExpiry = void 0;
1021
1016
 
1022
1017
  var storeWithExpiry = function storeWithExpiry() {
1023
1018
  return {
@@ -1049,5 +1044,4 @@ var storeWithExpiry = function storeWithExpiry() {
1049
1044
  };
1050
1045
  };
1051
1046
 
1052
- var _default = storeWithExpiry;
1053
- exports["default"] = _default;
1047
+ exports.storeWithExpiry = storeWithExpiry;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.69",
3
+ "version": "1.0.70",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -87,7 +87,7 @@ const RefreshToken = async (originalRequest, instance) => {
87
87
  }
88
88
  }
89
89
 
90
- const apiService = (ctx = {}) => {
90
+ export const apiService = (ctx = {}) => {
91
91
 
92
92
  let env = process.env.STAGE;
93
93
  if (env == "development")
@@ -248,6 +248,4 @@ const apiService = (ctx = {}) => {
248
248
  }
249
249
  }
250
250
  }
251
- }
252
-
253
- export default apiService;
251
+ }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { destroyCookie } from 'nookies';
3
3
 
4
- const authService = () => {
4
+ export const authService = () => {
5
5
 
6
6
  return {
7
7
 
@@ -105,6 +105,4 @@ const authService = () => {
105
105
 
106
106
  },
107
107
  }
108
- }
109
-
110
- export default authService;
108
+ }
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect, useState, useRef } from 'react';
2
2
  //import apiService from './apiService';
3
3
 
4
- export default function AuthorizationComponent({children, setCurrentUser, userLoaded, isLoading}) {
4
+ export function AuthorizationComponent({children, setCurrentUser, userLoaded, isLoading}) {
5
5
 
6
6
  const [loaded, setLoaded] = useState(false);
7
7
  const validateUserSignedIn = async () => {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- const Helper = () => {
3
+ export const Helper = () => {
4
4
 
5
5
  return {
6
6
 
@@ -8,6 +8,4 @@ const Helper = () => {
8
8
  return Object.keys(obj).length == 0;
9
9
  }
10
10
  }
11
- }
12
-
13
- export default Helper;
11
+ }
@@ -3,7 +3,7 @@ import axios from 'axios';
3
3
  import querystring from "querystring";
4
4
  import { setCookie } from 'nookies';
5
5
 
6
- const signInValidator = async (queryCode) => {
6
+ export const signInValidator = async (queryCode) => {
7
7
 
8
8
  let codeVerifier = window.localStorage.getItem("verifier");
9
9
  if (queryCode != null && codeVerifier != null)
@@ -63,6 +63,4 @@ const signInValidator = async (queryCode) => {
63
63
  window.location.href = "/";
64
64
  }
65
65
  }
66
- }
67
-
68
- export default signInValidator;
66
+ }
@@ -1,4 +1,4 @@
1
- const Slug = (slug) => {
1
+ export const Slug = (slug) => {
2
2
 
3
3
  let index = slug.lastIndexOf("-") + 1;
4
4
  if (slug.length > index)
@@ -8,6 +8,4 @@ const Slug = (slug) => {
8
8
  }
9
9
 
10
10
  return null;
11
- };
12
-
13
- export default Slug;
11
+ };
@@ -1,4 +1,4 @@
1
- const storeWithExpiry = () => {
1
+ export const storeWithExpiry = () => {
2
2
 
3
3
  return {
4
4
  set: (key, value, ttl) => {
@@ -25,6 +25,4 @@ const storeWithExpiry = () => {
25
25
  return item.value
26
26
  }
27
27
  }
28
- }
29
-
30
- export default storeWithExpiry;
28
+ }