@pact-foundation/pact-core
Advanced tools
Comparing version 11.0.1 to 11.1.0
@@ -5,4 +5,4 @@ #!/usr/bin/env node | ||
var pact_standalone_1 = require("../src/pact-standalone"); | ||
var spawnSync = require('child_process').spawnSync; | ||
var status = spawnSync(pact_standalone_1.default.brokerFullPath, process.argv.slice(2), { | ||
var childProcess = require("child_process"); | ||
var status = childProcess.spawnSync(pact_standalone_1.default.brokerFullPath, process.argv.slice(2), { | ||
stdio: 'inherit', | ||
@@ -9,0 +9,0 @@ }).status; |
@@ -5,4 +5,4 @@ #!/usr/bin/env node | ||
var pact_standalone_1 = require("../src/pact-standalone"); | ||
var spawnSync = require('child_process').spawnSync; | ||
var status = spawnSync(pact_standalone_1.default.messageFullPath, process.argv.slice(2), { | ||
var childProcess = require("child_process"); | ||
var status = childProcess.spawnSync(pact_standalone_1.default.messageFullPath, process.argv.slice(2), { | ||
stdio: 'inherit', | ||
@@ -9,0 +9,0 @@ }).status; |
@@ -5,5 +5,5 @@ #!/usr/bin/env node | ||
var pact_standalone_1 = require("../src/pact-standalone"); | ||
var spawnSync = require('child_process').spawnSync; | ||
var status = spawnSync(pact_standalone_1.default.mockServiceFullPath, process.argv.slice(2), { stdio: 'inherit' }).status; | ||
var childProcess = require("child_process"); | ||
var status = childProcess.spawnSync(pact_standalone_1.default.mockServiceFullPath, process.argv.slice(2), { stdio: 'inherit' }).status; | ||
process.exit(status); | ||
//# sourceMappingURL=pact-mock-service.js.map |
@@ -5,4 +5,4 @@ #!/usr/bin/env node | ||
var pact_standalone_1 = require("../src/pact-standalone"); | ||
var spawnSync = require('child_process').spawnSync; | ||
var status = spawnSync(pact_standalone_1.default.verifierFullPath, process.argv.slice(2), { | ||
var childProcess = require("child_process"); | ||
var status = childProcess.spawnSync(pact_standalone_1.default.verifierFullPath, process.argv.slice(2), { | ||
stdio: 'inherit', | ||
@@ -9,0 +9,0 @@ }).status; |
@@ -5,4 +5,4 @@ #!/usr/bin/env node | ||
var pact_standalone_1 = require("../src/pact-standalone"); | ||
var spawnSync = require('child_process').spawnSync; | ||
var status = spawnSync(pact_standalone_1.default.stubFullPath, process.argv.slice(2), { | ||
var childProcess = require("child_process"); | ||
var status = childProcess.spawnSync(pact_standalone_1.default.stubFullPath, process.argv.slice(2), { | ||
stdio: 'inherit', | ||
@@ -9,0 +9,0 @@ }).status; |
@@ -5,4 +5,4 @@ #!/usr/bin/env node | ||
var pact_standalone_1 = require("../src/pact-standalone"); | ||
var spawnSync = require('child_process').spawnSync; | ||
var status = spawnSync(pact_standalone_1.default.pactFullPath, process.argv.slice(2), { | ||
var childProcess = require("child_process"); | ||
var status = childProcess.spawnSync(pact_standalone_1.default.pactFullPath, process.argv.slice(2), { | ||
stdio: 'inherit', | ||
@@ -9,0 +9,0 @@ }).status; |
@@ -5,2 +5,16 @@ # Changelog | ||
## [11.1.0](https://github.com/pact-foundation/pact-js-core/compare/v11.0.1...v11.1.0) (2021-08-02) | ||
### Features | ||
* improve m1 support (via rosetta2) ([92bd98b](https://github.com/pact-foundation/pact-js-core/commit/92bd98b15e55c1ba603355fa9d0d57c3ce3fdd23)) | ||
### Fixes and Improvements | ||
* Replace request with needle ([b053e54](https://github.com/pact-foundation/pact-js-core/commit/b053e54e7ee313d0bd165f178e55108b1dd58052)) | ||
* update standalone to 1.88.58 ([b95b6ae](https://github.com/pact-foundation/pact-js-core/commit/b95b6aeb4198c2f32ebdc40adb9a6322a451fc42)) | ||
* update standalone to 1.88.61 ([019af87](https://github.com/pact-foundation/pact-js-core/commit/019af87cf72d1991313e82663d5530692fd2e42d)) | ||
### [11.0.1](https://github.com/pact-foundation/pact-js-core/compare/v11.0.0...v11.0.1) (2021-06-21) | ||
@@ -7,0 +21,0 @@ |
{ | ||
"name": "@pact-foundation/pact-core", | ||
"version": "11.0.1", | ||
"version": "11.1.0", | ||
"description": "Core of @pact-foundation/pact. You almost certainly don't want to depend on this directly.", | ||
@@ -23,3 +23,4 @@ "main": "src/index.js", | ||
"x64", | ||
"ia32" | ||
"ia32", | ||
"arm64" | ||
], | ||
@@ -61,6 +62,6 @@ "engine": { | ||
"mkdirp": "1.0.0", | ||
"needle": "^2.6.0", | ||
"pino": "^6.11.0", | ||
"pino-pretty": "^4.1.0", | ||
"promise-timeout": "^1.3.0", | ||
"request": "2.88.0", | ||
"rimraf": "2.6.2", | ||
@@ -87,2 +88,3 @@ "sumchecker": "^2.0.2", | ||
"@types/mocha": "2.2.48", | ||
"@types/needle": "^2.5.1", | ||
"@types/node": "9.4.6", | ||
@@ -112,3 +114,3 @@ "@types/promise-timeout": "^1.3.0", | ||
"nodemon": "^2.0.4", | ||
"prettier": "^1.18.2", | ||
"prettier": "^2.3.0", | ||
"sinon": "9.2.4", | ||
@@ -115,0 +117,0 @@ "snyk": "^1.605.0", |
@@ -5,2 +5,3 @@ /// <reference types="node" /> | ||
import { ChildProcess } from 'child_process'; | ||
import needle = require('needle'); | ||
interface AbstractServiceEventInterface { | ||
@@ -40,15 +41,8 @@ START_EVENT: string; | ||
export declare type LogLevel = 'debug' | 'info' | 'warn' | 'error'; | ||
export interface HTTPConfig { | ||
uri: string; | ||
method: string; | ||
export interface HTTPConfig extends Omit<needle.NeedleOptions, 'headers'> { | ||
headers: { | ||
'X-Pact-Mock-Service': boolean; | ||
'X-Pact-Mock-Service': string; | ||
'Content-Type': string; | ||
}; | ||
agentOptions?: { | ||
rejectUnauthorized?: boolean; | ||
requestCert?: boolean; | ||
agent?: boolean; | ||
}; | ||
} | ||
export {}; |
@@ -22,3 +22,2 @@ "use strict"; | ||
var events = require("events"); | ||
var http = require("request"); | ||
var logger_1 = require("./logger"); | ||
@@ -29,2 +28,3 @@ var spawn_1 = require("./spawn"); | ||
var checkTypes = require("check-types"); | ||
var needle = require("needle"); | ||
var setTimeout = global.setTimeout; | ||
@@ -235,6 +235,5 @@ var RETRY_AMOUNT = 60; | ||
var config = { | ||
uri: "http" + (options.ssl ? 's' : '') + "://" + options.host + ":" + options.port, | ||
method: 'GET', | ||
headers: { | ||
'X-Pact-Mock-Service': true, | ||
'X-Pact-Mock-Service': 'true', | ||
'Content-Type': 'application/json', | ||
@@ -245,8 +244,6 @@ }, | ||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; | ||
config.agentOptions = {}; | ||
config.agentOptions.rejectUnauthorized = false; | ||
config.agentOptions.requestCert = false; | ||
config.agentOptions.agent = false; | ||
config.rejectUnauthorized = false; | ||
config.agent = false; | ||
} | ||
http(config, function (err, res) { | ||
needle.get("http" + (options.ssl ? 's' : '') + "://" + options.host + ":" + options.port, config, function (err, res) { | ||
!err && res.statusCode === 200 | ||
@@ -253,0 +250,0 @@ ? resolve() |
@@ -1,2 +0,2 @@ | ||
export declare const PACT_STANDALONE_VERSION = "1.88.56"; | ||
export declare const PACT_STANDALONE_VERSION = "1.88.61"; | ||
export declare function createConfig(location?: string): Config; | ||
@@ -3,0 +3,0 @@ export declare function getBinaryEntry(platform?: string, arch?: string): BinaryEntry; |
@@ -15,3 +15,3 @@ "use strict"; | ||
exports.downloadChecksums = exports.getBinaryEntry = exports.createConfig = exports.PACT_STANDALONE_VERSION = void 0; | ||
var Request = require("request"); | ||
var needle = require("needle"); | ||
var unzipper = require("unzipper"); | ||
@@ -26,8 +26,9 @@ var tar = require("tar"); | ||
var sumchecker = require('sumchecker'); | ||
var request = Request.defaults({ | ||
proxy: process.env.npm_config_https_proxy || | ||
process.env.npm_config_proxy || | ||
undefined, | ||
}); | ||
exports.PACT_STANDALONE_VERSION = '1.88.56'; | ||
var environmentProxy = process.env.npm_config_https_proxy || process.env.npm_config_proxy; | ||
if (environmentProxy) { | ||
needle.defaults({ | ||
proxy: environmentProxy, | ||
}); | ||
} | ||
exports.PACT_STANDALONE_VERSION = '1.88.61'; | ||
var PACT_DEFAULT_LOCATION = "https://github.com/pact-foundation/pact-ruby-standalone/releases/download/v" + exports.PACT_STANDALONE_VERSION + "/"; | ||
@@ -149,11 +150,10 @@ var HTTP_REGEX = /^http(s?):\/\//; | ||
} | ||
request({ | ||
url: url, | ||
needle | ||
.get(url, { | ||
follow_max: 5, | ||
headers: { | ||
'User-Agent': 'https://github.com/pact-foundation/pact-js-core', | ||
}, | ||
strictSSL: config.read()['strict-ssl'], | ||
agentOptions: { | ||
ca: ca, | ||
}, | ||
rejectUnauthorized: config.read()['strict-ssl'] || false, | ||
ca: ca, | ||
}) | ||
@@ -191,5 +191,4 @@ .on('error', function (e) { return reject(e); }) | ||
var isCI = CIs.some(function (key) { return process.env[key] !== undefined; }); | ||
request | ||
.post({ | ||
url: 'https://www.google-analytics.com/collect', | ||
needle | ||
.post('https://www.google-analytics.com/collect', { | ||
form: { | ||
@@ -196,0 +195,0 @@ v: 1, |
@@ -123,3 +123,3 @@ "use strict"; | ||
server.get('/matrix', function (req, res) { | ||
if (req.query.q[0].pacticipant === 'Foo') { | ||
if (req.query && req.query.q && req.query.q[0].pacticipant === 'Foo') { | ||
return res.json({ | ||
@@ -126,0 +126,0 @@ summary: { |
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"target": "es5", | ||
"lib": ["es6", "dom"], | ||
"removeComments": true, | ||
"noLib": false, | ||
"sourceMap": true, | ||
"isolatedModules": false, | ||
"moduleResolution": "node", | ||
"suppressImplicitAnyIndexErrors": true, | ||
"declaration": true, | ||
"noImplicitReturns": true, | ||
"noImplicitAny": true, | ||
"noImplicitThis": true, | ||
"skipLibCheck": true, | ||
"strictNullChecks": true, | ||
"strict": true, | ||
"noUnusedLocals": true | ||
}, | ||
"include": ["**/*.ts"], | ||
"exclude": ["node_modules", "**/*.spec.ts", "**/__mocks__"], | ||
"compileOnSave": false | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"target": "es5", | ||
"lib": ["es6", "dom"], | ||
"removeComments": true, | ||
"noLib": false, | ||
"sourceMap": true, | ||
"isolatedModules": false, | ||
"moduleResolution": "node", | ||
"suppressImplicitAnyIndexErrors": true, | ||
"declaration": true, | ||
"noImplicitReturns": true, | ||
"noImplicitAny": true, | ||
"noImplicitThis": true, | ||
"skipLibCheck": true, | ||
"strictNullChecks": true, | ||
"strict": true, | ||
"noUnusedLocals": true | ||
}, | ||
"include": ["**/*.ts"], | ||
"exclude": ["node_modules", "**/*.spec.ts", "**/__mocks__"], | ||
"compileOnSave": false | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
277726
44
3602
+ Addedneedle@^2.6.0
+ Addeddebug@3.2.7(transitive)
+ Addediconv-lite@0.4.24(transitive)
+ Addedms@2.1.3(transitive)
+ Addedneedle@2.9.1(transitive)
+ Addedsax@1.4.1(transitive)
- Removedrequest@2.88.0
- Removedajv@6.12.6(transitive)
- Removedasn1@0.2.6(transitive)
- Removedassert-plus@1.0.0(transitive)
- Removedaws-sign2@0.7.0(transitive)
- Removedaws4@1.13.2(transitive)
- Removedbcrypt-pbkdf@1.0.2(transitive)
- Removedcaseless@0.12.0(transitive)
- Removedcore-util-is@1.0.2(transitive)
- Removeddashdash@1.14.1(transitive)
- Removedecc-jsbn@0.1.2(transitive)
- Removedextend@3.0.2(transitive)
- Removedextsprintf@1.3.0(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedforever-agent@0.6.1(transitive)
- Removedform-data@2.3.3(transitive)
- Removedgetpass@0.1.7(transitive)
- Removedhar-schema@2.0.0(transitive)
- Removedhar-validator@5.1.5(transitive)
- Removedhttp-signature@1.2.0(transitive)
- Removedis-typedarray@1.0.0(transitive)
- Removedisstream@0.1.2(transitive)
- Removedjsbn@0.1.1(transitive)
- Removedjson-schema@0.4.0(transitive)
- Removedjson-schema-traverse@0.4.1(transitive)
- Removedjson-stringify-safe@5.0.1(transitive)
- Removedjsprim@1.4.2(transitive)
- Removedoauth-sign@0.9.0(transitive)
- Removedperformance-now@2.1.0(transitive)
- Removedpsl@1.15.0(transitive)
- Removedpunycode@1.4.12.3.1(transitive)
- Removedqs@6.5.3(transitive)
- Removedrequest@2.88.0(transitive)
- Removedsshpk@1.18.0(transitive)
- Removedtough-cookie@2.4.3(transitive)
- Removedtunnel-agent@0.6.0(transitive)
- Removedtweetnacl@0.14.5(transitive)
- Removeduri-js@4.4.1(transitive)
- Removeduuid@3.4.0(transitive)
- Removedverror@1.10.0(transitive)