@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 CHANGED
@@ -3249,7 +3249,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
3249
3249
 
3250
3250
  const negativeNumberArg = (arg) => {
3251
3251
  // return false if not a negative number
3252
- if (!/^-\d*\.?\d+(e[+-]?\d+)?$/.test(arg)) return false;
3252
+ if (!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(arg)) return false;
3253
3253
  // negative number is ok unless digit used as an option in command hierarchy
3254
3254
  return !this._getCommandAndAncestors().some((cmd) =>
3255
3255
  cmd.options
@@ -27592,6 +27592,7 @@ var Ajv$1 = /*@__PURE__*/getDefaultExportFromCjs(ajvExports);
27592
27592
  // a full schema can be found at https://github.com/pactflow/pact-schemas
27593
27593
  // but we don't use that here, because we try to be permissive with input
27594
27594
  const Interaction = Type.Object({
27595
+ _skip: Type.Optional(Type.Boolean()),
27595
27596
  type: Type.Optional(Type.String()),
27596
27597
  description: Type.Optional(Type.String()),
27597
27598
  providerState: Type.Optional(Type.String()),
@@ -27720,9 +27721,9 @@ const parse = (pact) => {
27720
27721
  const interactionParser = version >= 4 ? interactionV4 : version >= 3 ? interactionV3 : interactionV1;
27721
27722
  return {
27722
27723
  metadata,
27723
- interactions: interactions
27724
- .filter(supportedInteractions)
27725
- .map(interactionParser),
27724
+ interactions: interactions.map((i) => supportedInteractions(i)
27725
+ ? interactionParser(i)
27726
+ : { _skip: true }),
27726
27727
  };
27727
27728
  };
27728
27729
  class ParserError extends Error {
@@ -32504,6 +32505,10 @@ class Comparator {
32504
32505
  }
32505
32506
  const parsedPact = parse(pact);
32506
32507
  for (const [index, interaction] of parsedPact.interactions.entries()) {
32508
+ if (interaction._skip) {
32509
+ // non http/synchronous have been zero-ed out
32510
+ continue;
32511
+ }
32507
32512
  const { method, path, query } = interaction.request;
32508
32513
  let pathWithLeadingSlash = path.startsWith("/") ? path : `/${path}`;
32509
32514
  if (this.#config.get("no-percent-encoding")) {
@@ -32552,7 +32557,7 @@ class Comparator {
32552
32557
  }
32553
32558
  }
32554
32559
 
32555
- var version = "1.7.0";
32560
+ var version = "1.7.1";
32556
32561
  var packageJson = {
32557
32562
  version: version};
32558
32563