@pact-foundation/pact-node
Advanced tools
Comparing version 10.6.0 to 10.7.0
@@ -5,2 +5,16 @@ # Change Log | ||
# [10.7.0](https://github.com/pact-foundation/pact-node/compare/v10.6.0...v10.7.0) (2020-03-23) | ||
### Bug Fixes | ||
* **deps:** Update vulnerable dependencies ([3c20366](https://github.com/pact-foundation/pact-node/commit/3c203660e157deb0380535fec870de1500a2da0c)) | ||
### Features | ||
* **verifier:** Add verbose option to improve debugging during verification ([3f0a5a3](https://github.com/pact-foundation/pact-node/commit/3f0a5a344b0886423d7995605134430f61b52ae4)) | ||
# [10.6.0](https://github.com/pact-foundation/pact-node/compare/v10.5.0...v10.6.0) (2020-03-15) | ||
@@ -7,0 +21,0 @@ |
{ | ||
"name": "@pact-foundation/pact-node", | ||
"version": "10.6.0", | ||
"version": "10.7.0", | ||
"description": "A wrapper for the Ruby version of Pact to work within Node", | ||
@@ -103,5 +103,5 @@ "main": "src/index.js", | ||
"express": "4.16.2", | ||
"mocha": "5.0.1", | ||
"mocha": "^7.1.1", | ||
"mocha-unfunk-reporter": "0.4.0", | ||
"nodemon": "^1.18.10", | ||
"nodemon": "^2.0.2", | ||
"prettier": "^1.18.2", | ||
@@ -126,3 +126,3 @@ "sinon": "4.4.2", | ||
"lint": "eslint '**/*.ts'", | ||
"pretest": "npm run build && npm run download-checksums && npm run install:current", | ||
"pretest": "npm run prettier:check && npm run build && npm run download-checksums && npm run install:current", | ||
"test": "cross-env LOGLEVEL=debug PACT_DO_NOT_TRACK=true mocha -r ts-node/register -R mocha-unfunk-reporter -t 15000 -s 5000 -b --check-leaks --exit \"{src,test,bin,standalone}/**/*.spec.ts\"", | ||
@@ -129,0 +129,0 @@ "dev": "npm run lint --force && npm test && node .", |
@@ -283,2 +283,3 @@ <img src="https://raw.githubusercontent.com/pact-foundation/pact-logo/master/media/logo-black.png" width="200"> | ||
| `format` | false | string | What format the verification results are printed in. Options are `json`, `xml`, `progress` and `RspecJunitFormatter` (which is a synonym for `xml`) | | ||
| `verbose` | false | boolean | Enables verbose output for underlying pact binary. | | ||
@@ -309,2 +310,3 @@ ### Pact Broker Publishing | ||
| `tags` | false | array | An array of Strings to tag the Pacts being published. Optional | | ||
| `verbose` | false | boolean | Enables verbose output for underlying pact binary. | | ||
@@ -347,3 +349,3 @@ ### Pact Broker Deployment Check | ||
| `output` | false | json,table | Specify output to show, json or table. Optional, Defaults to json. | | ||
| `verbose` | false | flag | Set logging mode to verbose. Optional | | ||
| `verbose` | false | boolean | Enables verbose output for underlying pact binary. | | ||
| `retryWhileUnknown` | false | number | The number of times to retry while there is an unknown verification result. Optional| | ||
@@ -350,0 +352,0 @@ | `retryInterval` | false | number | The time between retries in seconds, use with retryWhileUnknown. Optional | |
@@ -54,3 +54,4 @@ "use strict"; | ||
} | ||
if (options.pactBrokerToken && (options.pactBrokerUsername || options.pactBrokerPassword)) { | ||
if (options.pactBrokerToken && | ||
(options.pactBrokerUsername || options.pactBrokerPassword)) { | ||
throw new Error('Must provide pactBrokerToken or pactBrokerUsername/pactBrokerPassword but not both.'); | ||
@@ -57,0 +58,0 @@ } |
@@ -91,3 +91,3 @@ "use strict"; | ||
context('when a bearer token is provided', function () { | ||
context("and specifies a username or password", function () { | ||
context('and specifies a username or password', function () { | ||
it('should fail with an error', function () { | ||
@@ -99,5 +99,5 @@ expect(function () { | ||
consumerVersion: '1.0.0', | ||
pactBrokerToken: "1234", | ||
pactBrokerUsername: "username", | ||
pactBrokerPassword: "5678", | ||
pactBrokerToken: '1234', | ||
pactBrokerUsername: 'username', | ||
pactBrokerPassword: '5678', | ||
}); | ||
@@ -112,3 +112,3 @@ }).to.throw(Error); | ||
consumerVersion: '1.0.0', | ||
pactBrokerToken: "1234" | ||
pactBrokerToken: '1234', | ||
}); | ||
@@ -115,0 +115,0 @@ expect(p).to.be.ok; |
@@ -94,3 +94,3 @@ "use strict"; | ||
server = server_1.default(); | ||
var waitForServerUp = (server)['__waitForServiceUp'].bind(server); | ||
var waitForServerUp = server['__waitForServiceUp'].bind(server); | ||
return q | ||
@@ -267,5 +267,3 @@ .allSettled([ | ||
server = server_1.default(); | ||
return server | ||
.start() | ||
.then(function () { return expect((server)['__running']).to.be.true; }); | ||
return server.start().then(function () { return expect(server['__running']).to.be.true; }); | ||
}); | ||
@@ -289,3 +287,3 @@ }); | ||
.then(function () { return server.stop(); }) | ||
.then(function () { return expect((server)['__running']).to.be.false; }); | ||
.then(function () { return expect(server['__running']).to.be.false; }); | ||
}); | ||
@@ -310,3 +308,3 @@ }); | ||
.then(function () { return server.delete(); }) | ||
.then(function () { return expect((server)['__running']).to.be.false; }); | ||
.then(function () { return expect(server['__running']).to.be.false; }); | ||
}); | ||
@@ -313,0 +311,0 @@ }); |
@@ -83,3 +83,3 @@ "use strict"; | ||
stub = stub_1.default(validDefaults); | ||
var waitForStubUp = (stub)['__waitForServiceUp'].bind(stub); | ||
var waitForStubUp = stub['__waitForServiceUp'].bind(stub); | ||
return q | ||
@@ -153,5 +153,3 @@ .allSettled([ | ||
stub = stub_1.default(validDefaults); | ||
return stub | ||
.start() | ||
.then(function () { return expect((stub)['__running']).to.be.true; }); | ||
return stub.start().then(function () { return expect(stub['__running']).to.be.true; }); | ||
}); | ||
@@ -175,3 +173,3 @@ }); | ||
.then(function () { return stub.stop(); }) | ||
.then(function () { return expect((stub)['__running']).to.be.false; }); | ||
.then(function () { return expect(stub['__running']).to.be.false; }); | ||
}); | ||
@@ -196,3 +194,3 @@ }); | ||
.then(function () { return stub.delete(); }) | ||
.then(function () { return expect((stub)['__running']).to.be.false; }); | ||
.then(function () { return expect(stub['__running']).to.be.false; }); | ||
}); | ||
@@ -199,0 +197,0 @@ }); |
@@ -27,2 +27,3 @@ import q = require('q'); | ||
tags?: string[]; | ||
verbose?: boolean; | ||
monkeypatch?: string; | ||
@@ -29,0 +30,0 @@ format?: 'json' | 'xml' | 'progress' | 'RspecJunitFormatter'; |
@@ -31,2 +31,3 @@ "use strict"; | ||
customProviderHeaders: '--custom-provider-header', | ||
verbose: '--verbose', | ||
monkeypatch: '--monkeypatch', | ||
@@ -87,3 +88,4 @@ format: '--format', | ||
} | ||
if (options.pactBrokerToken && (options.pactBrokerUsername || options.pactBrokerPassword)) { | ||
if (options.pactBrokerToken && | ||
(options.pactBrokerUsername || options.pactBrokerPassword)) { | ||
throw new Error('Must provide pactBrokerToken or pactBrokerUsername/pactBrokerPassword but not both.'); | ||
@@ -90,0 +92,0 @@ } |
@@ -289,5 +289,5 @@ "use strict"; | ||
pactUrls: ['http://idontexist'], | ||
pactBrokerToken: "1234", | ||
pactBrokerUsername: "username", | ||
pactBrokerPassword: "5678", | ||
pactBrokerToken: '1234', | ||
pactBrokerUsername: 'username', | ||
pactBrokerPassword: '5678', | ||
}); | ||
@@ -301,5 +301,5 @@ }).to.throw(Error); | ||
pactUrls: ['http://idontexist'], | ||
pactBrokerToken: "1234", | ||
pactBrokerToken: '1234', | ||
}); | ||
expect(v.options.pactBrokerToken).to.eq("1234"); | ||
expect(v.options.pactBrokerToken).to.eq('1234'); | ||
}); | ||
@@ -306,0 +306,0 @@ }); |
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
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
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
419851
162
469