@pactflow/openapi-pact-comparator 1.8.1 → 1.10.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.
- package/dist/cli.cjs +190 -217
- package/dist/cli.cjs.map +1 -1
- package/dist/index.cjs +170 -203
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +170 -203
- package/dist/index.mjs.map +1 -1
- package/dist/src/documents/pact.d.ts +4 -13
- package/dist/src/results/index.d.ts +1 -1
- package/package.json +7 -7
package/dist/cli.cjs
CHANGED
|
@@ -4321,7 +4321,7 @@ const {
|
|
|
4321
4321
|
Help,
|
|
4322
4322
|
} = commander;
|
|
4323
4323
|
|
|
4324
|
-
/*! js-yaml 4.1.
|
|
4324
|
+
/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */
|
|
4325
4325
|
function isNothing(subject) {
|
|
4326
4326
|
return (typeof subject === 'undefined') || (subject === null);
|
|
4327
4327
|
}
|
|
@@ -5532,6 +5532,22 @@ function charFromCodepoint(c) {
|
|
|
5532
5532
|
);
|
|
5533
5533
|
}
|
|
5534
5534
|
|
|
5535
|
+
// set a property of a literal object, while protecting against prototype pollution,
|
|
5536
|
+
// see https://github.com/nodeca/js-yaml/issues/164 for more details
|
|
5537
|
+
function setProperty(object, key, value) {
|
|
5538
|
+
// used for this specific key only because Object.defineProperty is slow
|
|
5539
|
+
if (key === '__proto__') {
|
|
5540
|
+
Object.defineProperty(object, key, {
|
|
5541
|
+
configurable: true,
|
|
5542
|
+
enumerable: true,
|
|
5543
|
+
writable: true,
|
|
5544
|
+
value: value
|
|
5545
|
+
});
|
|
5546
|
+
} else {
|
|
5547
|
+
object[key] = value;
|
|
5548
|
+
}
|
|
5549
|
+
}
|
|
5550
|
+
|
|
5535
5551
|
var simpleEscapeCheck = new Array(256); // integer, for fast access
|
|
5536
5552
|
var simpleEscapeMap = new Array(256);
|
|
5537
5553
|
for (var i = 0; i < 256; i++) {
|
|
@@ -5710,7 +5726,7 @@ function mergeMappings(state, destination, source, overridableKeys) {
|
|
|
5710
5726
|
key = sourceKeys[index];
|
|
5711
5727
|
|
|
5712
5728
|
if (!_hasOwnProperty$1.call(destination, key)) {
|
|
5713
|
-
destination
|
|
5729
|
+
setProperty(destination, key, source[key]);
|
|
5714
5730
|
overridableKeys[key] = true;
|
|
5715
5731
|
}
|
|
5716
5732
|
}
|
|
@@ -5770,17 +5786,7 @@ function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valu
|
|
|
5770
5786
|
throwError(state, 'duplicated mapping key');
|
|
5771
5787
|
}
|
|
5772
5788
|
|
|
5773
|
-
|
|
5774
|
-
if (keyNode === '__proto__') {
|
|
5775
|
-
Object.defineProperty(_result, keyNode, {
|
|
5776
|
-
configurable: true,
|
|
5777
|
-
enumerable: true,
|
|
5778
|
-
writable: true,
|
|
5779
|
-
value: valueNode
|
|
5780
|
-
});
|
|
5781
|
-
} else {
|
|
5782
|
-
_result[keyNode] = valueNode;
|
|
5783
|
-
}
|
|
5789
|
+
setProperty(_result, keyNode, valueNode);
|
|
5784
5790
|
delete overridableKeys[keyNode];
|
|
5785
5791
|
}
|
|
5786
5792
|
|
|
@@ -20365,18 +20371,18 @@ var hasRequiredCode$1;
|
|
|
20365
20371
|
function requireCode$1 () {
|
|
20366
20372
|
if (hasRequiredCode$1) return code$1;
|
|
20367
20373
|
hasRequiredCode$1 = 1;
|
|
20368
|
-
(function (exports) {
|
|
20369
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20370
|
-
exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;
|
|
20374
|
+
(function (exports$1) {
|
|
20375
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
20376
|
+
exports$1.regexpCode = exports$1.getEsmExportName = exports$1.getProperty = exports$1.safeStringify = exports$1.stringify = exports$1.strConcat = exports$1.addCodeArg = exports$1.str = exports$1._ = exports$1.nil = exports$1._Code = exports$1.Name = exports$1.IDENTIFIER = exports$1._CodeOrName = void 0;
|
|
20371
20377
|
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
|
|
20372
20378
|
class _CodeOrName {
|
|
20373
20379
|
}
|
|
20374
|
-
exports._CodeOrName = _CodeOrName;
|
|
20375
|
-
exports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
|
|
20380
|
+
exports$1._CodeOrName = _CodeOrName;
|
|
20381
|
+
exports$1.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
|
|
20376
20382
|
class Name extends _CodeOrName {
|
|
20377
20383
|
constructor(s) {
|
|
20378
20384
|
super();
|
|
20379
|
-
if (!exports.IDENTIFIER.test(s))
|
|
20385
|
+
if (!exports$1.IDENTIFIER.test(s))
|
|
20380
20386
|
throw new Error("CodeGen: name must be a valid identifier");
|
|
20381
20387
|
this.str = s;
|
|
20382
20388
|
}
|
|
@@ -20390,7 +20396,7 @@ function requireCode$1 () {
|
|
|
20390
20396
|
return { [this.str]: 1 };
|
|
20391
20397
|
}
|
|
20392
20398
|
}
|
|
20393
|
-
exports.Name = Name;
|
|
20399
|
+
exports$1.Name = Name;
|
|
20394
20400
|
class _Code extends _CodeOrName {
|
|
20395
20401
|
constructor(code) {
|
|
20396
20402
|
super();
|
|
@@ -20418,8 +20424,8 @@ function requireCode$1 () {
|
|
|
20418
20424
|
}, {})));
|
|
20419
20425
|
}
|
|
20420
20426
|
}
|
|
20421
|
-
exports._Code = _Code;
|
|
20422
|
-
exports.nil = new _Code("");
|
|
20427
|
+
exports$1._Code = _Code;
|
|
20428
|
+
exports$1.nil = new _Code("");
|
|
20423
20429
|
function _(strs, ...args) {
|
|
20424
20430
|
const code = [strs[0]];
|
|
20425
20431
|
let i = 0;
|
|
@@ -20429,7 +20435,7 @@ function requireCode$1 () {
|
|
|
20429
20435
|
}
|
|
20430
20436
|
return new _Code(code);
|
|
20431
20437
|
}
|
|
20432
|
-
exports._ = _;
|
|
20438
|
+
exports$1._ = _;
|
|
20433
20439
|
const plus = new _Code("+");
|
|
20434
20440
|
function str(strs, ...args) {
|
|
20435
20441
|
const expr = [safeStringify(strs[0])];
|
|
@@ -20442,7 +20448,7 @@ function requireCode$1 () {
|
|
|
20442
20448
|
optimize(expr);
|
|
20443
20449
|
return new _Code(expr);
|
|
20444
20450
|
}
|
|
20445
|
-
exports.str = str;
|
|
20451
|
+
exports$1.str = str;
|
|
20446
20452
|
function addCodeArg(code, arg) {
|
|
20447
20453
|
if (arg instanceof _Code)
|
|
20448
20454
|
code.push(...arg._items);
|
|
@@ -20451,7 +20457,7 @@ function requireCode$1 () {
|
|
|
20451
20457
|
else
|
|
20452
20458
|
code.push(interpolate(arg));
|
|
20453
20459
|
}
|
|
20454
|
-
exports.addCodeArg = addCodeArg;
|
|
20460
|
+
exports$1.addCodeArg = addCodeArg;
|
|
20455
20461
|
function optimize(expr) {
|
|
20456
20462
|
let i = 1;
|
|
20457
20463
|
while (i < expr.length - 1) {
|
|
@@ -20487,7 +20493,7 @@ function requireCode$1 () {
|
|
|
20487
20493
|
function strConcat(c1, c2) {
|
|
20488
20494
|
return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str `${c1}${c2}`;
|
|
20489
20495
|
}
|
|
20490
|
-
exports.strConcat = strConcat;
|
|
20496
|
+
exports$1.strConcat = strConcat;
|
|
20491
20497
|
// TODO do not allow arrays here
|
|
20492
20498
|
function interpolate(x) {
|
|
20493
20499
|
return typeof x == "number" || typeof x == "boolean" || x === null
|
|
@@ -20497,29 +20503,29 @@ function requireCode$1 () {
|
|
|
20497
20503
|
function stringify(x) {
|
|
20498
20504
|
return new _Code(safeStringify(x));
|
|
20499
20505
|
}
|
|
20500
|
-
exports.stringify = stringify;
|
|
20506
|
+
exports$1.stringify = stringify;
|
|
20501
20507
|
function safeStringify(x) {
|
|
20502
20508
|
return JSON.stringify(x)
|
|
20503
20509
|
.replace(/\u2028/g, "\\u2028")
|
|
20504
20510
|
.replace(/\u2029/g, "\\u2029");
|
|
20505
20511
|
}
|
|
20506
|
-
exports.safeStringify = safeStringify;
|
|
20512
|
+
exports$1.safeStringify = safeStringify;
|
|
20507
20513
|
function getProperty(key) {
|
|
20508
|
-
return typeof key == "string" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _ `[${key}]`;
|
|
20514
|
+
return typeof key == "string" && exports$1.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _ `[${key}]`;
|
|
20509
20515
|
}
|
|
20510
|
-
exports.getProperty = getProperty;
|
|
20516
|
+
exports$1.getProperty = getProperty;
|
|
20511
20517
|
//Does best effort to format the name properly
|
|
20512
20518
|
function getEsmExportName(key) {
|
|
20513
|
-
if (typeof key == "string" && exports.IDENTIFIER.test(key)) {
|
|
20519
|
+
if (typeof key == "string" && exports$1.IDENTIFIER.test(key)) {
|
|
20514
20520
|
return new _Code(`${key}`);
|
|
20515
20521
|
}
|
|
20516
20522
|
throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);
|
|
20517
20523
|
}
|
|
20518
|
-
exports.getEsmExportName = getEsmExportName;
|
|
20524
|
+
exports$1.getEsmExportName = getEsmExportName;
|
|
20519
20525
|
function regexpCode(rx) {
|
|
20520
20526
|
return new _Code(rx.toString());
|
|
20521
20527
|
}
|
|
20522
|
-
exports.regexpCode = regexpCode;
|
|
20528
|
+
exports$1.regexpCode = regexpCode;
|
|
20523
20529
|
|
|
20524
20530
|
} (code$1));
|
|
20525
20531
|
return code$1;
|
|
@@ -20532,9 +20538,9 @@ var hasRequiredScope;
|
|
|
20532
20538
|
function requireScope () {
|
|
20533
20539
|
if (hasRequiredScope) return scope;
|
|
20534
20540
|
hasRequiredScope = 1;
|
|
20535
|
-
(function (exports) {
|
|
20536
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20537
|
-
exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0;
|
|
20541
|
+
(function (exports$1) {
|
|
20542
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
20543
|
+
exports$1.ValueScope = exports$1.ValueScopeName = exports$1.Scope = exports$1.varKinds = exports$1.UsedValueState = void 0;
|
|
20538
20544
|
const code_1 = requireCode$1();
|
|
20539
20545
|
class ValueError extends Error {
|
|
20540
20546
|
constructor(name) {
|
|
@@ -20546,8 +20552,8 @@ function requireScope () {
|
|
|
20546
20552
|
(function (UsedValueState) {
|
|
20547
20553
|
UsedValueState[UsedValueState["Started"] = 0] = "Started";
|
|
20548
20554
|
UsedValueState[UsedValueState["Completed"] = 1] = "Completed";
|
|
20549
|
-
})(UsedValueState || (exports.UsedValueState = UsedValueState = {}));
|
|
20550
|
-
exports.varKinds = {
|
|
20555
|
+
})(UsedValueState || (exports$1.UsedValueState = UsedValueState = {}));
|
|
20556
|
+
exports$1.varKinds = {
|
|
20551
20557
|
const: new code_1.Name("const"),
|
|
20552
20558
|
let: new code_1.Name("let"),
|
|
20553
20559
|
var: new code_1.Name("var"),
|
|
@@ -20576,7 +20582,7 @@ function requireScope () {
|
|
|
20576
20582
|
return (this._names[prefix] = { prefix, index: 0 });
|
|
20577
20583
|
}
|
|
20578
20584
|
}
|
|
20579
|
-
exports.Scope = Scope;
|
|
20585
|
+
exports$1.Scope = Scope;
|
|
20580
20586
|
class ValueScopeName extends code_1.Name {
|
|
20581
20587
|
constructor(prefix, nameStr) {
|
|
20582
20588
|
super(nameStr);
|
|
@@ -20587,7 +20593,7 @@ function requireScope () {
|
|
|
20587
20593
|
this.scopePath = (0, code_1._) `.${new code_1.Name(property)}[${itemIndex}]`;
|
|
20588
20594
|
}
|
|
20589
20595
|
}
|
|
20590
|
-
exports.ValueScopeName = ValueScopeName;
|
|
20596
|
+
exports$1.ValueScopeName = ValueScopeName;
|
|
20591
20597
|
const line = (0, code_1._) `\n`;
|
|
20592
20598
|
class ValueScope extends Scope {
|
|
20593
20599
|
constructor(opts) {
|
|
@@ -20658,7 +20664,7 @@ function requireScope () {
|
|
|
20658
20664
|
nameSet.set(name, UsedValueState.Started);
|
|
20659
20665
|
let c = valueCode(name);
|
|
20660
20666
|
if (c) {
|
|
20661
|
-
const def = this.opts.es5 ? exports.varKinds.var : exports.varKinds.const;
|
|
20667
|
+
const def = this.opts.es5 ? exports$1.varKinds.var : exports$1.varKinds.const;
|
|
20662
20668
|
code = (0, code_1._) `${code}${def} ${name} = ${c};${this.opts._n}`;
|
|
20663
20669
|
}
|
|
20664
20670
|
else if ((c = getCode === null || getCode === void 0 ? void 0 : getCode(name))) {
|
|
@@ -20673,7 +20679,7 @@ function requireScope () {
|
|
|
20673
20679
|
return code;
|
|
20674
20680
|
}
|
|
20675
20681
|
}
|
|
20676
|
-
exports.ValueScope = ValueScope;
|
|
20682
|
+
exports$1.ValueScope = ValueScope;
|
|
20677
20683
|
|
|
20678
20684
|
} (scope));
|
|
20679
20685
|
return scope;
|
|
@@ -20684,26 +20690,26 @@ var hasRequiredCodegen;
|
|
|
20684
20690
|
function requireCodegen () {
|
|
20685
20691
|
if (hasRequiredCodegen) return codegen;
|
|
20686
20692
|
hasRequiredCodegen = 1;
|
|
20687
|
-
(function (exports) {
|
|
20688
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20689
|
-
exports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0;
|
|
20693
|
+
(function (exports$1) {
|
|
20694
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
20695
|
+
exports$1.or = exports$1.and = exports$1.not = exports$1.CodeGen = exports$1.operators = exports$1.varKinds = exports$1.ValueScopeName = exports$1.ValueScope = exports$1.Scope = exports$1.Name = exports$1.regexpCode = exports$1.stringify = exports$1.getProperty = exports$1.nil = exports$1.strConcat = exports$1.str = exports$1._ = void 0;
|
|
20690
20696
|
const code_1 = requireCode$1();
|
|
20691
20697
|
const scope_1 = requireScope();
|
|
20692
20698
|
var code_2 = requireCode$1();
|
|
20693
|
-
Object.defineProperty(exports, "_", { enumerable: true, get: function () { return code_2._; } });
|
|
20694
|
-
Object.defineProperty(exports, "str", { enumerable: true, get: function () { return code_2.str; } });
|
|
20695
|
-
Object.defineProperty(exports, "strConcat", { enumerable: true, get: function () { return code_2.strConcat; } });
|
|
20696
|
-
Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return code_2.nil; } });
|
|
20697
|
-
Object.defineProperty(exports, "getProperty", { enumerable: true, get: function () { return code_2.getProperty; } });
|
|
20698
|
-
Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return code_2.stringify; } });
|
|
20699
|
-
Object.defineProperty(exports, "regexpCode", { enumerable: true, get: function () { return code_2.regexpCode; } });
|
|
20700
|
-
Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return code_2.Name; } });
|
|
20699
|
+
Object.defineProperty(exports$1, "_", { enumerable: true, get: function () { return code_2._; } });
|
|
20700
|
+
Object.defineProperty(exports$1, "str", { enumerable: true, get: function () { return code_2.str; } });
|
|
20701
|
+
Object.defineProperty(exports$1, "strConcat", { enumerable: true, get: function () { return code_2.strConcat; } });
|
|
20702
|
+
Object.defineProperty(exports$1, "nil", { enumerable: true, get: function () { return code_2.nil; } });
|
|
20703
|
+
Object.defineProperty(exports$1, "getProperty", { enumerable: true, get: function () { return code_2.getProperty; } });
|
|
20704
|
+
Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function () { return code_2.stringify; } });
|
|
20705
|
+
Object.defineProperty(exports$1, "regexpCode", { enumerable: true, get: function () { return code_2.regexpCode; } });
|
|
20706
|
+
Object.defineProperty(exports$1, "Name", { enumerable: true, get: function () { return code_2.Name; } });
|
|
20701
20707
|
var scope_2 = requireScope();
|
|
20702
|
-
Object.defineProperty(exports, "Scope", { enumerable: true, get: function () { return scope_2.Scope; } });
|
|
20703
|
-
Object.defineProperty(exports, "ValueScope", { enumerable: true, get: function () { return scope_2.ValueScope; } });
|
|
20704
|
-
Object.defineProperty(exports, "ValueScopeName", { enumerable: true, get: function () { return scope_2.ValueScopeName; } });
|
|
20705
|
-
Object.defineProperty(exports, "varKinds", { enumerable: true, get: function () { return scope_2.varKinds; } });
|
|
20706
|
-
exports.operators = {
|
|
20708
|
+
Object.defineProperty(exports$1, "Scope", { enumerable: true, get: function () { return scope_2.Scope; } });
|
|
20709
|
+
Object.defineProperty(exports$1, "ValueScope", { enumerable: true, get: function () { return scope_2.ValueScope; } });
|
|
20710
|
+
Object.defineProperty(exports$1, "ValueScopeName", { enumerable: true, get: function () { return scope_2.ValueScopeName; } });
|
|
20711
|
+
Object.defineProperty(exports$1, "varKinds", { enumerable: true, get: function () { return scope_2.varKinds; } });
|
|
20712
|
+
exports$1.operators = {
|
|
20707
20713
|
GT: new code_1._Code(">"),
|
|
20708
20714
|
GTE: new code_1._Code(">="),
|
|
20709
20715
|
LT: new code_1._Code("<"),
|
|
@@ -21117,7 +21123,7 @@ function requireCodegen () {
|
|
|
21117
21123
|
}
|
|
21118
21124
|
// `+=` code
|
|
21119
21125
|
add(lhs, rhs) {
|
|
21120
|
-
return this._leafNode(new AssignOp(lhs, exports.operators.ADD, rhs));
|
|
21126
|
+
return this._leafNode(new AssignOp(lhs, exports$1.operators.ADD, rhs));
|
|
21121
21127
|
}
|
|
21122
21128
|
// appends passed SafeExpr to code or executes Block
|
|
21123
21129
|
code(c) {
|
|
@@ -21319,7 +21325,7 @@ function requireCodegen () {
|
|
|
21319
21325
|
ns[ns.length - 1] = node;
|
|
21320
21326
|
}
|
|
21321
21327
|
}
|
|
21322
|
-
exports.CodeGen = CodeGen;
|
|
21328
|
+
exports$1.CodeGen = CodeGen;
|
|
21323
21329
|
function addNames(names, from) {
|
|
21324
21330
|
for (const n in from)
|
|
21325
21331
|
names[n] = (names[n] || 0) + (from[n] || 0);
|
|
@@ -21361,19 +21367,19 @@ function requireCodegen () {
|
|
|
21361
21367
|
function not(x) {
|
|
21362
21368
|
return typeof x == "boolean" || typeof x == "number" || x === null ? !x : (0, code_1._) `!${par(x)}`;
|
|
21363
21369
|
}
|
|
21364
|
-
exports.not = not;
|
|
21365
|
-
const andCode = mappend(exports.operators.AND);
|
|
21370
|
+
exports$1.not = not;
|
|
21371
|
+
const andCode = mappend(exports$1.operators.AND);
|
|
21366
21372
|
// boolean AND (&&) expression with the passed arguments
|
|
21367
21373
|
function and(...args) {
|
|
21368
21374
|
return args.reduce(andCode);
|
|
21369
21375
|
}
|
|
21370
|
-
exports.and = and;
|
|
21371
|
-
const orCode = mappend(exports.operators.OR);
|
|
21376
|
+
exports$1.and = and;
|
|
21377
|
+
const orCode = mappend(exports$1.operators.OR);
|
|
21372
21378
|
// boolean OR (||) expression with the passed arguments
|
|
21373
21379
|
function or(...args) {
|
|
21374
21380
|
return args.reduce(orCode);
|
|
21375
21381
|
}
|
|
21376
|
-
exports.or = or;
|
|
21382
|
+
exports$1.or = or;
|
|
21377
21383
|
function mappend(op) {
|
|
21378
21384
|
return (x, y) => (x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._) `${par(x)} ${op} ${par(y)}`);
|
|
21379
21385
|
}
|
|
@@ -21614,21 +21620,21 @@ var hasRequiredErrors;
|
|
|
21614
21620
|
function requireErrors () {
|
|
21615
21621
|
if (hasRequiredErrors) return errors;
|
|
21616
21622
|
hasRequiredErrors = 1;
|
|
21617
|
-
(function (exports) {
|
|
21618
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21619
|
-
exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0;
|
|
21623
|
+
(function (exports$1) {
|
|
21624
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
21625
|
+
exports$1.extendErrors = exports$1.resetErrorsCount = exports$1.reportExtraError = exports$1.reportError = exports$1.keyword$DataError = exports$1.keywordError = void 0;
|
|
21620
21626
|
const codegen_1 = requireCodegen();
|
|
21621
21627
|
const util_1 = requireUtil$1();
|
|
21622
21628
|
const names_1 = requireNames();
|
|
21623
|
-
exports.keywordError = {
|
|
21629
|
+
exports$1.keywordError = {
|
|
21624
21630
|
message: ({ keyword }) => (0, codegen_1.str) `must pass "${keyword}" keyword validation`,
|
|
21625
21631
|
};
|
|
21626
|
-
exports.keyword$DataError = {
|
|
21632
|
+
exports$1.keyword$DataError = {
|
|
21627
21633
|
message: ({ keyword, schemaType }) => schemaType
|
|
21628
21634
|
? (0, codegen_1.str) `"${keyword}" keyword must be ${schemaType} ($data)`
|
|
21629
21635
|
: (0, codegen_1.str) `"${keyword}" keyword is invalid ($data)`,
|
|
21630
21636
|
};
|
|
21631
|
-
function reportError(cxt, error = exports.keywordError, errorPaths, overrideAllErrors) {
|
|
21637
|
+
function reportError(cxt, error = exports$1.keywordError, errorPaths, overrideAllErrors) {
|
|
21632
21638
|
const { it } = cxt;
|
|
21633
21639
|
const { gen, compositeRule, allErrors } = it;
|
|
21634
21640
|
const errObj = errorObjectCode(cxt, error, errorPaths);
|
|
@@ -21639,8 +21645,8 @@ function requireErrors () {
|
|
|
21639
21645
|
returnErrors(it, (0, codegen_1._) `[${errObj}]`);
|
|
21640
21646
|
}
|
|
21641
21647
|
}
|
|
21642
|
-
exports.reportError = reportError;
|
|
21643
|
-
function reportExtraError(cxt, error = exports.keywordError, errorPaths) {
|
|
21648
|
+
exports$1.reportError = reportError;
|
|
21649
|
+
function reportExtraError(cxt, error = exports$1.keywordError, errorPaths) {
|
|
21644
21650
|
const { it } = cxt;
|
|
21645
21651
|
const { gen, compositeRule, allErrors } = it;
|
|
21646
21652
|
const errObj = errorObjectCode(cxt, error, errorPaths);
|
|
@@ -21649,12 +21655,12 @@ function requireErrors () {
|
|
|
21649
21655
|
returnErrors(it, names_1.default.vErrors);
|
|
21650
21656
|
}
|
|
21651
21657
|
}
|
|
21652
|
-
exports.reportExtraError = reportExtraError;
|
|
21658
|
+
exports$1.reportExtraError = reportExtraError;
|
|
21653
21659
|
function resetErrorsCount(gen, errsCount) {
|
|
21654
21660
|
gen.assign(names_1.default.errors, errsCount);
|
|
21655
21661
|
gen.if((0, codegen_1._) `${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._) `${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null)));
|
|
21656
21662
|
}
|
|
21657
|
-
exports.resetErrorsCount = resetErrorsCount;
|
|
21663
|
+
exports$1.resetErrorsCount = resetErrorsCount;
|
|
21658
21664
|
function extendErrors({ gen, keyword, schemaValue, data, errsCount, it, }) {
|
|
21659
21665
|
/* istanbul ignore if */
|
|
21660
21666
|
if (errsCount === undefined)
|
|
@@ -21670,7 +21676,7 @@ function requireErrors () {
|
|
|
21670
21676
|
}
|
|
21671
21677
|
});
|
|
21672
21678
|
}
|
|
21673
|
-
exports.extendErrors = extendErrors;
|
|
21679
|
+
exports$1.extendErrors = extendErrors;
|
|
21674
21680
|
function addError(gen, errObj) {
|
|
21675
21681
|
const err = gen.const("err", errObj);
|
|
21676
21682
|
gen.if((0, codegen_1._) `${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._) `[${err}]`), (0, codegen_1._) `${names_1.default.vErrors}.push(${err})`);
|
|
@@ -24634,18 +24640,18 @@ var hasRequiredCore$1;
|
|
|
24634
24640
|
function requireCore$1 () {
|
|
24635
24641
|
if (hasRequiredCore$1) return core$1;
|
|
24636
24642
|
hasRequiredCore$1 = 1;
|
|
24637
|
-
(function (exports) {
|
|
24638
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24639
|
-
exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
|
|
24643
|
+
(function (exports$1) {
|
|
24644
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
24645
|
+
exports$1.CodeGen = exports$1.Name = exports$1.nil = exports$1.stringify = exports$1.str = exports$1._ = exports$1.KeywordCxt = void 0;
|
|
24640
24646
|
var validate_1 = requireValidate();
|
|
24641
|
-
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
|
|
24647
|
+
Object.defineProperty(exports$1, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
|
|
24642
24648
|
var codegen_1 = requireCodegen();
|
|
24643
|
-
Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } });
|
|
24644
|
-
Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } });
|
|
24645
|
-
Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
|
|
24646
|
-
Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
|
|
24647
|
-
Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
|
|
24648
|
-
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
|
|
24649
|
+
Object.defineProperty(exports$1, "_", { enumerable: true, get: function () { return codegen_1._; } });
|
|
24650
|
+
Object.defineProperty(exports$1, "str", { enumerable: true, get: function () { return codegen_1.str; } });
|
|
24651
|
+
Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
|
|
24652
|
+
Object.defineProperty(exports$1, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
|
|
24653
|
+
Object.defineProperty(exports$1, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
|
|
24654
|
+
Object.defineProperty(exports$1, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
|
|
24649
24655
|
const validation_error_1 = requireValidation_error();
|
|
24650
24656
|
const ref_error_1 = requireRef_error();
|
|
24651
24657
|
const rules_1 = requireRules();
|
|
@@ -25125,7 +25131,7 @@ function requireCore$1 () {
|
|
|
25125
25131
|
}
|
|
25126
25132
|
Ajv.ValidationError = validation_error_1.default;
|
|
25127
25133
|
Ajv.MissingRefError = ref_error_1.default;
|
|
25128
|
-
exports.default = Ajv;
|
|
25134
|
+
exports$1.default = Ajv;
|
|
25129
25135
|
function checkOptions(checkOpts, options, msg, log = "error") {
|
|
25130
25136
|
for (const key in checkOpts) {
|
|
25131
25137
|
const opt = key;
|
|
@@ -26274,13 +26280,13 @@ var hasRequiredDependencies;
|
|
|
26274
26280
|
function requireDependencies () {
|
|
26275
26281
|
if (hasRequiredDependencies) return dependencies;
|
|
26276
26282
|
hasRequiredDependencies = 1;
|
|
26277
|
-
(function (exports) {
|
|
26278
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26279
|
-
exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0;
|
|
26283
|
+
(function (exports$1) {
|
|
26284
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
26285
|
+
exports$1.validateSchemaDeps = exports$1.validatePropertyDeps = exports$1.error = void 0;
|
|
26280
26286
|
const codegen_1 = requireCodegen();
|
|
26281
26287
|
const util_1 = requireUtil$1();
|
|
26282
26288
|
const code_1 = requireCode();
|
|
26283
|
-
exports.error = {
|
|
26289
|
+
exports$1.error = {
|
|
26284
26290
|
message: ({ params: { property, depsCount, deps } }) => {
|
|
26285
26291
|
const property_ies = depsCount === 1 ? "property" : "properties";
|
|
26286
26292
|
return (0, codegen_1.str) `must have ${property_ies} ${deps} when property ${property} is present`;
|
|
@@ -26294,7 +26300,7 @@ function requireDependencies () {
|
|
|
26294
26300
|
keyword: "dependencies",
|
|
26295
26301
|
type: "object",
|
|
26296
26302
|
schemaType: "object",
|
|
26297
|
-
error: exports.error,
|
|
26303
|
+
error: exports$1.error,
|
|
26298
26304
|
code(cxt) {
|
|
26299
26305
|
const [propDeps, schDeps] = splitDependencies(cxt);
|
|
26300
26306
|
validatePropertyDeps(cxt, propDeps);
|
|
@@ -26341,7 +26347,7 @@ function requireDependencies () {
|
|
|
26341
26347
|
}
|
|
26342
26348
|
}
|
|
26343
26349
|
}
|
|
26344
|
-
exports.validatePropertyDeps = validatePropertyDeps;
|
|
26350
|
+
exports$1.validatePropertyDeps = validatePropertyDeps;
|
|
26345
26351
|
function validateSchemaDeps(cxt, schemaDeps = cxt.schema) {
|
|
26346
26352
|
const { gen, data, keyword, it } = cxt;
|
|
26347
26353
|
const valid = gen.name("valid");
|
|
@@ -26356,8 +26362,8 @@ function requireDependencies () {
|
|
|
26356
26362
|
cxt.ok(valid);
|
|
26357
26363
|
}
|
|
26358
26364
|
}
|
|
26359
|
-
exports.validateSchemaDeps = validateSchemaDeps;
|
|
26360
|
-
exports.default = def;
|
|
26365
|
+
exports$1.validateSchemaDeps = validateSchemaDeps;
|
|
26366
|
+
exports$1.default = def;
|
|
26361
26367
|
|
|
26362
26368
|
} (dependencies));
|
|
26363
26369
|
return dependencies;
|
|
@@ -27532,9 +27538,9 @@ var hasRequiredAjv;
|
|
|
27532
27538
|
function requireAjv () {
|
|
27533
27539
|
if (hasRequiredAjv) return ajv$1.exports;
|
|
27534
27540
|
hasRequiredAjv = 1;
|
|
27535
|
-
(function (module, exports) {
|
|
27536
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27537
|
-
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0;
|
|
27541
|
+
(function (module, exports$1) {
|
|
27542
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
27543
|
+
exports$1.MissingRefError = exports$1.ValidationError = exports$1.CodeGen = exports$1.Name = exports$1.nil = exports$1.stringify = exports$1.str = exports$1._ = exports$1.KeywordCxt = exports$1.Ajv = void 0;
|
|
27538
27544
|
const core_1 = requireCore$1();
|
|
27539
27545
|
const draft7_1 = requireDraft7();
|
|
27540
27546
|
const discriminator_1 = requireDiscriminator();
|
|
@@ -27563,24 +27569,24 @@ function requireAjv () {
|
|
|
27563
27569
|
super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));
|
|
27564
27570
|
}
|
|
27565
27571
|
}
|
|
27566
|
-
exports.Ajv = Ajv;
|
|
27567
|
-
module.exports = exports = Ajv;
|
|
27572
|
+
exports$1.Ajv = Ajv;
|
|
27573
|
+
module.exports = exports$1 = Ajv;
|
|
27568
27574
|
module.exports.Ajv = Ajv;
|
|
27569
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27570
|
-
exports.default = Ajv;
|
|
27575
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
27576
|
+
exports$1.default = Ajv;
|
|
27571
27577
|
var validate_1 = requireValidate();
|
|
27572
|
-
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
|
|
27578
|
+
Object.defineProperty(exports$1, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
|
|
27573
27579
|
var codegen_1 = requireCodegen();
|
|
27574
|
-
Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } });
|
|
27575
|
-
Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } });
|
|
27576
|
-
Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
|
|
27577
|
-
Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
|
|
27578
|
-
Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
|
|
27579
|
-
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
|
|
27580
|
+
Object.defineProperty(exports$1, "_", { enumerable: true, get: function () { return codegen_1._; } });
|
|
27581
|
+
Object.defineProperty(exports$1, "str", { enumerable: true, get: function () { return codegen_1.str; } });
|
|
27582
|
+
Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
|
|
27583
|
+
Object.defineProperty(exports$1, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
|
|
27584
|
+
Object.defineProperty(exports$1, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
|
|
27585
|
+
Object.defineProperty(exports$1, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
|
|
27580
27586
|
var validation_error_1 = requireValidation_error();
|
|
27581
|
-
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return validation_error_1.default; } });
|
|
27587
|
+
Object.defineProperty(exports$1, "ValidationError", { enumerable: true, get: function () { return validation_error_1.default; } });
|
|
27582
27588
|
var ref_error_1 = requireRef_error();
|
|
27583
|
-
Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function () { return ref_error_1.default; } });
|
|
27589
|
+
Object.defineProperty(exports$1, "MissingRefError", { enumerable: true, get: function () { return ref_error_1.default; } });
|
|
27584
27590
|
|
|
27585
27591
|
} (ajv$1, ajv$1.exports));
|
|
27586
27592
|
return ajv$1.exports;
|
|
@@ -27592,7 +27598,7 @@ var Ajv$1 = /*@__PURE__*/getDefaultExportFromCjs(ajvExports);
|
|
|
27592
27598
|
// a full schema can be found at https://github.com/pactflow/pact-schemas
|
|
27593
27599
|
// but we don't use that here, because we try to be permissive with input
|
|
27594
27600
|
const Interaction = Type.Object({
|
|
27595
|
-
|
|
27601
|
+
_skip: Type.Optional(Type.Boolean()),
|
|
27596
27602
|
type: Type.Optional(Type.String()),
|
|
27597
27603
|
description: Type.Optional(Type.String()),
|
|
27598
27604
|
providerState: Type.Optional(Type.String()),
|
|
@@ -27622,10 +27628,6 @@ const Interaction = Type.Object({
|
|
|
27622
27628
|
status: Type.Number(),
|
|
27623
27629
|
}),
|
|
27624
27630
|
});
|
|
27625
|
-
const Message = Type.Object({
|
|
27626
|
-
description: Type.Optional(Type.String()),
|
|
27627
|
-
providerState: Type.Optional(Type.String()),
|
|
27628
|
-
});
|
|
27629
27631
|
const Pact = Type.Object({
|
|
27630
27632
|
metadata: Type.Optional(Type.Object({
|
|
27631
27633
|
pactSpecification: Type.Optional(Type.Object({
|
|
@@ -27636,8 +27638,7 @@ const Pact = Type.Object({
|
|
|
27636
27638
|
version: Type.String(),
|
|
27637
27639
|
})),
|
|
27638
27640
|
})),
|
|
27639
|
-
interactions: Type.
|
|
27640
|
-
messages: Type.Optional(Type.Array(Message)),
|
|
27641
|
+
interactions: Type.Array(Interaction),
|
|
27641
27642
|
});
|
|
27642
27643
|
const supportedInteractions = (i) => !i.type || i.type.toLowerCase() === "synchronous/http";
|
|
27643
27644
|
const parseAsPactV4Body = (body) => {
|
|
@@ -27708,18 +27709,13 @@ const interactionV4 = (i) => ({
|
|
|
27708
27709
|
headers: flattenValues(i.response.headers),
|
|
27709
27710
|
},
|
|
27710
27711
|
});
|
|
27711
|
-
const interactionNonHTTP = (i) => ({
|
|
27712
|
-
...i,
|
|
27713
|
-
_nonHTTP: true,
|
|
27714
|
-
});
|
|
27715
27712
|
const ajv = new Ajv$1();
|
|
27716
27713
|
const validate = ajv.compile(Pact);
|
|
27717
27714
|
const parse = (pact) => {
|
|
27718
|
-
const { metadata, interactions
|
|
27715
|
+
const { metadata, interactions } = pact;
|
|
27719
27716
|
const isValid = validate({
|
|
27720
27717
|
metadata,
|
|
27721
|
-
interactions: interactions
|
|
27722
|
-
messages,
|
|
27718
|
+
interactions: interactions.filter(supportedInteractions),
|
|
27723
27719
|
});
|
|
27724
27720
|
if (!isValid) {
|
|
27725
27721
|
throw new ParserError(validate.errors);
|
|
@@ -27731,8 +27727,9 @@ const parse = (pact) => {
|
|
|
27731
27727
|
const interactionParser = version >= 4 ? interactionV4 : version >= 3 ? interactionV3 : interactionV1;
|
|
27732
27728
|
return {
|
|
27733
27729
|
metadata,
|
|
27734
|
-
interactions: interactions
|
|
27735
|
-
|
|
27730
|
+
interactions: interactions.map((i) => supportedInteractions(i)
|
|
27731
|
+
? interactionParser(i)
|
|
27732
|
+
: { _skip: true }),
|
|
27736
27733
|
};
|
|
27737
27734
|
};
|
|
27738
27735
|
class ParserError extends Error {
|
|
@@ -28685,9 +28682,9 @@ var hasRequired_2019;
|
|
|
28685
28682
|
function require_2019 () {
|
|
28686
28683
|
if (hasRequired_2019) return _2019.exports;
|
|
28687
28684
|
hasRequired_2019 = 1;
|
|
28688
|
-
(function (module, exports) {
|
|
28689
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28690
|
-
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv2019 = void 0;
|
|
28685
|
+
(function (module, exports$1) {
|
|
28686
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
28687
|
+
exports$1.MissingRefError = exports$1.ValidationError = exports$1.CodeGen = exports$1.Name = exports$1.nil = exports$1.stringify = exports$1.str = exports$1._ = exports$1.KeywordCxt = exports$1.Ajv2019 = void 0;
|
|
28691
28688
|
const core_1 = requireCore$1();
|
|
28692
28689
|
const draft7_1 = requireDraft7();
|
|
28693
28690
|
const dynamic_1 = requireDynamic();
|
|
@@ -28727,24 +28724,24 @@ function require_2019 () {
|
|
|
28727
28724
|
super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));
|
|
28728
28725
|
}
|
|
28729
28726
|
}
|
|
28730
|
-
exports.Ajv2019 = Ajv2019;
|
|
28731
|
-
module.exports = exports = Ajv2019;
|
|
28727
|
+
exports$1.Ajv2019 = Ajv2019;
|
|
28728
|
+
module.exports = exports$1 = Ajv2019;
|
|
28732
28729
|
module.exports.Ajv2019 = Ajv2019;
|
|
28733
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28734
|
-
exports.default = Ajv2019;
|
|
28730
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
28731
|
+
exports$1.default = Ajv2019;
|
|
28735
28732
|
var validate_1 = requireValidate();
|
|
28736
|
-
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
|
|
28733
|
+
Object.defineProperty(exports$1, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
|
|
28737
28734
|
var codegen_1 = requireCodegen();
|
|
28738
|
-
Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } });
|
|
28739
|
-
Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } });
|
|
28740
|
-
Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
|
|
28741
|
-
Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
|
|
28742
|
-
Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
|
|
28743
|
-
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
|
|
28735
|
+
Object.defineProperty(exports$1, "_", { enumerable: true, get: function () { return codegen_1._; } });
|
|
28736
|
+
Object.defineProperty(exports$1, "str", { enumerable: true, get: function () { return codegen_1.str; } });
|
|
28737
|
+
Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
|
|
28738
|
+
Object.defineProperty(exports$1, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
|
|
28739
|
+
Object.defineProperty(exports$1, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
|
|
28740
|
+
Object.defineProperty(exports$1, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
|
|
28744
28741
|
var validation_error_1 = requireValidation_error();
|
|
28745
|
-
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return validation_error_1.default; } });
|
|
28742
|
+
Object.defineProperty(exports$1, "ValidationError", { enumerable: true, get: function () { return validation_error_1.default; } });
|
|
28746
28743
|
var ref_error_1 = requireRef_error();
|
|
28747
|
-
Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function () { return ref_error_1.default; } });
|
|
28744
|
+
Object.defineProperty(exports$1, "MissingRefError", { enumerable: true, get: function () { return ref_error_1.default; } });
|
|
28748
28745
|
|
|
28749
28746
|
} (_2019, _2019.exports));
|
|
28750
28747
|
return _2019.exports;
|
|
@@ -28762,13 +28759,13 @@ var hasRequiredFormats;
|
|
|
28762
28759
|
function requireFormats () {
|
|
28763
28760
|
if (hasRequiredFormats) return formats;
|
|
28764
28761
|
hasRequiredFormats = 1;
|
|
28765
|
-
(function (exports) {
|
|
28766
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28767
|
-
exports.formatNames = exports.fastFormats = exports.fullFormats = void 0;
|
|
28762
|
+
(function (exports$1) {
|
|
28763
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
28764
|
+
exports$1.formatNames = exports$1.fastFormats = exports$1.fullFormats = void 0;
|
|
28768
28765
|
function fmtDef(validate, compare) {
|
|
28769
28766
|
return { validate, compare };
|
|
28770
28767
|
}
|
|
28771
|
-
exports.fullFormats = {
|
|
28768
|
+
exports$1.fullFormats = {
|
|
28772
28769
|
// date: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
28773
28770
|
date: fmtDef(date, compareDate),
|
|
28774
28771
|
// date-time: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
@@ -28815,8 +28812,8 @@ function requireFormats () {
|
|
|
28815
28812
|
// unchecked string payload
|
|
28816
28813
|
binary: true,
|
|
28817
28814
|
};
|
|
28818
|
-
exports.fastFormats = {
|
|
28819
|
-
...exports.fullFormats,
|
|
28815
|
+
exports$1.fastFormats = {
|
|
28816
|
+
...exports$1.fullFormats,
|
|
28820
28817
|
date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate),
|
|
28821
28818
|
time: fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareTime),
|
|
28822
28819
|
"date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareDateTime),
|
|
@@ -28830,7 +28827,7 @@ function requireFormats () {
|
|
|
28830
28827
|
// http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation')
|
|
28831
28828
|
email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,
|
|
28832
28829
|
};
|
|
28833
|
-
exports.formatNames = Object.keys(exports.fullFormats);
|
|
28830
|
+
exports$1.formatNames = Object.keys(exports$1.fullFormats);
|
|
28834
28831
|
function isLeapYear(year) {
|
|
28835
28832
|
// https://tools.ietf.org/html/rfc3339#appendix-C
|
|
28836
28833
|
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
@@ -28981,9 +28978,9 @@ var hasRequiredLimit;
|
|
|
28981
28978
|
function requireLimit () {
|
|
28982
28979
|
if (hasRequiredLimit) return limit;
|
|
28983
28980
|
hasRequiredLimit = 1;
|
|
28984
|
-
(function (exports) {
|
|
28985
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28986
|
-
exports.formatLimitDefinition = void 0;
|
|
28981
|
+
(function (exports$1) {
|
|
28982
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
28983
|
+
exports$1.formatLimitDefinition = void 0;
|
|
28987
28984
|
const ajv_1 = requireAjv();
|
|
28988
28985
|
const codegen_1 = requireCodegen();
|
|
28989
28986
|
const ops = codegen_1.operators;
|
|
@@ -28997,7 +28994,7 @@ function requireLimit () {
|
|
|
28997
28994
|
message: ({ keyword, schemaCode }) => (0, codegen_1.str) `should be ${KWDs[keyword].okStr} ${schemaCode}`,
|
|
28998
28995
|
params: ({ keyword, schemaCode }) => (0, codegen_1._) `{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`,
|
|
28999
28996
|
};
|
|
29000
|
-
exports.formatLimitDefinition = {
|
|
28997
|
+
exports$1.formatLimitDefinition = {
|
|
29001
28998
|
keyword: Object.keys(KWDs),
|
|
29002
28999
|
type: "string",
|
|
29003
29000
|
schemaType: "string",
|
|
@@ -29045,10 +29042,10 @@ function requireLimit () {
|
|
|
29045
29042
|
dependencies: ["format"],
|
|
29046
29043
|
};
|
|
29047
29044
|
const formatLimitPlugin = (ajv) => {
|
|
29048
|
-
ajv.addKeyword(exports.formatLimitDefinition);
|
|
29045
|
+
ajv.addKeyword(exports$1.formatLimitDefinition);
|
|
29049
29046
|
return ajv;
|
|
29050
29047
|
};
|
|
29051
|
-
exports.default = formatLimitPlugin;
|
|
29048
|
+
exports$1.default = formatLimitPlugin;
|
|
29052
29049
|
|
|
29053
29050
|
} (limit));
|
|
29054
29051
|
return limit;
|
|
@@ -29059,8 +29056,8 @@ var hasRequiredDist$1;
|
|
|
29059
29056
|
function requireDist$1 () {
|
|
29060
29057
|
if (hasRequiredDist$1) return dist$2.exports;
|
|
29061
29058
|
hasRequiredDist$1 = 1;
|
|
29062
|
-
(function (module, exports) {
|
|
29063
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29059
|
+
(function (module, exports$1) {
|
|
29060
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
29064
29061
|
const formats_1 = requireFormats();
|
|
29065
29062
|
const limit_1 = requireLimit();
|
|
29066
29063
|
const codegen_1 = requireCodegen();
|
|
@@ -29092,9 +29089,9 @@ function requireDist$1 () {
|
|
|
29092
29089
|
for (const f of list)
|
|
29093
29090
|
ajv.addFormat(f, fs[f]);
|
|
29094
29091
|
}
|
|
29095
|
-
module.exports = exports = formatsPlugin;
|
|
29096
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29097
|
-
exports.default = formatsPlugin;
|
|
29092
|
+
module.exports = exports$1 = formatsPlugin;
|
|
29093
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
29094
|
+
exports$1.default = formatsPlugin;
|
|
29098
29095
|
|
|
29099
29096
|
} (dist$2, dist$2.exports));
|
|
29100
29097
|
return dist$2.exports;
|
|
@@ -29596,9 +29593,9 @@ var hasRequiredTypes$1;
|
|
|
29596
29593
|
function requireTypes$1 () {
|
|
29597
29594
|
if (hasRequiredTypes$1) return types;
|
|
29598
29595
|
hasRequiredTypes$1 = 1;
|
|
29599
|
-
(function (exports) {
|
|
29600
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29601
|
-
exports.types = void 0;
|
|
29596
|
+
(function (exports$1) {
|
|
29597
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
29598
|
+
exports$1.types = void 0;
|
|
29602
29599
|
(function (types) {
|
|
29603
29600
|
types[types["ROOT"] = 0] = "ROOT";
|
|
29604
29601
|
types[types["GROUP"] = 1] = "GROUP";
|
|
@@ -29608,7 +29605,7 @@ function requireTypes$1 () {
|
|
|
29608
29605
|
types[types["REPETITION"] = 5] = "REPETITION";
|
|
29609
29606
|
types[types["REFERENCE"] = 6] = "REFERENCE";
|
|
29610
29607
|
types[types["CHAR"] = 7] = "CHAR";
|
|
29611
|
-
})(exports.types || (exports.types = {}));
|
|
29608
|
+
})(exports$1.types || (exports$1.types = {}));
|
|
29612
29609
|
|
|
29613
29610
|
} (types));
|
|
29614
29611
|
return types;
|
|
@@ -29631,7 +29628,7 @@ var hasRequiredTypes;
|
|
|
29631
29628
|
function requireTypes () {
|
|
29632
29629
|
if (hasRequiredTypes) return types$1;
|
|
29633
29630
|
hasRequiredTypes = 1;
|
|
29634
|
-
(function (exports) {
|
|
29631
|
+
(function (exports$1) {
|
|
29635
29632
|
var __createBinding = (types$1 && types$1.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
29636
29633
|
if (k2 === undefined) k2 = k;
|
|
29637
29634
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
@@ -29639,13 +29636,13 @@ function requireTypes () {
|
|
|
29639
29636
|
if (k2 === undefined) k2 = k;
|
|
29640
29637
|
o[k2] = m[k];
|
|
29641
29638
|
}));
|
|
29642
|
-
var __exportStar = (types$1 && types$1.__exportStar) || function(m, exports) {
|
|
29643
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
29639
|
+
var __exportStar = (types$1 && types$1.__exportStar) || function(m, exports$1) {
|
|
29640
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
|
|
29644
29641
|
};
|
|
29645
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29646
|
-
__exportStar(requireTokens(), exports);
|
|
29647
|
-
__exportStar(requireTypes$1(), exports);
|
|
29648
|
-
__exportStar(requireSetLookup(), exports);
|
|
29642
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
29643
|
+
__exportStar(requireTokens(), exports$1);
|
|
29644
|
+
__exportStar(requireTypes$1(), exports$1);
|
|
29645
|
+
__exportStar(requireSetLookup(), exports$1);
|
|
29649
29646
|
|
|
29650
29647
|
} (types$1));
|
|
29651
29648
|
return types$1;
|
|
@@ -30348,12 +30345,12 @@ var hasRequiredReconstruct;
|
|
|
30348
30345
|
function requireReconstruct () {
|
|
30349
30346
|
if (hasRequiredReconstruct) return reconstruct;
|
|
30350
30347
|
hasRequiredReconstruct = 1;
|
|
30351
|
-
(function (exports) {
|
|
30352
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30353
|
-
exports.reconstruct = void 0;
|
|
30348
|
+
(function (exports$1) {
|
|
30349
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
30350
|
+
exports$1.reconstruct = void 0;
|
|
30354
30351
|
const types_1 = requireTypes();
|
|
30355
30352
|
const write_set_tokens_1 = requireWriteSetTokens();
|
|
30356
|
-
const reduceStack = (stack) => stack.map(exports.reconstruct).join('');
|
|
30353
|
+
const reduceStack = (stack) => stack.map(exports$1.reconstruct).join('');
|
|
30357
30354
|
const createAlternate = (token) => {
|
|
30358
30355
|
if ('options' in token) {
|
|
30359
30356
|
return token.options.map(reduceStack).join('|');
|
|
@@ -30365,7 +30362,7 @@ function requireReconstruct () {
|
|
|
30365
30362
|
throw new Error(`options or stack must be Root or Group token`);
|
|
30366
30363
|
}
|
|
30367
30364
|
};
|
|
30368
|
-
exports.reconstruct = (token) => {
|
|
30365
|
+
exports$1.reconstruct = (token) => {
|
|
30369
30366
|
switch (token.type) {
|
|
30370
30367
|
case types_1.types.ROOT:
|
|
30371
30368
|
return createAlternate(token);
|
|
@@ -30416,7 +30413,7 @@ function requireReconstruct () {
|
|
|
30416
30413
|
else {
|
|
30417
30414
|
endWith = `{${min},${max}}`;
|
|
30418
30415
|
}
|
|
30419
|
-
return `${exports.reconstruct(token.value)}${endWith}`;
|
|
30416
|
+
return `${exports$1.reconstruct(token.value)}${endWith}`;
|
|
30420
30417
|
}
|
|
30421
30418
|
case types_1.types.RANGE:
|
|
30422
30419
|
return `${write_set_tokens_1.setChar(token.from)}-${write_set_tokens_1.setChar(token.to)}`;
|
|
@@ -30436,7 +30433,7 @@ var hasRequiredDist;
|
|
|
30436
30433
|
function requireDist () {
|
|
30437
30434
|
if (hasRequiredDist) return dist$1.exports;
|
|
30438
30435
|
hasRequiredDist = 1;
|
|
30439
|
-
(function (module, exports) {
|
|
30436
|
+
(function (module, exports$1) {
|
|
30440
30437
|
var __createBinding = (dist && dist.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
30441
30438
|
if (k2 === undefined) k2 = k;
|
|
30442
30439
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
@@ -30444,20 +30441,20 @@ function requireDist () {
|
|
|
30444
30441
|
if (k2 === undefined) k2 = k;
|
|
30445
30442
|
o[k2] = m[k];
|
|
30446
30443
|
}));
|
|
30447
|
-
var __exportStar = (dist && dist.__exportStar) || function(m, exports) {
|
|
30448
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
30444
|
+
var __exportStar = (dist && dist.__exportStar) || function(m, exports$1) {
|
|
30445
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
|
|
30449
30446
|
};
|
|
30450
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30451
|
-
exports.types = void 0;
|
|
30447
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
30448
|
+
exports$1.types = void 0;
|
|
30452
30449
|
/* istanbul ignore file */
|
|
30453
30450
|
const types_1 = requireTypes();
|
|
30454
|
-
Object.defineProperty(exports, "types", { enumerable: true, get: function () { return types_1.types; } });
|
|
30455
|
-
__exportStar(requireTokenizer(), exports);
|
|
30456
|
-
__exportStar(requireReconstruct(), exports);
|
|
30451
|
+
Object.defineProperty(exports$1, "types", { enumerable: true, get: function () { return types_1.types; } });
|
|
30452
|
+
__exportStar(requireTokenizer(), exports$1);
|
|
30453
|
+
__exportStar(requireReconstruct(), exports$1);
|
|
30457
30454
|
const tokenizer_1 = requireTokenizer();
|
|
30458
30455
|
const reconstruct_1 = requireReconstruct();
|
|
30459
|
-
__exportStar(requireTypes(), exports);
|
|
30460
|
-
exports.default = tokenizer_1.tokenizer;
|
|
30456
|
+
__exportStar(requireTypes(), exports$1);
|
|
30457
|
+
exports$1.default = tokenizer_1.tokenizer;
|
|
30461
30458
|
module.exports = tokenizer_1.tokenizer;
|
|
30462
30459
|
module.exports.types = types_1.types;
|
|
30463
30460
|
module.exports.reconstruct = reconstruct_1.reconstruct;
|
|
@@ -32446,6 +32443,7 @@ function setupRouter(oas, config) {
|
|
|
32446
32443
|
"";
|
|
32447
32444
|
const path = basePath +
|
|
32448
32445
|
oasPath
|
|
32446
|
+
.replaceAll(":", "::")
|
|
32449
32447
|
.replaceAll(/{.*?}/g, cleanPathParameter)
|
|
32450
32448
|
.replaceAll(/{([.;]?)([^*]+?)\*?}/g, "$1:$2(.+)");
|
|
32451
32449
|
for (const method in oas.paths[oasPath]) {
|
|
@@ -32513,19 +32511,9 @@ class Comparator {
|
|
|
32513
32511
|
this.#router = setupRouter(this.#oas, this.#config);
|
|
32514
32512
|
}
|
|
32515
32513
|
const parsedPact = parse(pact);
|
|
32516
|
-
const
|
|
32517
|
-
|
|
32518
|
-
|
|
32519
|
-
yield {
|
|
32520
|
-
code: "interaction.type.unsupported",
|
|
32521
|
-
mockDetails: {
|
|
32522
|
-
...baseMockDetails(interaction),
|
|
32523
|
-
location: `[root].interactions[${index}].type`,
|
|
32524
|
-
value: interaction.type,
|
|
32525
|
-
},
|
|
32526
|
-
message: `Non-HTTP messages cannot be verified against an HTTP-only OpenAPI Document.`,
|
|
32527
|
-
type: "warning",
|
|
32528
|
-
};
|
|
32514
|
+
for (const [index, interaction] of parsedPact.interactions.entries()) {
|
|
32515
|
+
if (interaction._skip) {
|
|
32516
|
+
// non http/synchronous have been zero-ed out
|
|
32529
32517
|
continue;
|
|
32530
32518
|
}
|
|
32531
32519
|
const { method, path, query } = interaction.request;
|
|
@@ -32573,25 +32561,10 @@ class Comparator {
|
|
|
32573
32561
|
yield* compareResHeader(this.#ajvCoerce, route, interaction, index, this.#config);
|
|
32574
32562
|
yield* compareResBody(this.#ajvNocoerce, route, interaction, index, this.#config);
|
|
32575
32563
|
}
|
|
32576
|
-
if (parsedPact.messages) {
|
|
32577
|
-
for (const [index, message] of parsedPact.messages.entries()) {
|
|
32578
|
-
yield {
|
|
32579
|
-
code: "interaction.type.unsupported",
|
|
32580
|
-
mockDetails: {
|
|
32581
|
-
interactionDescription: message.description,
|
|
32582
|
-
interactionState: message.providerState || "[none]",
|
|
32583
|
-
location: `[root].messages[${index}]`,
|
|
32584
|
-
value: message,
|
|
32585
|
-
},
|
|
32586
|
-
message: `Non-HTTP messages cannot be verified against an HTTP-only OpenAPI Document.`,
|
|
32587
|
-
type: "warning",
|
|
32588
|
-
};
|
|
32589
|
-
}
|
|
32590
|
-
}
|
|
32591
32564
|
}
|
|
32592
32565
|
}
|
|
32593
32566
|
|
|
32594
|
-
var version = "1.
|
|
32567
|
+
var version = "1.10.0";
|
|
32595
32568
|
var packageJson = {
|
|
32596
32569
|
version: version};
|
|
32597
32570
|
|