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