Comparing version 3.2.3 to 3.2.4
{ | ||
"name": "pactum", | ||
"version": "3.2.3", | ||
"version": "3.2.4", | ||
"description": "REST API Testing Tool for all levels in a Test Pyramid", | ||
@@ -55,3 +55,3 @@ "main": "./src/index.js", | ||
"dependencies": { | ||
"@exodus/schemasafe": "^1.0.0-rc.7", | ||
"@exodus/schemasafe": "^1.0.0-rc.9", | ||
"deep-override": "^1.0.2", | ||
@@ -65,3 +65,3 @@ "form-data-lite": "^1.0.3", | ||
"parse-graphql": "^1.0.0", | ||
"phin": "^3.6.0", | ||
"phin": "^3.6.1", | ||
"polka": "^0.5.2" | ||
@@ -71,5 +71,5 @@ }, | ||
"chai": "^4.3.6", | ||
"mocha": "^10.0.0", | ||
"mocha": "^10.1.0", | ||
"nyc": "^15.1.0", | ||
"sinon": "^14.0.0" | ||
"sinon": "^14.0.1" | ||
}, | ||
@@ -76,0 +76,0 @@ "engines": { |
@@ -57,2 +57,3 @@ export type RequestMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS' | 'TRACE'; | ||
expects?: InteractionExpectations; | ||
stores?: object; | ||
} | ||
@@ -59,0 +60,0 @@ |
@@ -113,2 +113,6 @@ const override = require('deep-override'); | ||
} | ||
if (refType === 'E') { | ||
const value = process.env[refValue]; | ||
values.push(typeof value === 'undefined' ? raw : value); | ||
} | ||
} | ||
@@ -115,0 +119,0 @@ if (values.length === 1 && raw.length === dataRefMatches[0].length) { |
@@ -28,12 +28,17 @@ const helper = { | ||
getPlainQuery(query) { | ||
let plainQuery = ''; | ||
let plain_query = ''; | ||
if (typeof query === 'object') { | ||
for (const prop in query) { | ||
if (plainQuery !== '') { | ||
plainQuery = plainQuery + '&'; | ||
for (const key in query) { | ||
if (plain_query !== '') { | ||
plain_query = plain_query + '&'; | ||
} | ||
plainQuery = plainQuery + `${prop}=${query[prop]}`; | ||
const value = query[key]; | ||
if (typeof value === 'undefined') { | ||
plain_query = plain_query + `${key}`; | ||
} else { | ||
plain_query = plain_query + `${key}=${query[key]}`; | ||
} | ||
} | ||
} | ||
return plainQuery; | ||
return plain_query; | ||
}, | ||
@@ -40,0 +45,0 @@ |
@@ -123,3 +123,3 @@ import { RequestOptions, IncomingMessage } from 'http'; | ||
*/ | ||
withQueryParams(key: string, value: any): Spec; | ||
withQueryParams(key: string, value?: any): Spec; | ||
withQueryParams(params: object): Spec; | ||
@@ -126,0 +126,0 @@ |
@@ -151,5 +151,2 @@ const fd = require('../plugins/form.data') | ||
} | ||
if (value === undefined || value === null) { | ||
throw new PactumRequestError('`value` is required'); | ||
} | ||
this._request.queryParams[key] = value; | ||
@@ -156,0 +153,0 @@ } else { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
163332
4895
8
Updatedphin@^3.6.1