Socket
Socket
Sign inDemoInstall

postman-collection

Package Overview
Dependencies
Maintainers
4
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postman-collection - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

6

CHANGELOG.md
# Postman Collection SDK Changelog
#### v2.1.1 (August 18, 2017)
* :tada: Added an option to sanitize Property keys in `PropertList~toObject` #430
* :bug: Fixed a bug that caused incorrect AWS Auth signatures #438
* :racehorse: Initialized `VariableScope~_layers` only on demand, and not by default #437
* Updated dependencies, added edge case unit tests.
#### v2.1.0 (July 18, 2017)

@@ -4,0 +10,0 @@ * Updated `ProxyConfig#getProxyURL` to always return proxy URL with HTTP protocol #417

13

lib/collection/certificate.js

@@ -174,3 +174,14 @@ var _ = require('../util').lodash,

*/
_postman_propertyIndexKey: 'id'
_postman_propertyIndexKey: 'id',
/**
* Checks if the given object is a Certificate
*
* @param {*} obj
* @returns {Boolean}
*/
isCertificate: function (obj) {
return Boolean(obj) && ((obj instanceof Certificate) ||
_.inSuperChain(obj.constructor, '_postman_propertyName', Certificate._postman_propertyName));
}
});

@@ -177,0 +188,0 @@

24

lib/collection/property-list.js

@@ -474,8 +474,14 @@ var _ = require('../util').lodash,

