@8base/api-token-auth-client
Advanced tools
Comparing version 2.6.6 to 2.7.0-beta.0
@@ -6,2 +6,10 @@ # Change Log | ||
# [2.7.0-beta.0](https://github.com/8base/sdk/compare/v2.6.6...v2.7.0-beta.0) (2022-06-22) | ||
**Note:** Version bump only for package @8base/api-token-auth-client | ||
## [2.6.6](https://github.com/8base/sdk/compare/v2.6.5...v2.6.6) (2022-03-18) | ||
@@ -8,0 +16,0 @@ |
@@ -1,9 +0,3 @@ | ||
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ApiTokenAuthClient = void 0; | ||
const utils_1 = require("@8base/utils"); | ||
const jwt_decode_1 = __importDefault(require("jwt-decode")); | ||
import { PACKAGES, StorageAPI, throwIfMissingRequiredParameters, } from '@8base/utils'; | ||
import jwtDecode from 'jwt-decode'; | ||
/** | ||
@@ -14,5 +8,5 @@ * Creates instacne of the api token auth client | ||
constructor(options, storageOptions = {}) { | ||
utils_1.throwIfMissingRequiredParameters(['apiToken'], utils_1.PACKAGES.API_TOKEN_AUTH_CLIENT, options); | ||
throwIfMissingRequiredParameters(['apiToken'], PACKAGES.API_TOKEN_AUTH_CLIENT, options); | ||
const { apiToken } = options; | ||
this.storageAPI = new utils_1.StorageAPI(storageOptions.storage || window.localStorage, storageOptions.storageKey || 'auth', storageOptions.initialState); | ||
this.storageAPI = new StorageAPI(storageOptions.storage || window.localStorage, storageOptions.storageKey || 'auth', storageOptions.initialState); | ||
this.apiToken = apiToken; | ||
@@ -28,3 +22,3 @@ this.storageAPI.setState({ token: apiToken }); | ||
} | ||
return jwt_decode_1.default(this.apiToken) || undefined; | ||
return jwtDecode(this.apiToken) || undefined; | ||
} | ||
@@ -42,3 +36,3 @@ setState(state) { | ||
} | ||
exports.ApiTokenAuthClient = ApiTokenAuthClient; | ||
export { ApiTokenAuthClient }; | ||
//# sourceMappingURL=ApiTokenAuthClient.js.map |
@@ -1,6 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ApiTokenAuthClient = void 0; | ||
var ApiTokenAuthClient_1 = require("./ApiTokenAuthClient"); | ||
Object.defineProperty(exports, "ApiTokenAuthClient", { enumerable: true, get: function () { return ApiTokenAuthClient_1.ApiTokenAuthClient; } }); | ||
export { ApiTokenAuthClient } from './ApiTokenAuthClient'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@8base/api-token-auth-client", | ||
"version": "2.6.6", | ||
"version": "2.7.0-beta.0", | ||
"author": "8base", | ||
@@ -15,3 +15,3 @@ "repository": "https://github.com/8base/sdk", | ||
"dependencies": { | ||
"@8base/utils": "^2.6.6", | ||
"@8base/utils": "^2.7.0-beta.0", | ||
"jwt-decode": "^3.1.2" | ||
@@ -37,2 +37,25 @@ }, | ||
], | ||
"moduleNameMapper": { | ||
"8base-sdk": "<rootDir>/../../core/8base-sdk/src/index.ts", | ||
"@8base/api-client": "<rootDir>/../../core/api-client/src/index.ts", | ||
"@8base/api-token-auth-client": "<rootDir>/../../core/api-token-auth-client/src/index.ts", | ||
"@8base/apollo-client": "<rootDir>/../../core/apollo-client/src/index.ts", | ||
"@8base/apollo-links": "<rootDir>/../../core/apollo-links/src/index.ts", | ||
"@8base/auth": "<rootDir>/../../core/auth/src/index.ts", | ||
"@8base/utils": "<rootDir>/../../core/utils/src/index.ts", | ||
"@8base/validate": "<rootDir>/../../core/validate/src/index.ts", | ||
"@8base/web-auth0-auth-client": "<rootDir>/../../core/web-auth0-auth-client/src/index.ts", | ||
"@8base/web-cognito-auth-client": "<rootDir>/../../core/web-cognito-auth-client/src/index.ts", | ||
"@8base/web-native-auth-client": "<rootDir>/../../core/web-native-auth-client/src/index.ts", | ||
"@8base/web-oauth-client": "<rootDir>/../../core/web-oauth-client/src/index.ts", | ||
"8base-react-sdk": "<rootDir>/../../react/8base-react-sdk/src/index.ts", | ||
"@8base-react/app-provider": "<rootDir>/../../react/app-provider/src/index.ts", | ||
"@8base-react/auth": "<rootDir>/../../react/auth/src/index.ts", | ||
"@8base-react/crud": "<rootDir>/../../react/crud/src/index.ts", | ||
"@8base-react/file-input": "<rootDir>/../../react/file-input/src/index.ts", | ||
"@8base-react/forms": "<rootDir>/../../react/forms/src/index.ts", | ||
"@8base-react/permissions-provider": "<rootDir>/../../react/permissions-provider/src/index.ts", | ||
"@8base-react/table-schema-provider": "<rootDir>/../../react/table-schema-provider/src/index.ts", | ||
"@8base-react/utils": "<rootDir>/../../react/utils/src/index.ts" | ||
}, | ||
"moduleFileExtensions": [ | ||
@@ -39,0 +62,0 @@ "ts", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10996
65
1
+ Added@8base/utils@2.7.0-beta.0(transitive)
- Removed@8base/utils@2.6.6(transitive)
- Removedgraphql@14.7.0(transitive)
- Removedgraphql-prettier@1.0.6(transitive)
- Removediterall@1.3.0(transitive)
Updated@8base/utils@^2.7.0-beta.0