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

pitney-bowes

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pitney-bowes - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

CHANGELOG.md

10

index.js

@@ -9,3 +9,3 @@ const cache = require('memory-cache');

api_secret: '',
baseUrl: 'https://api-sandbox.pitneybowes.com/shippingservices',
baseUrl: 'https://shipping-api-sandbox.pitneybowes.com/shippingservices',
baseTestUrl: 'https://api-test.pitneybowes.com'

@@ -57,4 +57,6 @@ }, args);

this.getOAuthToken = function(callback) {
const url = `${options.baseUrl.replace('/shippingservices', '')}/oauth/token`;
// Try to get the token from memory cache
const oAuthToken = cache.get('pitney-bowes-oauth-token');
const oAuthToken = cache.get(url);

@@ -74,3 +76,3 @@ if (oAuthToken) {

method: 'POST',
url: `${options.baseUrl.replace('/shippingservices', '')}/oauth/token`
url
};

@@ -88,3 +90,3 @@

// Put the token in memory cache
cache.put('pitney-bowes-oauth-token', body, body.expiresIn * 1000 / 2);
cache.put(url, body, body.expiresIn * 1000 / 2);

@@ -91,0 +93,0 @@ callback(null, body);

10

package.json
{
"dependencies": {
"http-errors": "~1.7.1",
"http-errors": "~1.8.0",
"memory-cache": "~0.2.0",

@@ -10,4 +10,4 @@ "request": "~2.88.0"

"coveralls": "*",
"istanbul": "*",
"mocha": "*"
"mocha": "*",
"nyc": "*"
},

@@ -28,6 +28,6 @@ "keywords": [

"scripts": {
"coveralls": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- --exit -R spec test/* && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage",
"coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls",
"test": "mocha --exit --reporter spec test"
},
"version": "0.2.0"
"version": "0.3.0"
}
# pitney-bowes
[![Build Status](https://travis-ci.org/mediocre/pitney-bowes.svg?branch=master)](https://travis-ci.org/mediocre/pitney-bowes)
[![Coverage Status](https://coveralls.io/repos/github/mediocre/pitney-bowes/badge.svg?branch=master)](https://coveralls.io/github/mediocre/pitney-bowes?branch=master)
[![Build Status](https://travis-ci.org/mediocre/pitney-bowes.svg?branch=main)](https://travis-ci.org/mediocre/pitney-bowes)
[![Coverage Status](https://coveralls.io/repos/github/mediocre/pitney-bowes/badge.svg?branch=main)](https://coveralls.io/github/mediocre/pitney-bowes?branch=main)

@@ -6,0 +6,0 @@ The Pitney Bowes Complete Shipping APIs let you integrate shipping services from multiple carriers, including USPS® and Newgistics®, into your services and applications.

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