@accounts/client
Advanced tools
Comparing version 0.33.1 to 1.0.0-alpha-20231022085748-0910b9e1
@@ -145,4 +145,4 @@ "use strict"; | ||
_a.trys.push([2, 8, , 10]); | ||
isAccessTokenExpired = utils_1.isTokenExpired(tokens.accessToken); | ||
isRefreshTokenExpired = utils_1.isTokenExpired(tokens.refreshToken); | ||
isAccessTokenExpired = (0, utils_1.isTokenExpired)(tokens.accessToken); | ||
isRefreshTokenExpired = (0, utils_1.isTokenExpired)(tokens.refreshToken); | ||
if (!((force || isAccessTokenExpired) && !isRefreshTokenExpired)) return [3 /*break*/, 5]; | ||
@@ -270,3 +270,3 @@ return [4 /*yield*/, this.transport.refreshTokens(tokens.accessToken, tokens.refreshToken)]; | ||
AccountsClient.prototype.getTokenKey = function (tokenName) { | ||
return "" + this.options.tokenStoragePrefix + this.options.tokenStorageSeparator + tokenName; | ||
return "".concat(this.options.tokenStoragePrefix).concat(this.options.tokenStorageSeparator).concat(tokenName); | ||
}; | ||
@@ -273,0 +273,0 @@ return AccountsClient; |
@@ -1,2 +0,2 @@ | ||
declare type ValueOrPromise<T> = T | Promise<T>; | ||
type ValueOrPromise<T> = T | Promise<T>; | ||
export interface TokenStorage { | ||
@@ -3,0 +3,0 @@ setItem(key: string, value: string): ValueOrPromise<void>; |
@@ -8,3 +8,3 @@ "use strict"; | ||
var currentTime = Date.now() / 1000; | ||
var decodedToken = jwt_decode_1.default(token); | ||
var decodedToken = (0, jwt_decode_1.default)(token); | ||
return decodedToken.exp < currentTime; | ||
@@ -11,0 +11,0 @@ }; |
{ | ||
"name": "@accounts/client", | ||
"version": "0.33.1", | ||
"version": "1.0.0-alpha-20231022085748-0910b9e1", | ||
"description": "Fullstack authentication and accounts-management", | ||
@@ -10,2 +10,14 @@ "main": "lib/index.js", | ||
}, | ||
"scripts": { | ||
"clean": "yarn run -T rimraf lib", | ||
"start": "yarn run -T tsc --watch", | ||
"precompile": "yarn run clean", | ||
"compile": "yarn run -T tsc", | ||
"prepublishOnly": "yarn run compile", | ||
"test": "yarn run testonly", | ||
"test-ci": "yarn run lint && yarn run coverage", | ||
"testonly": "yarn run -T jest", | ||
"test:watch": "yarn run -T jest --watch", | ||
"coverage": "yarn run testonly --coverage" | ||
}, | ||
"files": [ | ||
@@ -39,26 +51,12 @@ "src", | ||
"devDependencies": { | ||
"@types/jest": "26.0.24", | ||
"@types/node": "16.4.13", | ||
"jest": "27.0.6", | ||
"jest-localstorage-mock": "2.4.14", | ||
"jsonwebtoken": "8.5.1", | ||
"localstorage-polyfill": "1.0.1", | ||
"rimraf": "3.0.2" | ||
"@types/jsonwebtoken": "9.0.4", | ||
"jest-localstorage-mock": "2.4.26", | ||
"jsonwebtoken": "9.0.2", | ||
"localstorage-polyfill": "1.0.1" | ||
}, | ||
"dependencies": { | ||
"@accounts/types": "^0.33.1", | ||
"@accounts/types": "1.0.0-alpha-20231022085748-0910b9e1", | ||
"jwt-decode": "3.1.2", | ||
"tslib": "2.3.0" | ||
}, | ||
"scripts": { | ||
"clean": "rimraf lib", | ||
"start": "tsc --watch", | ||
"precompile": "pnpm run clean", | ||
"compile": "tsc", | ||
"test": "npm run testonly", | ||
"test-ci": "npm lint && npm coverage", | ||
"testonly": "jest", | ||
"test:watch": "jest --watch", | ||
"coverage": "npm run testonly -- --coverage" | ||
"tslib": "2.6.2" | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
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
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
4
35167
34
+ Added@accounts/types@1.0.0-alpha-20231022085748-0910b9e1(transitive)
+ Addedtslib@2.6.2(transitive)
- Removed@accounts/types@0.33.2(transitive)
- Removedtslib@2.3.02.3.1(transitive)
Updatedtslib@2.6.2