@pactflow/openapi-pact-comparator 1.8.0 → 1.9.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 +166 -180
- package/dist/cli.cjs.map +1 -1
- package/dist/index.cjs +165 -179
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +165 -179
- package/dist/index.mjs.map +1 -1
- package/dist/src/documents/pact.d.ts +2 -3
- package/dist/src/results/index.d.ts +1 -1
- package/package.json +4 -4
package/dist/cli.cjs
CHANGED
|
@@ -20365,18 +20365,18 @@ var hasRequiredCode$1;
|
|
|
20365
20365
|
function requireCode$1 () {
|
|
20366
20366
|
if (hasRequiredCode$1) return code$1;
|
|
20367
20367
|
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;
|
|
20368
|
+
(function (exports$1) {
|
|
20369
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
20370
|
+
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
20371
|
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
|
|
20372
20372
|
class _CodeOrName {
|
|
20373
20373
|
}
|
|
20374
|
-
exports._CodeOrName = _CodeOrName;
|
|
20375
|
-
exports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
|
|
20374
|
+
exports$1._CodeOrName = _CodeOrName;
|
|
20375
|
+
exports$1.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
|
|
20376
20376
|
class Name extends _CodeOrName {
|
|
20377
20377
|
constructor(s) {
|
|
20378
20378
|
super();
|
|
20379
|
-
if (!exports.IDENTIFIER.test(s))
|
|
20379
|
+
if (!exports$1.IDENTIFIER.test(s))
|
|
20380
20380
|
throw new Error("CodeGen: name must be a valid identifier");
|
|
20381
20381
|
this.str = s;
|
|
20382
20382
|
}
|
|
@@ -20390,7 +20390,7 @@ function requireCode$1 () {
|
|
|
20390
20390
|
return { [this.str]: 1 };
|
|
20391
20391
|
}
|
|
20392
20392
|
}
|
|
20393
|
-
exports.Name = Name;
|
|
20393
|
+
exports$1.Name = Name;
|
|
20394
20394
|
class _Code extends _CodeOrName {
|
|
20395
20395
|
constructor(code) {
|
|
20396
20396
|
super();
|
|
@@ -20418,8 +20418,8 @@ function requireCode$1 () {
|
|
|
20418
20418
|
}, {})));
|
|
20419
20419
|
}
|
|
20420
20420
|
}
|
|
20421
|
-
exports._Code = _Code;
|
|
20422
|
-
exports.nil = new _Code("");
|
|
20421
|
+
exports$1._Code = _Code;
|
|
20422
|
+
exports$1.nil = new _Code("");
|
|
20423
20423
|
function _(strs, ...args) {
|
|
20424
20424
|
const code = [strs[0]];
|
|
20425
20425
|
let i = 0;
|
|
@@ -20429,7 +20429,7 @@ function requireCode$1 () {
|
|
|
20429
20429
|
}
|
|
20430
20430
|
return new _Code(code);
|
|
20431
20431
|
}
|
|
20432
|
-
exports._ = _;
|
|
20432
|
+
exports$1._ = _;
|
|
20433
20433
|
const plus = new _Code("+");
|
|
20434
20434
|
function str(strs, ...args) {
|
|
20435
20435
|
const expr = [safeStringify(strs[0])];
|
|
@@ -20442,7 +20442,7 @@ function requireCode$1 () {
|
|
|
20442
20442
|
optimize(expr);
|
|
20443
20443
|
return new _Code(expr);
|
|
20444
20444
|
}
|
|
20445
|
-
exports.str = str;
|
|
20445
|
+
exports$1.str = str;
|
|
20446
20446
|
function addCodeArg(code, arg) {
|
|
20447
20447
|
if (arg instanceof _Code)
|
|
20448
20448
|
code.push(...arg._items);
|
|
@@ -20451,7 +20451,7 @@ function requireCode$1 () {
|
|
|
20451
20451
|
else
|
|
20452
20452
|
code.push(interpolate(arg));
|
|
20453
20453
|
}
|
|
20454
|
-
exports.addCodeArg = addCodeArg;
|
|
20454
|
+
exports$1.addCodeArg = addCodeArg;
|
|
20455
20455
|
function optimize(expr) {
|
|
20456
20456
|
let i = 1;
|
|
20457
20457
|
while (i < expr.length - 1) {
|
|
@@ -20487,7 +20487,7 @@ function requireCode$1 () {
|
|
|
20487
20487
|
function strConcat(c1, c2) {
|
|
20488
20488
|
return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str `${c1}${c2}`;
|
|
20489
20489
|
}
|
|
20490
|
-
exports.strConcat = strConcat;
|
|
20490
|
+
exports$1.strConcat = strConcat;
|
|
20491
20491
|
// TODO do not allow arrays here
|
|
20492
20492
|
function interpolate(x) {
|
|
20493
20493
|
return typeof x == "number" || typeof x == "boolean" || x === null
|
|
@@ -20497,29 +20497,29 @@ function requireCode$1 () {
|
|
|
20497
20497
|
function stringify(x) {
|
|
20498
20498
|
return new _Code(safeStringify(x));
|
|
20499
20499
|
}
|
|
20500
|
-
exports.stringify = stringify;
|
|
20500
|
+
exports$1.stringify = stringify;
|
|
20501
20501
|
function safeStringify(x) {
|
|
20502
20502
|
return JSON.stringify(x)
|
|
20503
20503
|
.replace(/\u2028/g, "\\u2028")
|
|
20504
20504
|
.replace(/\u2029/g, "\\u2029");
|
|
20505
20505
|
}
|
|
20506
|
-
exports.safeStringify = safeStringify;
|
|
20506
|
+
exports$1.safeStringify = safeStringify;
|
|
20507
20507
|
function getProperty(key) {
|
|
20508
|
-
return typeof key == "string" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _ `[${key}]`;
|
|
20508
|
+
return typeof key == "string" && exports$1.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _ `[${key}]`;
|
|
20509
20509
|
}
|
|
20510
|
-
exports.getProperty = getProperty;
|
|
20510
|
+
exports$1.getProperty = getProperty;
|
|
20511
20511
|
//Does best effort to format the name properly
|
|
20512
20512
|
function getEsmExportName(key) {
|
|
20513
|
-
if (typeof key == "string" && exports.IDENTIFIER.test(key)) {
|
|
20513
|
+
if (typeof key == "string" && exports$1.IDENTIFIER.test(key)) {
|
|
20514
20514
|
return new _Code(`${key}`);
|
|
20515
20515
|
}
|
|
20516
20516
|
throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);
|
|
20517
20517
|
}
|
|
20518
|
-
exports.getEsmExportName = getEsmExportName;
|
|
20518
|
+
exports$1.getEsmExportName = getEsmExportName;
|
|
20519
20519
|
function regexpCode(rx) {
|
|
20520
20520
|
return new _Code(rx.toString());
|
|
20521
20521
|
}
|
|
20522
|
-
exports.regexpCode = regexpCode;
|
|
20522
|
+
exports$1.regexpCode = regexpCode;
|
|
20523
20523
|
|
|
20524
20524
|
} (code$1));
|
|
20525
20525
|
return code$1;
|
|
@@ -20532,9 +20532,9 @@ var hasRequiredScope;
|
|
|
20532
20532
|
function requireScope () {
|
|
20533
20533
|
if (hasRequiredScope) return scope;
|
|
20534
20534
|
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;
|
|
20535
|
+
(function (exports$1) {
|
|
20536
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
20537
|
+
exports$1.ValueScope = exports$1.ValueScopeName = exports$1.Scope = exports$1.varKinds = exports$1.UsedValueState = void 0;
|
|
20538
20538
|
const code_1 = requireCode$1();
|
|
20539
20539
|
class ValueError extends Error {
|
|
20540
20540
|
constructor(name) {
|
|
@@ -20546,8 +20546,8 @@ function requireScope () {
|
|
|
20546
20546
|
(function (UsedValueState) {
|
|
20547
20547
|
UsedValueState[UsedValueState["Started"] = 0] = "Started";
|
|
20548
20548
|
UsedValueState[UsedValueState["Completed"] = 1] = "Completed";
|
|
20549
|
-
})(UsedValueState || (exports.UsedValueState = UsedValueState = {}));
|
|
20550
|
-
exports.varKinds = {
|
|
20549
|
+
})(UsedValueState || (exports$1.UsedValueState = UsedValueState = {}));
|
|
20550
|
+
exports$1.varKinds = {
|
|
20551
20551
|
const: new code_1.Name("const"),
|
|
20552
20552
|
let: new code_1.Name("let"),
|
|
20553
20553
|
var: new code_1.Name("var"),
|
|
@@ -20576,7 +20576,7 @@ function requireScope () {
|
|
|
20576
20576
|
return (this._names[prefix] = { prefix, index: 0 });
|
|
20577
20577
|
}
|
|
20578
20578
|
}
|
|
20579
|
-
exports.Scope = Scope;
|
|
20579
|
+
exports$1.Scope = Scope;
|
|
20580
20580
|
class ValueScopeName extends code_1.Name {
|
|
20581
20581
|
constructor(prefix, nameStr) {
|
|
20582
20582
|
super(nameStr);
|
|
@@ -20587,7 +20587,7 @@ function requireScope () {
|
|
|
20587
20587
|
this.scopePath = (0, code_1._) `.${new code_1.Name(property)}[${itemIndex}]`;
|
|
20588
20588
|
}
|
|
20589
20589
|
}
|
|
20590
|
-
exports.ValueScopeName = ValueScopeName;
|
|
20590
|
+
exports$1.ValueScopeName = ValueScopeName;
|
|
20591
20591
|
const line = (0, code_1._) `\n`;
|
|
20592
20592
|
class ValueScope extends Scope {
|
|
20593
20593
|
constructor(opts) {
|
|
@@ -20658,7 +20658,7 @@ function requireScope () {
|
|
|
20658
20658
|
nameSet.set(name, UsedValueState.Started);
|
|
20659
20659
|
let c = valueCode(name);
|
|
20660
20660
|
if (c) {
|
|
20661
|
-
const def = this.opts.es5 ? exports.varKinds.var : exports.varKinds.const;
|
|
20661
|
+
const def = this.opts.es5 ? exports$1.varKinds.var : exports$1.varKinds.const;
|
|
20662
20662
|
code = (0, code_1._) `${code}${def} ${name} = ${c};${this.opts._n}`;
|
|
20663
20663
|
}
|
|
20664
20664
|
else if ((c = getCode === null || getCode === void 0 ? void 0 : getCode(name))) {
|
|
@@ -20673,7 +20673,7 @@ function requireScope () {
|
|
|
20673
20673
|
return code;
|
|
20674
20674
|
}
|
|
20675
20675
|
}
|
|
20676
|
-
exports.ValueScope = ValueScope;
|
|
20676
|
+
exports$1.ValueScope = ValueScope;
|
|
20677
20677
|
|
|
20678
20678
|
} (scope));
|
|
20679
20679
|
return scope;
|
|
@@ -20684,26 +20684,26 @@ var hasRequiredCodegen;
|
|
|
20684
20684
|
function requireCodegen () {
|
|
20685
20685
|
if (hasRequiredCodegen) return codegen;
|
|
20686
20686
|
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;
|
|
20687
|
+
(function (exports$1) {
|
|
20688
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
20689
|
+
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
20690
|
const code_1 = requireCode$1();
|
|
20691
20691
|
const scope_1 = requireScope();
|
|
20692
20692
|
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; } });
|
|
20693
|
+
Object.defineProperty(exports$1, "_", { enumerable: true, get: function () { return code_2._; } });
|
|
20694
|
+
Object.defineProperty(exports$1, "str", { enumerable: true, get: function () { return code_2.str; } });
|
|
20695
|
+
Object.defineProperty(exports$1, "strConcat", { enumerable: true, get: function () { return code_2.strConcat; } });
|
|
20696
|
+
Object.defineProperty(exports$1, "nil", { enumerable: true, get: function () { return code_2.nil; } });
|
|
20697
|
+
Object.defineProperty(exports$1, "getProperty", { enumerable: true, get: function () { return code_2.getProperty; } });
|
|
20698
|
+
Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function () { return code_2.stringify; } });
|
|
20699
|
+
Object.defineProperty(exports$1, "regexpCode", { enumerable: true, get: function () { return code_2.regexpCode; } });
|
|
20700
|
+
Object.defineProperty(exports$1, "Name", { enumerable: true, get: function () { return code_2.Name; } });
|
|
20701
20701
|
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 = {
|
|
20702
|
+
Object.defineProperty(exports$1, "Scope", { enumerable: true, get: function () { return scope_2.Scope; } });
|
|
20703
|
+
Object.defineProperty(exports$1, "ValueScope", { enumerable: true, get: function () { return scope_2.ValueScope; } });
|
|
20704
|
+
Object.defineProperty(exports$1, "ValueScopeName", { enumerable: true, get: function () { return scope_2.ValueScopeName; } });
|
|
20705
|
+
Object.defineProperty(exports$1, "varKinds", { enumerable: true, get: function () { return scope_2.varKinds; } });
|
|
20706
|
+
exports$1.operators = {
|
|
20707
20707
|
GT: new code_1._Code(">"),
|
|
20708
20708
|
GTE: new code_1._Code(">="),
|
|
20709
20709
|
LT: new code_1._Code("<"),
|
|
@@ -21117,7 +21117,7 @@ function requireCodegen () {
|
|
|
21117
21117
|
}
|
|
21118
21118
|
// `+=` code
|
|
21119
21119
|
add(lhs, rhs) {
|
|
21120
|
-
return this._leafNode(new AssignOp(lhs, exports.operators.ADD, rhs));
|
|
21120
|
+
return this._leafNode(new AssignOp(lhs, exports$1.operators.ADD, rhs));
|
|
21121
21121
|
}
|
|
21122
21122
|
// appends passed SafeExpr to code or executes Block
|
|
21123
21123
|
code(c) {
|
|
@@ -21319,7 +21319,7 @@ function requireCodegen () {
|
|
|
21319
21319
|
ns[ns.length - 1] = node;
|
|
21320
21320
|
}
|
|
21321
21321
|
}
|
|
21322
|
-
exports.CodeGen = CodeGen;
|
|
21322
|
+
exports$1.CodeGen = CodeGen;
|
|
21323
21323
|
function addNames(names, from) {
|
|
21324
21324
|
for (const n in from)
|
|
21325
21325
|
names[n] = (names[n] || 0) + (from[n] || 0);
|
|
@@ -21361,19 +21361,19 @@ function requireCodegen () {
|
|
|
21361
21361
|
function not(x) {
|
|
21362
21362
|
return typeof x == "boolean" || typeof x == "number" || x === null ? !x : (0, code_1._) `!${par(x)}`;
|
|
21363
21363
|
}
|
|
21364
|
-
exports.not = not;
|
|
21365
|
-
const andCode = mappend(exports.operators.AND);
|
|
21364
|
+
exports$1.not = not;
|
|
21365
|
+
const andCode = mappend(exports$1.operators.AND);
|
|
21366
21366
|
// boolean AND (&&) expression with the passed arguments
|
|
21367
21367
|
function and(...args) {
|
|
21368
21368
|
return args.reduce(andCode);
|
|
21369
21369
|
}
|
|
21370
|
-
exports.and = and;
|
|
21371
|
-
const orCode = mappend(exports.operators.OR);
|
|
21370
|
+
exports$1.and = and;
|
|
21371
|
+
const orCode = mappend(exports$1.operators.OR);
|
|
21372
21372
|
// boolean OR (||) expression with the passed arguments
|
|
21373
21373
|
function or(...args) {
|
|
21374
21374
|
return args.reduce(orCode);
|
|
21375
21375
|
}
|
|
21376
|
-
exports.or = or;
|
|
21376
|
+
exports$1.or = or;
|
|
21377
21377
|
function mappend(op) {
|
|
21378
21378
|
return (x, y) => (x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._) `${par(x)} ${op} ${par(y)}`);
|
|
21379
21379
|
}
|
|
@@ -21614,21 +21614,21 @@ var hasRequiredErrors;
|
|
|
21614
21614
|
function requireErrors () {
|
|
21615
21615
|
if (hasRequiredErrors) return errors;
|
|
21616
21616
|
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;
|
|
21617
|
+
(function (exports$1) {
|
|
21618
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
21619
|
+
exports$1.extendErrors = exports$1.resetErrorsCount = exports$1.reportExtraError = exports$1.reportError = exports$1.keyword$DataError = exports$1.keywordError = void 0;
|
|
21620
21620
|
const codegen_1 = requireCodegen();
|
|
21621
21621
|
const util_1 = requireUtil$1();
|
|
21622
21622
|
const names_1 = requireNames();
|
|
21623
|
-
exports.keywordError = {
|
|
21623
|
+
exports$1.keywordError = {
|
|
21624
21624
|
message: ({ keyword }) => (0, codegen_1.str) `must pass "${keyword}" keyword validation`,
|
|
21625
21625
|
};
|
|
21626
|
-
exports.keyword$DataError = {
|
|
21626
|
+
exports$1.keyword$DataError = {
|
|
21627
21627
|
message: ({ keyword, schemaType }) => schemaType
|
|
21628
21628
|
? (0, codegen_1.str) `"${keyword}" keyword must be ${schemaType} ($data)`
|
|
21629
21629
|
: (0, codegen_1.str) `"${keyword}" keyword is invalid ($data)`,
|
|
21630
21630
|
};
|
|
21631
|
-
function reportError(cxt, error = exports.keywordError, errorPaths, overrideAllErrors) {
|
|
21631
|
+
function reportError(cxt, error = exports$1.keywordError, errorPaths, overrideAllErrors) {
|
|
21632
21632
|
const { it } = cxt;
|
|
21633
21633
|
const { gen, compositeRule, allErrors } = it;
|
|
21634
21634
|
const errObj = errorObjectCode(cxt, error, errorPaths);
|
|
@@ -21639,8 +21639,8 @@ function requireErrors () {
|
|
|
21639
21639
|
returnErrors(it, (0, codegen_1._) `[${errObj}]`);
|
|
21640
21640
|
}
|
|
21641
21641
|
}
|
|
21642
|
-
exports.reportError = reportError;
|
|
21643
|
-
function reportExtraError(cxt, error = exports.keywordError, errorPaths) {
|
|
21642
|
+
exports$1.reportError = reportError;
|
|
21643
|
+
function reportExtraError(cxt, error = exports$1.keywordError, errorPaths) {
|
|
21644
21644
|
const { it } = cxt;
|
|
21645
21645
|
const { gen, compositeRule, allErrors } = it;
|
|
21646
21646
|
const errObj = errorObjectCode(cxt, error, errorPaths);
|
|
@@ -21649,12 +21649,12 @@ function requireErrors () {
|
|
|
21649
21649
|
returnErrors(it, names_1.default.vErrors);
|
|
21650
21650
|
}
|
|
21651
21651
|
}
|
|
21652
|
-
exports.reportExtraError = reportExtraError;
|
|
21652
|
+
exports$1.reportExtraError = reportExtraError;
|
|
21653
21653
|
function resetErrorsCount(gen, errsCount) {
|
|
21654
21654
|
gen.assign(names_1.default.errors, errsCount);
|
|
21655
21655
|
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
21656
|
}
|
|
21657
|
-
exports.resetErrorsCount = resetErrorsCount;
|
|
21657
|
+
exports$1.resetErrorsCount = resetErrorsCount;
|
|
21658
21658
|
function extendErrors({ gen, keyword, schemaValue, data, errsCount, it, }) {
|
|
21659
21659
|
/* istanbul ignore if */
|
|
21660
21660
|
if (errsCount === undefined)
|
|
@@ -21670,7 +21670,7 @@ function requireErrors () {
|
|
|
21670
21670
|
}
|
|
21671
21671
|
});
|
|
21672
21672
|
}
|
|
21673
|
-
exports.extendErrors = extendErrors;
|
|
21673
|
+
exports$1.extendErrors = extendErrors;
|
|
21674
21674
|
function addError(gen, errObj) {
|
|
21675
21675
|
const err = gen.const("err", errObj);
|
|
21676
21676
|
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 +24634,18 @@ var hasRequiredCore$1;
|
|
|
24634
24634
|
function requireCore$1 () {
|
|
24635
24635
|
if (hasRequiredCore$1) return core$1;
|
|
24636
24636
|
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;
|
|
24637
|
+
(function (exports$1) {
|
|
24638
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
24639
|
+
exports$1.CodeGen = exports$1.Name = exports$1.nil = exports$1.stringify = exports$1.str = exports$1._ = exports$1.KeywordCxt = void 0;
|
|
24640
24640
|
var validate_1 = requireValidate();
|
|
24641
|
-
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
|
|
24641
|
+
Object.defineProperty(exports$1, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
|
|
24642
24642
|
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; } });
|
|
24643
|
+
Object.defineProperty(exports$1, "_", { enumerable: true, get: function () { return codegen_1._; } });
|
|
24644
|
+
Object.defineProperty(exports$1, "str", { enumerable: true, get: function () { return codegen_1.str; } });
|
|
24645
|
+
Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
|
|
24646
|
+
Object.defineProperty(exports$1, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
|
|
24647
|
+
Object.defineProperty(exports$1, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
|
|
24648
|
+
Object.defineProperty(exports$1, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
|
|
24649
24649
|
const validation_error_1 = requireValidation_error();
|
|
24650
24650
|
const ref_error_1 = requireRef_error();
|
|
24651
24651
|
const rules_1 = requireRules();
|
|
@@ -25125,7 +25125,7 @@ function requireCore$1 () {
|
|
|
25125
25125
|
}
|
|
25126
25126
|
Ajv.ValidationError = validation_error_1.default;
|
|
25127
25127
|
Ajv.MissingRefError = ref_error_1.default;
|
|
25128
|
-
exports.default = Ajv;
|
|
25128
|
+
exports$1.default = Ajv;
|
|
25129
25129
|
function checkOptions(checkOpts, options, msg, log = "error") {
|
|
25130
25130
|
for (const key in checkOpts) {
|
|
25131
25131
|
const opt = key;
|
|
@@ -26274,13 +26274,13 @@ var hasRequiredDependencies;
|
|
|
26274
26274
|
function requireDependencies () {
|
|
26275
26275
|
if (hasRequiredDependencies) return dependencies;
|
|
26276
26276
|
hasRequiredDependencies = 1;
|
|
26277
|
-
(function (exports) {
|
|
26278
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26279
|
-
exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0;
|
|
26277
|
+
(function (exports$1) {
|
|
26278
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
26279
|
+
exports$1.validateSchemaDeps = exports$1.validatePropertyDeps = exports$1.error = void 0;
|
|
26280
26280
|
const codegen_1 = requireCodegen();
|
|
26281
26281
|
const util_1 = requireUtil$1();
|
|
26282
26282
|
const code_1 = requireCode();
|
|
26283
|
-
exports.error = {
|
|
26283
|
+
exports$1.error = {
|
|
26284
26284
|
message: ({ params: { property, depsCount, deps } }) => {
|
|
26285
26285
|
const property_ies = depsCount === 1 ? "property" : "properties";
|
|
26286
26286
|
return (0, codegen_1.str) `must have ${property_ies} ${deps} when property ${property} is present`;
|
|
@@ -26294,7 +26294,7 @@ function requireDependencies () {
|
|
|
26294
26294
|
keyword: "dependencies",
|
|
26295
26295
|
type: "object",
|
|
26296
26296
|
schemaType: "object",
|
|
26297
|
-
error: exports.error,
|
|
26297
|
+
error: exports$1.error,
|
|
26298
26298
|
code(cxt) {
|
|
26299
26299
|
const [propDeps, schDeps] = splitDependencies(cxt);
|
|
26300
26300
|
validatePropertyDeps(cxt, propDeps);
|
|
@@ -26341,7 +26341,7 @@ function requireDependencies () {
|
|
|
26341
26341
|
}
|
|
26342
26342
|
}
|
|
26343
26343
|
}
|
|
26344
|
-
exports.validatePropertyDeps = validatePropertyDeps;
|
|
26344
|
+
exports$1.validatePropertyDeps = validatePropertyDeps;
|
|
26345
26345
|
function validateSchemaDeps(cxt, schemaDeps = cxt.schema) {
|
|
26346
26346
|
const { gen, data, keyword, it } = cxt;
|
|
26347
26347
|
const valid = gen.name("valid");
|
|
@@ -26356,8 +26356,8 @@ function requireDependencies () {
|
|
|
26356
26356
|
cxt.ok(valid);
|
|
26357
26357
|
}
|
|
26358
26358
|
}
|
|
26359
|
-
exports.validateSchemaDeps = validateSchemaDeps;
|
|
26360
|
-
exports.default = def;
|
|
26359
|
+
exports$1.validateSchemaDeps = validateSchemaDeps;
|
|
26360
|
+
exports$1.default = def;
|
|
26361
26361
|
|
|
26362
26362
|
} (dependencies));
|
|
26363
26363
|
return dependencies;
|
|
@@ -27532,9 +27532,9 @@ var hasRequiredAjv;
|
|
|
27532
27532
|
function requireAjv () {
|
|
27533
27533
|
if (hasRequiredAjv) return ajv$1.exports;
|
|
27534
27534
|
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;
|
|
27535
|
+
(function (module, exports$1) {
|
|
27536
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
27537
|
+
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
27538
|
const core_1 = requireCore$1();
|
|
27539
27539
|
const draft7_1 = requireDraft7();
|
|
27540
27540
|
const discriminator_1 = requireDiscriminator();
|
|
@@ -27563,24 +27563,24 @@ function requireAjv () {
|
|
|
27563
27563
|
super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));
|
|
27564
27564
|
}
|
|
27565
27565
|
}
|
|
27566
|
-
exports.Ajv = Ajv;
|
|
27567
|
-
module.exports = exports = Ajv;
|
|
27566
|
+
exports$1.Ajv = Ajv;
|
|
27567
|
+
module.exports = exports$1 = Ajv;
|
|
27568
27568
|
module.exports.Ajv = Ajv;
|
|
27569
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27570
|
-
exports.default = Ajv;
|
|
27569
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
27570
|
+
exports$1.default = Ajv;
|
|
27571
27571
|
var validate_1 = requireValidate();
|
|
27572
|
-
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
|
|
27572
|
+
Object.defineProperty(exports$1, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
|
|
27573
27573
|
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; } });
|
|
27574
|
+
Object.defineProperty(exports$1, "_", { enumerable: true, get: function () { return codegen_1._; } });
|
|
27575
|
+
Object.defineProperty(exports$1, "str", { enumerable: true, get: function () { return codegen_1.str; } });
|
|
27576
|
+
Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
|
|
27577
|
+
Object.defineProperty(exports$1, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
|
|
27578
|
+
Object.defineProperty(exports$1, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
|
|
27579
|
+
Object.defineProperty(exports$1, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
|
|
27580
27580
|
var validation_error_1 = requireValidation_error();
|
|
27581
|
-
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return validation_error_1.default; } });
|
|
27581
|
+
Object.defineProperty(exports$1, "ValidationError", { enumerable: true, get: function () { return validation_error_1.default; } });
|
|
27582
27582
|
var ref_error_1 = requireRef_error();
|
|
27583
|
-
Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function () { return ref_error_1.default; } });
|
|
27583
|
+
Object.defineProperty(exports$1, "MissingRefError", { enumerable: true, get: function () { return ref_error_1.default; } });
|
|
27584
27584
|
|
|
27585
27585
|
} (ajv$1, ajv$1.exports));
|
|
27586
27586
|
return ajv$1.exports;
|
|
@@ -27632,8 +27632,7 @@ const Pact = Type.Object({
|
|
|
27632
27632
|
version: Type.String(),
|
|
27633
27633
|
})),
|
|
27634
27634
|
})),
|
|
27635
|
-
interactions: Type.
|
|
27636
|
-
messages: Type.Optional(Type.Array(Type.Unknown())),
|
|
27635
|
+
interactions: Type.Array(Interaction),
|
|
27637
27636
|
});
|
|
27638
27637
|
const supportedInteractions = (i) => !i.type || i.type.toLowerCase() === "synchronous/http";
|
|
27639
27638
|
const parseAsPactV4Body = (body) => {
|
|
@@ -27707,11 +27706,10 @@ const interactionV4 = (i) => ({
|
|
|
27707
27706
|
const ajv = new Ajv$1();
|
|
27708
27707
|
const validate = ajv.compile(Pact);
|
|
27709
27708
|
const parse = (pact) => {
|
|
27710
|
-
const { metadata, interactions
|
|
27709
|
+
const { metadata, interactions } = pact;
|
|
27711
27710
|
const isValid = validate({
|
|
27712
27711
|
metadata,
|
|
27713
|
-
interactions: interactions
|
|
27714
|
-
messages,
|
|
27712
|
+
interactions: interactions.filter(supportedInteractions),
|
|
27715
27713
|
});
|
|
27716
27714
|
if (!isValid) {
|
|
27717
27715
|
throw new ParserError(validate.errors);
|
|
@@ -27723,10 +27721,9 @@ const parse = (pact) => {
|
|
|
27723
27721
|
const interactionParser = version >= 4 ? interactionV4 : version >= 3 ? interactionV3 : interactionV1;
|
|
27724
27722
|
return {
|
|
27725
27723
|
metadata,
|
|
27726
|
-
interactions: interactions
|
|
27724
|
+
interactions: interactions.map((i) => supportedInteractions(i)
|
|
27727
27725
|
? interactionParser(i)
|
|
27728
27726
|
: { _skip: true }),
|
|
27729
|
-
messages,
|
|
27730
27727
|
};
|
|
27731
27728
|
};
|
|
27732
27729
|
class ParserError extends Error {
|
|
@@ -28679,9 +28676,9 @@ var hasRequired_2019;
|
|
|
28679
28676
|
function require_2019 () {
|
|
28680
28677
|
if (hasRequired_2019) return _2019.exports;
|
|
28681
28678
|
hasRequired_2019 = 1;
|
|
28682
|
-
(function (module, exports) {
|
|
28683
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28684
|
-
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv2019 = void 0;
|
|
28679
|
+
(function (module, exports$1) {
|
|
28680
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
28681
|
+
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;
|
|
28685
28682
|
const core_1 = requireCore$1();
|
|
28686
28683
|
const draft7_1 = requireDraft7();
|
|
28687
28684
|
const dynamic_1 = requireDynamic();
|
|
@@ -28721,24 +28718,24 @@ function require_2019 () {
|
|
|
28721
28718
|
super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));
|
|
28722
28719
|
}
|
|
28723
28720
|
}
|
|
28724
|
-
exports.Ajv2019 = Ajv2019;
|
|
28725
|
-
module.exports = exports = Ajv2019;
|
|
28721
|
+
exports$1.Ajv2019 = Ajv2019;
|
|
28722
|
+
module.exports = exports$1 = Ajv2019;
|
|
28726
28723
|
module.exports.Ajv2019 = Ajv2019;
|
|
28727
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28728
|
-
exports.default = Ajv2019;
|
|
28724
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
28725
|
+
exports$1.default = Ajv2019;
|
|
28729
28726
|
var validate_1 = requireValidate();
|
|
28730
|
-
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
|
|
28727
|
+
Object.defineProperty(exports$1, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
|
|
28731
28728
|
var codegen_1 = requireCodegen();
|
|
28732
|
-
Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } });
|
|
28733
|
-
Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } });
|
|
28734
|
-
Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
|
|
28735
|
-
Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
|
|
28736
|
-
Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
|
|
28737
|
-
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
|
|
28729
|
+
Object.defineProperty(exports$1, "_", { enumerable: true, get: function () { return codegen_1._; } });
|
|
28730
|
+
Object.defineProperty(exports$1, "str", { enumerable: true, get: function () { return codegen_1.str; } });
|
|
28731
|
+
Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
|
|
28732
|
+
Object.defineProperty(exports$1, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
|
|
28733
|
+
Object.defineProperty(exports$1, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
|
|
28734
|
+
Object.defineProperty(exports$1, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
|
|
28738
28735
|
var validation_error_1 = requireValidation_error();
|
|
28739
|
-
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return validation_error_1.default; } });
|
|
28736
|
+
Object.defineProperty(exports$1, "ValidationError", { enumerable: true, get: function () { return validation_error_1.default; } });
|
|
28740
28737
|
var ref_error_1 = requireRef_error();
|
|
28741
|
-
Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function () { return ref_error_1.default; } });
|
|
28738
|
+
Object.defineProperty(exports$1, "MissingRefError", { enumerable: true, get: function () { return ref_error_1.default; } });
|
|
28742
28739
|
|
|
28743
28740
|
} (_2019, _2019.exports));
|
|
28744
28741
|
return _2019.exports;
|
|
@@ -28756,13 +28753,13 @@ var hasRequiredFormats;
|
|
|
28756
28753
|
function requireFormats () {
|
|
28757
28754
|
if (hasRequiredFormats) return formats;
|
|
28758
28755
|
hasRequiredFormats = 1;
|
|
28759
|
-
(function (exports) {
|
|
28760
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28761
|
-
exports.formatNames = exports.fastFormats = exports.fullFormats = void 0;
|
|
28756
|
+
(function (exports$1) {
|
|
28757
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
28758
|
+
exports$1.formatNames = exports$1.fastFormats = exports$1.fullFormats = void 0;
|
|
28762
28759
|
function fmtDef(validate, compare) {
|
|
28763
28760
|
return { validate, compare };
|
|
28764
28761
|
}
|
|
28765
|
-
exports.fullFormats = {
|
|
28762
|
+
exports$1.fullFormats = {
|
|
28766
28763
|
// date: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
28767
28764
|
date: fmtDef(date, compareDate),
|
|
28768
28765
|
// date-time: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
@@ -28809,8 +28806,8 @@ function requireFormats () {
|
|
|
28809
28806
|
// unchecked string payload
|
|
28810
28807
|
binary: true,
|
|
28811
28808
|
};
|
|
28812
|
-
exports.fastFormats = {
|
|
28813
|
-
...exports.fullFormats,
|
|
28809
|
+
exports$1.fastFormats = {
|
|
28810
|
+
...exports$1.fullFormats,
|
|
28814
28811
|
date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate),
|
|
28815
28812
|
time: fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareTime),
|
|
28816
28813
|
"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),
|
|
@@ -28824,7 +28821,7 @@ function requireFormats () {
|
|
|
28824
28821
|
// http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation')
|
|
28825
28822
|
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,
|
|
28826
28823
|
};
|
|
28827
|
-
exports.formatNames = Object.keys(exports.fullFormats);
|
|
28824
|
+
exports$1.formatNames = Object.keys(exports$1.fullFormats);
|
|
28828
28825
|
function isLeapYear(year) {
|
|
28829
28826
|
// https://tools.ietf.org/html/rfc3339#appendix-C
|
|
28830
28827
|
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
@@ -28975,9 +28972,9 @@ var hasRequiredLimit;
|
|
|
28975
28972
|
function requireLimit () {
|
|
28976
28973
|
if (hasRequiredLimit) return limit;
|
|
28977
28974
|
hasRequiredLimit = 1;
|
|
28978
|
-
(function (exports) {
|
|
28979
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28980
|
-
exports.formatLimitDefinition = void 0;
|
|
28975
|
+
(function (exports$1) {
|
|
28976
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
28977
|
+
exports$1.formatLimitDefinition = void 0;
|
|
28981
28978
|
const ajv_1 = requireAjv();
|
|
28982
28979
|
const codegen_1 = requireCodegen();
|
|
28983
28980
|
const ops = codegen_1.operators;
|
|
@@ -28991,7 +28988,7 @@ function requireLimit () {
|
|
|
28991
28988
|
message: ({ keyword, schemaCode }) => (0, codegen_1.str) `should be ${KWDs[keyword].okStr} ${schemaCode}`,
|
|
28992
28989
|
params: ({ keyword, schemaCode }) => (0, codegen_1._) `{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`,
|
|
28993
28990
|
};
|
|
28994
|
-
exports.formatLimitDefinition = {
|
|
28991
|
+
exports$1.formatLimitDefinition = {
|
|
28995
28992
|
keyword: Object.keys(KWDs),
|
|
28996
28993
|
type: "string",
|
|
28997
28994
|
schemaType: "string",
|
|
@@ -29039,10 +29036,10 @@ function requireLimit () {
|
|
|
29039
29036
|
dependencies: ["format"],
|
|
29040
29037
|
};
|
|
29041
29038
|
const formatLimitPlugin = (ajv) => {
|
|
29042
|
-
ajv.addKeyword(exports.formatLimitDefinition);
|
|
29039
|
+
ajv.addKeyword(exports$1.formatLimitDefinition);
|
|
29043
29040
|
return ajv;
|
|
29044
29041
|
};
|
|
29045
|
-
exports.default = formatLimitPlugin;
|
|
29042
|
+
exports$1.default = formatLimitPlugin;
|
|
29046
29043
|
|
|
29047
29044
|
} (limit));
|
|
29048
29045
|
return limit;
|
|
@@ -29053,8 +29050,8 @@ var hasRequiredDist$1;
|
|
|
29053
29050
|
function requireDist$1 () {
|
|
29054
29051
|
if (hasRequiredDist$1) return dist$2.exports;
|
|
29055
29052
|
hasRequiredDist$1 = 1;
|
|
29056
|
-
(function (module, exports) {
|
|
29057
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29053
|
+
(function (module, exports$1) {
|
|
29054
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
29058
29055
|
const formats_1 = requireFormats();
|
|
29059
29056
|
const limit_1 = requireLimit();
|
|
29060
29057
|
const codegen_1 = requireCodegen();
|
|
@@ -29086,9 +29083,9 @@ function requireDist$1 () {
|
|
|
29086
29083
|
for (const f of list)
|
|
29087
29084
|
ajv.addFormat(f, fs[f]);
|
|
29088
29085
|
}
|
|
29089
|
-
module.exports = exports = formatsPlugin;
|
|
29090
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29091
|
-
exports.default = formatsPlugin;
|
|
29086
|
+
module.exports = exports$1 = formatsPlugin;
|
|
29087
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
29088
|
+
exports$1.default = formatsPlugin;
|
|
29092
29089
|
|
|
29093
29090
|
} (dist$2, dist$2.exports));
|
|
29094
29091
|
return dist$2.exports;
|
|
@@ -29590,9 +29587,9 @@ var hasRequiredTypes$1;
|
|
|
29590
29587
|
function requireTypes$1 () {
|
|
29591
29588
|
if (hasRequiredTypes$1) return types;
|
|
29592
29589
|
hasRequiredTypes$1 = 1;
|
|
29593
|
-
(function (exports) {
|
|
29594
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29595
|
-
exports.types = void 0;
|
|
29590
|
+
(function (exports$1) {
|
|
29591
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
29592
|
+
exports$1.types = void 0;
|
|
29596
29593
|
(function (types) {
|
|
29597
29594
|
types[types["ROOT"] = 0] = "ROOT";
|
|
29598
29595
|
types[types["GROUP"] = 1] = "GROUP";
|
|
@@ -29602,7 +29599,7 @@ function requireTypes$1 () {
|
|
|
29602
29599
|
types[types["REPETITION"] = 5] = "REPETITION";
|
|
29603
29600
|
types[types["REFERENCE"] = 6] = "REFERENCE";
|
|
29604
29601
|
types[types["CHAR"] = 7] = "CHAR";
|
|
29605
|
-
})(exports.types || (exports.types = {}));
|
|
29602
|
+
})(exports$1.types || (exports$1.types = {}));
|
|
29606
29603
|
|
|
29607
29604
|
} (types));
|
|
29608
29605
|
return types;
|
|
@@ -29625,7 +29622,7 @@ var hasRequiredTypes;
|
|
|
29625
29622
|
function requireTypes () {
|
|
29626
29623
|
if (hasRequiredTypes) return types$1;
|
|
29627
29624
|
hasRequiredTypes = 1;
|
|
29628
|
-
(function (exports) {
|
|
29625
|
+
(function (exports$1) {
|
|
29629
29626
|
var __createBinding = (types$1 && types$1.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
29630
29627
|
if (k2 === undefined) k2 = k;
|
|
29631
29628
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
@@ -29633,13 +29630,13 @@ function requireTypes () {
|
|
|
29633
29630
|
if (k2 === undefined) k2 = k;
|
|
29634
29631
|
o[k2] = m[k];
|
|
29635
29632
|
}));
|
|
29636
|
-
var __exportStar = (types$1 && types$1.__exportStar) || function(m, exports) {
|
|
29637
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
29633
|
+
var __exportStar = (types$1 && types$1.__exportStar) || function(m, exports$1) {
|
|
29634
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
|
|
29638
29635
|
};
|
|
29639
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29640
|
-
__exportStar(requireTokens(), exports);
|
|
29641
|
-
__exportStar(requireTypes$1(), exports);
|
|
29642
|
-
__exportStar(requireSetLookup(), exports);
|
|
29636
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
29637
|
+
__exportStar(requireTokens(), exports$1);
|
|
29638
|
+
__exportStar(requireTypes$1(), exports$1);
|
|
29639
|
+
__exportStar(requireSetLookup(), exports$1);
|
|
29643
29640
|
|
|
29644
29641
|
} (types$1));
|
|
29645
29642
|
return types$1;
|
|
@@ -30342,12 +30339,12 @@ var hasRequiredReconstruct;
|
|
|
30342
30339
|
function requireReconstruct () {
|
|
30343
30340
|
if (hasRequiredReconstruct) return reconstruct;
|
|
30344
30341
|
hasRequiredReconstruct = 1;
|
|
30345
|
-
(function (exports) {
|
|
30346
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30347
|
-
exports.reconstruct = void 0;
|
|
30342
|
+
(function (exports$1) {
|
|
30343
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
30344
|
+
exports$1.reconstruct = void 0;
|
|
30348
30345
|
const types_1 = requireTypes();
|
|
30349
30346
|
const write_set_tokens_1 = requireWriteSetTokens();
|
|
30350
|
-
const reduceStack = (stack) => stack.map(exports.reconstruct).join('');
|
|
30347
|
+
const reduceStack = (stack) => stack.map(exports$1.reconstruct).join('');
|
|
30351
30348
|
const createAlternate = (token) => {
|
|
30352
30349
|
if ('options' in token) {
|
|
30353
30350
|
return token.options.map(reduceStack).join('|');
|
|
@@ -30359,7 +30356,7 @@ function requireReconstruct () {
|
|
|
30359
30356
|
throw new Error(`options or stack must be Root or Group token`);
|
|
30360
30357
|
}
|
|
30361
30358
|
};
|
|
30362
|
-
exports.reconstruct = (token) => {
|
|
30359
|
+
exports$1.reconstruct = (token) => {
|
|
30363
30360
|
switch (token.type) {
|
|
30364
30361
|
case types_1.types.ROOT:
|
|
30365
30362
|
return createAlternate(token);
|
|
@@ -30410,7 +30407,7 @@ function requireReconstruct () {
|
|
|
30410
30407
|
else {
|
|
30411
30408
|
endWith = `{${min},${max}}`;
|
|
30412
30409
|
}
|
|
30413
|
-
return `${exports.reconstruct(token.value)}${endWith}`;
|
|
30410
|
+
return `${exports$1.reconstruct(token.value)}${endWith}`;
|
|
30414
30411
|
}
|
|
30415
30412
|
case types_1.types.RANGE:
|
|
30416
30413
|
return `${write_set_tokens_1.setChar(token.from)}-${write_set_tokens_1.setChar(token.to)}`;
|
|
@@ -30430,7 +30427,7 @@ var hasRequiredDist;
|
|
|
30430
30427
|
function requireDist () {
|
|
30431
30428
|
if (hasRequiredDist) return dist$1.exports;
|
|
30432
30429
|
hasRequiredDist = 1;
|
|
30433
|
-
(function (module, exports) {
|
|
30430
|
+
(function (module, exports$1) {
|
|
30434
30431
|
var __createBinding = (dist && dist.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
30435
30432
|
if (k2 === undefined) k2 = k;
|
|
30436
30433
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
@@ -30438,20 +30435,20 @@ function requireDist () {
|
|
|
30438
30435
|
if (k2 === undefined) k2 = k;
|
|
30439
30436
|
o[k2] = m[k];
|
|
30440
30437
|
}));
|
|
30441
|
-
var __exportStar = (dist && dist.__exportStar) || function(m, exports) {
|
|
30442
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
30438
|
+
var __exportStar = (dist && dist.__exportStar) || function(m, exports$1) {
|
|
30439
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
|
|
30443
30440
|
};
|
|
30444
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30445
|
-
exports.types = void 0;
|
|
30441
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
30442
|
+
exports$1.types = void 0;
|
|
30446
30443
|
/* istanbul ignore file */
|
|
30447
30444
|
const types_1 = requireTypes();
|
|
30448
|
-
Object.defineProperty(exports, "types", { enumerable: true, get: function () { return types_1.types; } });
|
|
30449
|
-
__exportStar(requireTokenizer(), exports);
|
|
30450
|
-
__exportStar(requireReconstruct(), exports);
|
|
30445
|
+
Object.defineProperty(exports$1, "types", { enumerable: true, get: function () { return types_1.types; } });
|
|
30446
|
+
__exportStar(requireTokenizer(), exports$1);
|
|
30447
|
+
__exportStar(requireReconstruct(), exports$1);
|
|
30451
30448
|
const tokenizer_1 = requireTokenizer();
|
|
30452
30449
|
const reconstruct_1 = requireReconstruct();
|
|
30453
|
-
__exportStar(requireTypes(), exports);
|
|
30454
|
-
exports.default = tokenizer_1.tokenizer;
|
|
30450
|
+
__exportStar(requireTypes(), exports$1);
|
|
30451
|
+
exports$1.default = tokenizer_1.tokenizer;
|
|
30455
30452
|
module.exports = tokenizer_1.tokenizer;
|
|
30456
30453
|
module.exports.types = types_1.types;
|
|
30457
30454
|
module.exports.reconstruct = reconstruct_1.reconstruct;
|
|
@@ -32507,15 +32504,9 @@ class Comparator {
|
|
|
32507
32504
|
this.#router = setupRouter(this.#oas, this.#config);
|
|
32508
32505
|
}
|
|
32509
32506
|
const parsedPact = parse(pact);
|
|
32510
|
-
const
|
|
32511
|
-
const UNSUPPORTED_INTERACTION_WARNING = {
|
|
32512
|
-
code: "interaction.type.unsupported",
|
|
32513
|
-
message: `Non-HTTP Interaction is not supported, OPC can only compare HTTP interactions.`,
|
|
32514
|
-
type: "warning",
|
|
32515
|
-
};
|
|
32516
|
-
for (const [index, interaction] of parsedInteractions.entries()) {
|
|
32507
|
+
for (const [index, interaction] of parsedPact.interactions.entries()) {
|
|
32517
32508
|
if (interaction._skip) {
|
|
32518
|
-
|
|
32509
|
+
// non http/synchronous have been zero-ed out
|
|
32519
32510
|
continue;
|
|
32520
32511
|
}
|
|
32521
32512
|
const { method, path, query } = interaction.request;
|
|
@@ -32563,15 +32554,10 @@ class Comparator {
|
|
|
32563
32554
|
yield* compareResHeader(this.#ajvCoerce, route, interaction, index, this.#config);
|
|
32564
32555
|
yield* compareResBody(this.#ajvNocoerce, route, interaction, index, this.#config);
|
|
32565
32556
|
}
|
|
32566
|
-
if (parsedPact.messages) {
|
|
32567
|
-
for (const [_message] of parsedPact.messages.entries()) {
|
|
32568
|
-
yield UNSUPPORTED_INTERACTION_WARNING;
|
|
32569
|
-
}
|
|
32570
|
-
}
|
|
32571
32557
|
}
|
|
32572
32558
|
}
|
|
32573
32559
|
|
|
32574
|
-
var version = "1.
|
|
32560
|
+
var version = "1.9.0";
|
|
32575
32561
|
var packageJson = {
|
|
32576
32562
|
version: version};
|
|
32577
32563
|
|