@fluxo-dev/api-client-base 25.2.10 → 25.3.1

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.
Files changed (2) hide show
  1. package/index.cjs.js +6 -8
  2. package/package.json +2 -2
package/index.cjs.js CHANGED
@@ -2637,11 +2637,6 @@ $$k({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
2637
2637
  }
2638
2638
  });
2639
2639
 
2640
- const LocalStorageConstants = {
2641
- accessToken: 'access-token',
2642
- userData: 'user-data'
2643
- };
2644
-
2645
2640
  let HttpClient$1 = class HttpClient {
2646
2641
  get client() {
2647
2642
  return this._axiosInstance;
@@ -2659,9 +2654,7 @@ let HttpClient$1 = class HttpClient {
2659
2654
  const state$1 = state.store.getState();
2660
2655
  if (state$1.user.loggedIn) {
2661
2656
  return Object.assign(Object.assign({}, config), {
2662
- headers: Object.assign(Object.assign({}, config.headers), {
2663
- 'Authorization': 'Bearer ' + localStorage.getItem(LocalStorageConstants.accessToken)
2664
- })
2657
+ headers: Object.assign({}, config.headers)
2665
2658
  });
2666
2659
  }
2667
2660
  return config;
@@ -2792,6 +2785,11 @@ if ($stringify) {
2792
2785
 
2793
2786
  function e(e){this.message=e;}e.prototype=new Error,e.prototype.name="InvalidCharacterError";var r="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,"");if(t.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,a=0,i=0,c="";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function t(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw "Illegal base64url string!"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t})))}(t)}catch(e){return r(t)}}function n(e){this.message=e;}function o(e,r){if("string"!=typeof e)throw new n("Invalid token specified");var o=true===(r=r||{}).header?0:1;try{return JSON.parse(t(e.split(".")[o]))}catch(e){throw new n("Invalid token specified: "+e.message)}}n.prototype=new Error,n.prototype.name="InvalidTokenError";
2794
2787
 
2788
+ const LocalStorageConstants = {
2789
+ accessToken: 'access-token',
2790
+ userData: 'user-data'
2791
+ };
2792
+
2795
2793
  class FluxoStateDispatcher {
2796
2794
  static dispatchUserLogin(data) {
2797
2795
  state.store.dispatch(state.userLogin(data));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluxo-dev/api-client-base",
3
- "version": "25.2.10",
3
+ "version": "25.3.1",
4
4
  "type": "commonjs",
5
5
  "peerDependencies": {
6
6
  "react": "^18.3.1",
@@ -8,7 +8,7 @@
8
8
  "react-router-dom": "^6.11.2",
9
9
  "react-redux": "^8.0.5",
10
10
  "@reduxjs/toolkit": "^1.9.1",
11
- "@fluxo-dev/state": "^25.2.10"
11
+ "@fluxo-dev/state": "^25.3.1"
12
12
  },
13
13
  "main": "./index.cjs.js",
14
14
  "types": "./index.cjs.d.ts"