@pact-foundation/pact-core 13.12.2 → 13.13.1
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 +19 -0
- package/bin/pact-broker.js.map +1 -1
- package/bin/pact-message.js.map +1 -1
- package/bin/pact-mock-service.js.map +1 -1
- package/bin/pact-provider-verifier.js.map +1 -1
- package/bin/pact-stub-service.js.map +1 -1
- package/bin/pact.js.map +1 -1
- package/bin/pactflow.js.map +1 -1
- package/build/Makefile +1 -1
- package/ffi/libpact_ffi.dylib +0 -0
- package/ffi/libpact_ffi.so +0 -0
- package/ffi/libpact_ffi.so.gz +0 -0
- package/ffi/linuxaarch64/libpact_ffi.so +0 -0
- package/ffi/osxaarch64/libpact_ffi.dylib +0 -0
- package/ffi/pact-cpp.h +292 -59
- package/ffi/pact.h +292 -57
- package/ffi/pact_ffi.dll +0 -0
- package/ffi/pact_ffi.dll.lib +0 -0
- package/native/consumer.cc +1 -1
- package/package.json +2 -2
- package/src/can-deploy.js +4 -2
- package/src/can-deploy.js.map +1 -1
- package/src/consumer/types.d.ts +14 -2
- package/src/ffi/index.d.ts +1 -1
- package/src/ffi/index.js +1 -1
- package/src/ffi/internals/index.d.ts +1 -1
- package/src/message.js +6 -4
- package/src/message.js.map +1 -1
- package/src/publisher.js +4 -2
- package/src/publisher.js.map +1 -1
- package/src/service.js +7 -3
- package/src/service.js.map +1 -1
- package/src/spawn/spawn.js +11 -7
- package/src/spawn/spawn.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [13.13.1](https://github.com/pact-foundation/pact-js-core/compare/v13.13.0...v13.13.1) (2022-12-19)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Fixes and Improvements
|
|
9
|
+
|
|
10
|
+
* update rust core to 0.3.18 ([d178c27](https://github.com/pact-foundation/pact-js-core/commit/d178c2784bb31e2bfe12585ad8d6f8d65dddf62b))
|
|
11
|
+
|
|
12
|
+
## [13.13.0](https://github.com/pact-foundation/pact-js-core/compare/v13.12.2...v13.13.0) (2022-12-02)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* new content mismatch types for plugins ([7cebccd](https://github.com/pact-foundation/pact-js-core/commit/7cebccdd412262011ae8fa33fbe1a0c26c65f10d))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Fixes and Improvements
|
|
21
|
+
|
|
22
|
+
* pactffi_create_mock_server_for_transport returns uint32 ([8d85a81](https://github.com/pact-foundation/pact-js-core/commit/8d85a8186d1c960af780bc039bbf4793dc389e0d))
|
|
23
|
+
|
|
5
24
|
### [13.12.2](https://github.com/pact-foundation/pact-js-core/compare/v13.12.1...v13.12.2) (2022-11-28)
|
|
6
25
|
|
|
7
26
|
|
package/bin/pact-broker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pact-broker.js","sourceRoot":"","sources":["pact-broker.ts"],"names":[],"mappings":";;;;;;AAEA,6EAAgD;AAChD,8CAA+C;AAE/C,MAAM,MAAM,GAAG,YAAY,CAAC,SAAS,CACnC,yBAAU,CAAC,cAAc,EACzB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EACrB;IACE,KAAK,EAAE,SAAS;CACjB,CACF,CAAC,MAAM,CAAC;AACT,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"pact-broker.js","sourceRoot":"","sources":["pact-broker.ts"],"names":[],"mappings":";;;;;;AAEA,6EAAgD;AAChD,8CAA+C;AAE/C,MAAM,MAAM,GAAG,YAAY,CAAC,SAAS,CACnC,yBAAU,CAAC,cAAc,EACzB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EACrB;IACE,KAAK,EAAE,SAAS;CACjB,CACF,CAAC,MAAM,CAAC;AACT,OAAO,CAAC,IAAI,CAAC,MAAgB,CAAC,CAAC"}
|
package/bin/pact-message.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pact-message.js","sourceRoot":"","sources":["pact-message.ts"],"names":[],"mappings":";;;;;;AAEA,6EAAgD;AAChD,8CAA+C;AAE/C,MAAM,MAAM,GAAG,YAAY,CAAC,SAAS,CACnC,yBAAU,CAAC,eAAe,EAC1B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EACrB;IACE,KAAK,EAAE,SAAS;CACjB,CACF,CAAC,MAAM,CAAC;AACT,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"pact-message.js","sourceRoot":"","sources":["pact-message.ts"],"names":[],"mappings":";;;;;;AAEA,6EAAgD;AAChD,8CAA+C;AAE/C,MAAM,MAAM,GAAG,YAAY,CAAC,SAAS,CACnC,yBAAU,CAAC,eAAe,EAC1B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EACrB;IACE,KAAK,EAAE,SAAS;CACjB,CACF,CAAC,MAAM,CAAC;AACT,OAAO,CAAC,IAAI,CAAC,MAAgB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pact-mock-service.js","sourceRoot":"","sources":["pact-mock-service.ts"],"names":[],"mappings":";;;;;;AAEA,6EAAgD;AAChD,8CAA+C;AAE/C,MAAM,MAAM,GAAG,YAAY,CAAC,SAAS,CACnC,yBAAU,CAAC,mBAAmB,EAC9B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EACrB,EAAE,KAAK,EAAE,SAAS,EAAE,CACrB,CAAC,MAAM,CAAC;AACT,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"pact-mock-service.js","sourceRoot":"","sources":["pact-mock-service.ts"],"names":[],"mappings":";;;;;;AAEA,6EAAgD;AAChD,8CAA+C;AAE/C,MAAM,MAAM,GAAG,YAAY,CAAC,SAAS,CACnC,yBAAU,CAAC,mBAAmB,EAC9B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EACrB,EAAE,KAAK,EAAE,SAAS,EAAE,CACrB,CAAC,MAAM,CAAC;AACT,OAAO,CAAC,IAAI,CAAC,MAAgB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pact-provider-verifier.js","sourceRoot":"","sources":["pact-provider-verifier.ts"],"names":[],"mappings":";;;;;;AAEA,6EAAgD;AAChD,8CAA+C;AAE/C,MAAM,MAAM,GAAG,YAAY,CAAC,SAAS,CACnC,yBAAU,CAAC,gBAAgB,EAC3B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EACrB;IACE,KAAK,EAAE,SAAS;CACjB,CACF,CAAC,MAAM,CAAC;AACT,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"pact-provider-verifier.js","sourceRoot":"","sources":["pact-provider-verifier.ts"],"names":[],"mappings":";;;;;;AAEA,6EAAgD;AAChD,8CAA+C;AAE/C,MAAM,MAAM,GAAG,YAAY,CAAC,SAAS,CACnC,yBAAU,CAAC,gBAAgB,EAC3B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EACrB;IACE,KAAK,EAAE,SAAS;CACjB,CACF,CAAC,MAAM,CAAC;AACT,OAAO,CAAC,IAAI,CAAC,MAAgB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pact-stub-service.js","sourceRoot":"","sources":["pact-stub-service.ts"],"names":[],"mappings":";;;;;;AAEA,6EAAgD;AAChD,8CAA+C;AAE/C,MAAM,MAAM,GAAG,YAAY,CAAC,SAAS,CACnC,yBAAU,CAAC,YAAY,EACvB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EACrB;IACE,KAAK,EAAE,SAAS;CACjB,CACF,CAAC,MAAM,CAAC;AACT,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"pact-stub-service.js","sourceRoot":"","sources":["pact-stub-service.ts"],"names":[],"mappings":";;;;;;AAEA,6EAAgD;AAChD,8CAA+C;AAE/C,MAAM,MAAM,GAAG,YAAY,CAAC,SAAS,CACnC,yBAAU,CAAC,YAAY,EACvB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EACrB;IACE,KAAK,EAAE,SAAS;CACjB,CACF,CAAC,MAAM,CAAC;AACT,OAAO,CAAC,IAAI,CAAC,MAAgB,CAAC,CAAC"}
|
package/bin/pact.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pact.js","sourceRoot":"","sources":["pact.ts"],"names":[],"mappings":";;;;;;AAEA,6EAAgD;AAChD,8CAA+C;AAE/C,MAAM,MAAM,GAAG,YAAY,CAAC,SAAS,CACnC,yBAAU,CAAC,YAAY,EACvB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EACrB;IACE,KAAK,EAAE,SAAS;CACjB,CACF,CAAC,MAAM,CAAC;AACT,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"pact.js","sourceRoot":"","sources":["pact.ts"],"names":[],"mappings":";;;;;;AAEA,6EAAgD;AAChD,8CAA+C;AAE/C,MAAM,MAAM,GAAG,YAAY,CAAC,SAAS,CACnC,yBAAU,CAAC,YAAY,EACvB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EACrB;IACE,KAAK,EAAE,SAAS;CACjB,CACF,CAAC,MAAM,CAAC;AACT,OAAO,CAAC,IAAI,CAAC,MAAgB,CAAC,CAAC"}
|
package/bin/pactflow.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pactflow.js","sourceRoot":"","sources":["pactflow.ts"],"names":[],"mappings":";;;;;;AAEA,6EAAgD;AAChD,8CAA+C;AAE/C,MAAM,MAAM,GAAG,YAAY,CAAC,SAAS,CACnC,yBAAU,CAAC,gBAAgB,EAC3B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EACrB;IACE,KAAK,EAAE,SAAS;CACjB,CACF,CAAC,MAAM,CAAC;AACT,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"pactflow.js","sourceRoot":"","sources":["pactflow.ts"],"names":[],"mappings":";;;;;;AAEA,6EAAgD;AAChD,8CAA+C;AAE/C,MAAM,MAAM,GAAG,YAAY,CAAC,SAAS,CACnC,yBAAU,CAAC,gBAAgB,EAC3B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EACrB;IACE,KAAK,EAAE,SAAS;CACjB,CACF,CAAC,MAAM,CAAC;AACT,OAAO,CAAC,IAAI,CAAC,MAAgB,CAAC,CAAC"}
|
package/build/Makefile
CHANGED
|
@@ -319,7 +319,7 @@ endif
|
|
|
319
319
|
|
|
320
320
|
quiet_cmd_regen_makefile = ACTION Regenerating $@
|
|
321
321
|
cmd_regen_makefile = cd $(srcdir); /opt/hostedtoolcache/node/16.18.1/x64/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/home/runner/.cache/node-gyp/16.18.1" "-Dnode_gyp_dir=/opt/hostedtoolcache/node/16.18.1/x64/lib/node_modules/npm/node_modules/node-gyp" "-Dnode_lib_file=/home/runner/.cache/node-gyp/16.18.1/<(target_arch)/node.lib" "-Dmodule_root_dir=/home/runner/work/pact-js-core/pact-js-core" "-Dnode_engine=v8" "--depth=." "-Goutput_dir=." "--generator-output=build" -I/home/runner/work/pact-js-core/pact-js-core/build/config.gypi -I/opt/hostedtoolcache/node/16.18.1/x64/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/home/runner/.cache/node-gyp/16.18.1/include/node/common.gypi "--toplevel-dir=." binding.gyp
|
|
322
|
-
Makefile: $(srcdir)/build/config.gypi $(srcdir)/../../../.cache/node-gyp/16.18.1/include/node/common.gypi $(srcdir)/../../../../../opt/hostedtoolcache/node/16.18.1/x64/lib/node_modules/npm/node_modules/node-gyp/addon.gypi
|
|
322
|
+
Makefile: $(srcdir)/build/config.gypi $(srcdir)/../../../.cache/node-gyp/16.18.1/include/node/common.gypi $(srcdir)/binding.gyp $(srcdir)/../../../../../opt/hostedtoolcache/node/16.18.1/x64/lib/node_modules/npm/node_modules/node-gyp/addon.gypi
|
|
323
323
|
$(call do_cmd,regen_makefile)
|
|
324
324
|
|
|
325
325
|
# "all" is a concatenation of the "all" targets from all the included
|
package/ffi/libpact_ffi.dylib
CHANGED
|
Binary file
|
package/ffi/libpact_ffi.so
CHANGED
|
Binary file
|
package/ffi/libpact_ffi.so.gz
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/ffi/pact-cpp.h
CHANGED
|
@@ -131,6 +131,38 @@ struct MatchingRuleDefinitionResult;
|
|
|
131
131
|
*/
|
|
132
132
|
struct MatchingRuleIterator;
|
|
133
133
|
|
|
134
|
+
/**
|
|
135
|
+
* The matching rule or reference from parsing the matching definition expression.
|
|
136
|
+
*
|
|
137
|
+
* For matching rules, the ID corresponds to the following rules:
|
|
138
|
+
* | Rule | ID |
|
|
139
|
+
* | ---- | -- |
|
|
140
|
+
* | Equality | 1 |
|
|
141
|
+
* | Regex | 2 |
|
|
142
|
+
* | Type | 3 |
|
|
143
|
+
* | MinType | 4 |
|
|
144
|
+
* | MaxType | 5 |
|
|
145
|
+
* | MinMaxType | 6 |
|
|
146
|
+
* | Timestamp | 7 |
|
|
147
|
+
* | Time | 8 |
|
|
148
|
+
* | Date | 9 |
|
|
149
|
+
* | Include | 10 |
|
|
150
|
+
* | Number | 11 |
|
|
151
|
+
* | Integer | 12 |
|
|
152
|
+
* | Decimal | 13 |
|
|
153
|
+
* | Null | 14 |
|
|
154
|
+
* | ContentType | 15 |
|
|
155
|
+
* | ArrayContains | 16 |
|
|
156
|
+
* | Values | 17 |
|
|
157
|
+
* | Boolean | 18 |
|
|
158
|
+
* | StatusCode | 19 |
|
|
159
|
+
* | NotEmpty | 20 |
|
|
160
|
+
* | Semver | 21 |
|
|
161
|
+
* | EachKey | 22 |
|
|
162
|
+
* | EachValue | 23 |
|
|
163
|
+
*/
|
|
164
|
+
struct MatchingRuleResult;
|
|
165
|
+
|
|
134
166
|
/**
|
|
135
167
|
* Struct that defines a message.
|
|
136
168
|
*/
|
|
@@ -283,65 +315,6 @@ struct ProviderStateParamPair {
|
|
|
283
315
|
const char *value;
|
|
284
316
|
};
|
|
285
317
|
|
|
286
|
-
/**
|
|
287
|
-
* The matching rule or reference from parsing the matching definition expression.
|
|
288
|
-
*
|
|
289
|
-
* For matching rules, the ID corresponds to the following rules:
|
|
290
|
-
* | Rule | ID |
|
|
291
|
-
* | ---- | -- |
|
|
292
|
-
* | Equality | 1 |
|
|
293
|
-
* | Regex | 2 |
|
|
294
|
-
* | Type | 3 |
|
|
295
|
-
* | MinType | 4 |
|
|
296
|
-
* | MaxType | 5 |
|
|
297
|
-
* | MinMaxType | 6 |
|
|
298
|
-
* | Timestamp | 7 |
|
|
299
|
-
* | Time | 8 |
|
|
300
|
-
* | Date | 9 |
|
|
301
|
-
* | Include | 10 |
|
|
302
|
-
* | Number | 11 |
|
|
303
|
-
* | Integer | 12 |
|
|
304
|
-
* | Decimal | 13 |
|
|
305
|
-
* | Null | 14 |
|
|
306
|
-
* | ContentType | 15 |
|
|
307
|
-
* | ArrayContains | 16 |
|
|
308
|
-
* | Values | 17 |
|
|
309
|
-
* | Boolean | 18 |
|
|
310
|
-
* | StatusCode | 19 |
|
|
311
|
-
* | NotEmpty | 20 |
|
|
312
|
-
* | Semver | 21 |
|
|
313
|
-
* | EachKey | 22 |
|
|
314
|
-
* | EachValue | 23 |
|
|
315
|
-
*/
|
|
316
|
-
struct MatchingRuleResult {
|
|
317
|
-
enum class Tag {
|
|
318
|
-
/**
|
|
319
|
-
* The matching rule from the expression.
|
|
320
|
-
*/
|
|
321
|
-
MatchingRuleResult_MatchingRule,
|
|
322
|
-
/**
|
|
323
|
-
* A reference to a named item.
|
|
324
|
-
*/
|
|
325
|
-
MatchingRuleResult_MatchingReference,
|
|
326
|
-
};
|
|
327
|
-
|
|
328
|
-
struct MatchingRuleResult_MatchingRule_Body {
|
|
329
|
-
uint16_t _0;
|
|
330
|
-
const char *_1;
|
|
331
|
-
const MatchingRule *_2;
|
|
332
|
-
};
|
|
333
|
-
|
|
334
|
-
struct MatchingRuleResult_MatchingReference_Body {
|
|
335
|
-
const char *_0;
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
Tag tag;
|
|
339
|
-
union {
|
|
340
|
-
MatchingRuleResult_MatchingRule_Body matching_rule;
|
|
341
|
-
MatchingRuleResult_MatchingReference_Body matching_reference;
|
|
342
|
-
};
|
|
343
|
-
};
|
|
344
|
-
|
|
345
318
|
/**
|
|
346
319
|
* Wraps a Pact model struct
|
|
347
320
|
*/
|
|
@@ -1988,6 +1961,118 @@ MatchingRuleIterator *pactffi_matcher_definition_iter(const MatchingRuleDefiniti
|
|
|
1988
1961
|
*/
|
|
1989
1962
|
const MatchingRuleResult *pactffi_matching_rule_iter_next(MatchingRuleIterator *iter);
|
|
1990
1963
|
|
|
1964
|
+
/**
|
|
1965
|
+
* Return the ID of the matching rule.
|
|
1966
|
+
*
|
|
1967
|
+
* The ID corresponds to the following rules:
|
|
1968
|
+
* | Rule | ID |
|
|
1969
|
+
* | ---- | -- |
|
|
1970
|
+
* | Equality | 1 |
|
|
1971
|
+
* | Regex | 2 |
|
|
1972
|
+
* | Type | 3 |
|
|
1973
|
+
* | MinType | 4 |
|
|
1974
|
+
* | MaxType | 5 |
|
|
1975
|
+
* | MinMaxType | 6 |
|
|
1976
|
+
* | Timestamp | 7 |
|
|
1977
|
+
* | Time | 8 |
|
|
1978
|
+
* | Date | 9 |
|
|
1979
|
+
* | Include | 10 |
|
|
1980
|
+
* | Number | 11 |
|
|
1981
|
+
* | Integer | 12 |
|
|
1982
|
+
* | Decimal | 13 |
|
|
1983
|
+
* | Null | 14 |
|
|
1984
|
+
* | ContentType | 15 |
|
|
1985
|
+
* | ArrayContains | 16 |
|
|
1986
|
+
* | Values | 17 |
|
|
1987
|
+
* | Boolean | 18 |
|
|
1988
|
+
* | StatusCode | 19 |
|
|
1989
|
+
* | NotEmpty | 20 |
|
|
1990
|
+
* | Semver | 21 |
|
|
1991
|
+
* | EachKey | 22 |
|
|
1992
|
+
* | EachValue | 23 |
|
|
1993
|
+
*
|
|
1994
|
+
* # Safety
|
|
1995
|
+
*
|
|
1996
|
+
* This function is safe as long as the MatchingRuleResult pointer is a valid pointer and the
|
|
1997
|
+
* iterator has not been deleted.
|
|
1998
|
+
*/
|
|
1999
|
+
uint16_t pactffi_matching_rule_id(const MatchingRuleResult *rule_result);
|
|
2000
|
+
|
|
2001
|
+
/**
|
|
2002
|
+
* Returns the associated value for the matching rule. If the matching rule does not have an
|
|
2003
|
+
* associated value, will return a NULL pointer.
|
|
2004
|
+
*
|
|
2005
|
+
* The associated values for the rules are:
|
|
2006
|
+
* | Rule | ID | VALUE |
|
|
2007
|
+
* | ---- | -- | ----- |
|
|
2008
|
+
* | Equality | 1 | NULL |
|
|
2009
|
+
* | Regex | 2 | Regex value |
|
|
2010
|
+
* | Type | 3 | NULL |
|
|
2011
|
+
* | MinType | 4 | Minimum value |
|
|
2012
|
+
* | MaxType | 5 | Maximum value |
|
|
2013
|
+
* | MinMaxType | 6 | "min:max" |
|
|
2014
|
+
* | Timestamp | 7 | Format string |
|
|
2015
|
+
* | Time | 8 | Format string |
|
|
2016
|
+
* | Date | 9 | Format string |
|
|
2017
|
+
* | Include | 10 | String value |
|
|
2018
|
+
* | Number | 11 | NULL |
|
|
2019
|
+
* | Integer | 12 | NULL |
|
|
2020
|
+
* | Decimal | 13 | NULL |
|
|
2021
|
+
* | Null | 14 | NULL |
|
|
2022
|
+
* | ContentType | 15 | Content type |
|
|
2023
|
+
* | ArrayContains | 16 | NULL |
|
|
2024
|
+
* | Values | 17 | NULL |
|
|
2025
|
+
* | Boolean | 18 | NULL |
|
|
2026
|
+
* | StatusCode | 19 | NULL |
|
|
2027
|
+
* | NotEmpty | 20 | NULL |
|
|
2028
|
+
* | Semver | 21 | NULL |
|
|
2029
|
+
* | EachKey | 22 | NULL |
|
|
2030
|
+
* | EachValue | 23 | NULL |
|
|
2031
|
+
*
|
|
2032
|
+
* Will return a NULL pointer if the matching rule was a reference or does not have an
|
|
2033
|
+
* associated value.
|
|
2034
|
+
*
|
|
2035
|
+
* # Safety
|
|
2036
|
+
*
|
|
2037
|
+
* This function is safe as long as the MatchingRuleResult pointer is a valid pointer and the
|
|
2038
|
+
* iterator it came from has not been deleted.
|
|
2039
|
+
*/
|
|
2040
|
+
const char *pactffi_matching_rule_value(const MatchingRuleResult *rule_result);
|
|
2041
|
+
|
|
2042
|
+
/**
|
|
2043
|
+
* Returns the matching rule pointer for the matching rule. Will return a NULL pointer if the
|
|
2044
|
+
* matching rule result was a reference.
|
|
2045
|
+
*
|
|
2046
|
+
* # Safety
|
|
2047
|
+
*
|
|
2048
|
+
* This function is safe as long as the MatchingRuleResult pointer is a valid pointer and the
|
|
2049
|
+
* iterator it came from has not been deleted.
|
|
2050
|
+
*/
|
|
2051
|
+
const MatchingRule *pactffi_matching_rule_pointer(const MatchingRuleResult *rule_result);
|
|
2052
|
+
|
|
2053
|
+
/**
|
|
2054
|
+
* Return any matching rule reference to a attribute by name. This is when the matcher should
|
|
2055
|
+
* be configured to match the type of a structure. I.e.,
|
|
2056
|
+
*
|
|
2057
|
+
* ```json
|
|
2058
|
+
* {
|
|
2059
|
+
* "pact:match": "eachValue(matching($'person'))",
|
|
2060
|
+
* "person": {
|
|
2061
|
+
* "name": "Fred",
|
|
2062
|
+
* "age": 100
|
|
2063
|
+
* }
|
|
2064
|
+
* }
|
|
2065
|
+
* ```
|
|
2066
|
+
*
|
|
2067
|
+
* Will return a NULL pointer if the matching rule was not a reference.
|
|
2068
|
+
*
|
|
2069
|
+
* # Safety
|
|
2070
|
+
*
|
|
2071
|
+
* This function is safe as long as the MatchingRuleResult pointer is a valid pointer and the
|
|
2072
|
+
* iterator has not been deleted.
|
|
2073
|
+
*/
|
|
2074
|
+
const char *pactffi_matching_rule_reference_name(const MatchingRuleResult *rule_result);
|
|
2075
|
+
|
|
1991
2076
|
/**
|
|
1992
2077
|
* Get the JSON form of the matching rule.
|
|
1993
2078
|
*
|
|
@@ -3327,6 +3412,154 @@ unsigned int pactffi_interaction_contents(InteractionHandle interaction,
|
|
|
3327
3412
|
const char *content_type,
|
|
3328
3413
|
const char *contents);
|
|
3329
3414
|
|
|
3415
|
+
/**
|
|
3416
|
+
* Determines if the string value matches the given matching rule. If the value matches OK,
|
|
3417
|
+
* will return a NULL pointer. If the value does not match, will return a error message as
|
|
3418
|
+
* a NULL terminated string. The error message pointer will need to be deleted with the
|
|
3419
|
+
* `pactffi_string_delete` function once it is no longer required.
|
|
3420
|
+
*
|
|
3421
|
+
* * matching_rule - pointer to a matching rule
|
|
3422
|
+
* * expected_value - value we expect to get as a NULL terminated string
|
|
3423
|
+
* * actual_value - value to match as a NULL terminated string
|
|
3424
|
+
* * cascaded - if the matching rule has been cascaded from a parent. 0 == false, 1 == true
|
|
3425
|
+
*
|
|
3426
|
+
* # Safety
|
|
3427
|
+
*
|
|
3428
|
+
* The matching rule pointer must be a valid pointer, and the value parameters must be
|
|
3429
|
+
* valid pointers to a NULL terminated strings.
|
|
3430
|
+
*/
|
|
3431
|
+
const char *pactffi_matches_string_value(const MatchingRule *matching_rule,
|
|
3432
|
+
const char *expected_value,
|
|
3433
|
+
const char *actual_value,
|
|
3434
|
+
uint8_t cascaded);
|
|
3435
|
+
|
|
3436
|
+
/**
|
|
3437
|
+
* Determines if the unsigned integer value matches the given matching rule. If the value matches OK,
|
|
3438
|
+
* will return a NULL pointer. If the value does not match, will return a error message as
|
|
3439
|
+
* a NULL terminated string. The error message pointer will need to be deleted with the
|
|
3440
|
+
* `pactffi_string_delete` function once it is no longer required.
|
|
3441
|
+
*
|
|
3442
|
+
* * matching_rule - pointer to a matching rule
|
|
3443
|
+
* * expected_value - value we expect to get
|
|
3444
|
+
* * actual_value - value to match
|
|
3445
|
+
* * cascaded - if the matching rule has been cascaded from a parent. 0 == false, 1 == true
|
|
3446
|
+
*
|
|
3447
|
+
* # Safety
|
|
3448
|
+
*
|
|
3449
|
+
* The matching rule pointer must be a valid pointer.
|
|
3450
|
+
*/
|
|
3451
|
+
const char *pactffi_matches_u64_value(const MatchingRule *matching_rule,
|
|
3452
|
+
uint64_t expected_value,
|
|
3453
|
+
uint64_t actual_value,
|
|
3454
|
+
uint8_t cascaded);
|
|
3455
|
+
|
|
3456
|
+
/**
|
|
3457
|
+
* Determines if the signed integer value matches the given matching rule. If the value matches OK,
|
|
3458
|
+
* will return a NULL pointer. If the value does not match, will return a error message as
|
|
3459
|
+
* a NULL terminated string. The error message pointer will need to be deleted with the
|
|
3460
|
+
* `pactffi_string_delete` function once it is no longer required.
|
|
3461
|
+
*
|
|
3462
|
+
* * matching_rule - pointer to a matching rule
|
|
3463
|
+
* * expected_value - value we expect to get
|
|
3464
|
+
* * actual_value - value to match
|
|
3465
|
+
* * cascaded - if the matching rule has been cascaded from a parent. 0 == false, 1 == true
|
|
3466
|
+
*
|
|
3467
|
+
* # Safety
|
|
3468
|
+
*
|
|
3469
|
+
* The matching rule pointer must be a valid pointer.
|
|
3470
|
+
*/
|
|
3471
|
+
const char *pactffi_matches_i64_value(const MatchingRule *matching_rule,
|
|
3472
|
+
int64_t expected_value,
|
|
3473
|
+
int64_t actual_value,
|
|
3474
|
+
uint8_t cascaded);
|
|
3475
|
+
|
|
3476
|
+
/**
|
|
3477
|
+
* Determines if the floating point value matches the given matching rule. If the value matches OK,
|
|
3478
|
+
* will return a NULL pointer. If the value does not match, will return a error message as
|
|
3479
|
+
* a NULL terminated string. The error message pointer will need to be deleted with the
|
|
3480
|
+
* `pactffi_string_delete` function once it is no longer required.
|
|
3481
|
+
*
|
|
3482
|
+
* * matching_rule - pointer to a matching rule
|
|
3483
|
+
* * expected_value - value we expect to get
|
|
3484
|
+
* * actual_value - value to match
|
|
3485
|
+
* * cascaded - if the matching rule has been cascaded from a parent. 0 == false, 1 == true
|
|
3486
|
+
*
|
|
3487
|
+
* # Safety
|
|
3488
|
+
*
|
|
3489
|
+
* The matching rule pointer must be a valid pointer.
|
|
3490
|
+
*/
|
|
3491
|
+
const char *pactffi_matches_f64_value(const MatchingRule *matching_rule,
|
|
3492
|
+
double expected_value,
|
|
3493
|
+
double actual_value,
|
|
3494
|
+
uint8_t cascaded);
|
|
3495
|
+
|
|
3496
|
+
/**
|
|
3497
|
+
* Determines if the boolean value matches the given matching rule. If the value matches OK,
|
|
3498
|
+
* will return a NULL pointer. If the value does not match, will return a error message as
|
|
3499
|
+
* a NULL terminated string. The error message pointer will need to be deleted with the
|
|
3500
|
+
* `pactffi_string_delete` function once it is no longer required.
|
|
3501
|
+
*
|
|
3502
|
+
* * matching_rule - pointer to a matching rule
|
|
3503
|
+
* * expected_value - value we expect to get, 0 == false and 1 == true
|
|
3504
|
+
* * actual_value - value to match, 0 == false and 1 == true
|
|
3505
|
+
* * cascaded - if the matching rule has been cascaded from a parent. 0 == false, 1 == true
|
|
3506
|
+
*
|
|
3507
|
+
* # Safety
|
|
3508
|
+
*
|
|
3509
|
+
* The matching rule pointer must be a valid pointer.
|
|
3510
|
+
*/
|
|
3511
|
+
const char *pactffi_matches_bool_value(const MatchingRule *matching_rule,
|
|
3512
|
+
uint8_t expected_value,
|
|
3513
|
+
uint8_t actual_value,
|
|
3514
|
+
uint8_t cascaded);
|
|
3515
|
+
|
|
3516
|
+
/**
|
|
3517
|
+
* Determines if the binary value matches the given matching rule. If the value matches OK,
|
|
3518
|
+
* will return a NULL pointer. If the value does not match, will return a error message as
|
|
3519
|
+
* a NULL terminated string. The error message pointer will need to be deleted with the
|
|
3520
|
+
* `pactffi_string_delete` function once it is no longer required.
|
|
3521
|
+
*
|
|
3522
|
+
* * matching_rule - pointer to a matching rule
|
|
3523
|
+
* * expected_value - value we expect to get
|
|
3524
|
+
* * expected_value_len - length of the expected value bytes
|
|
3525
|
+
* * actual_value - value to match
|
|
3526
|
+
* * actual_value_len - length of the actual value bytes
|
|
3527
|
+
* * cascaded - if the matching rule has been cascaded from a parent. 0 == false, 1 == true
|
|
3528
|
+
*
|
|
3529
|
+
* # Safety
|
|
3530
|
+
*
|
|
3531
|
+
* The matching rule, expected value and actual value pointers must be a valid pointers.
|
|
3532
|
+
* expected_value_len and actual_value_len must contain the number of bytes that the value
|
|
3533
|
+
* pointers point to. Passing invalid lengths can lead to undefined behaviour.
|
|
3534
|
+
*/
|
|
3535
|
+
const char *pactffi_matches_binary_value(const MatchingRule *matching_rule,
|
|
3536
|
+
const unsigned char *expected_value,
|
|
3537
|
+
uintptr_t expected_value_len,
|
|
3538
|
+
const unsigned char *actual_value,
|
|
3539
|
+
uintptr_t actual_value_len,
|
|
3540
|
+
uint8_t cascaded);
|
|
3541
|
+
|
|
3542
|
+
/**
|
|
3543
|
+
* Determines if the JSON value matches the given matching rule. If the value matches OK,
|
|
3544
|
+
* will return a NULL pointer. If the value does not match, will return a error message as
|
|
3545
|
+
* a NULL terminated string. The error message pointer will need to be deleted with the
|
|
3546
|
+
* `pactffi_string_delete` function once it is no longer required.
|
|
3547
|
+
*
|
|
3548
|
+
* * matching_rule - pointer to a matching rule
|
|
3549
|
+
* * expected_value - value we expect to get as a NULL terminated string
|
|
3550
|
+
* * actual_value - value to match as a NULL terminated string
|
|
3551
|
+
* * cascaded - if the matching rule has been cascaded from a parent. 0 == false, 1 == true
|
|
3552
|
+
*
|
|
3553
|
+
* # Safety
|
|
3554
|
+
*
|
|
3555
|
+
* The matching rule pointer must be a valid pointer, and the value parameters must be
|
|
3556
|
+
* valid pointers to a NULL terminated strings.
|
|
3557
|
+
*/
|
|
3558
|
+
const char *pactffi_matches_json_value(const MatchingRule *matching_rule,
|
|
3559
|
+
const char *expected_value,
|
|
3560
|
+
const char *actual_value,
|
|
3561
|
+
uint8_t cascaded);
|
|
3562
|
+
|
|
3330
3563
|
} // extern "C"
|
|
3331
3564
|
|
|
3332
3565
|
#endif // pact_ffi_h
|
package/ffi/pact.h
CHANGED
|
@@ -130,6 +130,38 @@ typedef struct MatchingRuleDefinitionResult MatchingRuleDefinitionResult;
|
|
|
130
130
|
*/
|
|
131
131
|
typedef struct MatchingRuleIterator MatchingRuleIterator;
|
|
132
132
|
|
|
133
|
+
/**
|
|
134
|
+
* The matching rule or reference from parsing the matching definition expression.
|
|
135
|
+
*
|
|
136
|
+
* For matching rules, the ID corresponds to the following rules:
|
|
137
|
+
* | Rule | ID |
|
|
138
|
+
* | ---- | -- |
|
|
139
|
+
* | Equality | 1 |
|
|
140
|
+
* | Regex | 2 |
|
|
141
|
+
* | Type | 3 |
|
|
142
|
+
* | MinType | 4 |
|
|
143
|
+
* | MaxType | 5 |
|
|
144
|
+
* | MinMaxType | 6 |
|
|
145
|
+
* | Timestamp | 7 |
|
|
146
|
+
* | Time | 8 |
|
|
147
|
+
* | Date | 9 |
|
|
148
|
+
* | Include | 10 |
|
|
149
|
+
* | Number | 11 |
|
|
150
|
+
* | Integer | 12 |
|
|
151
|
+
* | Decimal | 13 |
|
|
152
|
+
* | Null | 14 |
|
|
153
|
+
* | ContentType | 15 |
|
|
154
|
+
* | ArrayContains | 16 |
|
|
155
|
+
* | Values | 17 |
|
|
156
|
+
* | Boolean | 18 |
|
|
157
|
+
* | StatusCode | 19 |
|
|
158
|
+
* | NotEmpty | 20 |
|
|
159
|
+
* | Semver | 21 |
|
|
160
|
+
* | EachKey | 22 |
|
|
161
|
+
* | EachValue | 23 |
|
|
162
|
+
*/
|
|
163
|
+
typedef struct MatchingRuleResult MatchingRuleResult;
|
|
164
|
+
|
|
133
165
|
/**
|
|
134
166
|
* Struct that defines a message.
|
|
135
167
|
*/
|
|
@@ -282,63 +314,6 @@ typedef struct ProviderStateParamPair {
|
|
|
282
314
|
const char *value;
|
|
283
315
|
} ProviderStateParamPair;
|
|
284
316
|
|
|
285
|
-
/**
|
|
286
|
-
* The matching rule or reference from parsing the matching definition expression.
|
|
287
|
-
*
|
|
288
|
-
* For matching rules, the ID corresponds to the following rules:
|
|
289
|
-
* | Rule | ID |
|
|
290
|
-
* | ---- | -- |
|
|
291
|
-
* | Equality | 1 |
|
|
292
|
-
* | Regex | 2 |
|
|
293
|
-
* | Type | 3 |
|
|
294
|
-
* | MinType | 4 |
|
|
295
|
-
* | MaxType | 5 |
|
|
296
|
-
* | MinMaxType | 6 |
|
|
297
|
-
* | Timestamp | 7 |
|
|
298
|
-
* | Time | 8 |
|
|
299
|
-
* | Date | 9 |
|
|
300
|
-
* | Include | 10 |
|
|
301
|
-
* | Number | 11 |
|
|
302
|
-
* | Integer | 12 |
|
|
303
|
-
* | Decimal | 13 |
|
|
304
|
-
* | Null | 14 |
|
|
305
|
-
* | ContentType | 15 |
|
|
306
|
-
* | ArrayContains | 16 |
|
|
307
|
-
* | Values | 17 |
|
|
308
|
-
* | Boolean | 18 |
|
|
309
|
-
* | StatusCode | 19 |
|
|
310
|
-
* | NotEmpty | 20 |
|
|
311
|
-
* | Semver | 21 |
|
|
312
|
-
* | EachKey | 22 |
|
|
313
|
-
* | EachValue | 23 |
|
|
314
|
-
*/
|
|
315
|
-
typedef enum MatchingRuleResult_Tag {
|
|
316
|
-
/**
|
|
317
|
-
* The matching rule from the expression.
|
|
318
|
-
*/
|
|
319
|
-
MatchingRuleResult_MatchingRule,
|
|
320
|
-
/**
|
|
321
|
-
* A reference to a named item.
|
|
322
|
-
*/
|
|
323
|
-
MatchingRuleResult_MatchingReference,
|
|
324
|
-
} MatchingRuleResult_Tag;
|
|
325
|
-
|
|
326
|
-
typedef struct MatchingRuleResult_MatchingRule_Body {
|
|
327
|
-
uint16_t _0;
|
|
328
|
-
const char *_1;
|
|
329
|
-
const struct MatchingRule *_2;
|
|
330
|
-
} MatchingRuleResult_MatchingRule_Body;
|
|
331
|
-
|
|
332
|
-
typedef struct MatchingRuleResult {
|
|
333
|
-
MatchingRuleResult_Tag tag;
|
|
334
|
-
union {
|
|
335
|
-
MatchingRuleResult_MatchingRule_Body matching_rule;
|
|
336
|
-
struct {
|
|
337
|
-
const char *matching_reference;
|
|
338
|
-
};
|
|
339
|
-
};
|
|
340
|
-
} MatchingRuleResult;
|
|
341
|
-
|
|
342
317
|
/**
|
|
343
318
|
* Wraps a Pact model struct
|
|
344
319
|
*/
|
|
@@ -1984,6 +1959,118 @@ struct MatchingRuleIterator *pactffi_matcher_definition_iter(const struct Matchi
|
|
|
1984
1959
|
*/
|
|
1985
1960
|
const struct MatchingRuleResult *pactffi_matching_rule_iter_next(struct MatchingRuleIterator *iter);
|
|
1986
1961
|
|
|
1962
|
+
/**
|
|
1963
|
+
* Return the ID of the matching rule.
|
|
1964
|
+
*
|
|
1965
|
+
* The ID corresponds to the following rules:
|
|
1966
|
+
* | Rule | ID |
|
|
1967
|
+
* | ---- | -- |
|
|
1968
|
+
* | Equality | 1 |
|
|
1969
|
+
* | Regex | 2 |
|
|
1970
|
+
* | Type | 3 |
|
|
1971
|
+
* | MinType | 4 |
|
|
1972
|
+
* | MaxType | 5 |
|
|
1973
|
+
* | MinMaxType | 6 |
|
|
1974
|
+
* | Timestamp | 7 |
|
|
1975
|
+
* | Time | 8 |
|
|
1976
|
+
* | Date | 9 |
|
|
1977
|
+
* | Include | 10 |
|
|
1978
|
+
* | Number | 11 |
|
|
1979
|
+
* | Integer | 12 |
|
|
1980
|
+
* | Decimal | 13 |
|
|
1981
|
+
* | Null | 14 |
|
|
1982
|
+
* | ContentType | 15 |
|
|
1983
|
+
* | ArrayContains | 16 |
|
|
1984
|
+
* | Values | 17 |
|
|
1985
|
+
* | Boolean | 18 |
|
|
1986
|
+
* | StatusCode | 19 |
|
|
1987
|
+
* | NotEmpty | 20 |
|
|
1988
|
+
* | Semver | 21 |
|
|
1989
|
+
* | EachKey | 22 |
|
|
1990
|
+
* | EachValue | 23 |
|
|
1991
|
+
*
|
|
1992
|
+
* # Safety
|
|
1993
|
+
*
|
|
1994
|
+
* This function is safe as long as the MatchingRuleResult pointer is a valid pointer and the
|
|
1995
|
+
* iterator has not been deleted.
|
|
1996
|
+
*/
|
|
1997
|
+
uint16_t pactffi_matching_rule_id(const struct MatchingRuleResult *rule_result);
|
|
1998
|
+
|
|
1999
|
+
/**
|
|
2000
|
+
* Returns the associated value for the matching rule. If the matching rule does not have an
|
|
2001
|
+
* associated value, will return a NULL pointer.
|
|
2002
|
+
*
|
|
2003
|
+
* The associated values for the rules are:
|
|
2004
|
+
* | Rule | ID | VALUE |
|
|
2005
|
+
* | ---- | -- | ----- |
|
|
2006
|
+
* | Equality | 1 | NULL |
|
|
2007
|
+
* | Regex | 2 | Regex value |
|
|
2008
|
+
* | Type | 3 | NULL |
|
|
2009
|
+
* | MinType | 4 | Minimum value |
|
|
2010
|
+
* | MaxType | 5 | Maximum value |
|
|
2011
|
+
* | MinMaxType | 6 | "min:max" |
|
|
2012
|
+
* | Timestamp | 7 | Format string |
|
|
2013
|
+
* | Time | 8 | Format string |
|
|
2014
|
+
* | Date | 9 | Format string |
|
|
2015
|
+
* | Include | 10 | String value |
|
|
2016
|
+
* | Number | 11 | NULL |
|
|
2017
|
+
* | Integer | 12 | NULL |
|
|
2018
|
+
* | Decimal | 13 | NULL |
|
|
2019
|
+
* | Null | 14 | NULL |
|
|
2020
|
+
* | ContentType | 15 | Content type |
|
|
2021
|
+
* | ArrayContains | 16 | NULL |
|
|
2022
|
+
* | Values | 17 | NULL |
|
|
2023
|
+
* | Boolean | 18 | NULL |
|
|
2024
|
+
* | StatusCode | 19 | NULL |
|
|
2025
|
+
* | NotEmpty | 20 | NULL |
|
|
2026
|
+
* | Semver | 21 | NULL |
|
|
2027
|
+
* | EachKey | 22 | NULL |
|
|
2028
|
+
* | EachValue | 23 | NULL |
|
|
2029
|
+
*
|
|
2030
|
+
* Will return a NULL pointer if the matching rule was a reference or does not have an
|
|
2031
|
+
* associated value.
|
|
2032
|
+
*
|
|
2033
|
+
* # Safety
|
|
2034
|
+
*
|
|
2035
|
+
* This function is safe as long as the MatchingRuleResult pointer is a valid pointer and the
|
|
2036
|
+
* iterator it came from has not been deleted.
|
|
2037
|
+
*/
|
|
2038
|
+
const char *pactffi_matching_rule_value(const struct MatchingRuleResult *rule_result);
|
|
2039
|
+
|
|
2040
|
+
/**
|
|
2041
|
+
* Returns the matching rule pointer for the matching rule. Will return a NULL pointer if the
|
|
2042
|
+
* matching rule result was a reference.
|
|
2043
|
+
*
|
|
2044
|
+
* # Safety
|
|
2045
|
+
*
|
|
2046
|
+
* This function is safe as long as the MatchingRuleResult pointer is a valid pointer and the
|
|
2047
|
+
* iterator it came from has not been deleted.
|
|
2048
|
+
*/
|
|
2049
|
+
const struct MatchingRule *pactffi_matching_rule_pointer(const struct MatchingRuleResult *rule_result);
|
|
2050
|
+
|
|
2051
|
+
/**
|
|
2052
|
+
* Return any matching rule reference to a attribute by name. This is when the matcher should
|
|
2053
|
+
* be configured to match the type of a structure. I.e.,
|
|
2054
|
+
*
|
|
2055
|
+
* ```json
|
|
2056
|
+
* {
|
|
2057
|
+
* "pact:match": "eachValue(matching($'person'))",
|
|
2058
|
+
* "person": {
|
|
2059
|
+
* "name": "Fred",
|
|
2060
|
+
* "age": 100
|
|
2061
|
+
* }
|
|
2062
|
+
* }
|
|
2063
|
+
* ```
|
|
2064
|
+
*
|
|
2065
|
+
* Will return a NULL pointer if the matching rule was not a reference.
|
|
2066
|
+
*
|
|
2067
|
+
* # Safety
|
|
2068
|
+
*
|
|
2069
|
+
* This function is safe as long as the MatchingRuleResult pointer is a valid pointer and the
|
|
2070
|
+
* iterator has not been deleted.
|
|
2071
|
+
*/
|
|
2072
|
+
const char *pactffi_matching_rule_reference_name(const struct MatchingRuleResult *rule_result);
|
|
2073
|
+
|
|
1987
2074
|
/**
|
|
1988
2075
|
* Get the JSON form of the matching rule.
|
|
1989
2076
|
*
|
|
@@ -3325,4 +3412,152 @@ unsigned int pactffi_interaction_contents(InteractionHandle interaction,
|
|
|
3325
3412
|
const char *content_type,
|
|
3326
3413
|
const char *contents);
|
|
3327
3414
|
|
|
3415
|
+
/**
|
|
3416
|
+
* Determines if the string value matches the given matching rule. If the value matches OK,
|
|
3417
|
+
* will return a NULL pointer. If the value does not match, will return a error message as
|
|
3418
|
+
* a NULL terminated string. The error message pointer will need to be deleted with the
|
|
3419
|
+
* `pactffi_string_delete` function once it is no longer required.
|
|
3420
|
+
*
|
|
3421
|
+
* * matching_rule - pointer to a matching rule
|
|
3422
|
+
* * expected_value - value we expect to get as a NULL terminated string
|
|
3423
|
+
* * actual_value - value to match as a NULL terminated string
|
|
3424
|
+
* * cascaded - if the matching rule has been cascaded from a parent. 0 == false, 1 == true
|
|
3425
|
+
*
|
|
3426
|
+
* # Safety
|
|
3427
|
+
*
|
|
3428
|
+
* The matching rule pointer must be a valid pointer, and the value parameters must be
|
|
3429
|
+
* valid pointers to a NULL terminated strings.
|
|
3430
|
+
*/
|
|
3431
|
+
const char *pactffi_matches_string_value(const struct MatchingRule *matching_rule,
|
|
3432
|
+
const char *expected_value,
|
|
3433
|
+
const char *actual_value,
|
|
3434
|
+
uint8_t cascaded);
|
|
3435
|
+
|
|
3436
|
+
/**
|
|
3437
|
+
* Determines if the unsigned integer value matches the given matching rule. If the value matches OK,
|
|
3438
|
+
* will return a NULL pointer. If the value does not match, will return a error message as
|
|
3439
|
+
* a NULL terminated string. The error message pointer will need to be deleted with the
|
|
3440
|
+
* `pactffi_string_delete` function once it is no longer required.
|
|
3441
|
+
*
|
|
3442
|
+
* * matching_rule - pointer to a matching rule
|
|
3443
|
+
* * expected_value - value we expect to get
|
|
3444
|
+
* * actual_value - value to match
|
|
3445
|
+
* * cascaded - if the matching rule has been cascaded from a parent. 0 == false, 1 == true
|
|
3446
|
+
*
|
|
3447
|
+
* # Safety
|
|
3448
|
+
*
|
|
3449
|
+
* The matching rule pointer must be a valid pointer.
|
|
3450
|
+
*/
|
|
3451
|
+
const char *pactffi_matches_u64_value(const struct MatchingRule *matching_rule,
|
|
3452
|
+
uint64_t expected_value,
|
|
3453
|
+
uint64_t actual_value,
|
|
3454
|
+
uint8_t cascaded);
|
|
3455
|
+
|
|
3456
|
+
/**
|
|
3457
|
+
* Determines if the signed integer value matches the given matching rule. If the value matches OK,
|
|
3458
|
+
* will return a NULL pointer. If the value does not match, will return a error message as
|
|
3459
|
+
* a NULL terminated string. The error message pointer will need to be deleted with the
|
|
3460
|
+
* `pactffi_string_delete` function once it is no longer required.
|
|
3461
|
+
*
|
|
3462
|
+
* * matching_rule - pointer to a matching rule
|
|
3463
|
+
* * expected_value - value we expect to get
|
|
3464
|
+
* * actual_value - value to match
|
|
3465
|
+
* * cascaded - if the matching rule has been cascaded from a parent. 0 == false, 1 == true
|
|
3466
|
+
*
|
|
3467
|
+
* # Safety
|
|
3468
|
+
*
|
|
3469
|
+
* The matching rule pointer must be a valid pointer.
|
|
3470
|
+
*/
|
|
3471
|
+
const char *pactffi_matches_i64_value(const struct MatchingRule *matching_rule,
|
|
3472
|
+
int64_t expected_value,
|
|
3473
|
+
int64_t actual_value,
|
|
3474
|
+
uint8_t cascaded);
|
|
3475
|
+
|
|
3476
|
+
/**
|
|
3477
|
+
* Determines if the floating point value matches the given matching rule. If the value matches OK,
|
|
3478
|
+
* will return a NULL pointer. If the value does not match, will return a error message as
|
|
3479
|
+
* a NULL terminated string. The error message pointer will need to be deleted with the
|
|
3480
|
+
* `pactffi_string_delete` function once it is no longer required.
|
|
3481
|
+
*
|
|
3482
|
+
* * matching_rule - pointer to a matching rule
|
|
3483
|
+
* * expected_value - value we expect to get
|
|
3484
|
+
* * actual_value - value to match
|
|
3485
|
+
* * cascaded - if the matching rule has been cascaded from a parent. 0 == false, 1 == true
|
|
3486
|
+
*
|
|
3487
|
+
* # Safety
|
|
3488
|
+
*
|
|
3489
|
+
* The matching rule pointer must be a valid pointer.
|
|
3490
|
+
*/
|
|
3491
|
+
const char *pactffi_matches_f64_value(const struct MatchingRule *matching_rule,
|
|
3492
|
+
double expected_value,
|
|
3493
|
+
double actual_value,
|
|
3494
|
+
uint8_t cascaded);
|
|
3495
|
+
|
|
3496
|
+
/**
|
|
3497
|
+
* Determines if the boolean value matches the given matching rule. If the value matches OK,
|
|
3498
|
+
* will return a NULL pointer. If the value does not match, will return a error message as
|
|
3499
|
+
* a NULL terminated string. The error message pointer will need to be deleted with the
|
|
3500
|
+
* `pactffi_string_delete` function once it is no longer required.
|
|
3501
|
+
*
|
|
3502
|
+
* * matching_rule - pointer to a matching rule
|
|
3503
|
+
* * expected_value - value we expect to get, 0 == false and 1 == true
|
|
3504
|
+
* * actual_value - value to match, 0 == false and 1 == true
|
|
3505
|
+
* * cascaded - if the matching rule has been cascaded from a parent. 0 == false, 1 == true
|
|
3506
|
+
*
|
|
3507
|
+
* # Safety
|
|
3508
|
+
*
|
|
3509
|
+
* The matching rule pointer must be a valid pointer.
|
|
3510
|
+
*/
|
|
3511
|
+
const char *pactffi_matches_bool_value(const struct MatchingRule *matching_rule,
|
|
3512
|
+
uint8_t expected_value,
|
|
3513
|
+
uint8_t actual_value,
|
|
3514
|
+
uint8_t cascaded);
|
|
3515
|
+
|
|
3516
|
+
/**
|
|
3517
|
+
* Determines if the binary value matches the given matching rule. If the value matches OK,
|
|
3518
|
+
* will return a NULL pointer. If the value does not match, will return a error message as
|
|
3519
|
+
* a NULL terminated string. The error message pointer will need to be deleted with the
|
|
3520
|
+
* `pactffi_string_delete` function once it is no longer required.
|
|
3521
|
+
*
|
|
3522
|
+
* * matching_rule - pointer to a matching rule
|
|
3523
|
+
* * expected_value - value we expect to get
|
|
3524
|
+
* * expected_value_len - length of the expected value bytes
|
|
3525
|
+
* * actual_value - value to match
|
|
3526
|
+
* * actual_value_len - length of the actual value bytes
|
|
3527
|
+
* * cascaded - if the matching rule has been cascaded from a parent. 0 == false, 1 == true
|
|
3528
|
+
*
|
|
3529
|
+
* # Safety
|
|
3530
|
+
*
|
|
3531
|
+
* The matching rule, expected value and actual value pointers must be a valid pointers.
|
|
3532
|
+
* expected_value_len and actual_value_len must contain the number of bytes that the value
|
|
3533
|
+
* pointers point to. Passing invalid lengths can lead to undefined behaviour.
|
|
3534
|
+
*/
|
|
3535
|
+
const char *pactffi_matches_binary_value(const struct MatchingRule *matching_rule,
|
|
3536
|
+
const unsigned char *expected_value,
|
|
3537
|
+
uintptr_t expected_value_len,
|
|
3538
|
+
const unsigned char *actual_value,
|
|
3539
|
+
uintptr_t actual_value_len,
|
|
3540
|
+
uint8_t cascaded);
|
|
3541
|
+
|
|
3542
|
+
/**
|
|
3543
|
+
* Determines if the JSON value matches the given matching rule. If the value matches OK,
|
|
3544
|
+
* will return a NULL pointer. If the value does not match, will return a error message as
|
|
3545
|
+
* a NULL terminated string. The error message pointer will need to be deleted with the
|
|
3546
|
+
* `pactffi_string_delete` function once it is no longer required.
|
|
3547
|
+
*
|
|
3548
|
+
* * matching_rule - pointer to a matching rule
|
|
3549
|
+
* * expected_value - value we expect to get as a NULL terminated string
|
|
3550
|
+
* * actual_value - value to match as a NULL terminated string
|
|
3551
|
+
* * cascaded - if the matching rule has been cascaded from a parent. 0 == false, 1 == true
|
|
3552
|
+
*
|
|
3553
|
+
* # Safety
|
|
3554
|
+
*
|
|
3555
|
+
* The matching rule pointer must be a valid pointer, and the value parameters must be
|
|
3556
|
+
* valid pointers to a NULL terminated strings.
|
|
3557
|
+
*/
|
|
3558
|
+
const char *pactffi_matches_json_value(const struct MatchingRule *matching_rule,
|
|
3559
|
+
const char *expected_value,
|
|
3560
|
+
const char *actual_value,
|
|
3561
|
+
uint8_t cascaded);
|
|
3562
|
+
|
|
3328
3563
|
#endif /* pact_ffi_h */
|
package/ffi/pact_ffi.dll
CHANGED
|
Binary file
|
package/ffi/pact_ffi.dll.lib
CHANGED
|
Binary file
|
package/native/consumer.cc
CHANGED
|
@@ -309,7 +309,7 @@ Napi::Value PactffiCreateMockServerForTransport(const Napi::CallbackInfo& info)
|
|
|
309
309
|
std::string transport = info[3].As<Napi::String>().Utf8Value();
|
|
310
310
|
std::string config = info[4].As<Napi::String>().Utf8Value();
|
|
311
311
|
|
|
312
|
-
|
|
312
|
+
uint32_t result = pactffi_create_mock_server_for_transport(pact, addr.c_str(), port, transport.c_str(), config.c_str());
|
|
313
313
|
|
|
314
314
|
return Number::New(env, result);
|
|
315
315
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pact-foundation/pact-core",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.13.1",
|
|
4
4
|
"description": "Core of @pact-foundation/pact. You almost certainly don't want to depend on this directly.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"homepage": "https://github.com/pact-foundation/pact-js-core#readme",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@types/express": "4.11.1",
|
|
84
84
|
"@types/mkdirp": "^0.5.2",
|
|
85
85
|
"@types/mocha": "9.0.0",
|
|
86
|
-
"@types/node": "
|
|
86
|
+
"@types/node": "^18.11.10",
|
|
87
87
|
"@types/promise-timeout": "^1.3.0",
|
|
88
88
|
"@types/rimraf": "^2.0.2",
|
|
89
89
|
"@types/sinon": "^9.0.11",
|
package/src/can-deploy.js
CHANGED
|
@@ -94,8 +94,10 @@ class CanDeploy {
|
|
|
94
94
|
...CanDeploy.convertForSpawnBinary(this.options),
|
|
95
95
|
], this.__argMapping);
|
|
96
96
|
const output = [];
|
|
97
|
-
instance.stdout
|
|
98
|
-
|
|
97
|
+
if (instance.stdout && instance.stderr) {
|
|
98
|
+
instance.stdout.on('data', (l) => output.push(l));
|
|
99
|
+
instance.stderr.on('data', (l) => output.push(l));
|
|
100
|
+
}
|
|
99
101
|
instance.once('close', (code) => {
|
|
100
102
|
const result = output.join('\n');
|
|
101
103
|
if (this.options.output === 'json') {
|
package/src/can-deploy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"can-deploy.js","sourceRoot":"","sources":["can-deploy.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAoD;AACpD,oDAA4B;AAC5B,wEAA+C;AAC/C,qDAAwD;AACxD,mCAA6C;AAC7C,8CAAgC;AAEhC,0CAA2C;AAE3C,MAAa,iBAAkB,SAAQ,KAAK;IAG1C,YAAY,MAAkC;QAC5C,KAAK,CAAC,+CAA+C,CAAC,CAAC;QACvD,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;QAChC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AARD,8CAQC;AAED,MAAa,SAAS;IAkCpB,YAAY,OAAyB;QAfpB,iBAAY,GAAG;YAC9B,IAAI,EAAE,eAAe;YACrB,OAAO,EAAE,WAAW;YACpB,MAAM,EAAE,UAAU;YAClB,EAAE,EAAE,MAAM;YACV,UAAU,EAAE,mBAAmB;YAC/B,eAAe,EAAE,gBAAgB;YACjC,kBAAkB,EAAE,mBAAmB;YACvC,kBAAkB,EAAE,mBAAmB;YACvC,MAAM,EAAE,UAAU;YAClB,OAAO,EAAE,WAAW;YACpB,iBAAiB,EAAE,uBAAuB;YAC1C,aAAa,EAAE,kBAAkB;SAClC,CAAC;QAGA,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;QAExB,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,KAAK,CAAC;QAC3C,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YACnB,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;SACzB;QAED,UAAU,CAAC,MAAM,CAAC,aAAa,CAC7B,OAAO,CAAC,YAAY,EACpB,uCAAuC,CACxC,CAAC;QAEF,UAAU,CAAC,MAAM,CAAC,cAAc,CAC9B,OAAO,CAAC,UAAU,EAClB,sCAAsC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AAI,KAAK,CAAC,EAAE;oBACd,gBAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;oBACpB,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;iBACxB;gBAED,gBAAM,CAAC,KAAK,CACV,iDAAiD,MAAM,EAAE,CAC1D,CAAC;gBACF,OAAO,MAAM,CAAC,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;YAC/C,CAAC,CAAC,CAAC;QACL,CAAC,CACF,CAAC;QAEF,OAAO,yBAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC,OAAO,CAAC,OAAiB,CAAC,CAAC,KAAK,CACpE,CAAC,GAAU,EAAE,EAAE;YACb,IAAI,GAAG,YAAY,8BAAY,EAAE;gBAC/B,MAAM,IAAI,KAAK,CACb,qDAAqD,CACtD,CAAC;aACH;YACD,MAAM,GAAG,CAAC;QACZ,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AAzJD,8BAyJC;AAED,kBAAe,CAAC,OAAyB,EAAa,EAAE,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC"}
|
package/src/consumer/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
export declare type MatchingResult = MatchingResultSuccess | MatchingResultRequestMismatch | MatchingResultRequestNotFound | MatchingResultMissingRequest;
|
|
2
|
+
export declare type MatchingResult = MatchingResultSuccess | MatchingResultRequestMismatch | MatchingResultRequestNotFound | MatchingResultMissingRequest | MatchingResultPlugin;
|
|
3
3
|
export declare type MatchingResultSuccess = {
|
|
4
4
|
type: 'request-match';
|
|
5
5
|
};
|
|
@@ -21,7 +21,12 @@ export declare type MatchingResultMissingRequest = {
|
|
|
21
21
|
path: string;
|
|
22
22
|
request: RequestMismatch;
|
|
23
23
|
};
|
|
24
|
-
export declare type
|
|
24
|
+
export declare type MatchingResultPlugin = {
|
|
25
|
+
error: string;
|
|
26
|
+
path?: string;
|
|
27
|
+
mismatches: PluginContentMismatch[];
|
|
28
|
+
};
|
|
29
|
+
export declare type Mismatch = MethodMismatch | PathMismatch | StatusMismatch | QueryMismatch | HeaderMismatch | BodyTypeMismatch | BodyMismatch | MetadataMismatch | PluginContentMismatch;
|
|
25
30
|
export declare type MethodMismatch = {
|
|
26
31
|
type: 'MethodMismatch';
|
|
27
32
|
expected: string;
|
|
@@ -82,6 +87,13 @@ export declare type RequestMismatch = {
|
|
|
82
87
|
query?: Record<string, Array<string>>;
|
|
83
88
|
body?: string;
|
|
84
89
|
};
|
|
90
|
+
export declare type PluginContentMismatch = {
|
|
91
|
+
path: string;
|
|
92
|
+
expected?: string;
|
|
93
|
+
actual?: string;
|
|
94
|
+
mismatch: string;
|
|
95
|
+
diff?: string;
|
|
96
|
+
};
|
|
85
97
|
export declare type PluginInteraction = RequestPluginInteraction & ResponsePluginInteraction & RequestResponsePluginInteraction;
|
|
86
98
|
export declare type RequestPluginInteraction = {
|
|
87
99
|
withPluginRequestInteractionContents: (contentType: string, contents: string) => boolean;
|
package/src/ffi/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LogLevel } from '../logger/types';
|
|
2
2
|
import { Ffi } from './types';
|
|
3
3
|
declare const ffiLib: Ffi;
|
|
4
|
-
export declare const PACT_FFI_VERSION = "0.3.
|
|
4
|
+
export declare const PACT_FFI_VERSION = "0.3.18";
|
|
5
5
|
declare let ffi: typeof ffiLib;
|
|
6
6
|
export declare const getFfiLib: (logLevel?: LogLevel) => typeof ffi;
|
|
7
7
|
export {};
|
package/src/ffi/index.js
CHANGED
|
@@ -23,7 +23,7 @@ exports.getFfiLib = exports.PACT_FFI_VERSION = void 0;
|
|
|
23
23
|
const logger_1 = __importStar(require("../logger"));
|
|
24
24
|
const bindings = require("bindings");
|
|
25
25
|
const ffiLib = bindings('pact.node');
|
|
26
|
-
exports.PACT_FFI_VERSION = '0.3.
|
|
26
|
+
exports.PACT_FFI_VERSION = '0.3.18';
|
|
27
27
|
let ffi;
|
|
28
28
|
let ffiLogLevel;
|
|
29
29
|
const initialiseFfi = (logLevel) => {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
export declare const libName: (library: string, version: string, processArch?:
|
|
2
|
+
export declare const libName: (library: string, version: string, processArch?: NodeJS.Architecture, processPlatform?: NodeJS.Platform) => string;
|
package/src/message.js
CHANGED
|
@@ -64,10 +64,12 @@ class Message {
|
|
|
64
64
|
const { pactFileWriteMode, content, ...restOptions } = this.options;
|
|
65
65
|
const instance = spawn_1.default.spawnBinary(pact_standalone_1.default.messageFullPath, [{ pactFileWriteMode }, restOptions], this.__argMapping);
|
|
66
66
|
const output = [];
|
|
67
|
-
instance.stdout.
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
if (instance.stdout && instance.stderr && instance.stdin) {
|
|
68
|
+
instance.stdout.on('data', (l) => output.push(l));
|
|
69
|
+
instance.stderr.on('data', (l) => output.push(l));
|
|
70
|
+
instance.stdin.write(content);
|
|
71
|
+
instance.stdin.end();
|
|
72
|
+
}
|
|
71
73
|
instance.once('close', (code) => {
|
|
72
74
|
const o = output.join('\n');
|
|
73
75
|
logger_1.default.info(o);
|
package/src/message.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"","sources":["message.ts"],"names":[],"mappings":";;;;;;AAAA,yBAA0B;AAC1B,sDAA8B;AAC9B,oDAA4B;AAC5B,mCAAsC;AACtC,wEAA+C;AAC/C,6BAA8B;AAC9B,iCAAkC;AAClC,0CAA2C;AAE3C,MAAa,OAAO;IAUlB,YAAY,OAAuB;QARlB,iBAAY,GAAG;YAC9B,iBAAiB,EAAE,mBAAW;YAC9B,GAAG,EAAE,YAAY;YACjB,QAAQ,EAAE,YAAY;YACtB,QAAQ,EAAE,YAAY;YACtB,IAAI,EAAE,8BAA8B;SACrC,CAAC;QAGA,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;QACxB,O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AC,CAAC,CAAC,CAAC;gBAClD,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;gBAC9B,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;aACtB;YACD,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;gBAC9B,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC5B,gBAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAEf,IAAI,IAAI,KAAK,CAAC,EAAE;oBACd,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;iBACnB;qBAAM;oBACL,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;iBAClB;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAlGD,0BAkGC;AAED,kBAAe,CAAC,OAAuB,EAAW,EAAE,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC"}
|
package/src/publisher.js
CHANGED
|
@@ -96,8 +96,10 @@ class Publisher {
|
|
|
96
96
|
return promise_timeout_1.timeout(new Promise((resolve, reject) => {
|
|
97
97
|
const instance = spawn_1.default.spawnBinary(pact_standalone_1.default.brokerFullPath, [{ cliVerb: 'publish' }, this.options], this.__argMapping);
|
|
98
98
|
const output = [];
|
|
99
|
-
instance.
|
|
100
|
-
|
|
99
|
+
if (instance.stderr && instance.stdout) {
|
|
100
|
+
instance.stdout.on('data', (l) => output.push(l));
|
|
101
|
+
instance.stderr.on('data', (l) => output.push(l));
|
|
102
|
+
}
|
|
101
103
|
instance.once('close', (code) => {
|
|
102
104
|
const o = output.join('\n');
|
|
103
105
|
const pactUrls = /https?:\/\/.*\/pacts\/.*$/gim.exec(o);
|
package/src/publisher.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publisher.js","sourceRoot":"","sources":["publisher.ts"],"names":[],"mappings":";;;;;;;;;;;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,CAAC,KAAK,CAAC,CAAC,GAAU,EAAE,EAAE;YACrB,IAAI,GAAG,YAAY,8BAAY,EAAE;gBAC/B,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;aACxE;YACD,MAAM,GAAG,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AA5ID,8BA4IC;AAED,kBAAe,CAAC,OAAyB,EAAa,EAAE,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC"}
|
package/src/service.js
CHANGED
|
@@ -125,15 +125,19 @@ class AbstractService extends events.EventEmitter {
|
|
|
125
125
|
const match = data.match(/port=([0-9]+)/);
|
|
126
126
|
if (match && match[1]) {
|
|
127
127
|
this.options.port = parseInt(match[1], 10);
|
|
128
|
-
if (this
|
|
128
|
+
if (this?.__instance?.stdout) {
|
|
129
129
|
this.__instance.stdout.removeListener('data', catchPort);
|
|
130
130
|
}
|
|
131
131
|
logger_1.default.info(`Pact running on port ${this.options.port}`);
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
|
-
this
|
|
134
|
+
if (this?.__instance?.stdout) {
|
|
135
|
+
this.__instance.stdout.on('data', catchPort);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
if (this?.__instance?.stderr) {
|
|
139
|
+
this.__instance.stderr.on('data', (data) => logger_1.default.error(`Pact Binary Error: ${data}`));
|
|
135
140
|
}
|
|
136
|
-
this.__instance.stderr.on('data', (data) => logger_1.default.error(`Pact Binary Error: ${data}`));
|
|
137
141
|
return promise_timeout_1.timeout(this.__waitForServiceUp(), getTimeout(this.options))
|
|
138
142
|
.then(() => {
|
|
139
143
|
this.__running = true;
|
package/src/service.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA8B;AAC9B,yBAA0B;AAC1B,iCAAkC;AAClC,mDAA+C;AAE/C,oDAAgD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BACF,OAAO;yBACR;wBACD,UAAU,CAAC,KAAK,EAAE,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;oBACpD,CAAC,EACD,GAAG,EAAE,CAAC,OAAO,EAAE,CAChB,CAAC;iBACH;qBAAM;oBACL,OAAO,EAAE,CAAC;iBACX;YACH,CAAC,CAAC;YACF,KAAK,EAAE,CAAC;QACV,CAAC,CAAC,CAAC;QAEH,OAAO,YAAY,CAAC;IACtB,CAAC;IAEO,MAAM,CAAC,OAAuB;QACpC,MAAM,MAAM,GAAe;YACzB,MAAM,EAAE,KAAK;YACb,OAAO,EAAE;gBACP,qBAAqB,EAAE,MAAM;gBAC7B,cAAc,EAAE,kBAAkB;aACnC;SACF,CAAC;QAEF,IAAI,OAAO,CAAC,GAAG,EAAE;YACf,OAAO,CAAC,GAAG,CAAC,4BAA4B,GAAG,GAAG,CAAC;YAC/C,MAAM,CAAC,kBAAkB,GAAG,KAAK,CAAC;YAClC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;SACtB;QAED,OAAO,MAAM,CACX,KAAK,EACL,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,EAAE,EACjE,MAAM,CACP,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YACb,IAAI,GAAG,CAAC,UAAU,KAAK,GAAG,EAAE;gBAC1B,MAAM,IAAI,KAAK,CAAC,gBAAgB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;aACzD;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAzTD,0CAyTC"}
|
package/src/spawn/spawn.js
CHANGED
|
@@ -50,10 +50,12 @@ class Spawn {
|
|
|
50
50
|
logger_1.default.debug(`Starting pact binary '${command}', with arguments [${spawnArgs.join(' ')}]`);
|
|
51
51
|
logger_1.default.trace(`Environment: ${JSON.stringify(opts)}`);
|
|
52
52
|
const instance = spawn(command, spawnArgs, opts);
|
|
53
|
-
instance.stdout
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
if (instance.stderr && instance.stdout) {
|
|
54
|
+
instance.stdout.on('data', logger_1.default.debug.bind(logger_1.default));
|
|
55
|
+
instance.stdout.setEncoding('utf8');
|
|
56
|
+
instance.stderr.setEncoding('utf8');
|
|
57
|
+
instance.stderr.on('data', logger_1.default.debug.bind(logger_1.default));
|
|
58
|
+
}
|
|
57
59
|
instance.on('error', logger_1.default.error.bind(logger_1.default));
|
|
58
60
|
instance.once('close', (code) => {
|
|
59
61
|
if (code !== 0) {
|
|
@@ -69,9 +71,11 @@ class Spawn {
|
|
|
69
71
|
logger_1.default.info(`Removing Pact process with PID: ${pid}`);
|
|
70
72
|
binary.removeAllListeners();
|
|
71
73
|
try {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
if (pid) {
|
|
75
|
+
pact_environment_1.default.isWindows()
|
|
76
|
+
? cp.execSync(`taskkill /f /t /pid ${pid}`)
|
|
77
|
+
: process.kill(-pid, 'SIGINT');
|
|
78
|
+
}
|
|
75
79
|
}
|
|
76
80
|
catch (e) {
|
|
77
81
|
return false;
|
package/src/spawn/spawn.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spawn.js","sourceRoot":"","sources":["spawn.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAsC;AACtC,oCAAqC;AAErC,2CAA6B;AAC7B,uDAA+B;AAC/B,2EAAkD;AAClD,yDAAsE;AAEtE,MAAa,KAAK;IAChB,IAAW,GAAG;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACvC,CAAC;IAEM,WAAW,CAChB,OAAe,EACf,OAAuB,EAAE,EACzB,aAAuC,EAAE;QAEzC,MAAM,OAAO,GAAG,IAAI,CAAC,KA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