@pactflow/openapi-pact-comparator 1.7.0 → 1.7.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/dist/cli.cjs +10 -5
- package/dist/cli.cjs.map +1 -1
- package/dist/index.cjs +8 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +8 -3
- package/dist/index.mjs.map +1 -1
- package/dist/src/documents/pact.d.ts +2 -0
- package/package.json +15 -15
package/dist/index.mjs
CHANGED
|
@@ -19431,6 +19431,7 @@ var Ajv$1 = /*@__PURE__*/getDefaultExportFromCjs(ajvExports);
|
|
|
19431
19431
|
// a full schema can be found at https://github.com/pactflow/pact-schemas
|
|
19432
19432
|
// but we don't use that here, because we try to be permissive with input
|
|
19433
19433
|
const Interaction = Type.Object({
|
|
19434
|
+
_skip: Type.Optional(Type.Boolean()),
|
|
19434
19435
|
type: Type.Optional(Type.String()),
|
|
19435
19436
|
description: Type.Optional(Type.String()),
|
|
19436
19437
|
providerState: Type.Optional(Type.String()),
|
|
@@ -19559,9 +19560,9 @@ const parse = (pact) => {
|
|
|
19559
19560
|
const interactionParser = version >= 4 ? interactionV4 : version >= 3 ? interactionV3 : interactionV1;
|
|
19560
19561
|
return {
|
|
19561
19562
|
metadata,
|
|
19562
|
-
interactions: interactions
|
|
19563
|
-
|
|
19564
|
-
|
|
19563
|
+
interactions: interactions.map((i) => supportedInteractions(i)
|
|
19564
|
+
? interactionParser(i)
|
|
19565
|
+
: { _skip: true }),
|
|
19565
19566
|
};
|
|
19566
19567
|
};
|
|
19567
19568
|
class ParserError extends Error {
|
|
@@ -24343,6 +24344,10 @@ class Comparator {
|
|
|
24343
24344
|
}
|
|
24344
24345
|
const parsedPact = parse(pact);
|
|
24345
24346
|
for (const [index, interaction] of parsedPact.interactions.entries()) {
|
|
24347
|
+
if (interaction._skip) {
|
|
24348
|
+
// non http/synchronous have been zero-ed out
|
|
24349
|
+
continue;
|
|
24350
|
+
}
|
|
24346
24351
|
const { method, path, query } = interaction.request;
|
|
24347
24352
|
let pathWithLeadingSlash = path.startsWith("/") ? path : `/${path}`;
|
|
24348
24353
|
if (this.#config.get("no-percent-encoding")) {
|