@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/index.mjs
CHANGED
|
@@ -12204,18 +12204,18 @@ var hasRequiredCode$1;
|
|
|
12204
12204
|
function requireCode$1 () {
|
|
12205
12205
|
if (hasRequiredCode$1) return code$1;
|
|
12206
12206
|
hasRequiredCode$1 = 1;
|
|
12207
|
-
(function (exports) {
|
|
12208
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12209
|
-
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;
|
|
12207
|
+
(function (exports$1) {
|
|
12208
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
12209
|
+
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;
|
|
12210
12210
|
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
|
|
12211
12211
|
class _CodeOrName {
|
|
12212
12212
|
}
|
|
12213
|
-
exports._CodeOrName = _CodeOrName;
|
|
12214
|
-
exports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
|
|
12213
|
+
exports$1._CodeOrName = _CodeOrName;
|
|
12214
|
+
exports$1.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
|
|
12215
12215
|
class Name extends _CodeOrName {
|
|
12216
12216
|
constructor(s) {
|
|
12217
12217
|
super();
|
|
12218
|
-
if (!exports.IDENTIFIER.test(s))
|
|
12218
|
+
if (!exports$1.IDENTIFIER.test(s))
|
|
12219
12219
|
throw new Error("CodeGen: name must be a valid identifier");
|
|
12220
12220
|
this.str = s;
|
|
12221
12221
|
}
|
|
@@ -12229,7 +12229,7 @@ function requireCode$1 () {
|
|
|
12229
12229
|
return { [this.str]: 1 };
|
|
12230
12230
|
}
|
|
12231
12231
|
}
|
|
12232
|
-
exports.Name = Name;
|
|
12232
|
+
exports$1.Name = Name;
|
|
12233
12233
|
class _Code extends _CodeOrName {
|
|
12234
12234
|
constructor(code) {
|
|
12235
12235
|
super();
|
|
@@ -12257,8 +12257,8 @@ function requireCode$1 () {
|
|
|
12257
12257
|
}, {})));
|
|
12258
12258
|
}
|
|
12259
12259
|
}
|
|
12260
|
-
exports._Code = _Code;
|
|
12261
|
-
exports.nil = new _Code("");
|
|
12260
|
+
exports$1._Code = _Code;
|
|
12261
|
+
exports$1.nil = new _Code("");
|
|
12262
12262
|
function _(strs, ...args) {
|
|
12263
12263
|
const code = [strs[0]];
|
|
12264
12264
|
let i = 0;
|
|
@@ -12268,7 +12268,7 @@ function requireCode$1 () {
|
|
|
12268
12268
|
}
|
|
12269
12269
|
return new _Code(code);
|
|
12270
12270
|
}
|
|
12271
|
-
exports._ = _;
|
|
12271
|
+
exports$1._ = _;
|
|
12272
12272
|
const plus = new _Code("+");
|
|
12273
12273
|
function str(strs, ...args) {
|
|
12274
12274
|
const expr = [safeStringify(strs[0])];
|
|
@@ -12281,7 +12281,7 @@ function requireCode$1 () {
|
|
|
12281
12281
|
optimize(expr);
|
|
12282
12282
|
return new _Code(expr);
|
|
12283
12283
|
}
|
|
12284
|
-
exports.str = str;
|
|
12284
|
+
exports$1.str = str;
|
|
12285
12285
|
function addCodeArg(code, arg) {
|
|
12286
12286
|
if (arg instanceof _Code)
|
|
12287
12287
|
code.push(...arg._items);
|
|
@@ -12290,7 +12290,7 @@ function requireCode$1 () {
|
|
|
12290
12290
|
else
|
|
12291
12291
|
code.push(interpolate(arg));
|
|
12292
12292
|
}
|
|
12293
|
-
exports.addCodeArg = addCodeArg;
|
|
12293
|
+
exports$1.addCodeArg = addCodeArg;
|
|
12294
12294
|
function optimize(expr) {
|
|
12295
12295
|
let i = 1;
|
|
12296
12296
|
while (i < expr.length - 1) {
|
|
@@ -12326,7 +12326,7 @@ function requireCode$1 () {
|
|
|
12326
12326
|
function strConcat(c1, c2) {
|
|
12327
12327
|
return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str `${c1}${c2}`;
|
|
12328
12328
|
}
|
|
12329
|
-
exports.strConcat = strConcat;
|
|
12329
|
+
exports$1.strConcat = strConcat;
|
|
12330
12330
|
// TODO do not allow arrays here
|
|
12331
12331
|
function interpolate(x) {
|
|
12332
12332
|
return typeof x == "number" || typeof x == "boolean" || x === null
|
|
@@ -12336,29 +12336,29 @@ function requireCode$1 () {
|
|
|
12336
12336
|
function stringify(x) {
|
|
12337
12337
|
return new _Code(safeStringify(x));
|
|
12338
12338
|
}
|
|
12339
|
-
exports.stringify = stringify;
|
|
12339
|
+
exports$1.stringify = stringify;
|
|
12340
12340
|
function safeStringify(x) {
|
|
12341
12341
|
return JSON.stringify(x)
|
|
12342
12342
|
.replace(/\u2028/g, "\\u2028")
|
|
12343
12343
|
.replace(/\u2029/g, "\\u2029");
|
|
12344
12344
|
}
|
|
12345
|
-
exports.safeStringify = safeStringify;
|
|
12345
|
+
exports$1.safeStringify = safeStringify;
|
|
12346
12346
|
function getProperty(key) {
|
|
12347
|
-
return typeof key == "string" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _ `[${key}]`;
|
|
12347
|
+
return typeof key == "string" && exports$1.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _ `[${key}]`;
|
|
12348
12348
|
}
|
|
12349
|
-
exports.getProperty = getProperty;
|
|
12349
|
+
exports$1.getProperty = getProperty;
|
|
12350
12350
|
//Does best effort to format the name properly
|
|
12351
12351
|
function getEsmExportName(key) {
|
|
12352
|
-
if (typeof key == "string" && exports.IDENTIFIER.test(key)) {
|
|
12352
|
+
if (typeof key == "string" && exports$1.IDENTIFIER.test(key)) {
|
|
12353
12353
|
return new _Code(`${key}`);
|
|
12354
12354
|
}
|
|
12355
12355
|
throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);
|
|
12356
12356
|
}
|
|
12357
|
-
exports.getEsmExportName = getEsmExportName;
|
|
12357
|
+
exports$1.getEsmExportName = getEsmExportName;
|
|
12358
12358
|
function regexpCode(rx) {
|
|
12359
12359
|
return new _Code(rx.toString());
|
|
12360
12360
|
}
|
|
12361
|
-
exports.regexpCode = regexpCode;
|
|
12361
|
+
exports$1.regexpCode = regexpCode;
|
|
12362
12362
|
|
|
12363
12363
|
} (code$1));
|
|
12364
12364
|
return code$1;
|
|
@@ -12371,9 +12371,9 @@ var hasRequiredScope;
|
|
|
12371
12371
|
function requireScope () {
|
|
12372
12372
|
if (hasRequiredScope) return scope;
|
|
12373
12373
|
hasRequiredScope = 1;
|
|
12374
|
-
(function (exports) {
|
|
12375
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12376
|
-
exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0;
|
|
12374
|
+
(function (exports$1) {
|
|
12375
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
12376
|
+
exports$1.ValueScope = exports$1.ValueScopeName = exports$1.Scope = exports$1.varKinds = exports$1.UsedValueState = void 0;
|
|
12377
12377
|
const code_1 = requireCode$1();
|
|
12378
12378
|
class ValueError extends Error {
|
|
12379
12379
|
constructor(name) {
|
|
@@ -12385,8 +12385,8 @@ function requireScope () {
|
|
|
12385
12385
|
(function (UsedValueState) {
|
|
12386
12386
|
UsedValueState[UsedValueState["Started"] = 0] = "Started";
|
|
12387
12387
|
UsedValueState[UsedValueState["Completed"] = 1] = "Completed";
|
|
12388
|
-
})(UsedValueState || (exports.UsedValueState = UsedValueState = {}));
|
|
12389
|
-
exports.varKinds = {
|
|
12388
|
+
})(UsedValueState || (exports$1.UsedValueState = UsedValueState = {}));
|
|
12389
|
+
exports$1.varKinds = {
|
|
12390
12390
|
const: new code_1.Name("const"),
|
|
12391
12391
|
let: new code_1.Name("let"),
|
|
12392
12392
|
var: new code_1.Name("var"),
|
|
@@ -12415,7 +12415,7 @@ function requireScope () {
|
|
|
12415
12415
|
return (this._names[prefix] = { prefix, index: 0 });
|
|
12416
12416
|
}
|
|
12417
12417
|
}
|
|
12418
|
-
exports.Scope = Scope;
|
|
12418
|
+
exports$1.Scope = Scope;
|
|
12419
12419
|
class ValueScopeName extends code_1.Name {
|
|
12420
12420
|
constructor(prefix, nameStr) {
|
|
12421
12421
|
super(nameStr);
|
|
@@ -12426,7 +12426,7 @@ function requireScope () {
|
|
|
12426
12426
|
this.scopePath = (0, code_1._) `.${new code_1.Name(property)}[${itemIndex}]`;
|
|
12427
12427
|
}
|
|
12428
12428
|
}
|
|
12429
|
-
exports.ValueScopeName = ValueScopeName;
|
|
12429
|
+
exports$1.ValueScopeName = ValueScopeName;
|
|
12430
12430
|
const line = (0, code_1._) `\n`;
|
|
12431
12431
|
class ValueScope extends Scope {
|
|
12432
12432
|
constructor(opts) {
|
|
@@ -12497,7 +12497,7 @@ function requireScope () {
|
|
|
12497
12497
|
nameSet.set(name, UsedValueState.Started);
|
|
12498
12498
|
let c = valueCode(name);
|
|
12499
12499
|
if (c) {
|
|
12500
|
-
const def = this.opts.es5 ? exports.varKinds.var : exports.varKinds.const;
|
|
12500
|
+
const def = this.opts.es5 ? exports$1.varKinds.var : exports$1.varKinds.const;
|
|
12501
12501
|
code = (0, code_1._) `${code}${def} ${name} = ${c};${this.opts._n}`;
|
|
12502
12502
|
}
|
|
12503
12503
|
else if ((c = getCode === null || getCode === void 0 ? void 0 : getCode(name))) {
|
|
@@ -12512,7 +12512,7 @@ function requireScope () {
|
|
|
12512
12512
|
return code;
|
|
12513
12513
|
}
|
|
12514
12514
|
}
|
|
12515
|
-
exports.ValueScope = ValueScope;
|
|
12515
|
+
exports$1.ValueScope = ValueScope;
|
|
12516
12516
|
|
|
12517
12517
|
} (scope));
|
|
12518
12518
|
return scope;
|
|
@@ -12523,26 +12523,26 @@ var hasRequiredCodegen;
|
|
|
12523
12523
|
function requireCodegen () {
|
|
12524
12524
|
if (hasRequiredCodegen) return codegen;
|
|
12525
12525
|
hasRequiredCodegen = 1;
|
|
12526
|
-
(function (exports) {
|
|
12527
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12528
|
-
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;
|
|
12526
|
+
(function (exports$1) {
|
|
12527
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
12528
|
+
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;
|
|
12529
12529
|
const code_1 = requireCode$1();
|
|
12530
12530
|
const scope_1 = requireScope();
|
|
12531
12531
|
var code_2 = requireCode$1();
|
|
12532
|
-
Object.defineProperty(exports, "_", { enumerable: true, get: function () { return code_2._; } });
|
|
12533
|
-
Object.defineProperty(exports, "str", { enumerable: true, get: function () { return code_2.str; } });
|
|
12534
|
-
Object.defineProperty(exports, "strConcat", { enumerable: true, get: function () { return code_2.strConcat; } });
|
|
12535
|
-
Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return code_2.nil; } });
|
|
12536
|
-
Object.defineProperty(exports, "getProperty", { enumerable: true, get: function () { return code_2.getProperty; } });
|
|
12537
|
-
Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return code_2.stringify; } });
|
|
12538
|
-
Object.defineProperty(exports, "regexpCode", { enumerable: true, get: function () { return code_2.regexpCode; } });
|
|
12539
|
-
Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return code_2.Name; } });
|
|
12532
|
+
Object.defineProperty(exports$1, "_", { enumerable: true, get: function () { return code_2._; } });
|
|
12533
|
+
Object.defineProperty(exports$1, "str", { enumerable: true, get: function () { return code_2.str; } });
|
|
12534
|
+
Object.defineProperty(exports$1, "strConcat", { enumerable: true, get: function () { return code_2.strConcat; } });
|
|
12535
|
+
Object.defineProperty(exports$1, "nil", { enumerable: true, get: function () { return code_2.nil; } });
|
|
12536
|
+
Object.defineProperty(exports$1, "getProperty", { enumerable: true, get: function () { return code_2.getProperty; } });
|
|
12537
|
+
Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function () { return code_2.stringify; } });
|
|
12538
|
+
Object.defineProperty(exports$1, "regexpCode", { enumerable: true, get: function () { return code_2.regexpCode; } });
|
|
12539
|
+
Object.defineProperty(exports$1, "Name", { enumerable: true, get: function () { return code_2.Name; } });
|
|
12540
12540
|
var scope_2 = requireScope();
|
|
12541
|
-
Object.defineProperty(exports, "Scope", { enumerable: true, get: function () { return scope_2.Scope; } });
|
|
12542
|
-
Object.defineProperty(exports, "ValueScope", { enumerable: true, get: function () { return scope_2.ValueScope; } });
|
|
12543
|
-
Object.defineProperty(exports, "ValueScopeName", { enumerable: true, get: function () { return scope_2.ValueScopeName; } });
|
|
12544
|
-
Object.defineProperty(exports, "varKinds", { enumerable: true, get: function () { return scope_2.varKinds; } });
|
|
12545
|
-
exports.operators = {
|
|
12541
|
+
Object.defineProperty(exports$1, "Scope", { enumerable: true, get: function () { return scope_2.Scope; } });
|
|
12542
|
+
Object.defineProperty(exports$1, "ValueScope", { enumerable: true, get: function () { return scope_2.ValueScope; } });
|
|
12543
|
+
Object.defineProperty(exports$1, "ValueScopeName", { enumerable: true, get: function () { return scope_2.ValueScopeName; } });
|
|
12544
|
+
Object.defineProperty(exports$1, "varKinds", { enumerable: true, get: function () { return scope_2.varKinds; } });
|
|
12545
|
+
exports$1.operators = {
|
|
12546
12546
|
GT: new code_1._Code(">"),
|
|
12547
12547
|
GTE: new code_1._Code(">="),
|
|
12548
12548
|
LT: new code_1._Code("<"),
|
|
@@ -12956,7 +12956,7 @@ function requireCodegen () {
|
|
|
12956
12956
|
}
|
|
12957
12957
|
// `+=` code
|
|
12958
12958
|
add(lhs, rhs) {
|
|
12959
|
-
return this._leafNode(new AssignOp(lhs, exports.operators.ADD, rhs));
|
|
12959
|
+
return this._leafNode(new AssignOp(lhs, exports$1.operators.ADD, rhs));
|
|
12960
12960
|
}
|
|
12961
12961
|
// appends passed SafeExpr to code or executes Block
|
|
12962
12962
|
code(c) {
|
|
@@ -13158,7 +13158,7 @@ function requireCodegen () {
|
|
|
13158
13158
|
ns[ns.length - 1] = node;
|
|
13159
13159
|
}
|
|
13160
13160
|
}
|
|
13161
|
-
exports.CodeGen = CodeGen;
|
|
13161
|
+
exports$1.CodeGen = CodeGen;
|
|
13162
13162
|
function addNames(names, from) {
|
|
13163
13163
|
for (const n in from)
|
|
13164
13164
|
names[n] = (names[n] || 0) + (from[n] || 0);
|
|
@@ -13200,19 +13200,19 @@ function requireCodegen () {
|
|
|
13200
13200
|
function not(x) {
|
|
13201
13201
|
return typeof x == "boolean" || typeof x == "number" || x === null ? !x : (0, code_1._) `!${par(x)}`;
|
|
13202
13202
|
}
|
|
13203
|
-
exports.not = not;
|
|
13204
|
-
const andCode = mappend(exports.operators.AND);
|
|
13203
|
+
exports$1.not = not;
|
|
13204
|
+
const andCode = mappend(exports$1.operators.AND);
|
|
13205
13205
|
// boolean AND (&&) expression with the passed arguments
|
|
13206
13206
|
function and(...args) {
|
|
13207
13207
|
return args.reduce(andCode);
|
|
13208
13208
|
}
|
|
13209
|
-
exports.and = and;
|
|
13210
|
-
const orCode = mappend(exports.operators.OR);
|
|
13209
|
+
exports$1.and = and;
|
|
13210
|
+
const orCode = mappend(exports$1.operators.OR);
|
|
13211
13211
|
// boolean OR (||) expression with the passed arguments
|
|
13212
13212
|
function or(...args) {
|
|
13213
13213
|
return args.reduce(orCode);
|
|
13214
13214
|
}
|
|
13215
|
-
exports.or = or;
|
|
13215
|
+
exports$1.or = or;
|
|
13216
13216
|
function mappend(op) {
|
|
13217
13217
|
return (x, y) => (x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._) `${par(x)} ${op} ${par(y)}`);
|
|
13218
13218
|
}
|
|
@@ -13453,21 +13453,21 @@ var hasRequiredErrors;
|
|
|
13453
13453
|
function requireErrors () {
|
|
13454
13454
|
if (hasRequiredErrors) return errors;
|
|
13455
13455
|
hasRequiredErrors = 1;
|
|
13456
|
-
(function (exports) {
|
|
13457
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13458
|
-
exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0;
|
|
13456
|
+
(function (exports$1) {
|
|
13457
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
13458
|
+
exports$1.extendErrors = exports$1.resetErrorsCount = exports$1.reportExtraError = exports$1.reportError = exports$1.keyword$DataError = exports$1.keywordError = void 0;
|
|
13459
13459
|
const codegen_1 = requireCodegen();
|
|
13460
13460
|
const util_1 = requireUtil$1();
|
|
13461
13461
|
const names_1 = requireNames();
|
|
13462
|
-
exports.keywordError = {
|
|
13462
|
+
exports$1.keywordError = {
|
|
13463
13463
|
message: ({ keyword }) => (0, codegen_1.str) `must pass "${keyword}" keyword validation`,
|
|
13464
13464
|
};
|
|
13465
|
-
exports.keyword$DataError = {
|
|
13465
|
+
exports$1.keyword$DataError = {
|
|
13466
13466
|
message: ({ keyword, schemaType }) => schemaType
|
|
13467
13467
|
? (0, codegen_1.str) `"${keyword}" keyword must be ${schemaType} ($data)`
|
|
13468
13468
|
: (0, codegen_1.str) `"${keyword}" keyword is invalid ($data)`,
|
|
13469
13469
|
};
|
|
13470
|
-
function reportError(cxt, error = exports.keywordError, errorPaths, overrideAllErrors) {
|
|
13470
|
+
function reportError(cxt, error = exports$1.keywordError, errorPaths, overrideAllErrors) {
|
|
13471
13471
|
const { it } = cxt;
|
|
13472
13472
|
const { gen, compositeRule, allErrors } = it;
|
|
13473
13473
|
const errObj = errorObjectCode(cxt, error, errorPaths);
|
|
@@ -13478,8 +13478,8 @@ function requireErrors () {
|
|
|
13478
13478
|
returnErrors(it, (0, codegen_1._) `[${errObj}]`);
|
|
13479
13479
|
}
|
|
13480
13480
|
}
|
|
13481
|
-
exports.reportError = reportError;
|
|
13482
|
-
function reportExtraError(cxt, error = exports.keywordError, errorPaths) {
|
|
13481
|
+
exports$1.reportError = reportError;
|
|
13482
|
+
function reportExtraError(cxt, error = exports$1.keywordError, errorPaths) {
|
|
13483
13483
|
const { it } = cxt;
|
|
13484
13484
|
const { gen, compositeRule, allErrors } = it;
|
|
13485
13485
|
const errObj = errorObjectCode(cxt, error, errorPaths);
|
|
@@ -13488,12 +13488,12 @@ function requireErrors () {
|
|
|
13488
13488
|
returnErrors(it, names_1.default.vErrors);
|
|
13489
13489
|
}
|
|
13490
13490
|
}
|
|
13491
|
-
exports.reportExtraError = reportExtraError;
|
|
13491
|
+
exports$1.reportExtraError = reportExtraError;
|
|
13492
13492
|
function resetErrorsCount(gen, errsCount) {
|
|
13493
13493
|
gen.assign(names_1.default.errors, errsCount);
|
|
13494
13494
|
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)));
|
|
13495
13495
|
}
|
|
13496
|
-
exports.resetErrorsCount = resetErrorsCount;
|
|
13496
|
+
exports$1.resetErrorsCount = resetErrorsCount;
|
|
13497
13497
|
function extendErrors({ gen, keyword, schemaValue, data, errsCount, it, }) {
|
|
13498
13498
|
/* istanbul ignore if */
|
|
13499
13499
|
if (errsCount === undefined)
|
|
@@ -13509,7 +13509,7 @@ function requireErrors () {
|
|
|
13509
13509
|
}
|
|
13510
13510
|
});
|
|
13511
13511
|
}
|
|
13512
|
-
exports.extendErrors = extendErrors;
|
|
13512
|
+
exports$1.extendErrors = extendErrors;
|
|
13513
13513
|
function addError(gen, errObj) {
|
|
13514
13514
|
const err = gen.const("err", errObj);
|
|
13515
13515
|
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})`);
|
|
@@ -16473,18 +16473,18 @@ var hasRequiredCore$1;
|
|
|
16473
16473
|
function requireCore$1 () {
|
|
16474
16474
|
if (hasRequiredCore$1) return core$1;
|
|
16475
16475
|
hasRequiredCore$1 = 1;
|
|
16476
|
-
(function (exports) {
|
|
16477
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16478
|
-
exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
|
|
16476
|
+
(function (exports$1) {
|
|
16477
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
16478
|
+
exports$1.CodeGen = exports$1.Name = exports$1.nil = exports$1.stringify = exports$1.str = exports$1._ = exports$1.KeywordCxt = void 0;
|
|
16479
16479
|
var validate_1 = requireValidate();
|
|
16480
|
-
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
|
|
16480
|
+
Object.defineProperty(exports$1, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
|
|
16481
16481
|
var codegen_1 = requireCodegen();
|
|
16482
|
-
Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } });
|
|
16483
|
-
Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } });
|
|
16484
|
-
Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
|
|
16485
|
-
Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
|
|
16486
|
-
Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
|
|
16487
|
-
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
|
|
16482
|
+
Object.defineProperty(exports$1, "_", { enumerable: true, get: function () { return codegen_1._; } });
|
|
16483
|
+
Object.defineProperty(exports$1, "str", { enumerable: true, get: function () { return codegen_1.str; } });
|
|
16484
|
+
Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
|
|
16485
|
+
Object.defineProperty(exports$1, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
|
|
16486
|
+
Object.defineProperty(exports$1, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
|
|
16487
|
+
Object.defineProperty(exports$1, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
|
|
16488
16488
|
const validation_error_1 = requireValidation_error();
|
|
16489
16489
|
const ref_error_1 = requireRef_error();
|
|
16490
16490
|
const rules_1 = requireRules();
|
|
@@ -16964,7 +16964,7 @@ function requireCore$1 () {
|
|
|
16964
16964
|
}
|
|
16965
16965
|
Ajv.ValidationError = validation_error_1.default;
|
|
16966
16966
|
Ajv.MissingRefError = ref_error_1.default;
|
|
16967
|
-
exports.default = Ajv;
|
|
16967
|
+
exports$1.default = Ajv;
|
|
16968
16968
|
function checkOptions(checkOpts, options, msg, log = "error") {
|
|
16969
16969
|
for (const key in checkOpts) {
|
|
16970
16970
|
const opt = key;
|
|
@@ -18113,13 +18113,13 @@ var hasRequiredDependencies;
|
|
|
18113
18113
|
function requireDependencies () {
|
|
18114
18114
|
if (hasRequiredDependencies) return dependencies;
|
|
18115
18115
|
hasRequiredDependencies = 1;
|
|
18116
|
-
(function (exports) {
|
|
18117
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18118
|
-
exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0;
|
|
18116
|
+
(function (exports$1) {
|
|
18117
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
18118
|
+
exports$1.validateSchemaDeps = exports$1.validatePropertyDeps = exports$1.error = void 0;
|
|
18119
18119
|
const codegen_1 = requireCodegen();
|
|
18120
18120
|
const util_1 = requireUtil$1();
|
|
18121
18121
|
const code_1 = requireCode();
|
|
18122
|
-
exports.error = {
|
|
18122
|
+
exports$1.error = {
|
|
18123
18123
|
message: ({ params: { property, depsCount, deps } }) => {
|
|
18124
18124
|
const property_ies = depsCount === 1 ? "property" : "properties";
|
|
18125
18125
|
return (0, codegen_1.str) `must have ${property_ies} ${deps} when property ${property} is present`;
|
|
@@ -18133,7 +18133,7 @@ function requireDependencies () {
|
|
|
18133
18133
|
keyword: "dependencies",
|
|
18134
18134
|
type: "object",
|
|
18135
18135
|
schemaType: "object",
|
|
18136
|
-
error: exports.error,
|
|
18136
|
+
error: exports$1.error,
|
|
18137
18137
|
code(cxt) {
|
|
18138
18138
|
const [propDeps, schDeps] = splitDependencies(cxt);
|
|
18139
18139
|
validatePropertyDeps(cxt, propDeps);
|
|
@@ -18180,7 +18180,7 @@ function requireDependencies () {
|
|
|
18180
18180
|
}
|
|
18181
18181
|
}
|
|
18182
18182
|
}
|
|
18183
|
-
exports.validatePropertyDeps = validatePropertyDeps;
|
|
18183
|
+
exports$1.validatePropertyDeps = validatePropertyDeps;
|
|
18184
18184
|
function validateSchemaDeps(cxt, schemaDeps = cxt.schema) {
|
|
18185
18185
|
const { gen, data, keyword, it } = cxt;
|
|
18186
18186
|
const valid = gen.name("valid");
|
|
@@ -18195,8 +18195,8 @@ function requireDependencies () {
|
|
|
18195
18195
|
cxt.ok(valid);
|
|
18196
18196
|
}
|
|
18197
18197
|
}
|
|
18198
|
-
exports.validateSchemaDeps = validateSchemaDeps;
|
|
18199
|
-
exports.default = def;
|
|
18198
|
+
exports$1.validateSchemaDeps = validateSchemaDeps;
|
|
18199
|
+
exports$1.default = def;
|
|
18200
18200
|
|
|
18201
18201
|
} (dependencies));
|
|
18202
18202
|
return dependencies;
|
|
@@ -19371,9 +19371,9 @@ var hasRequiredAjv;
|
|
|
19371
19371
|
function requireAjv () {
|
|
19372
19372
|
if (hasRequiredAjv) return ajv$1.exports;
|
|
19373
19373
|
hasRequiredAjv = 1;
|
|
19374
|
-
(function (module, exports) {
|
|
19375
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19376
|
-
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0;
|
|
19374
|
+
(function (module, exports$1) {
|
|
19375
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
19376
|
+
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;
|
|
19377
19377
|
const core_1 = requireCore$1();
|
|
19378
19378
|
const draft7_1 = requireDraft7();
|
|
19379
19379
|
const discriminator_1 = requireDiscriminator();
|
|
@@ -19402,24 +19402,24 @@ function requireAjv () {
|
|
|
19402
19402
|
super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));
|
|
19403
19403
|
}
|
|
19404
19404
|
}
|
|
19405
|
-
exports.Ajv = Ajv;
|
|
19406
|
-
module.exports = exports = Ajv;
|
|
19405
|
+
exports$1.Ajv = Ajv;
|
|
19406
|
+
module.exports = exports$1 = Ajv;
|
|
19407
19407
|
module.exports.Ajv = Ajv;
|
|
19408
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19409
|
-
exports.default = Ajv;
|
|
19408
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
19409
|
+
exports$1.default = Ajv;
|
|
19410
19410
|
var validate_1 = requireValidate();
|
|
19411
|
-
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
|
|
19411
|
+
Object.defineProperty(exports$1, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
|
|
19412
19412
|
var codegen_1 = requireCodegen();
|
|
19413
|
-
Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } });
|
|
19414
|
-
Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } });
|
|
19415
|
-
Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
|
|
19416
|
-
Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
|
|
19417
|
-
Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
|
|
19418
|
-
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
|
|
19413
|
+
Object.defineProperty(exports$1, "_", { enumerable: true, get: function () { return codegen_1._; } });
|
|
19414
|
+
Object.defineProperty(exports$1, "str", { enumerable: true, get: function () { return codegen_1.str; } });
|
|
19415
|
+
Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
|
|
19416
|
+
Object.defineProperty(exports$1, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
|
|
19417
|
+
Object.defineProperty(exports$1, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
|
|
19418
|
+
Object.defineProperty(exports$1, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
|
|
19419
19419
|
var validation_error_1 = requireValidation_error();
|
|
19420
|
-
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return validation_error_1.default; } });
|
|
19420
|
+
Object.defineProperty(exports$1, "ValidationError", { enumerable: true, get: function () { return validation_error_1.default; } });
|
|
19421
19421
|
var ref_error_1 = requireRef_error();
|
|
19422
|
-
Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function () { return ref_error_1.default; } });
|
|
19422
|
+
Object.defineProperty(exports$1, "MissingRefError", { enumerable: true, get: function () { return ref_error_1.default; } });
|
|
19423
19423
|
|
|
19424
19424
|
} (ajv$1, ajv$1.exports));
|
|
19425
19425
|
return ajv$1.exports;
|
|
@@ -19471,8 +19471,7 @@ const Pact = Type.Object({
|
|
|
19471
19471
|
version: Type.String(),
|
|
19472
19472
|
})),
|
|
19473
19473
|
})),
|
|
19474
|
-
interactions: Type.
|
|
19475
|
-
messages: Type.Optional(Type.Array(Type.Unknown())),
|
|
19474
|
+
interactions: Type.Array(Interaction),
|
|
19476
19475
|
});
|
|
19477
19476
|
const supportedInteractions = (i) => !i.type || i.type.toLowerCase() === "synchronous/http";
|
|
19478
19477
|
const parseAsPactV4Body = (body) => {
|
|
@@ -19546,11 +19545,10 @@ const interactionV4 = (i) => ({
|
|
|
19546
19545
|
const ajv = new Ajv$1();
|
|
19547
19546
|
const validate = ajv.compile(Pact);
|
|
19548
19547
|
const parse = (pact) => {
|
|
19549
|
-
const { metadata, interactions
|
|
19548
|
+
const { metadata, interactions } = pact;
|
|
19550
19549
|
const isValid = validate({
|
|
19551
19550
|
metadata,
|
|
19552
|
-
interactions: interactions
|
|
19553
|
-
messages,
|
|
19551
|
+
interactions: interactions.filter(supportedInteractions),
|
|
19554
19552
|
});
|
|
19555
19553
|
if (!isValid) {
|
|
19556
19554
|
throw new ParserError(validate.errors);
|
|
@@ -19562,10 +19560,9 @@ const parse = (pact) => {
|
|
|
19562
19560
|
const interactionParser = version >= 4 ? interactionV4 : version >= 3 ? interactionV3 : interactionV1;
|
|
19563
19561
|
return {
|
|
19564
19562
|
metadata,
|
|
19565
|
-
interactions: interactions
|
|
19563
|
+
interactions: interactions.map((i) => supportedInteractions(i)
|
|
19566
19564
|
? interactionParser(i)
|
|
19567
19565
|
: { _skip: true }),
|
|
19568
|
-
messages,
|
|
19569
19566
|
};
|
|
19570
19567
|
};
|
|
19571
19568
|
class ParserError extends Error {
|
|
@@ -20518,9 +20515,9 @@ var hasRequired_2019;
|
|
|
20518
20515
|
function require_2019 () {
|
|
20519
20516
|
if (hasRequired_2019) return _2019.exports;
|
|
20520
20517
|
hasRequired_2019 = 1;
|
|
20521
|
-
(function (module, exports) {
|
|
20522
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20523
|
-
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv2019 = void 0;
|
|
20518
|
+
(function (module, exports$1) {
|
|
20519
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
20520
|
+
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;
|
|
20524
20521
|
const core_1 = requireCore$1();
|
|
20525
20522
|
const draft7_1 = requireDraft7();
|
|
20526
20523
|
const dynamic_1 = requireDynamic();
|
|
@@ -20560,24 +20557,24 @@ function require_2019 () {
|
|
|
20560
20557
|
super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));
|
|
20561
20558
|
}
|
|
20562
20559
|
}
|
|
20563
|
-
exports.Ajv2019 = Ajv2019;
|
|
20564
|
-
module.exports = exports = Ajv2019;
|
|
20560
|
+
exports$1.Ajv2019 = Ajv2019;
|
|
20561
|
+
module.exports = exports$1 = Ajv2019;
|
|
20565
20562
|
module.exports.Ajv2019 = Ajv2019;
|
|
20566
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20567
|
-
exports.default = Ajv2019;
|
|
20563
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
20564
|
+
exports$1.default = Ajv2019;
|
|
20568
20565
|
var validate_1 = requireValidate();
|
|
20569
|
-
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
|
|
20566
|
+
Object.defineProperty(exports$1, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
|
|
20570
20567
|
var codegen_1 = requireCodegen();
|
|
20571
|
-
Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } });
|
|
20572
|
-
Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } });
|
|
20573
|
-
Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
|
|
20574
|
-
Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
|
|
20575
|
-
Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
|
|
20576
|
-
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
|
|
20568
|
+
Object.defineProperty(exports$1, "_", { enumerable: true, get: function () { return codegen_1._; } });
|
|
20569
|
+
Object.defineProperty(exports$1, "str", { enumerable: true, get: function () { return codegen_1.str; } });
|
|
20570
|
+
Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
|
|
20571
|
+
Object.defineProperty(exports$1, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
|
|
20572
|
+
Object.defineProperty(exports$1, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
|
|
20573
|
+
Object.defineProperty(exports$1, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
|
|
20577
20574
|
var validation_error_1 = requireValidation_error();
|
|
20578
|
-
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return validation_error_1.default; } });
|
|
20575
|
+
Object.defineProperty(exports$1, "ValidationError", { enumerable: true, get: function () { return validation_error_1.default; } });
|
|
20579
20576
|
var ref_error_1 = requireRef_error();
|
|
20580
|
-
Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function () { return ref_error_1.default; } });
|
|
20577
|
+
Object.defineProperty(exports$1, "MissingRefError", { enumerable: true, get: function () { return ref_error_1.default; } });
|
|
20581
20578
|
|
|
20582
20579
|
} (_2019, _2019.exports));
|
|
20583
20580
|
return _2019.exports;
|
|
@@ -20595,13 +20592,13 @@ var hasRequiredFormats;
|
|
|
20595
20592
|
function requireFormats () {
|
|
20596
20593
|
if (hasRequiredFormats) return formats;
|
|
20597
20594
|
hasRequiredFormats = 1;
|
|
20598
|
-
(function (exports) {
|
|
20599
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20600
|
-
exports.formatNames = exports.fastFormats = exports.fullFormats = void 0;
|
|
20595
|
+
(function (exports$1) {
|
|
20596
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
20597
|
+
exports$1.formatNames = exports$1.fastFormats = exports$1.fullFormats = void 0;
|
|
20601
20598
|
function fmtDef(validate, compare) {
|
|
20602
20599
|
return { validate, compare };
|
|
20603
20600
|
}
|
|
20604
|
-
exports.fullFormats = {
|
|
20601
|
+
exports$1.fullFormats = {
|
|
20605
20602
|
// date: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
20606
20603
|
date: fmtDef(date, compareDate),
|
|
20607
20604
|
// date-time: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
@@ -20648,8 +20645,8 @@ function requireFormats () {
|
|
|
20648
20645
|
// unchecked string payload
|
|
20649
20646
|
binary: true,
|
|
20650
20647
|
};
|
|
20651
|
-
exports.fastFormats = {
|
|
20652
|
-
...exports.fullFormats,
|
|
20648
|
+
exports$1.fastFormats = {
|
|
20649
|
+
...exports$1.fullFormats,
|
|
20653
20650
|
date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate),
|
|
20654
20651
|
time: fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareTime),
|
|
20655
20652
|
"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),
|
|
@@ -20663,7 +20660,7 @@ function requireFormats () {
|
|
|
20663
20660
|
// http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation')
|
|
20664
20661
|
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,
|
|
20665
20662
|
};
|
|
20666
|
-
exports.formatNames = Object.keys(exports.fullFormats);
|
|
20663
|
+
exports$1.formatNames = Object.keys(exports$1.fullFormats);
|
|
20667
20664
|
function isLeapYear(year) {
|
|
20668
20665
|
// https://tools.ietf.org/html/rfc3339#appendix-C
|
|
20669
20666
|
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
@@ -20814,9 +20811,9 @@ var hasRequiredLimit;
|
|
|
20814
20811
|
function requireLimit () {
|
|
20815
20812
|
if (hasRequiredLimit) return limit;
|
|
20816
20813
|
hasRequiredLimit = 1;
|
|
20817
|
-
(function (exports) {
|
|
20818
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20819
|
-
exports.formatLimitDefinition = void 0;
|
|
20814
|
+
(function (exports$1) {
|
|
20815
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
20816
|
+
exports$1.formatLimitDefinition = void 0;
|
|
20820
20817
|
const ajv_1 = requireAjv();
|
|
20821
20818
|
const codegen_1 = requireCodegen();
|
|
20822
20819
|
const ops = codegen_1.operators;
|
|
@@ -20830,7 +20827,7 @@ function requireLimit () {
|
|
|
20830
20827
|
message: ({ keyword, schemaCode }) => (0, codegen_1.str) `should be ${KWDs[keyword].okStr} ${schemaCode}`,
|
|
20831
20828
|
params: ({ keyword, schemaCode }) => (0, codegen_1._) `{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`,
|
|
20832
20829
|
};
|
|
20833
|
-
exports.formatLimitDefinition = {
|
|
20830
|
+
exports$1.formatLimitDefinition = {
|
|
20834
20831
|
keyword: Object.keys(KWDs),
|
|
20835
20832
|
type: "string",
|
|
20836
20833
|
schemaType: "string",
|
|
@@ -20878,10 +20875,10 @@ function requireLimit () {
|
|
|
20878
20875
|
dependencies: ["format"],
|
|
20879
20876
|
};
|
|
20880
20877
|
const formatLimitPlugin = (ajv) => {
|
|
20881
|
-
ajv.addKeyword(exports.formatLimitDefinition);
|
|
20878
|
+
ajv.addKeyword(exports$1.formatLimitDefinition);
|
|
20882
20879
|
return ajv;
|
|
20883
20880
|
};
|
|
20884
|
-
exports.default = formatLimitPlugin;
|
|
20881
|
+
exports$1.default = formatLimitPlugin;
|
|
20885
20882
|
|
|
20886
20883
|
} (limit));
|
|
20887
20884
|
return limit;
|
|
@@ -20892,8 +20889,8 @@ var hasRequiredDist$1;
|
|
|
20892
20889
|
function requireDist$1 () {
|
|
20893
20890
|
if (hasRequiredDist$1) return dist$2.exports;
|
|
20894
20891
|
hasRequiredDist$1 = 1;
|
|
20895
|
-
(function (module, exports) {
|
|
20896
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20892
|
+
(function (module, exports$1) {
|
|
20893
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
20897
20894
|
const formats_1 = requireFormats();
|
|
20898
20895
|
const limit_1 = requireLimit();
|
|
20899
20896
|
const codegen_1 = requireCodegen();
|
|
@@ -20925,9 +20922,9 @@ function requireDist$1 () {
|
|
|
20925
20922
|
for (const f of list)
|
|
20926
20923
|
ajv.addFormat(f, fs[f]);
|
|
20927
20924
|
}
|
|
20928
|
-
module.exports = exports = formatsPlugin;
|
|
20929
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20930
|
-
exports.default = formatsPlugin;
|
|
20925
|
+
module.exports = exports$1 = formatsPlugin;
|
|
20926
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
20927
|
+
exports$1.default = formatsPlugin;
|
|
20931
20928
|
|
|
20932
20929
|
} (dist$2, dist$2.exports));
|
|
20933
20930
|
return dist$2.exports;
|
|
@@ -21429,9 +21426,9 @@ var hasRequiredTypes$1;
|
|
|
21429
21426
|
function requireTypes$1 () {
|
|
21430
21427
|
if (hasRequiredTypes$1) return types;
|
|
21431
21428
|
hasRequiredTypes$1 = 1;
|
|
21432
|
-
(function (exports) {
|
|
21433
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21434
|
-
exports.types = void 0;
|
|
21429
|
+
(function (exports$1) {
|
|
21430
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
21431
|
+
exports$1.types = void 0;
|
|
21435
21432
|
(function (types) {
|
|
21436
21433
|
types[types["ROOT"] = 0] = "ROOT";
|
|
21437
21434
|
types[types["GROUP"] = 1] = "GROUP";
|
|
@@ -21441,7 +21438,7 @@ function requireTypes$1 () {
|
|
|
21441
21438
|
types[types["REPETITION"] = 5] = "REPETITION";
|
|
21442
21439
|
types[types["REFERENCE"] = 6] = "REFERENCE";
|
|
21443
21440
|
types[types["CHAR"] = 7] = "CHAR";
|
|
21444
|
-
})(exports.types || (exports.types = {}));
|
|
21441
|
+
})(exports$1.types || (exports$1.types = {}));
|
|
21445
21442
|
|
|
21446
21443
|
} (types));
|
|
21447
21444
|
return types;
|
|
@@ -21464,7 +21461,7 @@ var hasRequiredTypes;
|
|
|
21464
21461
|
function requireTypes () {
|
|
21465
21462
|
if (hasRequiredTypes) return types$1;
|
|
21466
21463
|
hasRequiredTypes = 1;
|
|
21467
|
-
(function (exports) {
|
|
21464
|
+
(function (exports$1) {
|
|
21468
21465
|
var __createBinding = (types$1 && types$1.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
21469
21466
|
if (k2 === undefined) k2 = k;
|
|
21470
21467
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
@@ -21472,13 +21469,13 @@ function requireTypes () {
|
|
|
21472
21469
|
if (k2 === undefined) k2 = k;
|
|
21473
21470
|
o[k2] = m[k];
|
|
21474
21471
|
}));
|
|
21475
|
-
var __exportStar = (types$1 && types$1.__exportStar) || function(m, exports) {
|
|
21476
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
21472
|
+
var __exportStar = (types$1 && types$1.__exportStar) || function(m, exports$1) {
|
|
21473
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
|
|
21477
21474
|
};
|
|
21478
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21479
|
-
__exportStar(requireTokens(), exports);
|
|
21480
|
-
__exportStar(requireTypes$1(), exports);
|
|
21481
|
-
__exportStar(requireSetLookup(), exports);
|
|
21475
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
21476
|
+
__exportStar(requireTokens(), exports$1);
|
|
21477
|
+
__exportStar(requireTypes$1(), exports$1);
|
|
21478
|
+
__exportStar(requireSetLookup(), exports$1);
|
|
21482
21479
|
|
|
21483
21480
|
} (types$1));
|
|
21484
21481
|
return types$1;
|
|
@@ -22181,12 +22178,12 @@ var hasRequiredReconstruct;
|
|
|
22181
22178
|
function requireReconstruct () {
|
|
22182
22179
|
if (hasRequiredReconstruct) return reconstruct;
|
|
22183
22180
|
hasRequiredReconstruct = 1;
|
|
22184
|
-
(function (exports) {
|
|
22185
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22186
|
-
exports.reconstruct = void 0;
|
|
22181
|
+
(function (exports$1) {
|
|
22182
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
22183
|
+
exports$1.reconstruct = void 0;
|
|
22187
22184
|
const types_1 = requireTypes();
|
|
22188
22185
|
const write_set_tokens_1 = requireWriteSetTokens();
|
|
22189
|
-
const reduceStack = (stack) => stack.map(exports.reconstruct).join('');
|
|
22186
|
+
const reduceStack = (stack) => stack.map(exports$1.reconstruct).join('');
|
|
22190
22187
|
const createAlternate = (token) => {
|
|
22191
22188
|
if ('options' in token) {
|
|
22192
22189
|
return token.options.map(reduceStack).join('|');
|
|
@@ -22198,7 +22195,7 @@ function requireReconstruct () {
|
|
|
22198
22195
|
throw new Error(`options or stack must be Root or Group token`);
|
|
22199
22196
|
}
|
|
22200
22197
|
};
|
|
22201
|
-
exports.reconstruct = (token) => {
|
|
22198
|
+
exports$1.reconstruct = (token) => {
|
|
22202
22199
|
switch (token.type) {
|
|
22203
22200
|
case types_1.types.ROOT:
|
|
22204
22201
|
return createAlternate(token);
|
|
@@ -22249,7 +22246,7 @@ function requireReconstruct () {
|
|
|
22249
22246
|
else {
|
|
22250
22247
|
endWith = `{${min},${max}}`;
|
|
22251
22248
|
}
|
|
22252
|
-
return `${exports.reconstruct(token.value)}${endWith}`;
|
|
22249
|
+
return `${exports$1.reconstruct(token.value)}${endWith}`;
|
|
22253
22250
|
}
|
|
22254
22251
|
case types_1.types.RANGE:
|
|
22255
22252
|
return `${write_set_tokens_1.setChar(token.from)}-${write_set_tokens_1.setChar(token.to)}`;
|
|
@@ -22269,7 +22266,7 @@ var hasRequiredDist;
|
|
|
22269
22266
|
function requireDist () {
|
|
22270
22267
|
if (hasRequiredDist) return dist$1.exports;
|
|
22271
22268
|
hasRequiredDist = 1;
|
|
22272
|
-
(function (module, exports) {
|
|
22269
|
+
(function (module, exports$1) {
|
|
22273
22270
|
var __createBinding = (dist && dist.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
22274
22271
|
if (k2 === undefined) k2 = k;
|
|
22275
22272
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
@@ -22277,20 +22274,20 @@ function requireDist () {
|
|
|
22277
22274
|
if (k2 === undefined) k2 = k;
|
|
22278
22275
|
o[k2] = m[k];
|
|
22279
22276
|
}));
|
|
22280
|
-
var __exportStar = (dist && dist.__exportStar) || function(m, exports) {
|
|
22281
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
22277
|
+
var __exportStar = (dist && dist.__exportStar) || function(m, exports$1) {
|
|
22278
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
|
|
22282
22279
|
};
|
|
22283
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22284
|
-
exports.types = void 0;
|
|
22280
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
22281
|
+
exports$1.types = void 0;
|
|
22285
22282
|
/* istanbul ignore file */
|
|
22286
22283
|
const types_1 = requireTypes();
|
|
22287
|
-
Object.defineProperty(exports, "types", { enumerable: true, get: function () { return types_1.types; } });
|
|
22288
|
-
__exportStar(requireTokenizer(), exports);
|
|
22289
|
-
__exportStar(requireReconstruct(), exports);
|
|
22284
|
+
Object.defineProperty(exports$1, "types", { enumerable: true, get: function () { return types_1.types; } });
|
|
22285
|
+
__exportStar(requireTokenizer(), exports$1);
|
|
22286
|
+
__exportStar(requireReconstruct(), exports$1);
|
|
22290
22287
|
const tokenizer_1 = requireTokenizer();
|
|
22291
22288
|
const reconstruct_1 = requireReconstruct();
|
|
22292
|
-
__exportStar(requireTypes(), exports);
|
|
22293
|
-
exports.default = tokenizer_1.tokenizer;
|
|
22289
|
+
__exportStar(requireTypes(), exports$1);
|
|
22290
|
+
exports$1.default = tokenizer_1.tokenizer;
|
|
22294
22291
|
module.exports = tokenizer_1.tokenizer;
|
|
22295
22292
|
module.exports.types = types_1.types;
|
|
22296
22293
|
module.exports.reconstruct = reconstruct_1.reconstruct;
|
|
@@ -24346,15 +24343,9 @@ class Comparator {
|
|
|
24346
24343
|
this.#router = setupRouter(this.#oas, this.#config);
|
|
24347
24344
|
}
|
|
24348
24345
|
const parsedPact = parse(pact);
|
|
24349
|
-
const
|
|
24350
|
-
const UNSUPPORTED_INTERACTION_WARNING = {
|
|
24351
|
-
code: "interaction.type.unsupported",
|
|
24352
|
-
message: `Non-HTTP Interaction is not supported, OPC can only compare HTTP interactions.`,
|
|
24353
|
-
type: "warning",
|
|
24354
|
-
};
|
|
24355
|
-
for (const [index, interaction] of parsedInteractions.entries()) {
|
|
24346
|
+
for (const [index, interaction] of parsedPact.interactions.entries()) {
|
|
24356
24347
|
if (interaction._skip) {
|
|
24357
|
-
|
|
24348
|
+
// non http/synchronous have been zero-ed out
|
|
24358
24349
|
continue;
|
|
24359
24350
|
}
|
|
24360
24351
|
const { method, path, query } = interaction.request;
|
|
@@ -24402,11 +24393,6 @@ class Comparator {
|
|
|
24402
24393
|
yield* compareResHeader(this.#ajvCoerce, route, interaction, index, this.#config);
|
|
24403
24394
|
yield* compareResBody(this.#ajvNocoerce, route, interaction, index, this.#config);
|
|
24404
24395
|
}
|
|
24405
|
-
if (parsedPact.messages) {
|
|
24406
|
-
for (const [_message] of parsedPact.messages.entries()) {
|
|
24407
|
-
yield UNSUPPORTED_INTERACTION_WARNING;
|
|
24408
|
-
}
|
|
24409
|
-
}
|
|
24410
24396
|
}
|
|
24411
24397
|
}
|
|
24412
24398
|
|