@pact-foundation/pact-core 13.5.1 → 13.6.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.
Files changed (61) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/binding.gyp +141 -0
  3. package/build/Makefile +334 -0
  4. package/build/binding.Makefile +6 -0
  5. package/build/copy_release_artifacts.target.mk +47 -0
  6. package/build/pact.target.mk +174 -0
  7. package/build/set_osx_install_name.target.mk +18 -0
  8. package/ffi/{v0.0.3-libpact_ffi-osx-aarch64-apple-darwin.dylib → libpact_ffi.dylib} +0 -0
  9. package/ffi/{v0.0.3-libpact_ffi-linux-x86_64.so → libpact_ffi.so} +0 -0
  10. package/ffi/libpact_ffi.so.gz +0 -0
  11. package/ffi/{v0.0.3-libpact_ffi-osx-x86_64.dylib → osxaarch64/libpact_ffi.dylib} +0 -0
  12. package/ffi/pact-cpp.h +2344 -0
  13. package/ffi/{v0.0.3-pact.h → pact.h} +667 -119
  14. package/ffi/{v0.0.3-pact_ffi-windows-x86_64.dll → pact_ffi.dll} +0 -0
  15. package/ffi/pact_ffi.dll.lib +0 -0
  16. package/native/addon.cc +68 -0
  17. package/native/consumer.cc +1570 -0
  18. package/native/consumer.h +124 -0
  19. package/native/ffi.cc +148 -0
  20. package/native/ffi.h +18 -0
  21. package/native/plugin.cc +6 -0
  22. package/native/plugin.h +7 -0
  23. package/native/provider.cc +815 -0
  24. package/native/provider.h +38 -0
  25. package/package.json +12 -9
  26. package/src/consumer/checkErrors.d.ts +7 -0
  27. package/src/consumer/checkErrors.js +41 -0
  28. package/src/consumer/checkErrors.js.map +1 -0
  29. package/src/consumer/index.d.ts +5 -0
  30. package/src/consumer/index.js +222 -0
  31. package/src/consumer/index.js.map +1 -0
  32. package/src/consumer/types.d.ts +132 -0
  33. package/src/{ffi/internals → consumer}/types.js +0 -0
  34. package/src/{ffi/internals → consumer}/types.js.map +0 -0
  35. package/src/ffi/index.d.ts +4 -3
  36. package/src/ffi/index.js +6 -9
  37. package/src/ffi/index.js.map +1 -1
  38. package/src/ffi/internals/index.d.ts +0 -2
  39. package/src/ffi/internals/index.js +1 -11
  40. package/src/ffi/internals/index.js.map +1 -1
  41. package/src/ffi/types.d.ts +100 -0
  42. package/src/ffi/types.js +70 -0
  43. package/src/ffi/types.js.map +1 -0
  44. package/src/index.d.ts +2 -0
  45. package/src/index.js +2 -0
  46. package/src/index.js.map +1 -1
  47. package/src/logger/index.d.ts +5 -2
  48. package/src/logger/index.js +15 -2
  49. package/src/logger/index.js.map +1 -1
  50. package/src/verifier/argumentMapper/arguments.js +8 -0
  51. package/src/verifier/argumentMapper/arguments.js.map +1 -1
  52. package/src/verifier/index.js +1 -7
  53. package/src/verifier/index.js.map +1 -1
  54. package/src/verifier/nativeVerifier.js +74 -15
  55. package/src/verifier/nativeVerifier.js.map +1 -1
  56. package/src/verifier/types.d.ts +10 -2
  57. package/test.js +52 -0
  58. package/src/ffi/declarations.d.ts +0 -136
  59. package/src/ffi/declarations.js +0 -92
  60. package/src/ffi/declarations.js.map +0 -1
  61. package/src/ffi/internals/types.d.ts +0 -23
