postman-runtime 7.40.0-beta.1 → 7.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -116,7 +116,7 @@ module.exports = backpack = {
116
116
  // if any flag is not defined, we exit. when all flags hold a value, we know that the end callback has to be
117
117
  // executed.
118
118
  for (var i = 0, ii = flags.length; i < ii; i++) {
119
- if (!Object.hasOwnProperty.call(status, flags[i])) { return; }
119
+ if (!Object.hasOwn(status, flags[i])) { return; }
120
120
  }
121
121
 
122
122
  sealed = true;
@@ -102,7 +102,7 @@ urlEncodedBodyReducer = function (form, param) {
102
102
  value = param.value;
103
103
 
104
104
  // add the parameter to the form while accounting for duplicate values
105
- if (!Object.hasOwnProperty.call(form, key)) {
105
+ if (!Object.hasOwn(form, key)) {
106
106
  form[key] = value;
107
107
 
108
108
  return form;
@@ -273,15 +273,15 @@ module.exports = {
273
273
  // stringified content. This avoids parsing the variables.
274
274
  body = [];
275
275
 
276
- if (Object.hasOwnProperty.call(content, 'query') && (typeof content.query === STRING)) {
276
+ if (Object.hasOwn(content, 'query') && (typeof content.query === STRING)) {
277
277
  body.push('"query":' + JSON.stringify(content.query));
278
278
  }
279
279
 
280
- if (Object.hasOwnProperty.call(content, 'operationName') && (typeof content.operationName === STRING)) {
280
+ if (Object.hasOwn(content, 'operationName') && (typeof content.operationName === STRING)) {
281
281
  body.push('"operationName":' + JSON.stringify(content.operationName));
282
282
  }
283
283
 
284
- if (Object.hasOwnProperty.call(content, 'variables') && (typeof content.variables === STRING) &&
284
+ if (Object.hasOwn(content, 'variables') && (typeof content.variables === STRING) &&
285
285
  // even though users are free to send even malformed json string, the case of empty string has to be
286
286
  // specially disallowed since in most default cases if a text editor is used to accept this data, it will
287
287
  // send a blank string for an empty text-editor state and that would be an error flow. That implies majority
@@ -173,7 +173,7 @@ var dns = require('dns'),
173
173
  });
174
174
 
175
175
  for (key in systemHeaders) {
176
- if (Object.hasOwnProperty.call(systemHeaders, key)) {
176
+ if (Object.hasOwn(systemHeaders, key)) {
177
177
  // upsert instead of add to replace user-defined headers also
178
178
  headers.upsert({
179
179
  key: key,
@@ -254,7 +254,7 @@ var dns = require('dns'),
254
254
 
255
255
  done = function (type) {
256
256
  if (!called) {
257
- callback(type === S_CONNECT ? null : true); // eslint-disable-line callback-return
257
+ callback(type === S_CONNECT ? null : true); // eslint-disable-line n/callback-return
258
258
  called = true;
259
259
  this.destroy();
260
260
  }
@@ -375,7 +375,7 @@ var dns = require('dns'),
375
375
  // bail out if property or defaultOpts is not defined
376
376
  if (!(property && defaultOpts)) { return; }
377
377
 
378
- if (Object.hasOwnProperty.call(protocolProfileBehavior, property)) {
378
+ if (Object.hasOwn(protocolProfileBehavior, property)) {
379
379
  return protocolProfileBehavior[property];
380
380
  }
381
381
 
@@ -665,7 +665,7 @@ module.exports = {
665
665
  //
666
666
  // @note if you'd like to support additional body types beyond formdata, url-encoding, etc, add the same to
667
667
  // the builder module
668
- if (!Object.hasOwnProperty.call(requestBodyBuilders, requestBodyType)) {
668
+ if (!Object.hasOwn(requestBodyBuilders, requestBodyType)) {
669
669
  return;
670
670
  }
671
671
 
@@ -63,11 +63,6 @@ var _ = require('lodash'),
63
63
  cb(null, options);
64
64
  };
65
65
 
66
- // Enable support for extending root CAs.
67
- // Refer: https://github.com/postmanlabs/postman-request/pull/35
68
- // @todo trigger console warning (using callback) if not enabled.
69
- requests.enableNodeExtraCACerts();
70
-
71
66
  module.exports = function (request, options, onStart, onData, callback) {
72
67
  var req = {};
73
68
 
@@ -112,7 +112,7 @@ module.exports = {
112
112
  var requestId = uuid.v4(),
113
113
  replayOptions;
114
114
 
115
- // eslint-disable-next-line max-len
115
+ // eslint-disable-next-line @stylistic/js/max-len
116
116
  requester.on(RESPONSE_START_EVENT_BASE + requestId, function (err, response, request, cookies, history) {
117
117
  // we could have also added the response to the set of responses in the cloned item,
118
118
  // but then, we would have to iterate over all of them, which seems unnecessary
@@ -152,7 +152,7 @@ module.exports = {
152
152
  requester.on(RESPONSE_DATA_EVENT_BASE + requestId, function (data) {
153
153
  self.triggers.responseData(context.coords, data);
154
154
  });
155
- // eslint-disable-next-line max-len
155
+ // eslint-disable-next-line @stylistic/js/max-len
156
156
  xhr = requester.request(requestId, item.request, context.protocolProfileBehavior, function (err, res, req, cookies, history) {
157
157
  err = err || null;
158
158
 
@@ -101,7 +101,7 @@ _.assign(Runner.prototype, {
101
101
 
102
102
  // Bail out only if: abortOnError is set and the returned entrypoint is invalid
103
103
  if (options.abortOnError && !entrypoint) {
104
- // eslint-disable-next-line max-len
104
+ // eslint-disable-next-line @stylistic/js/max-len
105
105
  return callback(new Error(`Unable to find a folder or request: ${_.get(options, 'entrypoint.execute')}`));
106
106
  }
107
107
 
package/lib/runner/run.js CHANGED
@@ -208,7 +208,7 @@ Run.commands = _.transform({
208
208
  // extract the prototype from the command interface
209
209
  if (_.has(extension, 'prototype')) {
210
210
  _.forOwn(extension.prototype, function (value, prop) {
211
- if (Object.hasOwnProperty.call(Run.prototype, prop)) {
211
+ if (Object.hasOwn(Run.prototype, prop)) {
212
212
  throw new Error('run: duplicate command prototype extension ' + prop);
213
213
  }
214
214
  Run.prototype[prop] = value;
@@ -226,7 +226,7 @@ Run.commands = _.transform({
226
226
  if (_.has(extension, 'process')) {
227
227
  _.forOwn(extension.process, function (command, name) {
228
228
  if (!_.isFunction(command)) { return; }
229
- if (Object.hasOwnProperty.call(all, name)) {
229
+ if (Object.hasOwn(all, name)) {
230
230
  throw new Error('run: duplicate command processor ' + name);
231
231
  }
232
232
  // finally add the command function to the accumulator
@@ -119,14 +119,14 @@ module.exports = {
119
119
 
120
120
  // update or add values from src
121
121
  for (prop in src) {
122
- if (Object.hasOwnProperty.call(src, prop)) {
122
+ if (Object.hasOwn(src, prop)) {
123
123
  dest[prop] = src[prop];
124
124
  }
125
125
  }
126
126
 
127
127
  // remove values that no longer exist
128
128
  for (prop in dest) {
129
- if (Object.hasOwnProperty.call(dest, prop) && !Object.hasOwnProperty.call(src, prop)) {
129
+ if (Object.hasOwn(dest, prop) && !Object.hasOwn(src, prop)) {
130
130
  delete dest[prop];
131
131
  }
132
132
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postman-runtime",
3
- "version": "7.40.0-beta.1",
3
+ "version": "7.40.0",
4
4
  "description": "Underlying library of executing Postman Collections",
5
5
  "author": "Postman Inc.",
6
6
  "license": "Apache-2.0",
@@ -44,10 +44,10 @@
44
44
  "dependencies": {
45
45
  "@postman/tough-cookie": "4.1.3-postman.1",
46
46
  "async": "3.2.5",
47
- "aws4": "1.12.0",
47
+ "aws4": "1.13.0",
48
48
  "handlebars": "4.7.8",
49
49
  "httpntlm": "1.8.13",
50
- "jose": "4.14.4",
50
+ "jose": "5.4.1",
51
51
  "js-sha512": "0.9.0",
52
52
  "lodash": "4.17.21",
53
53
  "mime-types": "2.1.35",
@@ -55,8 +55,8 @@
55
55
  "node-oauth1": "1.3.0",
56
56
  "performance-now": "2.1.0",
57
57
  "postman-collection": "4.4.0",
58
- "postman-request": "2.88.1-postman.33",
59
- "postman-sandbox": "5.0.0-beta.1",
58
+ "postman-request": "2.88.1-postman.34",
59
+ "postman-sandbox": "5.0.0",
60
60
  "postman-url-encoder": "3.0.5",
61
61
  "serialised-error": "1.1.3",
62
62
  "strip-json-comments": "3.1.1",
@@ -64,16 +64,18 @@
64
64
  },
65
65
  "devDependencies": {
66
66
  "@postman/shipit": "^0.4.0",
67
- "ajv": "^8.12.0",
67
+ "@stylistic/eslint-plugin-js": "^1.8.0",
68
+ "ajv": "^8.16.0",
68
69
  "browserify": "^17.0.0",
69
70
  "chai": "^4.3.10",
70
71
  "chalk": "^4.1.2",
71
72
  "dependency-check": "^4.1.0",
72
- "editorconfig": "^1.0.2",
73
- "eslint": "^7.32.0",
74
- "eslint-plugin-jsdoc": "^36.1.1",
73
+ "editorconfig": "^2.0.0",
74
+ "eslint": "^8.57.0",
75
+ "eslint-plugin-jsdoc": "^47.0.2",
75
76
  "eslint-plugin-lodash": "^7.4.0",
76
- "eslint-plugin-mocha": "^10.4.1",
77
+ "eslint-plugin-mocha": "^10.4.3",
78
+ "eslint-plugin-n": "^16.6.2",
77
79
  "eslint-plugin-security": "^2.1.1",
78
80
  "express": "^4.17.2",
79
81
  "graphql": "^15.7.2",
@@ -85,20 +87,20 @@
85
87
  "karma-mocha-reporter": "^2.2.5",
86
88
  "mocha": "^9.1.3",
87
89
  "nyc": "^15.1.0",
88
- "parse-gitignore": "^1.0.1",
90
+ "parse-gitignore": "^2.0.0",
89
91
  "passport": "^0.7.0",
90
92
  "passport-http": "^0.3.0",
91
93
  "recursive-readdir": "^2.2.3",
92
94
  "server-destroy": "^1.0.1",
93
95
  "shelljs": "^0.8.5",
94
- "sinon": "^12.0.1",
96
+ "sinon": "^18.0.0",
95
97
  "teleport-javascript": "^1.0.0",
96
- "terser": "^5.30.2",
98
+ "terser": "^5.31.1",
97
99
  "tmp": "^0.2.3",
98
- "webpack": "^5.91.0",
100
+ "webpack": "^5.92.0",
99
101
  "yankee": "^1.0.8"
100
102
  },
101
103
  "engines": {
102
- "node": ">=12"
104
+ "node": ">=16"
103
105
  }
104
106
  }