Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

supertokens-website

Package Overview
Dependencies
Maintainers
1
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

supertokens-website - npm Package Compare versions

Comparing version 20.1.0 to 20.1.1

10

CHANGELOG.md

@@ -10,2 +10,12 @@ # Changelog

## [20.1.1] - 2024-07-13
### Changes
- Added a warning if the SDK can't save to cookies to help people notice/debug these issues faster.
### Fixes
- Fixed an issue in the Axios interceptor that caused it to throw when encountering a network error
## [20.1.0] - 2024-05-31

@@ -12,0 +22,0 @@

3

lib/build/axios.js

@@ -421,3 +421,3 @@ "use strict";

logger_1.logDebugMessage)("responseErrorInterceptor: already intercepted: " + (error.response && error.response.headers["x-supertokens-xhr-intercepted"]));
if (error.response.headers["x-supertokens-xhr-intercepted"]) {
if (error.response === undefined || error.response.headers["x-supertokens-xhr-intercepted"]) {
throw error;

@@ -696,2 +696,3 @@ }

logger_1.logDebugMessage)("doRequest: sessionRefreshAttempts: " + config.__supertokensSessionRefreshAttempts);
console.log("!!!!", JSON.stringify(refreshResult));
if (!(refreshResult.result !== "RETRY")) return [3 /*break*/, 21];

@@ -698,0 +699,0 @@ (0, logger_1.logDebugMessage)("doRequest: Not retrying original request");

import { AxiosError } from "axios";
export declare function createAxiosErrorFromFetchResp(response: Response): Promise<AxiosError>;
export declare function createAxiosErrorFromFetchResp(responseOrError: Response): Promise<AxiosError>;

@@ -174,5 +174,5 @@ "use strict";

}
function createAxiosErrorFromFetchResp(response) {
function createAxiosErrorFromFetchResp(responseOrError) {
return __awaiter(this, void 0, void 0, function () {
var config, contentType, data, _a, axiosResponse;
var config, isResponse, axiosResponse, contentType, data, _a;
return __generator(this, function (_b) {

@@ -182,6 +182,9 @@ switch (_b.label) {

config = {
url: response.url,
headers: response.headers
url: responseOrError.url,
headers: responseOrError.headers
};
contentType = response.headers.get("content-type");
isResponse = "status" in responseOrError;
if (!isResponse) return [3 /*break*/, 12];
contentType = responseOrError.headers.get("content-type");
data = void 0;
if (!(contentType === null)) return [3 /*break*/, 5];

@@ -191,3 +194,3 @@ _b.label = 1;

_b.trys.push([1, 3, , 4]);
return [4 /*yield*/, response.text()];
return [4 /*yield*/, responseOrError.text()];
case 2:

@@ -204,3 +207,3 @@ data = _b.sent();

if (!contentType.includes("application/json")) return [3 /*break*/, 7];
return [4 /*yield*/, response.json()];
return [4 /*yield*/, responseOrError.json()];
case 6:

@@ -211,3 +214,3 @@ data = _b.sent();

if (!contentType.includes("text/")) return [3 /*break*/, 9];
return [4 /*yield*/, response.text()];
return [4 /*yield*/, responseOrError.text()];
case 8:

@@ -217,3 +220,3 @@ data = _b.sent();

case 9:
return [4 /*yield*/, response.blob()];
return [4 /*yield*/, responseOrError.blob()];
case 10:

@@ -225,15 +228,19 @@ data = _b.sent();

data: data,
status: response.status,
statusText: response.statusText,
headers: response.headers,
status: responseOrError.status,
statusText: responseOrError.statusText,
headers: responseOrError.headers,
config: config,
request: undefined
};
_b.label = 12;
case 12:
return [
2 /*return*/,
enhanceAxiosError(
new Error("Request failed with status code " + response.status),
isResponse
? new Error("Request failed with status code " + responseOrError.status)
: responseOrError,
config,
responseOrError.code,
undefined,
undefined,
axiosResponse

@@ -240,0 +247,0 @@ )

@@ -1,2 +0,2 @@

export declare const package_version = "20.1.0";
export declare const package_version = "20.1.1";
export declare const supported_fdi: string[];

@@ -18,3 +18,3 @@ "use strict";

*/
exports.package_version = "20.1.0";
exports.package_version = "20.1.1";
exports.supported_fdi = ["1.16", "1.17", "1.18", "1.19", "2.0", "3.0"];
{
"name": "supertokens-website",
"version": "20.1.0",
"version": "20.1.1",
"description": "frontend sdk for website to be used for auth solution.",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc