@pact-foundation/pact 16.3.1 → 16.4.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.
- package/CHANGELOG.md +7 -0
- package/CONTRIBUTING.md +2 -2
- package/package.json +16 -24
- package/src/common/graphQL/configurationError.js +2 -22
- package/src/common/graphQL/configurationError.js.map +1 -1
- package/src/common/graphQL/graphQL.d.ts +2 -2
- package/src/common/graphQL/graphQL.js +11 -14
- package/src/common/graphQL/graphQL.js.map +1 -1
- package/src/common/graphQL/graphQLQueryError.js +2 -22
- package/src/common/graphQL/graphQLQueryError.js.map +1 -1
- package/src/common/logger.js +9 -9
- package/src/common/logger.js.map +1 -1
- package/src/common/matchingRules.d.ts +1 -1
- package/src/common/matchingRules.js +21 -21
- package/src/common/matchingRules.js.map +1 -1
- package/src/common/net.js +36 -42
- package/src/common/net.js.map +1 -1
- package/src/common/net.spec.js +41 -53
- package/src/common/net.spec.js.map +1 -1
- package/src/common/request.js +33 -82
- package/src/common/request.js.map +1 -1
- package/src/common/request.spec.js +26 -26
- package/src/common/request.spec.js.map +1 -1
- package/src/common/spec.js +3 -4
- package/src/common/spec.js.map +1 -1
- package/src/dsl/apolloGraphql.js +7 -25
- package/src/dsl/apolloGraphql.js.map +1 -1
- package/src/dsl/apolloGraphql.spec.js +21 -18
- package/src/dsl/apolloGraphql.spec.js.map +1 -1
- package/src/dsl/graphql.d.ts +2 -2
- package/src/dsl/graphql.js +29 -48
- package/src/dsl/graphql.js.map +1 -1
- package/src/dsl/graphql.spec.js +81 -66
- package/src/dsl/graphql.spec.js.map +1 -1
- package/src/dsl/interaction.d.ts +2 -2
- package/src/dsl/interaction.js +41 -48
- package/src/dsl/interaction.js.map +1 -1
- package/src/dsl/interaction.spec.js +77 -70
- package/src/dsl/interaction.spec.js.map +1 -1
- package/src/dsl/matchers.d.ts +1 -1
- package/src/dsl/matchers.js +19 -31
- package/src/dsl/matchers.js.map +1 -1
- package/src/dsl/matchers.spec.js +199 -208
- package/src/dsl/matchers.spec.js.map +1 -1
- package/src/dsl/message.d.ts +3 -3
- package/src/dsl/options.d.ts +3 -3
- package/src/dsl/verifier/proxy/hooks.d.ts +2 -2
- package/src/dsl/verifier/proxy/hooks.js +42 -112
- package/src/dsl/verifier/proxy/hooks.js.map +1 -1
- package/src/dsl/verifier/proxy/hooks.spec.js +84 -199
- package/src/dsl/verifier/proxy/hooks.spec.js.map +1 -1
- package/src/dsl/verifier/proxy/messages.d.ts +2 -2
- package/src/dsl/verifier/proxy/messages.js +88 -106
- package/src/dsl/verifier/proxy/messages.js.map +1 -1
- package/src/dsl/verifier/proxy/parseBody.d.ts +1 -1
- package/src/dsl/verifier/proxy/parseBody.js +2 -2
- package/src/dsl/verifier/proxy/parseBody.js.map +1 -1
- package/src/dsl/verifier/proxy/parseBody.spec.js +31 -76
- package/src/dsl/verifier/proxy/parseBody.spec.js.map +1 -1
- package/src/dsl/verifier/proxy/proxy.d.ts +2 -2
- package/src/dsl/verifier/proxy/proxy.js +22 -26
- package/src/dsl/verifier/proxy/proxy.js.map +1 -1
- package/src/dsl/verifier/proxy/proxy.spec.js +14 -14
- package/src/dsl/verifier/proxy/proxy.spec.js.map +1 -1
- package/src/dsl/verifier/proxy/proxyRequest.d.ts +3 -3
- package/src/dsl/verifier/proxy/proxyRequest.js +7 -7
- package/src/dsl/verifier/proxy/proxyRequest.js.map +1 -1
- package/src/dsl/verifier/proxy/proxyRequest.spec.js +49 -64
- package/src/dsl/verifier/proxy/proxyRequest.spec.js.map +1 -1
- package/src/dsl/verifier/proxy/stateHandler/setupStates.d.ts +3 -3
- package/src/dsl/verifier/proxy/stateHandler/setupStates.js +14 -18
- package/src/dsl/verifier/proxy/stateHandler/setupStates.js.map +1 -1
- package/src/dsl/verifier/proxy/stateHandler/setupStates.spec.js +76 -159
- package/src/dsl/verifier/proxy/stateHandler/setupStates.spec.js.map +1 -1
- package/src/dsl/verifier/proxy/stateHandler/stateHandler.d.ts +2 -2
- package/src/dsl/verifier/proxy/stateHandler/stateHandler.js +23 -72
- package/src/dsl/verifier/proxy/stateHandler/stateHandler.js.map +1 -1
- package/src/dsl/verifier/proxy/stateHandler/stateHandler.spec.js +37 -85
- package/src/dsl/verifier/proxy/stateHandler/stateHandler.spec.js.map +1 -1
- package/src/dsl/verifier/proxy/tracer.d.ts +1 -1
- package/src/dsl/verifier/proxy/tracer.js +42 -35
- package/src/dsl/verifier/proxy/tracer.js.map +1 -1
- package/src/dsl/verifier/proxy/types.d.ts +5 -5
- package/src/dsl/verifier/types.d.ts +3 -3
- package/src/dsl/verifier/verifier.d.ts +1 -1
- package/src/dsl/verifier/verifier.js +49 -56
- package/src/dsl/verifier/verifier.js.map +1 -1
- package/src/dsl/verifier/verifier.spec.js +76 -93
- package/src/dsl/verifier/verifier.spec.js.map +1 -1
- package/src/errors/configurationError.js +2 -22
- package/src/errors/configurationError.js.map +1 -1
- package/src/errors/graphQLQueryError.js +2 -22
- package/src/errors/graphQLQueryError.js.map +1 -1
- package/src/errors/matcherError.js +2 -22
- package/src/errors/matcherError.js.map +1 -1
- package/src/errors/verificationError.js +2 -22
- package/src/errors/verificationError.js.map +1 -1
- package/src/httpPact/ffi.d.ts +2 -2
- package/src/httpPact/ffi.js +28 -29
- package/src/httpPact/ffi.js.map +1 -1
- package/src/httpPact/ffi.spec.js +30 -31
- package/src/httpPact/ffi.spec.js.map +1 -1
- package/src/httpPact/index.d.ts +3 -3
- package/src/httpPact/index.js +92 -149
- package/src/httpPact/index.js.map +1 -1
- package/src/httpPact/index.spec.js +75 -125
- package/src/httpPact/index.spec.js.map +1 -1
- package/src/httpPact/tracing.js +20 -28
- package/src/httpPact/tracing.js.map +1 -1
- package/src/index.js +1 -1
- package/src/index.js.map +1 -1
- package/src/messageConsumerPact.d.ts +3 -3
- package/src/messageConsumerPact.js +50 -51
- package/src/messageConsumerPact.js.map +1 -1
- package/src/messageConsumerPact.spec.js +50 -49
- package/src/messageConsumerPact.spec.js.map +1 -1
- package/src/messageProviderPact.d.ts +3 -3
- package/src/messageProviderPact.js +68 -85
- package/src/messageProviderPact.js.map +1 -1
- package/src/messageProviderPact.spec.js +75 -66
- package/src/messageProviderPact.spec.js.map +1 -1
- package/src/pact.integration.spec.js +243 -313
- package/src/pact.integration.spec.js.map +1 -1
- package/src/v3/display.d.ts +1 -1
- package/src/v3/display.js +44 -58
- package/src/v3/display.js.map +1 -1
- package/src/v3/ffi.js +15 -15
- package/src/v3/ffi.js.map +1 -1
- package/src/v3/ffi.spec.js +8 -8
- package/src/v3/ffi.spec.js.map +1 -1
- package/src/v3/graphql/graphQL.d.ts +4 -4
- package/src/v3/graphql/graphQL.js +50 -75
- package/src/v3/graphql/graphQL.js.map +1 -1
- package/src/v3/matchers.d.ts +2 -2
- package/src/v3/matchers.js +112 -147
- package/src/v3/matchers.js.map +1 -1
- package/src/v3/matchers.spec.js +168 -187
- package/src/v3/matchers.spec.js.map +1 -1
- package/src/v3/pact.d.ts +2 -2
- package/src/v3/pact.js +103 -151
- package/src/v3/pact.js.map +1 -1
- package/src/v3/types.d.ts +1 -1
- package/src/v3/xml/xmlBuilder.d.ts +1 -3
- package/src/v3/xml/xmlBuilder.js +7 -9
- package/src/v3/xml/xmlBuilder.js.map +1 -1
- package/src/v3/xml/xmlElement.d.ts +2 -2
- package/src/v3/xml/xmlElement.js +24 -41
- package/src/v3/xml/xmlElement.js.map +1 -1
- package/src/v3/xml/xmlElement.spec.js +23 -25
- package/src/v3/xml/xmlElement.spec.js.map +1 -1
- package/src/v3/xml/xmlNode.js +2 -5
- package/src/v3/xml/xmlNode.js.map +1 -1
- package/src/v3/xml/xmlText.d.ts +1 -1
- package/src/v3/xml/xmlText.js +9 -25
- package/src/v3/xml/xmlText.js.map +1 -1
- package/src/v4/graphql/graphQLInteractionWithRequest.d.ts +4 -4
- package/src/v4/graphql/graphQLInteractionWithRequest.js +21 -17
- package/src/v4/graphql/graphQLInteractionWithRequest.js.map +1 -1
- package/src/v4/graphql/graphQLRequestBuilder.d.ts +3 -3
- package/src/v4/graphql/graphQLRequestBuilder.js +18 -20
- package/src/v4/graphql/graphQLRequestBuilder.js.map +1 -1
- package/src/v4/graphql/index.d.ts +6 -6
- package/src/v4/graphql/index.js +21 -17
- package/src/v4/graphql/index.js.map +1 -1
- package/src/v4/graphql/types.d.ts +5 -5
- package/src/v4/http/index.d.ts +2 -2
- package/src/v4/http/index.js +48 -93
- package/src/v4/http/index.js.map +1 -1
- package/src/v4/http/interactionWithCompleteRequest.d.ts +4 -7
- package/src/v4/http/interactionWithCompleteRequest.js +6 -10
- package/src/v4/http/interactionWithCompleteRequest.js.map +1 -1
- package/src/v4/http/interactionWithPlugin.d.ts +3 -3
- package/src/v4/http/interactionWithPlugin.js +14 -11
- package/src/v4/http/interactionWithPlugin.js.map +1 -1
- package/src/v4/http/interactionWithPluginRequest.d.ts +2 -2
- package/src/v4/http/interactionWithPluginRequest.js +11 -8
- package/src/v4/http/interactionWithPluginRequest.js.map +1 -1
- package/src/v4/http/interactionWithPluginResponse.d.ts +2 -2
- package/src/v4/http/interactionWithPluginResponse.js +10 -48
- package/src/v4/http/interactionWithPluginResponse.js.map +1 -1
- package/src/v4/http/interactionWithRequest.d.ts +2 -2
- package/src/v4/http/interactionWithRequest.js +11 -8
- package/src/v4/http/interactionWithRequest.js.map +1 -1
- package/src/v4/http/interactionWithResponse.d.ts +2 -2
- package/src/v4/http/interactionWithResponse.js +10 -48
- package/src/v4/http/interactionWithResponse.js.map +1 -1
- package/src/v4/http/requestBuilder.d.ts +3 -3
- package/src/v4/http/requestBuilder.js +32 -34
- package/src/v4/http/requestBuilder.js.map +1 -1
- package/src/v4/http/requestWithPluginBuilder.d.ts +2 -2
- package/src/v4/http/requestWithPluginBuilder.js +26 -46
- package/src/v4/http/requestWithPluginBuilder.js.map +1 -1
- package/src/v4/http/responseBuilder.d.ts +3 -3
- package/src/v4/http/responseBuilder.js +24 -25
- package/src/v4/http/responseBuilder.js.map +1 -1
- package/src/v4/http/responseWithPluginBuilder.d.ts +1 -1
- package/src/v4/http/responseWithPluginBuilder.js +5 -25
- package/src/v4/http/responseWithPluginBuilder.js.map +1 -1
- package/src/v4/http/types.d.ts +3 -2
- package/src/v4/http/unconfiguredInteraction.d.ts +6 -5
- package/src/v4/http/unconfiguredInteraction.js +31 -26
- package/src/v4/http/unconfiguredInteraction.js.map +1 -1
- package/src/v4/index.d.ts +4 -4
- package/src/v4/index.js +31 -35
- package/src/v4/index.js.map +1 -1
- package/src/v4/message/asynchronousMessage.d.ts +7 -6
- package/src/v4/message/asynchronousMessage.js +157 -190
- package/src/v4/message/asynchronousMessage.js.map +1 -1
- package/src/v4/message/index.d.ts +7 -6
- package/src/v4/message/index.js +188 -217
- package/src/v4/message/index.js.map +1 -1
- package/src/v4/message/types.d.ts +5 -3
- package/src/v4/types.d.ts +3 -3
package/src/v3/matchers.js
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
3
|
if (k2 === undefined) k2 = k;
|
|
15
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -24,15 +13,6 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
24
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
25
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
26
15
|
};
|
|
27
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
28
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
29
|
-
if (ar || !(i in from)) {
|
|
30
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
31
|
-
ar[i] = from[i];
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
35
|
-
};
|
|
36
16
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
18
|
};
|
|
@@ -55,8 +35,8 @@ exports.fromProviderState = fromProviderState;
|
|
|
55
35
|
exports.uuid = uuid;
|
|
56
36
|
exports.reify = reify;
|
|
57
37
|
exports.extractPayload = reify;
|
|
58
|
-
|
|
59
|
-
|
|
38
|
+
const ramda_1 = require("ramda");
|
|
39
|
+
const randexp_1 = __importDefault(require("randexp"));
|
|
60
40
|
__exportStar(require("./types"), exports);
|
|
61
41
|
function isMatcher(x) {
|
|
62
42
|
return (x != null &&
|
|
@@ -67,10 +47,10 @@ function isMatcher(x) {
|
|
|
67
47
|
* Value must match the given template
|
|
68
48
|
* @param template Template to base the comparison on
|
|
69
49
|
*/
|
|
70
|
-
|
|
50
|
+
const like = (template) => ({
|
|
71
51
|
'pact:matcher:type': 'type',
|
|
72
52
|
value: template,
|
|
73
|
-
});
|
|
53
|
+
});
|
|
74
54
|
exports.like = like;
|
|
75
55
|
/**
|
|
76
56
|
* Object where the key itself is ignored, but the value template must match.
|
|
@@ -79,15 +59,12 @@ exports.like = like;
|
|
|
79
59
|
* @param keyTemplate Example key to use
|
|
80
60
|
* @param template Example value template to base the comparison on
|
|
81
61
|
*/
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
_a),
|
|
89
|
-
});
|
|
90
|
-
};
|
|
62
|
+
const eachKeyLike = (keyTemplate, template) => ({
|
|
63
|
+
'pact:matcher:type': 'values',
|
|
64
|
+
value: {
|
|
65
|
+
[keyTemplate]: template,
|
|
66
|
+
},
|
|
67
|
+
});
|
|
91
68
|
exports.eachKeyLike = eachKeyLike;
|
|
92
69
|
/**
|
|
93
70
|
* Object where the _keys_ must match the supplied matchers.
|
|
@@ -97,14 +74,11 @@ exports.eachKeyLike = eachKeyLike;
|
|
|
97
74
|
* @param example Example object with key/values e.g. `{ foo: 'bar', baz: 'qux'}`
|
|
98
75
|
* @param matchers Matchers to apply to each key
|
|
99
76
|
*/
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
value: example,
|
|
106
|
-
});
|
|
107
|
-
};
|
|
77
|
+
const eachKeyMatches = (example, matchers = (0, exports.like)('key')) => ({
|
|
78
|
+
'pact:matcher:type': 'eachKey',
|
|
79
|
+
rules: Array.isArray(matchers) ? matchers : [matchers],
|
|
80
|
+
value: example,
|
|
81
|
+
});
|
|
108
82
|
exports.eachKeyMatches = eachKeyMatches;
|
|
109
83
|
/**
|
|
110
84
|
* Object where the _values_ must match the supplied matchers.
|
|
@@ -114,7 +88,7 @@ exports.eachKeyMatches = eachKeyMatches;
|
|
|
114
88
|
* @param example Example object with key/values e.g. `{ foo: 'bar', baz: 'qux'}`
|
|
115
89
|
* @param matchers Matchers to apply to each value
|
|
116
90
|
*/
|
|
117
|
-
|
|
91
|
+
const eachValueMatches = (example, matchers) => ({
|
|
118
92
|
'pact:matcher:type': 'eachValue',
|
|
119
93
|
rules: Array.isArray(matchers) ? matchers : [matchers],
|
|
120
94
|
value: example,
|
|
@@ -122,20 +96,19 @@ var eachValueMatches = function (example, matchers) { return ({
|
|
|
122
96
|
// value: {
|
|
123
97
|
// [keyTemplate]: template,
|
|
124
98
|
// },
|
|
125
|
-
});
|
|
99
|
+
});
|
|
126
100
|
exports.eachValueMatches = eachValueMatches;
|
|
127
101
|
/**
|
|
128
102
|
* Array where each element must match the given template
|
|
129
103
|
* @param template Template to base the comparison on
|
|
130
104
|
* @param min Minimum number of elements required in the array
|
|
131
105
|
*/
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
var elements = min;
|
|
106
|
+
const eachLike = (template, min = 1) => {
|
|
107
|
+
const elements = min;
|
|
135
108
|
return {
|
|
136
|
-
min
|
|
109
|
+
min,
|
|
137
110
|
'pact:matcher:type': 'type',
|
|
138
|
-
value: (0, ramda_1.times)(
|
|
111
|
+
value: (0, ramda_1.times)(() => template, elements),
|
|
139
112
|
};
|
|
140
113
|
};
|
|
141
114
|
exports.eachLike = eachLike;
|
|
@@ -144,14 +117,11 @@ exports.eachLike = eachLike;
|
|
|
144
117
|
* @param template Template to base the comparison on
|
|
145
118
|
* @param count Number of examples to generate, defaults to one
|
|
146
119
|
*/
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
value: (0, ramda_1.times)(function () { return template; }, count),
|
|
153
|
-
});
|
|
154
|
-
};
|
|
120
|
+
const atLeastOneLike = (template, count = 1) => ({
|
|
121
|
+
min: 1,
|
|
122
|
+
'pact:matcher:type': 'type',
|
|
123
|
+
value: (0, ramda_1.times)(() => template, count),
|
|
124
|
+
});
|
|
155
125
|
exports.atLeastOneLike = atLeastOneLike;
|
|
156
126
|
/**
|
|
157
127
|
* An array that has to have at least the required number of elements and each element must match the given template
|
|
@@ -159,16 +129,16 @@ exports.atLeastOneLike = atLeastOneLike;
|
|
|
159
129
|
* @param min Minimum number of elements required in the array
|
|
160
130
|
* @param count Number of examples to generate, defaults to min
|
|
161
131
|
*/
|
|
162
|
-
|
|
163
|
-
|
|
132
|
+
const atLeastLike = (template, min, count) => {
|
|
133
|
+
const elements = count || min;
|
|
164
134
|
if (count && count < min) {
|
|
165
|
-
throw new Error(
|
|
166
|
-
|
|
135
|
+
throw new Error(`atLeastLike has a minimum of ${min} but ${count} elements were requested.` +
|
|
136
|
+
` Make sure the count is greater than or equal to the min.`);
|
|
167
137
|
}
|
|
168
138
|
return {
|
|
169
|
-
min
|
|
139
|
+
min,
|
|
170
140
|
'pact:matcher:type': 'type',
|
|
171
|
-
value: (0, ramda_1.times)(
|
|
141
|
+
value: (0, ramda_1.times)(() => template, elements),
|
|
172
142
|
};
|
|
173
143
|
};
|
|
174
144
|
exports.atLeastLike = atLeastLike;
|
|
@@ -178,16 +148,16 @@ exports.atLeastLike = atLeastLike;
|
|
|
178
148
|
* @param max Maximum number of elements required in the array
|
|
179
149
|
* @param count Number of examples to generate, defaults to one
|
|
180
150
|
*/
|
|
181
|
-
|
|
182
|
-
|
|
151
|
+
const atMostLike = (template, max, count) => {
|
|
152
|
+
const elements = count || 1;
|
|
183
153
|
if (count && count > max) {
|
|
184
|
-
throw new Error(
|
|
185
|
-
|
|
154
|
+
throw new Error(`atMostLike has a maximum of ${max} but ${count} elements where requested.` +
|
|
155
|
+
` Make sure the count is less than or equal to the max.`);
|
|
186
156
|
}
|
|
187
157
|
return {
|
|
188
|
-
max
|
|
158
|
+
max,
|
|
189
159
|
'pact:matcher:type': 'type',
|
|
190
|
-
value: (0, ramda_1.times)(
|
|
160
|
+
value: (0, ramda_1.times)(() => template, elements),
|
|
191
161
|
};
|
|
192
162
|
};
|
|
193
163
|
exports.atMostLike = atMostLike;
|
|
@@ -198,23 +168,23 @@ exports.atMostLike = atMostLike;
|
|
|
198
168
|
* @param max Maximum number of elements required in the array
|
|
199
169
|
* @param count Number of examples to generate, defaults to one
|
|
200
170
|
*/
|
|
201
|
-
|
|
202
|
-
|
|
171
|
+
const constrainedArrayLike = (template, min, max, count) => {
|
|
172
|
+
const elements = count || min;
|
|
203
173
|
if (count) {
|
|
204
174
|
if (count < min) {
|
|
205
|
-
throw new Error(
|
|
206
|
-
|
|
175
|
+
throw new Error(`constrainedArrayLike has a minimum of ${min} but ${count} elements where requested.` +
|
|
176
|
+
` Make sure the count is greater than or equal to the min.`);
|
|
207
177
|
}
|
|
208
178
|
else if (count > max) {
|
|
209
|
-
throw new Error(
|
|
210
|
-
|
|
179
|
+
throw new Error(`constrainedArrayLike has a maximum of ${max} but ${count} elements where requested.` +
|
|
180
|
+
` Make sure the count is less than or equal to the max.`);
|
|
211
181
|
}
|
|
212
182
|
}
|
|
213
183
|
return {
|
|
214
|
-
min
|
|
215
|
-
max
|
|
184
|
+
min,
|
|
185
|
+
max,
|
|
216
186
|
'pact:matcher:type': 'type',
|
|
217
|
-
value: (0, ramda_1.times)(
|
|
187
|
+
value: (0, ramda_1.times)(() => template, elements),
|
|
218
188
|
};
|
|
219
189
|
};
|
|
220
190
|
exports.constrainedArrayLike = constrainedArrayLike;
|
|
@@ -222,19 +192,16 @@ exports.constrainedArrayLike = constrainedArrayLike;
|
|
|
222
192
|
* Value must be a boolean
|
|
223
193
|
* @param b Boolean example value. Defaults to true if unsupplied
|
|
224
194
|
*/
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
value: b,
|
|
230
|
-
});
|
|
231
|
-
};
|
|
195
|
+
const boolean = (b = true) => ({
|
|
196
|
+
'pact:matcher:type': 'type',
|
|
197
|
+
value: b,
|
|
198
|
+
});
|
|
232
199
|
exports.boolean = boolean;
|
|
233
200
|
/**
|
|
234
201
|
* Value must be an integer (must be a number and have no decimal places)
|
|
235
202
|
* @param int Example value. If omitted a random value will be generated.
|
|
236
203
|
*/
|
|
237
|
-
|
|
204
|
+
const integer = (int) => {
|
|
238
205
|
if (Number.isInteger(int)) {
|
|
239
206
|
return {
|
|
240
207
|
'pact:matcher:type': 'integer',
|
|
@@ -242,7 +209,7 @@ var integer = function (int) {
|
|
|
242
209
|
};
|
|
243
210
|
}
|
|
244
211
|
if (int) {
|
|
245
|
-
throw new Error(
|
|
212
|
+
throw new Error(`The integer matcher was passed '${int}' which is not an integer.`);
|
|
246
213
|
}
|
|
247
214
|
return {
|
|
248
215
|
'pact:generator:type': 'RandomInt',
|
|
@@ -255,7 +222,7 @@ exports.integer = integer;
|
|
|
255
222
|
* Value must be a decimal number (must be a number and have decimal places)
|
|
256
223
|
* @param num Example value. If omitted a random value will be generated.
|
|
257
224
|
*/
|
|
258
|
-
|
|
225
|
+
const decimal = (num) => {
|
|
259
226
|
if (Number.isFinite(num)) {
|
|
260
227
|
return {
|
|
261
228
|
'pact:matcher:type': 'decimal',
|
|
@@ -263,7 +230,7 @@ var decimal = function (num) {
|
|
|
263
230
|
};
|
|
264
231
|
}
|
|
265
232
|
if (num) {
|
|
266
|
-
throw new Error(
|
|
233
|
+
throw new Error(`The decimal matcher was passed '${num}' which is not a number.`);
|
|
267
234
|
}
|
|
268
235
|
return {
|
|
269
236
|
'pact:generator:type': 'RandomDecimal',
|
|
@@ -284,7 +251,7 @@ function number(num) {
|
|
|
284
251
|
};
|
|
285
252
|
}
|
|
286
253
|
if (num) {
|
|
287
|
-
throw new Error(
|
|
254
|
+
throw new Error(`The number matcher was passed '${num}' which is not a number.`);
|
|
288
255
|
}
|
|
289
256
|
return {
|
|
290
257
|
'pact:generator:type': 'RandomInt',
|
|
@@ -296,8 +263,7 @@ function number(num) {
|
|
|
296
263
|
* Value must be a string
|
|
297
264
|
* @param str Example value
|
|
298
265
|
*/
|
|
299
|
-
function string(str) {
|
|
300
|
-
if (str === void 0) { str = 'some string'; }
|
|
266
|
+
function string(str = 'some string') {
|
|
301
267
|
return {
|
|
302
268
|
'pact:matcher:type': 'type',
|
|
303
269
|
value: str,
|
|
@@ -327,19 +293,19 @@ function regex(pattern, str) {
|
|
|
327
293
|
* Used for matching binary content or specific content types in multipart requests.
|
|
328
294
|
* @param contentTypeValue The content type to match (e.g., 'image/jpeg', 'text/plain')
|
|
329
295
|
*/
|
|
330
|
-
|
|
296
|
+
const contentType = (contentTypeValue) => ({
|
|
331
297
|
'pact:matcher:type': 'contentType',
|
|
332
298
|
value: contentTypeValue,
|
|
333
|
-
});
|
|
299
|
+
});
|
|
334
300
|
exports.contentType = contentType;
|
|
335
301
|
/**
|
|
336
302
|
* Value that must be equal to the example. This is mainly used to reset the matching rules which cascade.
|
|
337
303
|
* @param value Example value
|
|
338
304
|
*/
|
|
339
|
-
|
|
305
|
+
const equal = (value) => ({
|
|
340
306
|
'pact:matcher:type': 'equality',
|
|
341
|
-
value
|
|
342
|
-
});
|
|
307
|
+
value,
|
|
308
|
+
});
|
|
343
309
|
exports.equal = equal;
|
|
344
310
|
/**
|
|
345
311
|
* String value that must match the provided datetime format string.
|
|
@@ -348,12 +314,12 @@ exports.equal = equal;
|
|
|
348
314
|
*/
|
|
349
315
|
function datetime(format, example) {
|
|
350
316
|
if (!example) {
|
|
351
|
-
throw new Error(
|
|
317
|
+
throw new Error(`you must provide an example datetime`);
|
|
352
318
|
}
|
|
353
|
-
return (0, ramda_1.pickBy)(
|
|
319
|
+
return (0, ramda_1.pickBy)((v) => !(0, ramda_1.isNil)(v), {
|
|
354
320
|
'pact:generator:type': example ? undefined : 'DateTime',
|
|
355
321
|
'pact:matcher:type': 'timestamp',
|
|
356
|
-
format
|
|
322
|
+
format,
|
|
357
323
|
value: example,
|
|
358
324
|
});
|
|
359
325
|
}
|
|
@@ -364,7 +330,7 @@ function datetime(format, example) {
|
|
|
364
330
|
*/
|
|
365
331
|
function timestamp(format, example) {
|
|
366
332
|
if (!example) {
|
|
367
|
-
throw new Error(
|
|
333
|
+
throw new Error(`you must provide an example timestamp`);
|
|
368
334
|
}
|
|
369
335
|
return datetime(format, example);
|
|
370
336
|
}
|
|
@@ -375,12 +341,12 @@ function timestamp(format, example) {
|
|
|
375
341
|
*/
|
|
376
342
|
function time(format, example) {
|
|
377
343
|
if (!example) {
|
|
378
|
-
throw new Error(
|
|
344
|
+
throw new Error(`you must provide an example time`);
|
|
379
345
|
}
|
|
380
|
-
return (0, ramda_1.pickBy)(
|
|
346
|
+
return (0, ramda_1.pickBy)((v) => !(0, ramda_1.isNil)(v), {
|
|
381
347
|
'pact:generator:type': example ? undefined : 'Time',
|
|
382
348
|
'pact:matcher:type': 'time',
|
|
383
|
-
format
|
|
349
|
+
format,
|
|
384
350
|
value: example,
|
|
385
351
|
});
|
|
386
352
|
}
|
|
@@ -391,10 +357,10 @@ function time(format, example) {
|
|
|
391
357
|
*/
|
|
392
358
|
function date(format, example) {
|
|
393
359
|
if (!example) {
|
|
394
|
-
throw new Error(
|
|
360
|
+
throw new Error(`you must provide an example date`);
|
|
395
361
|
}
|
|
396
|
-
return (0, ramda_1.pickBy)(
|
|
397
|
-
format
|
|
362
|
+
return (0, ramda_1.pickBy)((v) => !(0, ramda_1.isNil)(v), {
|
|
363
|
+
format,
|
|
398
364
|
'pact:generator:type': example ? undefined : 'Date',
|
|
399
365
|
'pact:matcher:type': 'date',
|
|
400
366
|
value: example,
|
|
@@ -407,7 +373,7 @@ function date(format, example) {
|
|
|
407
373
|
function includes(value) {
|
|
408
374
|
return {
|
|
409
375
|
'pact:matcher:type': 'include',
|
|
410
|
-
value
|
|
376
|
+
value,
|
|
411
377
|
};
|
|
412
378
|
}
|
|
413
379
|
/**
|
|
@@ -429,42 +395,44 @@ function stringFromRegex(r) {
|
|
|
429
395
|
* @param pathFragments list of path fragments, can be regular expressions
|
|
430
396
|
*/
|
|
431
397
|
function url2(basePath, pathFragments) {
|
|
432
|
-
|
|
433
|
-
'.*('
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
398
|
+
const regexpr = [
|
|
399
|
+
'.*(',
|
|
400
|
+
...pathFragments.map((p) => {
|
|
401
|
+
if (p instanceof RegExp) {
|
|
402
|
+
return `\\/${p.source}`;
|
|
403
|
+
}
|
|
404
|
+
if (p instanceof Object && p['pact:matcher:type'] === 'regex') {
|
|
405
|
+
return `\\/${p.regex}`;
|
|
406
|
+
}
|
|
407
|
+
return `\\/${p.toString()}`;
|
|
408
|
+
}),
|
|
409
|
+
].join('');
|
|
410
|
+
const example = [
|
|
411
|
+
basePath || 'http://localhost:8080',
|
|
412
|
+
...pathFragments.map((p) => {
|
|
413
|
+
if (p instanceof RegExp) {
|
|
414
|
+
return `/${stringFromRegex(p)}`;
|
|
415
|
+
}
|
|
416
|
+
if (p instanceof Object && p['pact:matcher:type'] === 'regex') {
|
|
417
|
+
return `/${p.value}`;
|
|
418
|
+
}
|
|
419
|
+
return `/${p.toString()}`;
|
|
420
|
+
}),
|
|
421
|
+
].join('');
|
|
454
422
|
// Temporary fix for inconsistencies between matchers and generators. Matchers use "value" attribute for
|
|
455
423
|
// example values, while generators use "example"
|
|
456
424
|
if (basePath == null) {
|
|
457
425
|
return {
|
|
458
426
|
'pact:matcher:type': 'regex',
|
|
459
427
|
'pact:generator:type': 'MockServerURL',
|
|
460
|
-
regex:
|
|
428
|
+
regex: `${regexpr})$`,
|
|
461
429
|
value: example,
|
|
462
|
-
example
|
|
430
|
+
example,
|
|
463
431
|
};
|
|
464
432
|
}
|
|
465
433
|
return {
|
|
466
434
|
'pact:matcher:type': 'regex',
|
|
467
|
-
regex:
|
|
435
|
+
regex: `${regexpr})$`,
|
|
468
436
|
value: example,
|
|
469
437
|
};
|
|
470
438
|
}
|
|
@@ -479,14 +447,10 @@ function url(pathFragments) {
|
|
|
479
447
|
* Matches the items in an array against a number of variants. Matching is successful if each variant
|
|
480
448
|
* occurs once in the array. Variants may be objects containing matching rules.
|
|
481
449
|
*/
|
|
482
|
-
function arrayContaining() {
|
|
483
|
-
var variants = [];
|
|
484
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
485
|
-
variants[_i] = arguments[_i];
|
|
486
|
-
}
|
|
450
|
+
function arrayContaining(...variants) {
|
|
487
451
|
return {
|
|
488
452
|
'pact:matcher:type': 'arrayContains',
|
|
489
|
-
variants
|
|
453
|
+
variants,
|
|
490
454
|
};
|
|
491
455
|
}
|
|
492
456
|
/**
|
|
@@ -498,7 +462,7 @@ function fromProviderState(expression, exampleValue) {
|
|
|
498
462
|
return {
|
|
499
463
|
'pact:matcher:type': 'type',
|
|
500
464
|
'pact:generator:type': 'ProviderState',
|
|
501
|
-
expression
|
|
465
|
+
expression,
|
|
502
466
|
value: exampleValue,
|
|
503
467
|
};
|
|
504
468
|
}
|
|
@@ -506,11 +470,11 @@ function fromProviderState(expression, exampleValue) {
|
|
|
506
470
|
* Match a universally unique identifier (UUID). Random values will be used for examples if no example is given.
|
|
507
471
|
*/
|
|
508
472
|
function uuid(example) {
|
|
509
|
-
|
|
473
|
+
const regexStr = '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}';
|
|
510
474
|
if (example) {
|
|
511
|
-
|
|
475
|
+
const regexpr = new RegExp(`^${regexStr}$`);
|
|
512
476
|
if (!example.match(regexpr)) {
|
|
513
|
-
throw new Error(
|
|
477
|
+
throw new Error(`regex: Example value '${example}' does not match the UUID regular expression '${regexStr}'`);
|
|
514
478
|
}
|
|
515
479
|
return {
|
|
516
480
|
'pact:matcher:type': 'regex',
|
|
@@ -525,7 +489,7 @@ function uuid(example) {
|
|
|
525
489
|
value: 'e2490de5-5bd3-43d5-b7c4-526e33f71304',
|
|
526
490
|
};
|
|
527
491
|
}
|
|
528
|
-
|
|
492
|
+
const matcherValueOrString = (obj) => {
|
|
529
493
|
if (typeof obj === 'string')
|
|
530
494
|
return obj;
|
|
531
495
|
return JSON.stringify(obj);
|
|
@@ -546,9 +510,10 @@ function reify(input) {
|
|
|
546
510
|
if (input === null) {
|
|
547
511
|
return input;
|
|
548
512
|
}
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
513
|
+
const objectInput = input;
|
|
514
|
+
return Object.keys(objectInput).reduce((acc, propName) => {
|
|
515
|
+
acc[propName] = reify(objectInput[propName]);
|
|
516
|
+
return acc;
|
|
552
517
|
}, {});
|
|
553
518
|
}
|
|
554
519
|
if (typeof input === 'number' ||
|
|
@@ -556,6 +521,6 @@ function reify(input) {
|
|
|
556
521
|
typeof input === 'boolean') {
|
|
557
522
|
return input;
|
|
558
523
|
}
|
|
559
|
-
throw new Error(
|
|
524
|
+
throw new Error(`Unable to strip matcher from a '${typeof input}', as it is not valid in a Pact description`);
|
|
560
525
|
}
|
|
561
526
|
//# sourceMappingURL=matchers.js.map
|
package/src/v3/matchers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchers.js","sourceRoot":"","sources":["../../../src/v3/matchers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"matchers.js","sourceRoot":"","sources":["../../../src/v3/matchers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAkBA,8BAMC;AAkPD,wBAiBC;AAMD,wBAKC;AAOD,sBAaC;AA0BD,4BAWC;AAOD,8BAKC;AAOD,oBAUC;AAOD,oBAUC;AAMD,4BAKC;AAMD,8BAKC;AAWD,oBA8CC;AAMD,kBAIC;AAMD,0CAKC;AAOD,8CAUC;AAKD,oBAsBC;AAYD,sBA8BC;AAEiB,+BAAc;AAzkBhC,iCAA6C;AAC7C,sDAA8B;AAe9B,0CAAwB;AAExB,SAAgB,SAAS,CAAC,CAAU;IAClC,OAAO,CACL,CAAC,IAAI,IAAI;QACR,CAAsB,CAAC,mBAAmB,CAAC,KAAK,SAAS;QACzD,CAAsB,CAAC,KAAK,KAAK,SAAS,CAC5C,CAAC;AACJ,CAAC;AAED;;;GAGG;AACI,MAAM,IAAI,GAAG,CAAI,QAAW,EAAc,EAAE,CAAC,CAAC;IACnD,mBAAmB,EAAE,MAAM;IAC3B,KAAK,EAAE,QAAQ;CAChB,CAAC,CAAC;AAHU,QAAA,IAAI,QAGd;AAEH;;;;;;GAMG;AACI,MAAM,WAAW,GAAG,CACzB,WAAmB,EACnB,QAAW,EACC,EAAE,CAAC,CAAC;IAChB,mBAAmB,EAAE,QAAQ;IA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