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

@openreplay/tracker-axios

Package Overview
Dependencies
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@openreplay/tracker-axios - npm Package Compare versions

Comparing version 3.4.1 to 3.4.2

2

cjs/index.d.ts

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

import { AxiosInstance } from 'axios';
import type { AxiosInstance } from 'axios';
import { App } from '@openreplay/tracker/cjs';

@@ -3,0 +3,0 @@ export interface Options {

@@ -5,4 +5,9 @@ "use strict";

const tracker_1 = require("@openreplay/tracker/cjs");
const exception_1 = require("@openreplay/tracker/cjs/modules/exception"); // TODO: export from tracker root
const url_1 = require("./url");
const exception_js_1 = require("@openreplay/tracker/cjs/modules/exception.js"); // TODO: export from tracker root
const url_js_1 = require("./url.js");
function isAxiosResponse(r) {
return typeof r === "object" &&
typeof r.config === "object" &&
typeof r.status === "number";
}
function default_1(opts = {}) {

@@ -75,3 +80,3 @@ const options = Object.assign({

// Why can't axios propogate the final request URL somewhere?
const fullURL = url_1.buildFullPath(res.config.baseURL, options.instance.getUri(res.config));
const fullURL = (0, url_js_1.buildFullPath)(res.config.baseURL, options.instance.getUri(res.config));
app.send(tracker_1.Messages.Fetch(typeof res.config.method === 'string' ? res.config.method.toUpperCase() : 'GET', fullURL, JSON.stringify({

@@ -111,3 +116,3 @@ headers: reqHs,

if (error instanceof Error) {
app.send(exception_1.getExceptionMessage(error, []));
app.send((0, exception_js_1.getExceptionMessage)(error, []));
}

@@ -126,4 +131,8 @@ return Promise.reject(error);

else if (!axios_1.default.isCancel(error) && error instanceof Error) {
app.send(exception_1.getExceptionMessage(error, []));
app.send((0, exception_js_1.getExceptionMessage)(error, []));
}
// TODO: common case (selector)
if (isAxiosResponse(error)) {
sendFetchMessage(error);
}
return Promise.reject(error);

@@ -130,0 +139,0 @@ });

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

import { AxiosInstance } from 'axios';
import type { AxiosInstance } from 'axios';
import { App } from '@openreplay/tracker';

@@ -3,0 +3,0 @@ export interface Options {

import axios from 'axios';
import { Messages } from '@openreplay/tracker';
import { getExceptionMessage } from '@openreplay/tracker/lib/modules/exception'; // TODO: export from tracker root
import { buildFullPath } from './url';
import { getExceptionMessage } from '@openreplay/tracker/lib/modules/exception.js'; // TODO: export from tracker root
import { buildFullPath } from './url.js';
function isAxiosResponse(r) {
return typeof r === "object" &&
typeof r.config === "object" &&
typeof r.status === "number";
}
export default function (opts = {}) {

@@ -123,2 +128,6 @@ const options = Object.assign({

}
// TODO: common case (selector)
if (isAxiosResponse(error)) {
sendFetchMessage(error);
}
return Promise.reject(error);

@@ -125,0 +134,0 @@ });

{
"name": "@openreplay/tracker-axios",
"description": "Tracker plugin for axios requests recording",
"version": "3.4.1",
"version": "3.4.2",
"keywords": [

@@ -23,12 +23,12 @@ "axios",

"peerDependencies": {
"@openreplay/tracker": "^3.0.0",
"@openreplay/tracker": "^3.4.8",
"axios": "^0.21.2"
},
"devDependencies": {
"@openreplay/tracker": "^3.0.0",
"@openreplay/tracker": "^3.4.9",
"axios": "^0.21.2",
"prettier": "^1.18.2",
"replace-in-files-cli": "^1.0.0",
"typescript": "^3.6.4"
"typescript": "^4.6.0-dev.20211126"
}
}
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