New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@pm2/js-api

Package Overview
Dependencies
Maintainers
2
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pm2/js-api - npm Package Compare versions

Comparing version 0.7.0 to 0.8.0

4

package.json
{
"name": "@pm2/js-api",
"version": "0.7.0",
"version": "0.8.0",
"description": "PM2.io API Client for Javascript",

@@ -37,3 +37,3 @@ "main": "index.js",

"async": "^2.6.3",
"axios": "^0.21.0",
"extrareqp2": "^1.0.0",
"debug": "~4.3.1",

@@ -40,0 +40,0 @@ "eventemitter2": "^6.3.1",

'use strict'
const axios = require('axios')
const extrareqp2 = require('extrareqp2')
const AuthStrategy = require('./auth_strategies/strategy')

@@ -28,3 +28,3 @@ const constants = require('../constants')

this._queue = []
this._axios = axios.create(opts)
this._extrareqp2 = extrareqp2.create(opts)
this._websockets = []

@@ -74,3 +74,3 @@ this._endpoints = new Map()

this._axios.interceptors.response.use(
this._extrareqp2.interceptors.response.use(
response => {

@@ -113,3 +113,3 @@ updateApiDateLag(response)

if (!this._endpoints.has(bucketID)) {
const promise = this._axios.request({
const promise = this._extrareqp2.request({
url: `/api/bucket/${bucketID}`,

@@ -185,3 +185,3 @@ method: 'GET',

this._axios.request(httpOpts)
this._extrareqp2.request(httpOpts)
.then(successNext)

@@ -214,3 +214,3 @@ .catch((error) => {

httpOpts.headers.Authorization = `Bearer ${this.tokens.access_token}`
return this._axios.request(httpOpts).then(successNext).catch(next)
return this._extrareqp2.request(httpOpts).then(successNext).catch(next)
})

@@ -255,4 +255,4 @@ })

this._websockets.forEach(websocket => websocket.updateAuthorization(data.access_token))
this._axios.defaults.headers.common['Authorization'] = `Bearer ${data.access_token}`
this._axios.request({
this._extrareqp2.defaults.headers.common['Authorization'] = `Bearer ${data.access_token}`
this._extrareqp2.request({
url: '/api/bucket',

@@ -259,0 +259,0 @@ method: 'GET',

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

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