Binary file
@@ -0,0 +1,68 @@
1
+ #include <napi.h>
2
+ #include "ffi.h"
3
+ #include "consumer.h"
4
+ #include "provider.h"
5
+ #include "plugin.h"
6
+
7
+ Napi::Object Init(Napi::Env env, Napi::Object exports) {
8
+ exports.Set(Napi::String::New(env, "pactffiVersion"), Napi::Function::New(env, PactffiVersion));
9
+ exports.Set(Napi::String::New(env, "pactffiInit"), Napi::Function::New(env, PactffiInit));
10
+ exports.Set(Napi::String::New(env, "pactffiInitWithLogLevel"), Napi::Function::New(env, PactffiInitWithLogLevel));
11
+
12
+ // Consumer
13
+ exports.Set(Napi::String::New(env, "pactffiMockServerMatched"), Napi::Function::New(env, PactffiMockServerMatched));
14
+ exports.Set(Napi::String::New(env, "pactffiMockServerMismatches"), Napi::Function::New(env, PactffiMockServerMismatches));
15
+ exports.Set(Napi::String::New(env, "pactffiCreateMockServerForPact"), Napi::Function::New(env, PactffiCreateMockServerForPact));
16
+ exports.Set(Napi::String::New(env, "pactffiCleanupMockServer"), Napi::Function::New(env, PactffiCleanupMockServer));
17
+ exports.Set(Napi::String::New(env, "pactffiWritePactFile"), Napi::Function::New(env, PactffiWritePactFile));
18
+ exports.Set(Napi::String::New(env, "pactffiNewPact"), Napi::Function::New(env, PactffiNewPact));
19
+ exports.Set(Napi::String::New(env, "pactffiNewInteraction"), Napi::Function::New(env, PactffiNewInteraction));
20
+ exports.Set(Napi::String::New(env, "pactffiUponReceiving"), Napi::Function::New(env, PactffiUponReceiving));
21
+ exports.Set(Napi::String::New(env, "pactffiGiven"), Napi::Function::New(env, PactffiGiven));
22
+ exports.Set(Napi::String::New(env, "pactffiGivenWithParam"), Napi::Function::New(env, PactffiGivenWithParam));
23
+ exports.Set(Napi::String::New(env, "pactffiWithRequest"), Napi::Function::New(env, PactffiWithRequest));
24
+ exports.Set(Napi::String::New(env, "pactffiWithQueryParameter"), Napi::Function::New(env, PactffiWithQueryParameter));
25
+ exports.Set(Napi::String::New(env, "pactffiWithSpecification"), Napi::Function::New(env, PactffiWithSpecification));
26
+ exports.Set(Napi::String::New(env, "pactffiWithPactMetadata"), Napi::Function::New(env, PactffiWithPactMetadata));
27
+ exports.Set(Napi::String::New(env, "pactffiWithHeader"), Napi::Function::New(env, PactffiWithHeader));
28
+ exports.Set(Napi::String::New(env, "pactffiWithBody"), Napi::Function::New(env, PactffiWithBody));
29
+ exports.Set(Napi::String::New(env, "pactffiWithBinaryFile"), Napi::Function::New(env, PactffiWithBinaryFile));
30
+ exports.Set(Napi::String::New(env, "pactffiWithMultipartFile"), Napi::Function::New(env, PactffiWithMultipartFile));
31
+ exports.Set(Napi::String::New(env, "pactffiResponseStatus"), Napi::Function::New(env, PactffiResponseStatus));
32
+ exports.Set(Napi::String::New(env, "pactffiUsingPlugin"), Napi::Function::New(env, PactffiUsingPlugin));
33
+ exports.Set(Napi::String::New(env, "pactffiCleanupPlugins"), Napi::Function::New(env, PactffiCleanupPlugins));
34
+ exports.Set(Napi::String::New(env, "pactffiPluginInteractionContents"), Napi::Function::New(env, PactffiPluginInteractionContents));
35
+
36
+ // exports.Set(Napi::String::New(env, "pactffiNewMessagePact"), Napi::Function::New(env, PactffiNewMessagePact));
37
+ // exports.Set(Napi::String::New(env, "pactffiWriteMessagePactFile"), Napi::Function::New(env, PactffiWriteMessagePactFile));
38
+ // exports.Set(Napi::String::New(env, "pactffiWithMessagePactMetadata"), Napi::Function::New(env, PactffiWithMessagePactMetadata));
39
+ exports.Set(Napi::String::New(env, "pactffiNewAsyncMessage"), Napi::Function::New(env, PactffiNewAsyncMessage));
40
+ exports.Set(Napi::String::New(env, "pactffiNewSyncMessage"), Napi::Function::New(env, PactffiNewSyncMessage));
41
+ // exports.Set(Napi::String::New(env, "pactffiNewMessage"), Napi::Function::New(env, PactffiNewMessage));
42
+ exports.Set(Napi::String::New(env, "pactffiMessageReify"), Napi::Function::New(env, PactffiMessageReify));
43
+ exports.Set(Napi::String::New(env, "pactffiMessageGiven"), Napi::Function::New(env, PactffiMessageGiven));
44
+ exports.Set(Napi::String::New(env, "pactffiMessageGivenWithParam"), Napi::Function::New(env, PactffiMessageGivenWithParam));
45
+ exports.Set(Napi::String::New(env, "pactffiMessageWithContents"), Napi::Function::New(env, PactffiMessageWithContents));
46
+ exports.Set(Napi::String::New(env, "pactffiMessageWithMetadata"), Napi::Function::New(env, PactffiMessageWithMetadata));
47
+ exports.Set(Napi::String::New(env, "pactffiMessageExpectsToReceive"), Napi::Function::New(env, PactffiMessageExpectsToReceive));
48
+
49
+ // Provider
50
+ exports.Set(Napi::String::New(env, "pactffiVerifierNewForApplication"), Napi::Function::New(env, PactffiVerifierNewForApplication));
51
+ exports.Set(Napi::String::New(env, "pactffiVerifierSetVerificationOptions"), Napi::Function::New(env, PactffiVerifierSetVerificationOptions));
52
+ exports.Set(Napi::String::New(env, "pactffiVerifierSetPublishOptions"), Napi::Function::New(env, PactffiVerifierSetPublishOptions));
53
+ exports.Set(Napi::String::New(env, "pactffiVerifierExecute"), Napi::Function::New(env, PactffiVerifierExecute));
54
+ exports.Set(Napi::String::New(env, "pactffiVerifierShutdown"), Napi::Function::New(env, PactffiVerifierShutdown));
55
+ exports.Set(Napi::String::New(env, "pactffiVerifierSetProviderInfo"), Napi::Function::New(env, PactffiVerifierSetProviderInfo));
56
+ exports.Set(Napi::String::New(env, "pactffiVerifierSetFilterInfo"), Napi::Function::New(env, PactffiVerifierSetFilterInfo));
57
+ exports.Set(Napi::String::New(env, "pactffiVerifierSetProviderState"), Napi::Function::New(env, PactffiVerifierSetProviderState));
58
+ exports.Set(Napi::String::New(env, "pactffiVerifierSetConsumerFilters"), Napi::Function::New(env, PactffiVerifierSetConsumerFilters));
59
+ exports.Set(Napi::String::New(env, "pactffiVerifierAddCustomHeader"), Napi::Function::New(env, PactffiVerifierAddCustomHeader));
60
+ exports.Set(Napi::String::New(env, "pactffiVerifierAddFileSource"), Napi::Function::New(env, PactffiVerifierAddFileSource));
61
+ exports.Set(Napi::String::New(env, "pactffiVerifierAddDirectorySource"), Napi::Function::New(env, PactffiVerifierAddDirectorySource));
62
+ exports.Set(Napi::String::New(env, "pactffiVerifierUrlSource"), Napi::Function::New(env, PactffiVerifierUrlSource));
63
+ exports.Set(Napi::String::New(env, "pactffiVerifierBrokerSourceWithSelectors"), Napi::Function::New(env, PactffiVerifierBrokerSourceWithSelectors));
64
+
65
+ return exports;
66
+ }
67
+
68
+ NODE_API_MODULE(pact, Init)