*
* @param {Boolean} excludeDisabled
* @param {Boolean} caseSensitive
* @param {Boolean} multiValue
* @param {?Boolean} [excludeDisabled=false] - When set to true, disabled properties are excluded from the resultant
* object.
* @param {?Boolean} [caseSensitive] - When set to true, properties are treated strictly as per their original
* case. The default value for this property also depends on the case insensitivity definition of the current
* property.
* @param {?Boolean} [multiValue=false] - When set to true, only the first value of a multi valued property is
* returned.
* @param {Boolean} [sanitizeKeys=false] - When set to true, properties with falsy keys are removed.
* @todo Change the function signature to an object of options instead of the current structure.
* @return {Object}
*/
toObject: function (excludeDisabled, caseSensitive, multiValue) {
toObject: function (excludeDisabled, caseSensitive, multiValue, sanitizeKeys) {
var obj = {}, // create transformation data accumulator

@@ -485,2 +491,3 @@

key = this._postman_listIndexKey,
sanitiseKeys = this._postman_sanitizeKeys || sanitizeKeys,
sensitive = !this._postman_listIndexCaseInsensitive || caseSensitive,

@@ -491,4 +498,9 @@ multivalue = this._postman_listAllowsMultipleValues || multiValue;

this.each(function (member) {
// in case the member does not have the list index key or it is marked to configure disabled ones, bail out
if (!member || !member.hasOwnProperty(key) || (excludeDisabled && member.disabled)) {
// Bail out for the current member if ANY of the conditions below is true:
// 1. The member is falsy.
// 2. The member does not have the specified property list index key.
// 3. The member is disabled and disabled properties have to be ignored.
// 4. The member has a falsy key, and sanitize is true.
if (!member || !member.hasOwnProperty(key) || (excludeDisabled && member.disabled) ||
(sanitiseKeys && !member[key])) {
return;

@@ -495,0 +507,0 @@ }

@@ -166,3 +166,3 @@ var _ = require('../util').lodash,

return variables ? variables.substitute(this.toJSON(), overrides) : undefined;
return variables.substitute(this.toJSON(), overrides);
}

@@ -169,0 +169,0 @@ });

@@ -58,3 +58,3 @@ var _ = require('../../util').lodash,

},
host: request.url.getHost(),
host: request.url.getRemote(),
path: request.url.getPathWithQuery(),

@@ -61,0 +61,0 @@ service: params.service || params.serviceName || 'execute-api', // AWS API Gateway is the default service.

@@ -48,2 +48,4 @@ var _ = require('../util').lodash,

_.isString(options.urlencoded) && (urlencoded = QueryParam.parse(options.urlencoded));
// @todo: The fallback in the ternary expression will never be hit, as urlencoded points to
// @todo: options.urlencoded
urlencoded = urlencoded ? new PropertyList(QueryParam, this, urlencoded) :

@@ -55,2 +57,4 @@ new PropertyList(QueryParam, this, []);

if (options.formdata) {
// @todo: The fallback in the ternary expression will never be hit, as formdata points to
// @todo: options.formdata
formdata = formdata ? new PropertyList(FormParam, this, options.formdata) :

@@ -57,0 +61,0 @@ new PropertyList(FormParam, this, []);

@@ -85,5 +85,5 @@ var _ = require('../util').lodash,

this._layers = [];
if (layers) {
this._layers = [];
if (layers) {
for (i = 0, ii = layers.length; i < ii; i++) {

@@ -181,4 +181,4 @@ VariableList.isVariableList(layers[i]) && this._layers.push(layers[i]);

// if a variable does not exist in local scope, we search all the layers and return the first occurence.
if (!variable && this._layers) {
// if a variable does not exist in local scope, we search all the layers and return the first occurrence.
if (!(variable || !this._layers)) {
for (i = 0, ii = this._layers.length; i < ii; i++) {

@@ -291,2 +291,3 @@ variable = this._layers[i].one(key);

!this._layers && (this._layers = []); // lazily initialize layers
this._layers.push(list);

@@ -293,0 +294,0 @@ }

@@ -134,6 +134,4 @@ var _ = require('../util').lodash,

// set the new type if it is valid and cast the stored value
if (typeName) {
this.type = typeName;
!_nocast && (this.value = this.cast(this.value));
}
this.type = typeName;
!_nocast && (this.value = this.cast(this.value));

@@ -140,0 +138,0 @@ return typeName;

@@ -254,4 +254,2 @@ /* global btoa */

var base64;
// handle when buffer is pure string

@@ -263,3 +261,3 @@ if (_.isString(buffer)) {

// check if tostring works
base64 = buffer.toString('base64') || '';
var base64 = buffer.toString('base64') || '';

@@ -266,0 +264,0 @@ if (base64 === '[object ArrayBuffer]') {

@@ -5,3 +5,3 @@ {

"author": "Postman Labs <help@getpostman.com>",
"version": "2.1.0",
"version": "2.1.1",
"keywords": [

@@ -48,6 +48,6 @@ "postman"

"mime-format": "2.0.0",
"mime-types": "2.1.15",
"mime-types": "2.1.16",
"node-oauth1": "1.2.1",
"sanitize-html": "1.14.1",
"semver": "5.3.0",
"semver": "5.4.1",
"uuid": "3.1.0",

@@ -60,4 +60,4 @@ "postman-url-encoder": "1.0.1"

"colors": "1.1.2",
"eslint": "4.2.0",
"eslint-plugin-jsdoc": "3.1.1",
"eslint": "4.4.1",
"eslint-plugin-jsdoc": "3.1.2",
"eslint-plugin-lodash": "2.4.4",

@@ -68,4 +68,4 @@ "eslint-plugin-mocha": "4.11.0",

"istanbul": "0.4.5",
"js-yaml": "3.9.0",
"jsdoc": "3.5.3",
"js-yaml": "3.9.1",
"jsdoc": "3.5.4",
"jsdoc-to-markdown": "3.0.0",

@@ -77,5 +77,5 @@ "karma": "1.7.0",

"karma-mocha-reporter": "2.2.3",
"mocha": "3.4.2",
"mocha": "3.5.0",
"mustache": "2.3.0",
"nsp": "2.6.3",
"nsp": "2.7.0",
"packity": "0.3.2",

@@ -82,0 +82,0 @@ "parse-gitignore": "0.4.0",

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