Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

api-smart-diff

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

api-smart-diff - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

dist/src/rules/helpers/index.d.ts

795

browser/api-smart-diff.js

@@ -86,3 +86,3 @@ /*! api-smart-diff@0.1.0 */

/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 3);
/******/ return __webpack_require__(__webpack_require__.s = 4);
/******/ })

@@ -97,9 +97,3 @@ /************************************************************************/

Object.defineProperty(exports, "__esModule", { value: true });
exports.breakingIfAfterTrue = exports.breakingIf = exports.allAnnotation = exports.allUnclassified = exports.addNonBreaking = exports.onlyAddBreaking = exports.allBreaking = exports.allNonBreaking = exports.unclassified = exports.annotation = exports.nonBreaking = exports.breaking = exports.ActionType = void 0;
var ActionType;
(function (ActionType) {
ActionType["add"] = "add";
ActionType["remove"] = "remove";
ActionType["replace"] = "replace";
})(ActionType = exports.ActionType || (exports.ActionType = {}));
exports.breakingIfAfterTrue = exports.breakingIf = exports.allAnnotation = exports.allUnclassified = exports.addNonBreaking = exports.onlyAddBreaking = exports.allBreaking = exports.allNonBreaking = exports.unclassified = exports.annotation = exports.nonBreaking = exports.breaking = void 0;
exports.breaking = "breaking";

@@ -117,7 +111,7 @@ exports.nonBreaking = "non-breaking";

// helpers
const breakingIf = (v) => v ? exports.breaking : exports.nonBreaking;
const breakingIf = (v) => (v ? exports.breaking : exports.nonBreaking);
exports.breakingIf = breakingIf;
const breakingIfAfterTrue = (_, a) => (0, exports.breakingIf)(a);
exports.breakingIfAfterTrue = breakingIfAfterTrue;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMudH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LEVBQUUsa0JBQVUsRUFBRSxrQkFBVSxDQUFDLENBQUE7QUFFN0UsVUFBVTtBQUNILE1BQU0sVUFBVSxHQUFHLENBQUMsQ0FBVSxFQUFjLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsZ0JBQVEsQ0FBQyxDQUFDLENBQUMsbUJBQVcsQ0FBQyxDQUFBO0FBQXJFLFFBQUEsVUFBVSxjQUEyRDtBQUMzRSxNQUFNLG1CQUFtQixHQUFHLENBQUMsQ0FBTSxFQUFFLENBQU0sRUFBYyxFQUFFLENBQUMsSUFBQSxrQkFBVSxFQUFDLENBQUMsQ0FBQyxDQUFBO0FBQW5FLFFBQUEsbUJBQW1CLHVCQUFnRCJ9

@@ -132,31 +126,31 @@ /***/ }),

exports.jsonSchemaRules = void 0;
const types_1 = __webpack_require__(0);
const helpers_1 = __webpack_require__(0);
const maxClassifier = [
types_1.breaking,
types_1.nonBreaking,
(b, a) => (0, types_1.breakingIf)(b < a)
helpers_1.breaking,
helpers_1.nonBreaking,
(b, a) => (0, helpers_1.breakingIf)(b < a)
];
const minClassifier = [
types_1.breaking,
types_1.nonBreaking,
(b, a) => (0, types_1.breakingIf)(b > a)
helpers_1.breaking,
helpers_1.nonBreaking,
(b, a) => (0, helpers_1.breakingIf)(b > a)
];
const exclusiveClassifier = [
types_1.breakingIfAfterTrue,
types_1.nonBreaking,
(b, a) => (0, types_1.breakingIf)(b < a)
helpers_1.breakingIfAfterTrue,
helpers_1.nonBreaking,
(b, a) => (0, helpers_1.breakingIf)(b < a)
];
const booleanClassifier = [
types_1.breakingIfAfterTrue,
types_1.nonBreaking,
types_1.breakingIfAfterTrue
helpers_1.breakingIfAfterTrue,
helpers_1.nonBreaking,
helpers_1.breakingIfAfterTrue
];
const multipleOfClassifier = [
types_1.breaking,
types_1.nonBreaking,
(b, a) => (0, types_1.breakingIf)(!!(b % a))
helpers_1.breaking,
helpers_1.nonBreaking,
(b, a) => (0, helpers_1.breakingIf)(!!(b % a))
];
const jsonSchemaRules = (rootRule = types_1.allUnclassified) => ({
const jsonSchemaRules = (rootRule = helpers_1.allUnclassified) => ({
"/": rootRule,
"/title": types_1.allAnnotation,
"/title": helpers_1.allAnnotation,
"/multipleOf": multipleOfClassifier,

@@ -169,3 +163,3 @@ "/maximum": maxClassifier,

"/minLength": minClassifier,
"/pattern": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/pattern": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/maxItems": maxClassifier,

@@ -177,60 +171,62 @@ "/minItems": minClassifier,

"/required": {
'/': types_1.onlyAddBreaking,
'/*': [types_1.breaking, types_1.nonBreaking, types_1.breaking]
"/": helpers_1.onlyAddBreaking,
"/*": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
},
"/enum": {
"/": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/*": [types_1.nonBreaking, types_1.breaking, types_1.breaking]
"/": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/*": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
},
"/type": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/type": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/not": {
'/': [types_1.breaking, types_1.nonBreaking, types_1.breaking],
'/*': () => (0, exports.jsonSchemaRules)(types_1.allBreaking)
"/": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/*": () => (0, exports.jsonSchemaRules)(helpers_1.allBreaking),
},
"/allOf": {
'/': [types_1.breaking, types_1.nonBreaking, types_1.breaking],
'/*': () => (0, exports.jsonSchemaRules)(types_1.allBreaking)
"/": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/*": () => (0, exports.jsonSchemaRules)(helpers_1.allBreaking),
},
"/oneOf": {
'/': [types_1.breaking, types_1.nonBreaking, types_1.breaking],
'/*': () => (0, exports.jsonSchemaRules)(types_1.addNonBreaking)
"/": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/*": () => (0, exports.jsonSchemaRules)(helpers_1.addNonBreaking),
},
"/anyOf": {
'/': [types_1.breaking, types_1.nonBreaking, types_1.breaking],
'/*': () => (0, exports.jsonSchemaRules)(types_1.addNonBreaking)
"/": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/*": () => (0, exports.jsonSchemaRules)(helpers_1.addNonBreaking),
},
"/items": () => (0, exports.jsonSchemaRules)(),
"/properties": {
"/": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/*": () => (0, exports.jsonSchemaRules)(),
},
"/additionalProperties": {
"/": [types_1.breaking, types_1.breaking, types_1.breakingIfAfterTrue],
'/*': () => (0, exports.jsonSchemaRules)(types_1.addNonBreaking)
"/": [helpers_1.breaking, helpers_1.breaking, helpers_1.breakingIfAfterTrue],
"/*": () => (0, exports.jsonSchemaRules)(helpers_1.addNonBreaking),
},
"/description": types_1.allAnnotation,
"/format": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/default": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/description": helpers_1.allAnnotation,
"/format": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/default": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/nullable": booleanClassifier,
"/discriminator": {
'/': types_1.allUnclassified,
'/propertyName': types_1.allUnclassified,
'/mapping': types_1.allUnclassified
// TODO
"/": helpers_1.allUnclassified,
"/propertyName": helpers_1.allUnclassified,
"/mapping": helpers_1.allUnclassified,
},
"/readOnly": booleanClassifier,
"/writeOnly": booleanClassifier,
"/example": types_1.allAnnotation,
"/externalDocs": types_1.allAnnotation,
"/example": helpers_1.allAnnotation,
"/externalDocs": helpers_1.allAnnotation,
"/deprecated": booleanClassifier,
"/xml": {
'/': types_1.allUnclassified,
"/name": types_1.allUnclassified,
"/namespace": types_1.allUnclassified,
"/prefix": types_1.allUnclassified,
"/attribute": types_1.allUnclassified,
"/wrapped": types_1.allUnclassified,
// TODO
"/": helpers_1.allUnclassified,
"/name": helpers_1.allUnclassified,
"/namespace": helpers_1.allUnclassified,
"/prefix": helpers_1.allUnclassified,
"/attribute": helpers_1.allUnclassified,
"/wrapped": helpers_1.allUnclassified,
},
});
exports.jsonSchemaRules = jsonSchemaRules;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianNvbnNjaGVtYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9ydWxlcy9qc29uc2NoZW1hLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLG9DQUdpQjtBQUVqQixNQUFNLGFBQWEsR0FBZTtJQUNoQyxnQkFBUTtJQUNSLG1CQUFXO0lBQ1gsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxJQUFBLGtCQUFVLEVBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQztDQUM1QixDQUFBO0FBRUQsTUFBTSxhQUFhLEdBQWU7SUFDaEMsZ0JBQVE7SUFDUixtQkFBVztJQUNYLENBQUMsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFLENBQUMsSUFBQSxrQkFBVSxFQUFDLENBQUMsR0FBRyxDQUFDLENBQUM7Q0FDNUIsQ0FBQTtBQUVELE1BQU0sbUJBQW1CLEdBQWU7SUFDdEMsMkJBQW1CO0lBQ25CLG1CQUFXO0lBQ1gsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxJQUFBLGtCQUFVLEVBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQztDQUM1QixDQUFBO0FBRUQsTUFBTSxpQkFBaUIsR0FBZTtJQUNwQywyQkFBbUI7SUFDbkIsbUJBQVc7SUFDWCwyQkFBbUI7Q0FDcEIsQ0FBQTtB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LGtCQUFRLENBQUM7SUFDN0MsV0FBVyxFQUFFLGlCQUFpQjtJQUM5QixnQkFBZ0IsRUFBRTtRQUNoQixPQUFPO1FBQ1AsR0FBRyxFQUFFLHlCQUFlO1FBQ3BCLGVBQWUsRUFBRSx5QkFBZTtRQUNoQyxVQUFVLEVBQUUseUJBQWU7S0FDNUI7SUFDRCxXQUFXLEVBQUUsaUJBQWlCO0lBQzlCLFlBQVksRUFBRSxpQkFBaUI7SUFDL0IsVUFBVSxFQUFFLHVCQUFhO0lBQ3pCLGVBQWUsRUFBRSx1QkFBYTtJQUM5QixhQUFhLEVBQUUsaUJBQWlCO0lBQ2hDLE1BQU0sRUFBRTtRQUNOLE9BQU87UUFDUCxHQUFHLEVBQUUseUJBQWU7UUFDcEIsT0FBTyxFQUFFLHlCQUFlO1FBQ3hCLFlBQVksRUFBRSx5QkFBZTtRQUM3QixTQUFTLEVBQUUseUJBQWU7UUFDMUIsWUFBWSxFQUFFLHlCQUFlO1FBQzdCLFVBQVUsRUFBRSx5QkFBZTtLQUM1QjtDQUNGLENBQUMsQ0FBQTtBQTFFVyxRQUFBLGVBQWUsbUJBMEUxQiJ9

@@ -258,6 +254,7 @@ /***/ }),

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(__webpack_require__(6), exports);
__exportStar(__webpack_require__(7), exports);
__exportStar(__webpack_require__(8), exports);
__exportStar(__webpack_require__(1), exports);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvcnVsZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLDhDQUEyQjtBQUMzQiw2Q0FBMEI7QUFDMUIsK0NBQTRCIn0=
__exportStar(__webpack_require__(0), exports);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvcnVsZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLDhDQUEyQjtBQUMzQiw2Q0FBMEI7QUFDMUIsK0NBQTRCO0FBQzVCLDRDQUF5QiJ9

@@ -270,2 +267,18 @@ /***/ }),

Object.defineProperty(exports, "__esModule", { value: true });
exports.ActionType = void 0;
var ActionType;
(function (ActionType) {
ActionType["add"] = "add";
ActionType["remove"] = "remove";
ActionType["replace"] = "replace";
})(ActionType = exports.ActionType || (exports.ActionType = {}));
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsSUFBWSxVQUlYO0FBSkQsV0FBWSxVQUFVO0lBQ3BCLHlCQUFXLENBQUE7SUFDWCwrQkFBaUIsQ0FBQTtJQUNqQixpQ0FBbUIsQ0FBQTtBQUNyQixDQUFDLEVBSlcsVUFBVSxHQUFWLGtCQUFVLEtBQVYsa0JBQVUsUUFJckIifQ==
/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {

@@ -286,9 +299,9 @@ if (k2 === undefined) k2 = k;

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(__webpack_require__(4), exports);
__exportStar(__webpack_require__(5), exports);
__exportStar(__webpack_require__(2), exports);
__exportStar(__webpack_require__(0), exports);
__exportStar(__webpack_require__(3), exports);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLDZDQUEwQjtBQUMxQiwwQ0FBdUI7QUFDdkIsMENBQXVCIn0=
/***/ }),
/* 4 */
/* 5 */
/***/ (function(module, exports, __webpack_require__) {

@@ -300,10 +313,12 @@

exports.apiDiff = exports.syncApiDiff = void 0;
const classifier_1 = __webpack_require__(5);
const json_diff_1 = __webpack_require__(6);
const rules_1 = __webpack_require__(2);
const json_diff_1 = __webpack_require__(8);
const getBaseRules = (name) => {
switch (name) {
case "OpenApi3": return rules_1.openapi3Rules;
case "AsyncApi2": return rules_1.asyncApi2Rules;
case "JsonSchema": return (0, rules_1.jsonSchemaRules)();
case "OpenApi3":
return rules_1.openapi3Rules;
case "AsyncApi2":
return rules_1.asyncApi2Rules;
case "JsonSchema":
return (0, rules_1.jsonSchemaRules)();
}

@@ -313,4 +328,3 @@ };

rules = typeof rules === "string" ? getBaseRules(rules) : rules;
const diff = (0, json_diff_1.jsonDiff)(before, after);
return (0, classifier_1.classifyDiff)(rules, diff);
return (0, json_diff_1.jsonDiff)(before, after, { rules });
};

@@ -329,54 +343,5 @@ exports.syncApiDiff = syncApiDiff;

exports.apiDiff = apiDiff;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLWRpZmYuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYXBpLWRpZmYudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EsNkNBQTJDO0FBQzNDLDJDQUFzQztBQUN0QyxtQ0FBd0U7QUFHeEUsTUFBTSxZQUFZLEdBQUcsQ0FBQyxJQUFtQixFQUFTLEVBQUU7SUFDbEQsUUFBUSxJQUFJLEVBQUU7UUFDWixLQUFLLFVBQVUsQ0FBQyxDQUFDLE9BQU8scUJBQWEsQ0FBQT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FBQyxDQUFBO1NBQzNDO1FBQUMsT0FBTyxLQUFLLEVBQUU7WUFDZCxNQUFNLENBQUMsS0FBSyxDQUFDLENBQUE7U0FDZDtJQUNILENBQUMsQ0FBQyxDQUFBO0FBQ0osQ0FBQyxDQUFBO0FBUlksUUFBQSxPQUFPLFdBUW5CIn0=
/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.classifyDiff = exports.findClassifier = void 0;
const types_1 = __webpack_require__(0);
const findClassifier = (rules, path) => {
let _rules = rules;
for (let key of [...path, ""]) {
// check if rules dont have key of key is array index
if (!_rules.hasOwnProperty(`/${key}`) || typeof key === "number") {
key = "*";
}
// check if rules have key
if (_rules.hasOwnProperty(`/${key}`)) {
const rule = _rules[`/${key}`];
if (Array.isArray(rule)) {
return rule;
}
_rules = typeof rule === "function" ? rule() : rule;
}
else {
return types_1.allUnclassified;
}
}
return types_1.allUnclassified;
};
exports.findClassifier = findClassifier;
const classifyDiff = (rules, diff) => {
const _diff = diff;
for (const item of _diff) {
const classifier = (0, exports.findClassifier)(rules, item.path);
const index = ["add", "remove", "replace"].indexOf(item.action);
const changeType = classifier[index];
if (typeof changeType === "function") {
item.type = changeType(item.before, item.after);
}
else {
item.type = changeType;
}
}
return _diff;
};
exports.classifyDiff = classifyDiff;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xhc3NpZmllci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jbGFzc2lmaWVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLG1DQUErRjtBQUV4RixNQUFNLGNBQWMsR0FBRyxDQUFDLEtBQVksRUFBRSxJQUFlLEVBQWMsRUFBRTtJQUMxRSxJQUFJLE1BQU0sR0FBRyxLQUFLLENBQUE7SUFDbEIsS0FBSyxJQUFJLEdBQUcsSUFBSSxD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UUsUUFBUSxFQUFFLFNBQVMsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUE7UUFDL0QsTUFBTSxVQUFVLEdBQUcsVUFBVSxDQUFDLEtBQUssQ0FBQyxDQUFBO1FBQ3BDLElBQUksT0FBTyxVQUFVLEtBQUssVUFBVSxFQUFFO1lBQ3BDLElBQUksQ0FBQyxJQUFJLEdBQUcsVUFBVSxDQUFDLElBQUksQ0FBQyxNQUFNLEVBQUUsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFBO1NBQ2hEO2FBQU07WUFDTCxJQUFJLENBQUMsSUFBSSxHQUFHLFVBQVUsQ0FBQTtTQUN2QjtLQUNGO0lBRUQsT0FBTyxLQUFLLENBQUE7QUFDZCxDQUFDLENBQUE7QUFmWSxRQUFBLFlBQVksZ0JBZXhCIn0=
/***/ }),
/* 6 */

@@ -388,214 +353,79 @@ /***/ (function(module, exports, __webpack_require__) {

Object.defineProperty(exports, "__esModule", { value: true });
exports.jsonDiff = void 0;
const types_1 = __webpack_require__(0);
const typeOf = (value) => {
if (Array.isArray(value)) {
return "array";
}
return typeof value == null ? "null" : typeof value;
};
const jsonDiff = (before, after, options, path = []) => {
if (typeOf(before) !== typeOf(after)) {
return [{ path, before, after, action: types_1.ActionType.replace }];
}
switch (typeOf(before)) {
case "string":
return stringsDiff(before, after, options, path);
case "object":
return objectsDiff(before, after, options, path);
case "array":
return arrayDiff(before, after, options, path);
default:
return before !== after ? [{ path, before, after, action: types_1.ActionType.replace }] : [];
}
};
exports.jsonDiff = jsonDiff;
const stringsDiff = (before, after, options, path = []) => {
const a = normalizeString(before, options);
const b = normalizeString(after, options);
return a !== b ? [{ path, before, after, action: types_1.ActionType.replace }] : [];
};
const normalizeString = (value, options) => {
value = (options === null || options === void 0 ? void 0 : options.trimStrings) ? value.trim() : value;
value = (options === null || options === void 0 ? void 0 : options.caseSensitive) ? value : value.toLowerCase();
return value;
};
const objectsDiff = (before, after, options, path = []) => {
const diffs = [];
const keys = new Set([...Object.keys(before), ...Object.keys(after)]);
for (const key of keys) {
// skip symbol key
if (typeof key === "symbol") {
continue;
}
if (!before.hasOwnProperty(key)) {
// added key
diffs.push({
path: [...path, key],
before: undefined,
after: after[key],
action: types_1.ActionType.add,
});
}
else if (!after.hasOwnProperty(key)) {
// deleted key
diffs.push({
path: [...path, key],
before: before[key],
after: undefined,
action: types_1.ActionType.remove,
});
}
else {
// updated value
diffs.push(...(0, exports.jsonDiff)(before[key], after[key], options, [...path, key]));
}
if ((options === null || options === void 0 ? void 0 : options.findFirstDiff) && diffs.length) {
break;
}
}
return diffs;
};
const findEqualItemIndex = (item, array, options) => {
for (let j = 0; j < array.length; j++) {
if (!(0, exports.jsonDiff)(item, array[j], Object.assign(Object.assign({}, options), { findFirstDiff: true })).length) {
return j;
}
}
return -1;
};
const arrayDiff = (before, after, options, path = []) => {
const diffs = [];
const _after = [...after];
for (let i = 0; i < before.length; i++) {
if (options === null || options === void 0 ? void 0 : options.strictArrays) {
if (i >= after.length) {
diffs.push({
path: [...path, i],
before: before[i],
after: undefined,
action: types_1.ActionType.remove,
});
}
else {
diffs.push(...(0, exports.jsonDiff)(before[i], after[i], options, [...path, i]));
}
}
else {
const index = findEqualItemIndex(before[i], _after, options);
if (index >= 0) {
_after.splice(index, 1);
}
else {
diffs.push({
path: [...path, i],
before: before[i],
after: undefined,
action: types_1.ActionType.remove,
});
}
}
if ((options === null || options === void 0 ? void 0 : options.findFirstDiff) && diffs.length) {
break;
}
}
if (options === null || options === void 0 ? void 0 : options.strictArrays) {
_after.splice(0, before.length);
}
for (let i = 0; i < _after.length; i++) {
diffs.push({
path: [...path, before.length + i],
before: undefined,
after: _after[i],
action: types_1.ActionType.add,
});
}
return diffs;
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianNvbi1kaWZmLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3J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xDQUFBIn0=
/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.asyncApi2Rules = exports.messageRules = exports.messageTraitsRules = void 0;
const types_1 = __webpack_require__(0);
const jsonschema_1 = __webpack_require__(1);
const helpers_1 = __webpack_require__(0);
const correlationIdRules = {
"/": types_1.addNonBreaking,
"/location": types_1.addNonBreaking,
"/description": types_1.allAnnotation,
"/": helpers_1.addNonBreaking,
"/location": helpers_1.addNonBreaking,
"/description": helpers_1.allAnnotation,
};
const commonRules = {
"/summary": types_1.allAnnotation,
"/tags": types_1.allAnnotation,
"/externalDocs": types_1.allAnnotation,
"/bindings": types_1.allUnclassified,
"/summary": helpers_1.allAnnotation,
"/tags": helpers_1.allAnnotation,
"/externalDocs": helpers_1.allAnnotation,
"/bindings": helpers_1.allUnclassified,
};
const pubsubTraitsRules = Object.assign({ "/": types_1.addNonBreaking, "/*": types_1.addNonBreaking, "/operationId": types_1.addNonBreaking, "/description": types_1.allAnnotation }, commonRules);
exports.messageTraitsRules = Object.assign({ "/": types_1.addNonBreaking, "/*": types_1.addNonBreaking, "/headers": types_1.allUnclassified, "/correlationId": correlationIdRules, "/schemaFormat": types_1.allBreaking, "/contentType": types_1.addNonBreaking, "/name": types_1.allNonBreaking, "/title": types_1.allNonBreaking, "/examples": types_1.allAnnotation }, commonRules);
exports.messageRules = Object.assign({ "/": types_1.allBreaking, "/headers": types_1.allUnclassified, "/correlationId": correlationIdRules, "/schemaFormat": types_1.allBreaking, "/contentType": types_1.addNonBreaking, "/name": types_1.allNonBreaking, "/title": types_1.allNonBreaking, "/description": types_1.allNonBreaking, "/examples": types_1.allAnnotation, "/traits": exports.messageTraitsRules, "/payload": (0, jsonschema_1.jsonSchemaRules)(types_1.allBreaking) }, commonRules);
const pubsubRules = Object.assign({ "/": types_1.addNonBreaking, "/operationId": types_1.addNonBreaking, "/description": types_1.allAnnotation, "/traits": pubsubTraitsRules, "/message": exports.messageRules }, commonRules);
const pubsubTraitsRules = Object.assign({ "/": helpers_1.addNonBreaking, "/*": helpers_1.addNonBreaking, "/operationId": helpers_1.addNonBreaking, "/description": helpers_1.allAnnotation }, commonRules);
exports.messageTraitsRules = Object.assign({ "/": helpers_1.addNonBreaking, "/*": helpers_1.addNonBreaking, "/headers": helpers_1.allUnclassified, "/correlationId": correlationIdRules, "/schemaFormat": helpers_1.allBreaking, "/contentType": helpers_1.addNonBreaking, "/name": helpers_1.allNonBreaking, "/title": helpers_1.allNonBreaking, "/examples": helpers_1.allAnnotation }, commonRules);
exports.messageRules = Object.assign({ "/": helpers_1.allBreaking, "/headers": helpers_1.allUnclassified, "/correlationId": correlationIdRules, "/schemaFormat": helpers_1.allBreaking, "/contentType": helpers_1.addNonBreaking, "/name": helpers_1.allNonBreaking, "/title": helpers_1.allNonBreaking, "/description": helpers_1.allNonBreaking, "/examples": helpers_1.allAnnotation, "/traits": exports.messageTraitsRules, "/payload": (0, jsonschema_1.jsonSchemaRules)(helpers_1.allBreaking) }, commonRules);
const pubsubRules = Object.assign({ "/": helpers_1.addNonBreaking, "/operationId": helpers_1.addNonBreaking, "/description": helpers_1.allAnnotation, "/traits": pubsubTraitsRules, "/message": exports.messageRules }, commonRules);
const infoRules = {
"/": types_1.addNonBreaking,
"/version": types_1.addNonBreaking,
"/termsOfService": types_1.addNonBreaking,
"/": helpers_1.addNonBreaking,
"/version": helpers_1.addNonBreaking,
"/termsOfService": helpers_1.addNonBreaking,
"/license": {
"/": types_1.addNonBreaking,
"/name": types_1.allBreaking,
"/url": types_1.onlyAddBreaking,
"/": helpers_1.addNonBreaking,
"/name": helpers_1.allBreaking,
"/url": helpers_1.onlyAddBreaking,
},
"/title": types_1.allAnnotation,
"/description": types_1.allAnnotation,
"/title": helpers_1.allAnnotation,
"/description": helpers_1.allAnnotation,
"/contact": {
"/": types_1.allAnnotation,
"/name": types_1.allAnnotation,
"/url": types_1.allAnnotation,
"/email": types_1.allAnnotation,
"/": helpers_1.allAnnotation,
"/name": helpers_1.allAnnotation,
"/url": helpers_1.allAnnotation,
"/email": helpers_1.allAnnotation,
},
};
const serversRules = {
"/": types_1.addNonBreaking,
"/": helpers_1.addNonBreaking,
"/*": {
"/": types_1.addNonBreaking,
"/url": types_1.addNonBreaking,
"/description": types_1.allAnnotation,
"/protocol": types_1.allBreaking,
"/protocolVersion": types_1.allBreaking,
"/": helpers_1.addNonBreaking,
"/url": helpers_1.addNonBreaking,
"/description": helpers_1.allAnnotation,
"/protocol": helpers_1.allBreaking,
"/protocolVersion": helpers_1.allBreaking,
"/variables": {
"/": types_1.addNonBreaking,
"/": helpers_1.addNonBreaking,
"/*": {
"/": types_1.addNonBreaking,
"/": helpers_1.addNonBreaking,
"/enum": {
"/": types_1.addNonBreaking,
"/*": types_1.addNonBreaking,
"/": helpers_1.addNonBreaking,
"/*": helpers_1.addNonBreaking,
},
"/default": types_1.allBreaking,
"/description": types_1.allAnnotation,
"/examples": types_1.allAnnotation,
"/default": helpers_1.allBreaking,
"/description": helpers_1.allAnnotation,
"/examples": helpers_1.allAnnotation,
},
},
"/security": {
"/": types_1.allBreaking,
"/*": types_1.allBreaking,
"/": helpers_1.allBreaking,
"/*": helpers_1.allBreaking,
},
"/bindings": types_1.allUnclassified,
"/bindings": helpers_1.allUnclassified,
},
};
const channelRules = {
"/": types_1.addNonBreaking,
"/description": types_1.allNonBreaking,
"/bindings": types_1.allUnclassified,
"/": helpers_1.addNonBreaking,
"/description": helpers_1.allNonBreaking,
"/bindings": helpers_1.allUnclassified,
"/subscribe": pubsubRules,
"/publish": pubsubRules,
"/parameters": {
"/": types_1.allBreaking,
"/": helpers_1.allBreaking,
"/*": {
"/": types_1.addNonBreaking,
"/description": types_1.allNonBreaking,
"/schema": (0, jsonschema_1.jsonSchemaRules)(types_1.allBreaking),
"/location": types_1.allBreaking,
"/": helpers_1.addNonBreaking,
"/description": helpers_1.allNonBreaking,
"/schema": (0, jsonschema_1.jsonSchemaRules)(helpers_1.allBreaking),
"/location": helpers_1.allBreaking,
},

@@ -605,19 +435,19 @@ },

exports.asyncApi2Rules = {
"/asyncapi": types_1.addNonBreaking,
"/id": types_1.allAnnotation,
"/defaultContentType": types_1.allBreaking,
"/asyncapi": helpers_1.addNonBreaking,
"/id": helpers_1.allAnnotation,
"/defaultContentType": helpers_1.allBreaking,
"/info": infoRules,
"/servers": serversRules,
"/channels": {
"/": types_1.addNonBreaking,
"/": helpers_1.addNonBreaking,
"/*": channelRules,
},
"/components": types_1.allNonBreaking,
"/tags": types_1.allAnnotation,
"/externalDocs": types_1.allAnnotation,
"/components": helpers_1.allNonBreaking,
"/tags": helpers_1.allAnnotation,
"/externalDocs": helpers_1.allAnnotation,
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXN5bmNhcGkyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3J1bGVzL2FzeW5jYXBpMi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxvQ0FHaUI7QUFDakIsNkNBQThDO0FBRTlDLE1BQU0sa0JBQWtCLEdBQVU7SUFDaEMsR0FBRyxFQUFFLHNCQUFjO0lBQ25CLFdBQVcsRUFBRSxzQkFBYztJQUMzQixjQUFjLEVBQUUscUJBQWE7Q0FDOUIsQ0FBQTtBQUVELE1BQU0sV0FBVyxHQUFVO0lBQ3pCLFVBQVUsRUFBRSxxQkFBYTtJQUN6QixPQUFPLEVBQUUscUJBQWE7SUFDdEIsZUFBZSxFQUFFLHFCQUFhO0lBQzlCLFdBQVcsRUFBRSx1QkFBZTtDQUM3QixDQUFBO0FBRUQsTUFBTSxpQkFBaUIsbUJBQ3JCLEdBQUcsRUFBRSxzQkFBYyxFQUNuQixJQUFJLEVBQUUsc0JBQWMsRUFDcEIsY0FBYyxFQUFFLHNCQUFjLEVBQzlCLGNBQWMsRUFBRSxxQkFBYSxJQUMxQixXQUFXLENBQ2Ys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FBRSx1QkFBYTtJQUN0QixlQUFlLEVBQUUsdUJBQWE7Q0FDL0IsQ0FBQSJ9
/***/ }),
/* 8 */
/* 7 */
/***/ (function(module, exports, __webpack_require__) {

@@ -629,20 +459,20 @@

exports.openapi3Rules = void 0;
const types_1 = __webpack_require__(0);
const jsonschema_1 = __webpack_require__(1);
const helpers_1 = __webpack_require__(0);
const serversRules = {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/url": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/description": types_1.allAnnotation,
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/url": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/description": helpers_1.allAnnotation,
"/variables": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/enum": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/*": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
},
"/default": [types_1.breaking, types_1.breaking, types_1.breaking],
"/description": types_1.allAnnotation,
"/default": [helpers_1.breaking, helpers_1.breaking, helpers_1.breaking],
"/description": helpers_1.allAnnotation,
},

@@ -653,39 +483,39 @@ },

const parametersRules = {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/name": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/in": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/description": types_1.allAnnotation,
"/required": [types_1.breaking, types_1.nonBreaking, types_1.breakingIfAfterTrue],
"/deprecated": [types_1.breaking, types_1.nonBreaking, types_1.breakingIfAfterTrue],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/name": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/in": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/description": helpers_1.allAnnotation,
"/required": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breakingIfAfterTrue],
"/deprecated": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breakingIfAfterTrue],
},
};
const headersRules = {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/description": types_1.allAnnotation,
"/required": [types_1.breaking, types_1.nonBreaking, types_1.breakingIfAfterTrue],
"/deprecated": [types_1.breaking, types_1.nonBreaking, types_1.breakingIfAfterTrue],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/description": helpers_1.allAnnotation,
"/required": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breakingIfAfterTrue],
"/deprecated": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breakingIfAfterTrue],
},
};
const encodingRules = {
"/": [types_1.nonBreaking, types_1.nonBreaking, types_1.nonBreaking],
"/": [helpers_1.nonBreaking, helpers_1.nonBreaking, helpers_1.nonBreaking],
"/*": {
"/contentType": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/contentType": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/headers": headersRules,
"/style": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/explode": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/allowReserved": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/style": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/explode": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/allowReserved": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
},
};
const contentRules = {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"*": {
"/schema": (0, jsonschema_1.jsonSchemaRules)(types_1.allBreaking),
"/example": types_1.allAnnotation,
"/examples": types_1.allAnnotation,
"/schema": (0, jsonschema_1.jsonSchemaRules)(helpers_1.allBreaking),
"/example": helpers_1.allAnnotation,
"/examples": helpers_1.allAnnotation,
"/encoding": encodingRules,

@@ -696,15 +526,15 @@ },

const requestBodiesRules = {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/description": types_1.allAnnotation,
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/description": helpers_1.allAnnotation,
"/content": contentRules,
"/required": [types_1.breaking, types_1.nonBreaking, (_, a) => a ? types_1.breaking : types_1.nonBreaking],
"/required": [helpers_1.breaking, helpers_1.nonBreaking, (_, a) => (a ? helpers_1.breaking : helpers_1.nonBreaking)],
},
};
const responsesRules = {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/description": types_1.allAnnotation,
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/description": helpers_1.allAnnotation,
"/headers": headersRules,

@@ -715,15 +545,15 @@ "/content": contentRules,

const securityRules = {
"/": [types_1.breaking, types_1.nonBreaking, types_1.unclassified],
"/*": [types_1.breaking, types_1.nonBreaking, types_1.unclassified],
"/": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.unclassified],
"/*": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.unclassified],
};
const operationRules = {
"/tags": types_1.allAnnotation,
"/summary": types_1.allAnnotation,
"/description": types_1.allAnnotation,
"/externalDocs": types_1.allAnnotation,
"/operationId": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/tags": helpers_1.allAnnotation,
"/summary": helpers_1.allAnnotation,
"/description": helpers_1.allAnnotation,
"/externalDocs": helpers_1.allAnnotation,
"/operationId": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/parameters": parametersRules,
"/requestBody": requestBodiesRules,
"/responses": responsesRules,
"/deprecated": [types_1.breaking, types_1.nonBreaking, types_1.breakingIfAfterTrue],
"/deprecated": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breakingIfAfterTrue],
"/security": securityRules,

@@ -733,25 +563,25 @@ "/servers": serversRules,

exports.openapi3Rules = {
"/openapi": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/openapi": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/info": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/title": types_1.allAnnotation,
"/description": types_1.allAnnotation,
"/termsOfService": types_1.allAnnotation,
"/contact": types_1.allAnnotation,
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/title": helpers_1.allAnnotation,
"/description": helpers_1.allAnnotation,
"/termsOfService": helpers_1.allAnnotation,
"/contact": helpers_1.allAnnotation,
"/licence": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/name": [types_1.breaking, types_1.breaking, types_1.breaking],
"/url": [types_1.breaking, types_1.nonBreaking, types_1.nonBreaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/name": [helpers_1.breaking, helpers_1.breaking, helpers_1.breaking],
"/url": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.nonBreaking],
},
"/version": types_1.allAnnotation,
"/version": helpers_1.allAnnotation,
},
"/servers": serversRules,
"/paths": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/summary": types_1.allAnnotation,
"/description": types_1.allAnnotation,
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/summary": helpers_1.allAnnotation,
"/description": helpers_1.allAnnotation,
"/*": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": operationRules,

@@ -764,12 +594,12 @@ },

"/components": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.nonBreaking, helpers_1.nonBreaking],
"/schemas": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/*": (0, jsonschema_1.jsonSchemaRules)(types_1.addNonBreaking),
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": (0, jsonschema_1.jsonSchemaRules)(helpers_1.addNonBreaking),
},
"/responses": responsesRules,
"/parameters": parametersRules,
"/examples": types_1.allAnnotation,
"/examples": helpers_1.allAnnotation,
"/requestBodies": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": requestBodiesRules,

@@ -779,13 +609,13 @@ },

"/securitySchemes": {
"/": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/*": {
"/": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/type": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/description": types_1.allAnnotation,
"/name": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/in": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/scheme": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/bearerFormat": types_1.allAnnotation,
"/flows": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/openIdConnectUrl": types_1.allAnnotation,
"/": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/type": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/description": helpers_1.allAnnotation,
"/name": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/in": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/scheme": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/bearerFormat": helpers_1.allAnnotation,
"/flows": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/openIdConnectUrl": helpers_1.allAnnotation,
},

@@ -795,8 +625,183 @@ },

"/security": securityRules,
"/tags": types_1.allAnnotation,
"/externalDocs": types_1.allAnnotation,
"/tags": helpers_1.allAnnotation,
"/externalDocs": helpers_1.allAnnotation,
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3BlbmFwaTMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvcnVsZXMvb3BlbmFwaTMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsb0NBR2lCO0FBQ2pCLDZDQUE4QztBQUU5QyxNQUFNLFlBQVksR0FBVTtJQUMxQixHQUFHLEVBQUUsQ0FBQyxtQkFBVyxFQUFFLGdCQUFRLEVBQUUsZ0JBQVEsQ0FBQztJQUN0QyxJQUFJLEVBQUU7UUFDSixHQUFHLEVBQUUsQ0FBQyxtQkFBVyxFQUFFLGdCQUFRLEVBQUUsZ0JBQVEsQ0FBQztRQUN0QyxNQUFNLEVBQUUsQ0FBQyx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BRSxxQkFBVyxFQUFFLGtCQUFRLENBQUM7Z0JBQzNDLG1CQUFtQixFQUFFLHVCQUFhO2FBQ25DO1NBQ0Y7S0FDRjtJQUNELFdBQVcsRUFBRSxhQUFhO0lBQzFCLE9BQU8sRUFBRSx1QkFBYTtJQUN0QixlQUFlLEVBQUUsdUJBQWE7Q0FDL0IsQ0FBQSJ9
/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.jsonDiff = void 0;
const types_1 = __webpack_require__(3);
const classifier_1 = __webpack_require__(9);
const typeOf = (value) => {
if (Array.isArray(value)) {
return "array";
}
return typeof value == null ? "null" : typeof value;
};
const jsonDiff = (before, after, options, path = []) => {
if (typeOf(before) !== typeOf(after)) {
return [(0, classifier_1.classifyDiff)({ path, before, after, action: types_1.ActionType.replace }, options === null || options === void 0 ? void 0 : options.rules)];
}
switch (typeOf(before)) {
case "string":
return stringsDiff(before, after, options, path);
case "object":
return objectsDiff(before, after, options, path);
case "array":
return arrayDiff(before, after, options, path);
default:
return before !== after ? [(0, classifier_1.classifyDiff)({ path, before, after, action: types_1.ActionType.replace }, options === null || options === void 0 ? void 0 : options.rules)] : [];
}
};
exports.jsonDiff = jsonDiff;
const stringsDiff = (before, after, options, path = []) => {
const a = normalizeString(before, options);
const b = normalizeString(after, options);
return a !== b ? [(0, classifier_1.classifyDiff)({ path, before, after, action: types_1.ActionType.replace }, options === null || options === void 0 ? void 0 : options.rules)] : [];
};
const normalizeString = (value, options) => {
value = (options === null || options === void 0 ? void 0 : options.trimStrings) ? value.trim() : value;
value = (options === null || options === void 0 ? void 0 : options.caseSensitive) ? value : value.toLowerCase();
return value;
};
const objectsDiff = (before, after, options, path = []) => {
const diffs = [];
const keys = new Set([...Object.keys(before), ...Object.keys(after)]);
for (const key of keys) {
// skip symbol key
if (typeof key === "symbol") {
continue;
}
if (!before.hasOwnProperty(key)) {
// added key
diffs.push((0, classifier_1.classifyDiff)({
path: [...path, key],
after: after[key],
action: types_1.ActionType.add,
}, options === null || options === void 0 ? void 0 : options.rules));
}
else if (!after.hasOwnProperty(key)) {
// deleted key
diffs.push((0, classifier_1.classifyDiff)({
path: [...path, key],
before: before[key],
action: types_1.ActionType.remove,
}, options === null || options === void 0 ? void 0 : options.rules));
}
else {
// updated value
diffs.push(...(0, exports.jsonDiff)(before[key], after[key], options, [...path, key]));
}
if ((options === null || options === void 0 ? void 0 : options.findFirstDiff) && diffs.length) {
break;
}
}
return diffs;
};
const findEqualItemIndex = (item, array, options) => {
for (let j = 0; j < array.length; j++) {
if (!(0, exports.jsonDiff)(item, array[j], Object.assign(Object.assign({}, options), { findFirstDiff: true })).length) {
return j;
}
}
return -1;
};
const arrayDiff = (before, after, options, path = []) => {
const diffs = [];
const _after = [...after];
for (let i = 0; i < before.length; i++) {
if (options === null || options === void 0 ? void 0 : options.strictArrays) {
if (i >= after.length) {
diffs.push((0, classifier_1.classifyDiff)({
path: [...path, i],
before: before[i],
action: types_1.ActionType.remove,
}, options === null || options === void 0 ? void 0 : options.rules));
}
else {
diffs.push(...(0, exports.jsonDiff)(before[i], after[i], options, [...path, i]));
}
}
else {
const index = findEqualItemIndex(before[i], _after, options);
if (index >= 0) {
_after.splice(index, 1);
}
else {
diffs.push((0, classifier_1.classifyDiff)({
path: [...path, i],
before: before[i],
action: types_1.ActionType.remove,
}, options === null || options === void 0 ? void 0 : options.rules));
}
}
if ((options === null || options === void 0 ? void 0 : options.findFirstDiff) && diffs.length) {
break;
}
}
if (options === null || options === void 0 ? void 0 : options.strictArrays) {
_after.splice(0, before.length);
}
for (let i = 0; i < _after.length; i++) {
diffs.push((0, classifier_1.classifyDiff)({
path: [...path, before.length + i],
after: _after[i],
action: types_1.ActionType.add,
}, options === null || options === void 0 ? void 0 : options.rules));
}
return diffs;
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianNvbi1kaWZmLmpzIiwic291cmNlUm9vdCI6IiI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UVELElBQUksT0FBTyxhQUFQLE9BQU8sdUJBQVAsT0FBTyxDQUFFLFlBQVksRUFBRTtRQUN6QixNQUFNLENBQUMsTUFBTSxDQUFDLENBQUMsRUFBRSxNQUFNLENBQUMsTUFBTSxDQUFDLENBQUE7S0FDaEM7SUFFRCxLQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsTUFBTSxDQUFDLE1BQU0sRUFBRSxDQUFDLEVBQUUsRUFBRTtRQUN0QyxLQUFLLENBQUMsSUFBSSxDQUNSLElBQUEseUJBQVksRUFDVjtZQUNFLElBQUksRUFBRSxDQUFDLEdBQUcsSUFBSSxFQUFFLE1BQU0sQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFDO1lBQ2xDLEtBQUssRUFBRSxNQUFNLENBQUMsQ0FBQyxDQUFDO1lBQ2hCLE1BQU0sRUFBRSxrQkFBVSxDQUFDLEdBQUc7U0FDdkIsRUFDRCxPQUFPLGFBQVAsT0FBTyx1QkFBUCxPQUFPLENBQUUsS0FBSyxDQUNmLENBQ0YsQ0FBQTtLQUNGO0lBRUQsT0FBTyxLQUFLLENBQUE7QUFDZCxDQUFDLENBQUEifQ==
/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.classifyDiff = exports.findClassifier = void 0;
const helpers_1 = __webpack_require__(0);
const findClassifier = (rules, path) => {
let _rules = rules;
for (let key of [...path, ""]) {
// check if rules dont have key of key is array index
if (!_rules.hasOwnProperty(`/${key}`) || typeof key === "number") {
key = "*";
}
// check if rules have key
if (_rules.hasOwnProperty(`/${key}`)) {
const rule = _rules[`/${key}`];
if (Array.isArray(rule)) {
return rule;
}
_rules = typeof rule === "function" ? rule() : rule;
}
else {
return helpers_1.allUnclassified;
}
}
return helpers_1.allUnclassified;
};
exports.findClassifier = findClassifier;
const classifyDiff = (diff, rules = {}) => {
const _diff = diff;
const classifier = (0, exports.findClassifier)(rules, diff.path);
const index = ["add", "remove", "replace"].indexOf(diff.action);
const changeType = classifier[index];
_diff.type = typeof changeType === "function"
? changeType(diff.before, diff.after)
: changeType;
return _diff;
};
exports.classifyDiff = classifyDiff;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xhc3NpZmllci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jbGFzc2lmaWVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLDZDQUFpRDtBQUcxQyxNQUFNLGNBQWMsR0FBRyxDQUFDLEtBQVksRUFBRSxJQUFlLEVBQWMsRUFBRTtJQUMxRSxJQUFJLE1BQU0sR0FBRyxLQUFLLENBQUE7SUFDbEIsS0FBSyxJQUFJLEdBQUcsSUFBSSxDQUFDLEdBQUcsSUFBSSxFQUFFLEVBQUUsQ0FBQyxFQUFFO1FBQzdCLHFEQUFxRDtRQUNyRCxJQUFJLENBQUMsTUFBTSxDQUFDLGNBQWMsQ0FBQyxJQUFJLEdBQUcsRUFBRSxDQUFDLElBQUksT0FBTyxHQUFHLEtBQUssUUFBUSxFQUFFO1lBQ2hFLEdBQUcsR0FBRyxHQUFHLENBQUE7U0FDVjtRQUVELDBCQUEwQjtRQUMxQixJQUFJLE1BQU0sQ0FBQyxjQUFjLENBQUMsSUFBSSxHQUFHLEVBQUUsQ0FBQyxFQUFFO1lBQ3BDLE1BQU0sSUFBSSxHQUFHLE1BQU0sQ0FBQyxJQUFJLEdBQUcsRUFBRSxDQUFDLENBQUE7WUFDOUIsSUFBSSxLQUFLLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxFQUFFO2dCQUN2QixPQUFPLElBQUksQ0FBQTthQUNaO1lBQ0QsTUFBTSxHQUFHLE9BQU8sSUFBSSxLQUFLLFVBQVUsQ0FBQyxDQUFDLENBQUMsSUFBSSxFQUFFLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQTtTQUNwRDthQUFNO1lBQ0wsT0FBTyx5QkFBZSxDQUFBO1NBQ3ZCO0tBQ0Y7SUFDRCxPQUFPLHlCQUFlLENBQUE7QUFDeEIsQ0FBQyxDQUFBO0FBcEJZLFFBQUEsY0FBYyxrQkFvQjFCO0FBRU0sTUFBTSxZQUFZLEdBQUcsQ0FBQyxJQUFXLEVBQUUsUUFBZSxFQUFFLEVBQW1CLEVBQUU7SUFDOUUsTUFBTSxLQUFLLEdBQUcsSUFBdUIsQ0FBQTtJQUVyQyxNQUFNLFVBQVUsR0FBRyxJQUFBLHNCQUFjLEVBQUMsS0FBSyxFQUFFLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQTtJQUVuRCxNQUFNLEtBQUssR0FBRyxDQUFDLEtBQUssRUFBRSxRQUFRLEVBQUUsU0FBUyxDQUFDLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQTtJQUMvRCxNQUFNLFVBQVUsR0FBRyxVQUFVLENBQUMsS0FBSyxDQUFDLENBQUE7SUFFcEMsS0FBSyxDQUFDLElBQUksR0FBRyxPQUFPLFVBQVUsS0FBSyxVQUFVO1FBQzNDLENBQUMsQ0FBQyxVQUFVLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxJQUFJLENBQUMsS0FBSyxDQUFDO1FBQ3JDLENBQUMsQ0FBQyxVQUFVLENBQUE7SUFFZCxPQUFPLEtBQUssQ0FBQTtBQUNkLENBQUMsQ0FBQTtBQWJZLFFBQUEsWUFBWSxnQkFheEIifQ==
/***/ })
/******/ ]);
/*! api-smart-diff@0.1.0 */
var ApiSmartDiff=function(a){var i={};function r(n){if(i[n])return i[n].exports;var e=i[n]={i:n,l:!1,exports:{}};return a[n].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=a,r.c=i,r.d=function(n,e,a){r.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:a})},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(e,n){if(1&n&&(e=r(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)r.d(a,i,function(n){return e[n]}.bind(null,i));return a},r.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(e,"a",e),e},r.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},r.p="",r(r.s=3)}([function(n,a,e){"use strict";var i;Object.defineProperty(a,"__esModule",{value:!0}),a.breakingIfAfterTrue=a.breakingIf=a.allAnnotation=a.allUnclassified=a.addNonBreaking=a.onlyAddBreaking=a.allBreaking=a.allNonBreaking=a.unclassified=a.annotation=a.nonBreaking=a.breaking=a.ActionType=void 0,(i=a.ActionType||(a.ActionType={})).add="add",i.remove="remove",i.replace="replace",a.breaking="breaking",a.nonBreaking="non-breaking",a.annotation="annotation",a.unclassified="unclassified",a.allNonBreaking=[a.nonBreaking,a.nonBreaking,a.nonBreaking],a.allBreaking=[a.breaking,a.breaking,a.breaking],a.onlyAddBreaking=[a.breaking,a.nonBreaking,a.nonBreaking],a.addNonBreaking=[a.nonBreaking,a.breaking,a.breaking],a.allUnclassified=[a.unclassified,a.unclassified,a.unclassified],a.allAnnotation=[a.annotation,a.annotation,a.annotation],a.breakingIf=n=>n?a.breaking:a.nonBreaking;a.breakingIfAfterTrue=(n,e)=>(0,a.breakingIf)(e)},function(n,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.jsonSchemaRules=void 0;const i=a(0),r=[i.breaking,i.nonBreaking,(n,e)=>(0,i.breakingIf)(n<e)],o=[i.breaking,i.nonBreaking,(n,e)=>(0,i.breakingIf)(e<n)],t=[i.breakingIfAfterTrue,i.nonBreaking,(n,e)=>(0,i.breakingIf)(n<e)],l=[i.breakingIfAfterTrue,i.nonBreaking,i.breakingIfAfterTrue],s=[i.breaking,i.nonBreaking,(n,e)=>(0,i.breakingIf)(!!(n%e))];e.jsonSchemaRules=(n=i.allUnclassified)=>({"/":n,"/title":i.allAnnotation,"/multipleOf":s,"/maximum":r,"/exclusiveMaximum":t,"/minimum":o,"/exclusiveMinimum":t,"/maxLength":r,"/minLength":o,"/pattern":[i.breaking,i.nonBreaking,i.breaking],"/maxItems":r,"/minItems":o,"/uniqueItems":l,"/maxProperties":r,"/minProperties":o,"/required":{"/":i.onlyAddBreaking,"/*":[i.breaking,i.nonBreaking,i.breaking]},"/enum":{"/":[i.breaking,i.nonBreaking,i.breaking],"/*":[i.nonBreaking,i.breaking,i.breaking]},"/type":[i.breaking,i.nonBreaking,i.breaking],"/not":{"/":[i.breaking,i.nonBreaking,i.breaking],"/*":()=>(0,e.jsonSchemaRules)(i.allBreaking)},"/allOf":{"/":[i.breaking,i.nonBreaking,i.breaking],"/*":()=>(0,e.jsonSchemaRules)(i.allBreaking)},"/oneOf":{"/":[i.breaking,i.nonBreaking,i.breaking],"/*":()=>(0,e.jsonSchemaRules)(i.addNonBreaking)},"/anyOf":{"/":[i.breaking,i.nonBreaking,i.breaking],"/*":()=>(0,e.jsonSchemaRules)(i.addNonBreaking)},"/items":()=>(0,e.jsonSchemaRules)(),"/properties":{"/":[i.breaking,i.nonBreaking,i.breaking],"/*":()=>(0,e.jsonSchemaRules)()},"/additionalProperties":{"/":[i.breaking,i.breaking,i.breakingIfAfterTrue],"/*":()=>(0,e.jsonSchemaRules)(i.addNonBreaking)},"/description":i.allAnnotation,"/format":[i.breaking,i.nonBreaking,i.breaking],"/default":[i.nonBreaking,i.breaking,i.breaking],"/nullable":l,"/discriminator":{"/":i.allUnclassified,"/propertyName":i.allUnclassified,"/mapping":i.allUnclassified},"/readOnly":l,"/writeOnly":l,"/example":i.allAnnotation,"/externalDocs":i.allAnnotation,"/deprecated":l,"/xml":{"/":i.allUnclassified,"/name":i.allUnclassified,"/namespace":i.allUnclassified,"/prefix":i.allUnclassified,"/attribute":i.allUnclassified,"/wrapped":i.allUnclassified}})},function(n,e,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(n,e,a,i){void 0===i&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);r&&("get"in r?e.__esModule:!r.writable&&!r.configurable)||(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(n,i,r)}:function(n,e,a,i){n[i=void 0===i?a:i]=e[a]}),r=this&&this.__exportStar||function(n,e){for(var a in n)"default"===a||Object.prototype.hasOwnProperty.call(e,a)||i(e,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(a(7),e),r(a(8),e),r(a(1),e)},function(n,e,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(n,e,a,i){void 0===i&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);r&&("get"in r?e.__esModule:!r.writable&&!r.configurable)||(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(n,i,r)}:function(n,e,a,i){n[i=void 0===i?a:i]=e[a]}),r=this&&this.__exportStar||function(n,e){for(var a in n)"default"===a||Object.prototype.hasOwnProperty.call(e,a)||i(e,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(a(4),e),r(a(2),e),r(a(0),e)},function(n,o,e){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.apiDiff=o.syncApiDiff=void 0;const i=e(5),r=e(6),t=e(2);o.syncApiDiff=(n,e,a)=>{a="string"==typeof a?(n=>{switch(n){case"OpenApi3":return t.openapi3Rules;case"AsyncApi2":return t.asyncApi2Rules;case"JsonSchema":return(0,t.jsonSchemaRules)()}})(a):a;n=(0,r.jsonDiff)(n,e);return(0,i.classifyDiff)(a,n)};o.apiDiff=(a,i,r)=>new Promise((n,e)=>{try{n((0,o.syncApiDiff)(a,i,r))}catch(n){e(n)}})},function(n,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.classifyDiff=r.findClassifier=void 0;const o=e(0);r.findClassifier=(n,e)=>{let a=n;for(var i of[...e,""]){if(a.hasOwnProperty("/"+i)&&"number"!=typeof i||(i="*"),!a.hasOwnProperty("/"+i))return o.allUnclassified;{const r=a["/"+i];if(Array.isArray(r))return r;a="function"==typeof r?r():r}}return o.allUnclassified};r.classifyDiff=(n,e)=>{for(const a of e){const i=(0,r.findClassifier)(n,a.path)[["add","remove","replace"].indexOf(a.action)];"function"==typeof i?a.type=i(a.before,a.after):a.type=i}return e}},function(n,s,e){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.jsonDiff=void 0;const g=e(0),r=n=>Array.isArray(n)?"array":null==typeof n?"null":typeof n;s.jsonDiff=(n,e,a,i=[])=>{if(r(n)!==r(e))return[{path:i,before:n,after:e,action:g.ActionType.replace}];switch(r(n)){case"string":return o(n,e,a,i);case"object":return l(n,e,a,i);case"array":return k(n,e,a,i);default:return n!==e?[{path:i,before:n,after:e,action:g.ActionType.replace}]:[]}};const o=(n,e,a,i=[])=>{return t(n,a)!==t(e,a)?[{path:i,before:n,after:e,action:g.ActionType.replace}]:[]},t=(n,e)=>(n=null!=e&&e.trimStrings?n.trim():n,n=null!=e&&e.caseSensitive?n:n.toLowerCase()),l=(n,e,a,i=[])=>{const r=[];for(const o of new Set([...Object.keys(n),...Object.keys(e)]))if("symbol"!=typeof o&&(n.hasOwnProperty(o)?e.hasOwnProperty(o)?r.push(...(0,s.jsonDiff)(n[o],e[o],a,[...i,o])):r.push({path:[...i,o],before:n[o],after:void 0,action:g.ActionType.remove}):r.push({path:[...i,o],before:void 0,after:e[o],action:g.ActionType.add}),null!=a&&a.findFirstDiff&&r.length))break;return r},k=(e,a,i,r=[])=>{const o=[],t=[...a];for(let n=0;n<e.length;n++){var l;if(null!=i&&i.strictArrays?n>=a.length?o.push({path:[...r,n],before:e[n],after:void 0,action:g.ActionType.remove}):o.push(...(0,s.jsonDiff)(e[n],a[n],i,[...r,n])):0<=(l=((e,a,i)=>{for(let n=0;n<a.length;n++)if(!(0,s.jsonDiff)(e,a[n],Object.assign(Object.assign({},i),{findFirstDiff:!0})).length)return n;return-1})(e[n],t,i))?t.splice(l,1):o.push({path:[...r,n],before:e[n],after:void 0,action:g.ActionType.remove}),null!=i&&i.findFirstDiff&&o.length)break}null!=i&&i.strictArrays&&t.splice(0,e.length);for(let n=0;n<t.length;n++)o.push({path:[...r,e.length+n],before:void 0,after:t[n],action:g.ActionType.add});return o}},function(n,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.asyncApi2Rules=e.messageRules=e.messageTraitsRules=void 0;var i=a(0);const r=a(1);var a={"/":i.addNonBreaking,"/location":i.addNonBreaking,"/description":i.allAnnotation},o={"/summary":i.allAnnotation,"/tags":i.allAnnotation,"/externalDocs":i.allAnnotation,"/bindings":i.allUnclassified},t=Object.assign({"/":i.addNonBreaking,"/*":i.addNonBreaking,"/operationId":i.addNonBreaking,"/description":i.allAnnotation},o),a=(e.messageTraitsRules=Object.assign({"/":i.addNonBreaking,"/*":i.addNonBreaking,"/headers":i.allUnclassified,"/correlationId":a,"/schemaFormat":i.allBreaking,"/contentType":i.addNonBreaking,"/name":i.allNonBreaking,"/title":i.allNonBreaking,"/examples":i.allAnnotation},o),e.messageRules=Object.assign({"/":i.allBreaking,"/headers":i.allUnclassified,"/correlationId":a,"/schemaFormat":i.allBreaking,"/contentType":i.addNonBreaking,"/name":i.allNonBreaking,"/title":i.allNonBreaking,"/description":i.allNonBreaking,"/examples":i.allAnnotation,"/traits":e.messageTraitsRules,"/payload":(0,r.jsonSchemaRules)(i.allBreaking)},o),Object.assign({"/":i.addNonBreaking,"/operationId":i.addNonBreaking,"/description":i.allAnnotation,"/traits":t,"/message":e.messageRules},o)),t={"/":i.addNonBreaking,"/version":i.addNonBreaking,"/termsOfService":i.addNonBreaking,"/license":{"/":i.addNonBreaking,"/name":i.allBreaking,"/url":i.onlyAddBreaking},"/title":i.allAnnotation,"/description":i.allAnnotation,"/contact":{"/":i.allAnnotation,"/name":i.allAnnotation,"/url":i.allAnnotation,"/email":i.allAnnotation}},o={"/":i.addNonBreaking,"/*":{"/":i.addNonBreaking,"/url":i.addNonBreaking,"/description":i.allAnnotation,"/protocol":i.allBreaking,"/protocolVersion":i.allBreaking,"/variables":{"/":i.addNonBreaking,"/*":{"/":i.addNonBreaking,"/enum":{"/":i.addNonBreaking,"/*":i.addNonBreaking},"/default":i.allBreaking,"/description":i.allAnnotation,"/examples":i.allAnnotation}},"/security":{"/":i.allBreaking,"/*":i.allBreaking},"/bindings":i.allUnclassified}},a={"/":i.addNonBreaking,"/description":i.allNonBreaking,"/bindings":i.allUnclassified,"/subscribe":a,"/publish":a,"/parameters":{"/":i.allBreaking,"/*":{"/":i.addNonBreaking,"/description":i.allNonBreaking,"/schema":(0,r.jsonSchemaRules)(i.allBreaking),"/location":i.allBreaking}}};e.asyncApi2Rules={"/asyncapi":i.addNonBreaking,"/id":i.allAnnotation,"/defaultContentType":i.allBreaking,"/info":t,"/servers":o,"/channels":{"/":i.addNonBreaking,"/*":a},"/components":i.allNonBreaking,"/tags":i.allAnnotation,"/externalDocs":i.allAnnotation}},function(n,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.openapi3Rules=void 0;const i=a(0),r=a(1);var a={"/":[i.nonBreaking,i.breaking,i.breaking],"/*":{"/":[i.nonBreaking,i.breaking,i.breaking],"/url":[i.nonBreaking,i.breaking,i.breaking],"/description":i.allAnnotation,"/variables":{"/":[i.nonBreaking,i.breaking,i.breaking],"/*":{"/":[i.nonBreaking,i.breaking,i.breaking],"/enum":{"/":[i.nonBreaking,i.breaking,i.breaking],"/*":[i.nonBreaking,i.breaking,i.breaking]},"/default":[i.breaking,i.breaking,i.breaking],"/description":i.allAnnotation}}}},o={"/":[i.nonBreaking,i.breaking,i.breaking],"/*":{"/":[i.nonBreaking,i.breaking,i.breaking],"/name":[i.nonBreaking,i.breaking,i.breaking],"/in":[i.nonBreaking,i.breaking,i.breaking],"/description":i.allAnnotation,"/required":[i.breaking,i.nonBreaking,i.breakingIfAfterTrue],"/deprecated":[i.breaking,i.nonBreaking,i.breakingIfAfterTrue]}},t={"/":[i.nonBreaking,i.breaking,i.breaking],"/*":{"/":[i.nonBreaking,i.breaking,i.breaking],"/description":i.allAnnotation,"/required":[i.breaking,i.nonBreaking,i.breakingIfAfterTrue],"/deprecated":[i.breaking,i.nonBreaking,i.breakingIfAfterTrue]}},l={"/":[i.nonBreaking,i.nonBreaking,i.nonBreaking],"/*":{"/contentType":[i.nonBreaking,i.breaking,i.breaking],"/headers":t,"/style":[i.nonBreaking,i.breaking,i.breaking],"/explode":[i.nonBreaking,i.breaking,i.breaking],"/allowReserved":[i.nonBreaking,i.breaking,i.breaking]}},l={"/":[i.nonBreaking,i.breaking,i.breaking],"/*":{"/":[i.nonBreaking,i.breaking,i.breaking],"*":{"/schema":(0,r.jsonSchemaRules)(i.allBreaking),"/example":i.allAnnotation,"/examples":i.allAnnotation,"/encoding":l}}},s={"/":[i.nonBreaking,i.breaking,i.breaking],"/*":{"/":[i.nonBreaking,i.breaking,i.breaking],"/description":i.allAnnotation,"/content":l,"/required":[i.breaking,i.nonBreaking,(n,e)=>e?i.breaking:i.nonBreaking]}},l={"/":[i.nonBreaking,i.breaking,i.breaking],"/*":{"/":[i.nonBreaking,i.breaking,i.breaking],"/description":i.allAnnotation,"/headers":t,"/content":l}},g={"/":[i.breaking,i.nonBreaking,i.unclassified],"/*":[i.breaking,i.nonBreaking,i.unclassified]},k={"/tags":i.allAnnotation,"/summary":i.allAnnotation,"/description":i.allAnnotation,"/externalDocs":i.allAnnotation,"/operationId":[i.nonBreaking,i.breaking,i.breaking],"/parameters":o,"/requestBody":s,"/responses":l,"/deprecated":[i.breaking,i.nonBreaking,i.breakingIfAfterTrue],"/security":g,"/servers":a};e.openapi3Rules={"/openapi":[i.nonBreaking,i.breaking,i.breaking],"/info":{"/":[i.nonBreaking,i.breaking,i.breaking],"/title":i.allAnnotation,"/description":i.allAnnotation,"/termsOfService":i.allAnnotation,"/contact":i.allAnnotation,"/licence":{"/":[i.nonBreaking,i.breaking,i.breaking],"/name":[i.breaking,i.breaking,i.breaking],"/url":[i.breaking,i.nonBreaking,i.nonBreaking]},"/version":i.allAnnotation},"/servers":a,"/paths":{"/":[i.nonBreaking,i.breaking,i.breaking],"/*":{"/":[i.nonBreaking,i.breaking,i.breaking],"/summary":i.allAnnotation,"/description":i.allAnnotation,"/*":{"/":[i.nonBreaking,i.breaking,i.breaking],"/*":k},"/servers":a,"/parameters":o}},"/components":{"/":[i.nonBreaking,i.breaking,i.breaking],"/schemas":{"/":[i.nonBreaking,i.breaking,i.breaking],"/*":(0,r.jsonSchemaRules)(i.addNonBreaking)},"/responses":l,"/parameters":o,"/examples":i.allAnnotation,"/requestBodies":{"/":[i.nonBreaking,i.breaking,i.breaking],"/*":s},"/headers":t,"/securitySchemes":{"/":[i.breaking,i.nonBreaking,i.breaking],"/*":{"/":[i.breaking,i.nonBreaking,i.breaking],"/type":[i.breaking,i.nonBreaking,i.breaking],"/description":i.allAnnotation,"/name":[i.breaking,i.nonBreaking,i.breaking],"/in":[i.breaking,i.nonBreaking,i.breaking],"/scheme":[i.breaking,i.nonBreaking,i.breaking],"/bearerFormat":i.allAnnotation,"/flows":[i.breaking,i.nonBreaking,i.breaking],"/openIdConnectUrl":i.allAnnotation}}},"/security":g,"/tags":i.allAnnotation,"/externalDocs":i.allAnnotation}}]);
var ApiSmartDiff=function(a){var i={};function r(n){if(i[n])return i[n].exports;var e=i[n]={i:n,l:!1,exports:{}};return a[n].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=a,r.c=i,r.d=function(n,e,a){r.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:a})},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(e,n){if(1&n&&(e=r(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)r.d(a,i,function(n){return e[n]}.bind(null,i));return a},r.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(e,"a",e),e},r.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},r.p="",r(r.s=4)}([function(n,a,e){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.breakingIfAfterTrue=a.breakingIf=a.allAnnotation=a.allUnclassified=a.addNonBreaking=a.onlyAddBreaking=a.allBreaking=a.allNonBreaking=a.unclassified=a.annotation=a.nonBreaking=a.breaking=void 0,a.breaking="breaking",a.nonBreaking="non-breaking",a.annotation="annotation",a.unclassified="unclassified",a.allNonBreaking=[a.nonBreaking,a.nonBreaking,a.nonBreaking],a.allBreaking=[a.breaking,a.breaking,a.breaking],a.onlyAddBreaking=[a.breaking,a.nonBreaking,a.nonBreaking],a.addNonBreaking=[a.nonBreaking,a.breaking,a.breaking],a.allUnclassified=[a.unclassified,a.unclassified,a.unclassified],a.allAnnotation=[a.annotation,a.annotation,a.annotation];a.breakingIf=n=>n?a.breaking:a.nonBreaking;a.breakingIfAfterTrue=(n,e)=>(0,a.breakingIf)(e)},function(n,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.jsonSchemaRules=void 0;const i=a(0),r=[i.breaking,i.nonBreaking,(n,e)=>(0,i.breakingIf)(n<e)],o=[i.breaking,i.nonBreaking,(n,e)=>(0,i.breakingIf)(e<n)],t=[i.breakingIfAfterTrue,i.nonBreaking,(n,e)=>(0,i.breakingIf)(n<e)],l=[i.breakingIfAfterTrue,i.nonBreaking,i.breakingIfAfterTrue],s=[i.breaking,i.nonBreaking,(n,e)=>(0,i.breakingIf)(!!(n%e))];e.jsonSchemaRules=(n=i.allUnclassified)=>({"/":n,"/title":i.allAnnotation,"/multipleOf":s,"/maximum":r,"/exclusiveMaximum":t,"/minimum":o,"/exclusiveMinimum":t,"/maxLength":r,"/minLength":o,"/pattern":[i.breaking,i.nonBreaking,i.breaking],"/maxItems":r,"/minItems":o,"/uniqueItems":l,"/maxProperties":r,"/minProperties":o,"/required":{"/":i.onlyAddBreaking,"/*":[i.breaking,i.nonBreaking,i.breaking]},"/enum":{"/":[i.breaking,i.nonBreaking,i.breaking],"/*":[i.nonBreaking,i.breaking,i.breaking]},"/type":[i.breaking,i.nonBreaking,i.breaking],"/not":{"/":[i.breaking,i.nonBreaking,i.breaking],"/*":()=>(0,e.jsonSchemaRules)(i.allBreaking)},"/allOf":{"/":[i.breaking,i.nonBreaking,i.breaking],"/*":()=>(0,e.jsonSchemaRules)(i.allBreaking)},"/oneOf":{"/":[i.breaking,i.nonBreaking,i.breaking],"/*":()=>(0,e.jsonSchemaRules)(i.addNonBreaking)},"/anyOf":{"/":[i.breaking,i.nonBreaking,i.breaking],"/*":()=>(0,e.jsonSchemaRules)(i.addNonBreaking)},"/items":()=>(0,e.jsonSchemaRules)(),"/properties":{"/":[i.breaking,i.nonBreaking,i.breaking],"/*":()=>(0,e.jsonSchemaRules)()},"/additionalProperties":{"/":[i.breaking,i.breaking,i.breakingIfAfterTrue],"/*":()=>(0,e.jsonSchemaRules)(i.addNonBreaking)},"/description":i.allAnnotation,"/format":[i.breaking,i.nonBreaking,i.breaking],"/default":[i.nonBreaking,i.breaking,i.breaking],"/nullable":l,"/discriminator":{"/":i.allUnclassified,"/propertyName":i.allUnclassified,"/mapping":i.allUnclassified},"/readOnly":l,"/writeOnly":l,"/example":i.allAnnotation,"/externalDocs":i.allAnnotation,"/deprecated":l,"/xml":{"/":i.allUnclassified,"/name":i.allUnclassified,"/namespace":i.allUnclassified,"/prefix":i.allUnclassified,"/attribute":i.allUnclassified,"/wrapped":i.allUnclassified}})},function(n,e,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(n,e,a,i){void 0===i&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);r&&("get"in r?e.__esModule:!r.writable&&!r.configurable)||(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(n,i,r)}:function(n,e,a,i){n[i=void 0===i?a:i]=e[a]}),r=this&&this.__exportStar||function(n,e){for(var a in n)"default"===a||Object.prototype.hasOwnProperty.call(e,a)||i(e,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(a(6),e),r(a(7),e),r(a(1),e),r(a(0),e)},function(n,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=void 0,(e=e.ActionType||(e.ActionType={})).add="add",e.remove="remove",e.replace="replace"},function(n,e,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(n,e,a,i){void 0===i&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);r&&("get"in r?e.__esModule:!r.writable&&!r.configurable)||(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(n,i,r)}:function(n,e,a,i){n[i=void 0===i?a:i]=e[a]}),r=this&&this.__exportStar||function(n,e){for(var a in n)"default"===a||Object.prototype.hasOwnProperty.call(e,a)||i(e,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(a(5),e),r(a(2),e),r(a(3),e)},function(n,o,e){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.apiDiff=o.syncApiDiff=void 0;const i=e(2),r=e(8);o.syncApiDiff=(n,e,a)=>(a="string"==typeof a?(n=>{switch(n){case"OpenApi3":return i.openapi3Rules;case"AsyncApi2":return i.asyncApi2Rules;case"JsonSchema":return(0,i.jsonSchemaRules)()}})(a):a,(0,r.jsonDiff)(n,e,{rules:a}));o.apiDiff=(a,i,r)=>new Promise((n,e)=>{try{n((0,o.syncApiDiff)(a,i,r))}catch(n){e(n)}})},function(n,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.asyncApi2Rules=e.messageRules=e.messageTraitsRules=void 0;const i=a(1);var a=a(0),r={"/":a.addNonBreaking,"/location":a.addNonBreaking,"/description":a.allAnnotation},o={"/summary":a.allAnnotation,"/tags":a.allAnnotation,"/externalDocs":a.allAnnotation,"/bindings":a.allUnclassified},t=Object.assign({"/":a.addNonBreaking,"/*":a.addNonBreaking,"/operationId":a.addNonBreaking,"/description":a.allAnnotation},o),r=(e.messageTraitsRules=Object.assign({"/":a.addNonBreaking,"/*":a.addNonBreaking,"/headers":a.allUnclassified,"/correlationId":r,"/schemaFormat":a.allBreaking,"/contentType":a.addNonBreaking,"/name":a.allNonBreaking,"/title":a.allNonBreaking,"/examples":a.allAnnotation},o),e.messageRules=Object.assign({"/":a.allBreaking,"/headers":a.allUnclassified,"/correlationId":r,"/schemaFormat":a.allBreaking,"/contentType":a.addNonBreaking,"/name":a.allNonBreaking,"/title":a.allNonBreaking,"/description":a.allNonBreaking,"/examples":a.allAnnotation,"/traits":e.messageTraitsRules,"/payload":(0,i.jsonSchemaRules)(a.allBreaking)},o),Object.assign({"/":a.addNonBreaking,"/operationId":a.addNonBreaking,"/description":a.allAnnotation,"/traits":t,"/message":e.messageRules},o)),t={"/":a.addNonBreaking,"/version":a.addNonBreaking,"/termsOfService":a.addNonBreaking,"/license":{"/":a.addNonBreaking,"/name":a.allBreaking,"/url":a.onlyAddBreaking},"/title":a.allAnnotation,"/description":a.allAnnotation,"/contact":{"/":a.allAnnotation,"/name":a.allAnnotation,"/url":a.allAnnotation,"/email":a.allAnnotation}},o={"/":a.addNonBreaking,"/*":{"/":a.addNonBreaking,"/url":a.addNonBreaking,"/description":a.allAnnotation,"/protocol":a.allBreaking,"/protocolVersion":a.allBreaking,"/variables":{"/":a.addNonBreaking,"/*":{"/":a.addNonBreaking,"/enum":{"/":a.addNonBreaking,"/*":a.addNonBreaking},"/default":a.allBreaking,"/description":a.allAnnotation,"/examples":a.allAnnotation}},"/security":{"/":a.allBreaking,"/*":a.allBreaking},"/bindings":a.allUnclassified}},r={"/":a.addNonBreaking,"/description":a.allNonBreaking,"/bindings":a.allUnclassified,"/subscribe":r,"/publish":r,"/parameters":{"/":a.allBreaking,"/*":{"/":a.addNonBreaking,"/description":a.allNonBreaking,"/schema":(0,i.jsonSchemaRules)(a.allBreaking),"/location":a.allBreaking}}};e.asyncApi2Rules={"/asyncapi":a.addNonBreaking,"/id":a.allAnnotation,"/defaultContentType":a.allBreaking,"/info":t,"/servers":o,"/channels":{"/":a.addNonBreaking,"/*":r},"/components":a.allNonBreaking,"/tags":a.allAnnotation,"/externalDocs":a.allAnnotation}},function(n,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.openapi3Rules=void 0;const i=a(1),r=a(0);var a={"/":[r.nonBreaking,r.breaking,r.breaking],"/*":{"/":[r.nonBreaking,r.breaking,r.breaking],"/url":[r.nonBreaking,r.breaking,r.breaking],"/description":r.allAnnotation,"/variables":{"/":[r.nonBreaking,r.breaking,r.breaking],"/*":{"/":[r.nonBreaking,r.breaking,r.breaking],"/enum":{"/":[r.nonBreaking,r.breaking,r.breaking],"/*":[r.nonBreaking,r.breaking,r.breaking]},"/default":[r.breaking,r.breaking,r.breaking],"/description":r.allAnnotation}}}},o={"/":[r.nonBreaking,r.breaking,r.breaking],"/*":{"/":[r.nonBreaking,r.breaking,r.breaking],"/name":[r.nonBreaking,r.breaking,r.breaking],"/in":[r.nonBreaking,r.breaking,r.breaking],"/description":r.allAnnotation,"/required":[r.breaking,r.nonBreaking,r.breakingIfAfterTrue],"/deprecated":[r.breaking,r.nonBreaking,r.breakingIfAfterTrue]}},t={"/":[r.nonBreaking,r.breaking,r.breaking],"/*":{"/":[r.nonBreaking,r.breaking,r.breaking],"/description":r.allAnnotation,"/required":[r.breaking,r.nonBreaking,r.breakingIfAfterTrue],"/deprecated":[r.breaking,r.nonBreaking,r.breakingIfAfterTrue]}},l={"/":[r.nonBreaking,r.nonBreaking,r.nonBreaking],"/*":{"/contentType":[r.nonBreaking,r.breaking,r.breaking],"/headers":t,"/style":[r.nonBreaking,r.breaking,r.breaking],"/explode":[r.nonBreaking,r.breaking,r.breaking],"/allowReserved":[r.nonBreaking,r.breaking,r.breaking]}},l={"/":[r.nonBreaking,r.breaking,r.breaking],"/*":{"/":[r.nonBreaking,r.breaking,r.breaking],"*":{"/schema":(0,i.jsonSchemaRules)(r.allBreaking),"/example":r.allAnnotation,"/examples":r.allAnnotation,"/encoding":l}}},s={"/":[r.nonBreaking,r.breaking,r.breaking],"/*":{"/":[r.nonBreaking,r.breaking,r.breaking],"/description":r.allAnnotation,"/content":l,"/required":[r.breaking,r.nonBreaking,(n,e)=>e?r.breaking:r.nonBreaking]}},l={"/":[r.nonBreaking,r.breaking,r.breaking],"/*":{"/":[r.nonBreaking,r.breaking,r.breaking],"/description":r.allAnnotation,"/headers":t,"/content":l}},g={"/":[r.breaking,r.nonBreaking,r.unclassified],"/*":[r.breaking,r.nonBreaking,r.unclassified]},k={"/tags":r.allAnnotation,"/summary":r.allAnnotation,"/description":r.allAnnotation,"/externalDocs":r.allAnnotation,"/operationId":[r.nonBreaking,r.breaking,r.breaking],"/parameters":o,"/requestBody":s,"/responses":l,"/deprecated":[r.breaking,r.nonBreaking,r.breakingIfAfterTrue],"/security":g,"/servers":a};e.openapi3Rules={"/openapi":[r.nonBreaking,r.breaking,r.breaking],"/info":{"/":[r.nonBreaking,r.breaking,r.breaking],"/title":r.allAnnotation,"/description":r.allAnnotation,"/termsOfService":r.allAnnotation,"/contact":r.allAnnotation,"/licence":{"/":[r.nonBreaking,r.breaking,r.breaking],"/name":[r.breaking,r.breaking,r.breaking],"/url":[r.breaking,r.nonBreaking,r.nonBreaking]},"/version":r.allAnnotation},"/servers":a,"/paths":{"/":[r.nonBreaking,r.breaking,r.breaking],"/*":{"/":[r.nonBreaking,r.breaking,r.breaking],"/summary":r.allAnnotation,"/description":r.allAnnotation,"/*":{"/":[r.nonBreaking,r.breaking,r.breaking],"/*":k},"/servers":a,"/parameters":o}},"/components":{"/":[r.nonBreaking,r.nonBreaking,r.nonBreaking],"/schemas":{"/":[r.nonBreaking,r.breaking,r.breaking],"/*":(0,i.jsonSchemaRules)(r.addNonBreaking)},"/responses":l,"/parameters":o,"/examples":r.allAnnotation,"/requestBodies":{"/":[r.nonBreaking,r.breaking,r.breaking],"/*":s},"/headers":t,"/securitySchemes":{"/":[r.breaking,r.nonBreaking,r.breaking],"/*":{"/":[r.breaking,r.nonBreaking,r.breaking],"/type":[r.breaking,r.nonBreaking,r.breaking],"/description":r.allAnnotation,"/name":[r.breaking,r.nonBreaking,r.breaking],"/in":[r.breaking,r.nonBreaking,r.breaking],"/scheme":[r.breaking,r.nonBreaking,r.breaking],"/bearerFormat":r.allAnnotation,"/flows":[r.breaking,r.nonBreaking,r.breaking],"/openIdConnectUrl":r.allAnnotation}}},"/security":g,"/tags":r.allAnnotation,"/externalDocs":r.allAnnotation}},function(n,s,e){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.jsonDiff=void 0;const g=e(3),k=e(9),r=n=>Array.isArray(n)?"array":null==typeof n?"null":typeof n;s.jsonDiff=(n,e,a,i=[])=>{if(r(n)!==r(e))return[(0,k.classifyDiff)({path:i,before:n,after:e,action:g.ActionType.replace},null==a?void 0:a.rules)];switch(r(n)){case"string":return o(n,e,a,i);case"object":return l(n,e,a,i);case"array":return c(n,e,a,i);default:return n!==e?[(0,k.classifyDiff)({path:i,before:n,after:e,action:g.ActionType.replace},null==a?void 0:a.rules)]:[]}};const o=(n,e,a,i=[])=>{return t(n,a)!==t(e,a)?[(0,k.classifyDiff)({path:i,before:n,after:e,action:g.ActionType.replace},null==a?void 0:a.rules)]:[]},t=(n,e)=>(n=null!=e&&e.trimStrings?n.trim():n,n=null!=e&&e.caseSensitive?n:n.toLowerCase()),l=(n,e,a,i=[])=>{const r=[];for(const o of new Set([...Object.keys(n),...Object.keys(e)]))if("symbol"!=typeof o&&(n.hasOwnProperty(o)?e.hasOwnProperty(o)?r.push(...(0,s.jsonDiff)(n[o],e[o],a,[...i,o])):r.push((0,k.classifyDiff)({path:[...i,o],before:n[o],action:g.ActionType.remove},null==a?void 0:a.rules)):r.push((0,k.classifyDiff)({path:[...i,o],after:e[o],action:g.ActionType.add},null==a?void 0:a.rules)),null!=a&&a.findFirstDiff&&r.length))break;return r},c=(e,a,i,r=[])=>{const o=[],t=[...a];for(let n=0;n<e.length;n++){var l;if(null!=i&&i.strictArrays?n>=a.length?o.push((0,k.classifyDiff)({path:[...r,n],before:e[n],action:g.ActionType.remove},null==i?void 0:i.rules)):o.push(...(0,s.jsonDiff)(e[n],a[n],i,[...r,n])):0<=(l=((e,a,i)=>{for(let n=0;n<a.length;n++)if(!(0,s.jsonDiff)(e,a[n],Object.assign(Object.assign({},i),{findFirstDiff:!0})).length)return n;return-1})(e[n],t,i))?t.splice(l,1):o.push((0,k.classifyDiff)({path:[...r,n],before:e[n],action:g.ActionType.remove},null==i?void 0:i.rules)),null!=i&&i.findFirstDiff&&o.length)break}null!=i&&i.strictArrays&&t.splice(0,e.length);for(let n=0;n<t.length;n++)o.push((0,k.classifyDiff)({path:[...r,e.length+n],after:t[n],action:g.ActionType.add},null==i?void 0:i.rules));return o}},function(n,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.classifyDiff=r.findClassifier=void 0;const o=e(0);r.findClassifier=(n,e)=>{let a=n;for(var i of[...e,""]){if(a.hasOwnProperty("/"+i)&&"number"!=typeof i||(i="*"),!a.hasOwnProperty("/"+i))return o.allUnclassified;{const r=a["/"+i];if(Array.isArray(r))return r;a="function"==typeof r?r():r}}return o.allUnclassified};r.classifyDiff=(n,e={})=>{const a=n;const i=(0,r.findClassifier)(e,n.path)[["add","remove","replace"].indexOf(n.action)];return a.type="function"==typeof i?i(n.before,n.after):i,a}}]);
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.apiDiff = exports.syncApiDiff = void 0;
const classifier_1 = require("./classifier");
const rules_1 = require("./rules");
const json_diff_1 = require("./json-diff");
const rules_1 = require("./rules");
const getBaseRules = (name) => {
switch (name) {
case "OpenApi3": return rules_1.openapi3Rules;
case "AsyncApi2": return rules_1.asyncApi2Rules;
case "JsonSchema": return (0, rules_1.jsonSchemaRules)();
case "OpenApi3":
return rules_1.openapi3Rules;
case "AsyncApi2":
return rules_1.asyncApi2Rules;
case "JsonSchema":
return (0, rules_1.jsonSchemaRules)();
}

@@ -16,4 +18,3 @@ };

rules = typeof rules === "string" ? getBaseRules(rules) : rules;
const diff = (0, json_diff_1.jsonDiff)(before, after);
return (0, classifier_1.classifyDiff)(rules, diff);
return (0, json_diff_1.jsonDiff)(before, after, { rules });
};

@@ -32,2 +33,2 @@ exports.syncApiDiff = syncApiDiff;

exports.apiDiff = apiDiff;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLWRpZmYuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYXBpLWRpZmYudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EsNkNBQTJDO0FBQzNDLDJDQUFzQztBQUN0QyxtQ0FBd0U7QUFHeEUsTUFBTSxZQUFZLEdBQUcsQ0FBQyxJQUFtQixFQUFTLEVBQUU7SUFDbEQsUUFBUSxJQUFJLEVBQUU7UUFDWixLQUFLLFVBQVUsQ0FBQyxDQUFDLE9BQU8scUJBQWEsQ0FBQTtRQUNyQyxLQUFLLFdBQVcsQ0FBQyxDQUFDLE9BQU8sc0JBQWMsQ0FBQTtRQUN2QyxLQUFLLFlBQVksQ0FBQyxDQUFDLE9BQU8sSUFBQSx1QkFBZSxHQUFFLENBQUE7S0FDNUM7QUFDSCxDQUFDLENBQUE7QUFFTSxNQUFNLFdBQVcsR0FBRyxDQUFDLE1BQVcsRUFBRSxLQUFVLEVBQUUsS0FBNEIsRUFBcUIsRUFBRTtJQUN0RyxLQUFLLEdBQUcsT0FBTyxLQUFLLEtBQUssUUFBUSxDQUFDLENBQUMsQ0FBQyxZQUFZLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQTtJQUMvRCxNQUFNLElBQUksR0FBRyxJQUFBLG9CQUFRLEVBQUMsTUFBTSxFQUFFLEtBQUssQ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U0sV0FBVyxHQUFHLENBQUMsTUFBVyxFQUFFLEtBQVUsRUFBRSxLQUE0QixFQUFxQixFQUFFO0lBQ3RHLEtBQUssR0FBRyxPQUFPLEtBQUssS0FBSyxRQUFRLENBQUMsQ0FBQyxDQUFDLFlBQVksQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFBO0lBQy9ELE9BQU8sSUFBQSxvQkFBUSxFQUFDLE1BQU0sRUFBRSxLQUFLLEVBQUUsRUFBRSxLQUFLLEVBQUUsQ0FBQyxDQUFBO0FBQzNDLENBQUMsQ0FBQTtBQUhZLFFBQUEsV0FBVyxlQUd2QjtBQUVNLE1BQU0sT0FBTyxHQUFHLENBQUMsTUFBVyxFQUFFLEtBQVUsRUFBRSxLQUE0QixFQUE4QixFQUFFO0lBQzNHLE9BQU8sSUFBSSxPQUFPLENBQUMsQ0FBQyxPQUFPLEVBQUUsTUFBTSxFQUFFLEVBQUU7UUFDckMsSUFBSTtZQUNGLE9BQU8sQ0FBQyxJQUFBLG1CQUFXLEVBQUMsTUFBTSxFQUFFLEtBQUssRUFBRSxLQUFLLENBQUMsQ0FBQyxDQUFBO1NBQzNDO1FBQUMsT0FBTyxLQUFLLEVBQUU7WUFDZCxNQUFNLENBQUMsS0FBSyxDQUFDLENBQUE7U0FDZDtJQUNILENBQUMsQ0FBQyxDQUFBO0FBQ0osQ0FBQyxDQUFBO0FBUlksUUFBQSxPQUFPLFdBUW5CIn0=

@@ -1,3 +0,4 @@

import { Rules, IJsonPath, Classifier, IClassifiedDiff, IDiff } from "./types";
import { Rules, IJsonPath, Classifier, IDiff } from "./types";
import { IClassifiedDiff } from ".";
export declare const findClassifier: (rules: Rules, path: IJsonPath) => Classifier;
export declare const classifyDiff: (rules: Rules, diff: IDiff[]) => IClassifiedDiff[];
export declare const classifyDiff: (diff: IDiff, rules?: Rules) => IClassifiedDiff;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.classifyDiff = exports.findClassifier = void 0;
const types_1 = require("./types");
const helpers_1 = require("./rules/helpers");
const findClassifier = (rules, path) => {

@@ -21,24 +21,19 @@ let _rules = rules;

else {
return types_1.allUnclassified;
return helpers_1.allUnclassified;
}
}
return types_1.allUnclassified;
return helpers_1.allUnclassified;
};
exports.findClassifier = findClassifier;
const classifyDiff = (rules, diff) => {
const classifyDiff = (diff, rules = {}) => {
const _diff = diff;
for (const item of _diff) {
const classifier = (0, exports.findClassifier)(rules, item.path);
const index = ["add", "remove", "replace"].indexOf(item.action);
const changeType = classifier[index];
if (typeof changeType === "function") {
item.type = changeType(item.before, item.after);
}
else {
item.type = changeType;
}
}
const classifier = (0, exports.findClassifier)(rules, diff.path);
const index = ["add", "remove", "replace"].indexOf(diff.action);
const changeType = classifier[index];
_diff.type = typeof changeType === "function"
? changeType(diff.before, diff.after)
: changeType;
return _diff;
};
exports.classifyDiff = classifyDiff;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xhc3NpZmllci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jbGFzc2lmaWVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLG1DQUErRjtBQUV4RixNQUFNLGNBQWMsR0FBRyxDQUFDLEtBQVksRUFBRSxJQUFlLEVBQWMsRUFBRTtJQUMxRSxJQUFJLE1BQU0sR0FBRyxLQUFLLENBQUE7SUFDbEIsS0FBSyxJQUFJLEdBQUcsSUFBSSxDQUFDLEdBQUcsSUFBSSxFQUFFLEVBQUUsQ0FBQyxFQUFFO1FBQzdCLHFEQUFxRDtRQUNyRCxJQUFJLENBQUMsTUFBTSxDQUFDLGNBQWMsQ0FBQyxJQUFJLEdBQUcsRUFBRSxDQUFDLElBQUksT0FBTyxHQUFHLEtBQUssUUFBUSxFQUFFO1lBQ2hFLEdBQUcsR0FBRyxHQUFHLENBQUE7U0FDVjtRQUVELDBCQUEwQjt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lBQ0QsTUFBTSxHQUFHLE9BQU8sSUFBSSxLQUFLLFVBQVUsQ0FBQyxDQUFDLENBQUMsSUFBSSxFQUFFLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQTtTQUNwRDthQUFNO1lBQ0wsT0FBTyx5QkFBZSxDQUFBO1NBQ3ZCO0tBQ0Y7SUFDRCxPQUFPLHlCQUFlLENBQUE7QUFDeEIsQ0FBQyxDQUFBO0FBcEJZLFFBQUEsY0FBYyxrQkFvQjFCO0FBRU0sTUFBTSxZQUFZLEdBQUcsQ0FBQyxJQUFXLEVBQUUsUUFBZSxFQUFFLEVBQW1CLEVBQUU7SUFDOUUsTUFBTSxLQUFLLEdBQUcsSUFBdUIsQ0FBQTtJQUVyQyxNQUFNLFVBQVUsR0FBRyxJQUFBLHNCQUFjLEVBQUMsS0FBSyxFQUFFLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQTtJQUVuRCxNQUFNLEtBQUssR0FBRyxDQUFDLEtBQUssRUFBRSxRQUFRLEVBQUUsU0FBUyxDQUFDLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQTtJQUMvRCxNQUFNLFVBQVUsR0FBRyxVQUFVLENBQUMsS0FBSyxDQUFDLENBQUE7SUFFcEMsS0FBSyxDQUFDLElBQUksR0FBRyxPQUFPLFVBQVUsS0FBSyxVQUFVO1FBQzNDLENBQUMsQ0FBQyxVQUFVLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxJQUFJLENBQUMsS0FBSyxDQUFDO1FBQ3JDLENBQUMsQ0FBQyxVQUFVLENBQUE7SUFFZCxPQUFPLEtBQUssQ0FBQTtBQUNkLENBQUMsQ0FBQTtBQWJZLFFBQUEsWUFBWSxnQkFheEIifQ==

@@ -1,3 +0,5 @@

import { IDiff, IJsonPath } from "./types";
import { IJsonPath } from "./types";
import { IClassifiedDiff, Rules } from ".";
interface IJsonDiffOptions {
rules?: Rules;
trimStrings?: boolean;

@@ -8,3 +10,3 @@ caseSensitive?: boolean;

}
export declare const jsonDiff: (before: any, after: any, options?: IJsonDiffOptions | undefined, path?: IJsonPath) => IDiff[];
export declare const jsonDiff: (before: any, after: any, options?: IJsonDiffOptions | undefined, path?: IJsonPath) => IClassifiedDiff[];
export {};

@@ -5,2 +5,3 @@ "use strict";

const types_1 = require("./types");
const classifier_1 = require("./classifier");
const typeOf = (value) => {

@@ -14,3 +15,3 @@ if (Array.isArray(value)) {

if (typeOf(before) !== typeOf(after)) {
return [{ path, before, after, action: types_1.ActionType.replace }];
return [(0, classifier_1.classifyDiff)({ path, before, after, action: types_1.ActionType.replace }, options === null || options === void 0 ? void 0 : options.rules)];
}

@@ -25,3 +26,3 @@ switch (typeOf(before)) {

default:
return before !== after ? [{ path, before, after, action: types_1.ActionType.replace }] : [];
return before !== after ? [(0, classifier_1.classifyDiff)({ path, before, after, action: types_1.ActionType.replace }, options === null || options === void 0 ? void 0 : options.rules)] : [];
}

@@ -33,3 +34,3 @@ };

const b = normalizeString(after, options);
return a !== b ? [{ path, before, after, action: types_1.ActionType.replace }] : [];
return a !== b ? [(0, classifier_1.classifyDiff)({ path, before, after, action: types_1.ActionType.replace }, options === null || options === void 0 ? void 0 : options.rules)] : [];
};

@@ -51,17 +52,15 @@ const normalizeString = (value, options) => {

// added key
diffs.push({
diffs.push((0, classifier_1.classifyDiff)({
path: [...path, key],
before: undefined,
after: after[key],
action: types_1.ActionType.add,
});
}, options === null || options === void 0 ? void 0 : options.rules));
}
else if (!after.hasOwnProperty(key)) {
// deleted key
diffs.push({
diffs.push((0, classifier_1.classifyDiff)({
path: [...path, key],
before: before[key],
after: undefined,
action: types_1.ActionType.remove,
});
}, options === null || options === void 0 ? void 0 : options.rules));
}

@@ -92,8 +91,7 @@ else {

if (i >= after.length) {
diffs.push({
diffs.push((0, classifier_1.classifyDiff)({
path: [...path, i],
before: before[i],
after: undefined,
action: types_1.ActionType.remove,
});
}, options === null || options === void 0 ? void 0 : options.rules));
}

@@ -110,8 +108,7 @@ else {

else {
diffs.push({
diffs.push((0, classifier_1.classifyDiff)({
path: [...path, i],
before: before[i],
after: undefined,
action: types_1.ActionType.remove,
});
}, options === null || options === void 0 ? void 0 : options.rules));
}

@@ -127,11 +124,10 @@ }

for (let i = 0; i < _after.length; i++) {
diffs.push({
diffs.push((0, classifier_1.classifyDiff)({
path: [...path, before.length + i],
before: undefined,
after: _after[i],
action: types_1.ActionType.add,
});
}, options === null || options === void 0 ? void 0 : options.rules));
}
return diffs;
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianNvbi1kaWZmLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2pzb24tZGlmZi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxtQ0FBc0Q7QUFTdEQsTUFBTSxNQUFNLEdBQUcsQ0FBQyxLQUFVLEVBQUUsRUFBRTtJQUM1QixJQUFJLEtBQUssQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDLEVBQUU7UUFDeEIsT0FBTyxPQUFPLENBQUE7S0FDZjtJQUNELE9BQU8sT0FBTyxLQUFLLElBQUksSUFBSSxDQUFDLENBQUMsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLE9BQU8sS0FBSyxDQUFBO0FBQ3JELENBQUMsQ0FBQTtBQUVNLE1BQU0sUUFBUSxHQUFHLENBQUMsTUFBVyxFQUFFLEtBQVUsRUFBRSxPQUEwQixFQUFFLE9BQWtCLEVBQUUsRUFBVyxFQUFFO0lBQzdHLElBQUksTUFBTSxDQUFDLE1BQU0sQ0FBQyxLQUFLLE1BQU0sQ0FBQyxLQUFLLENBQUMsRUFBRTtRQUNwQyxPQUFPLENBQUMsRUFBRSxJQUFJLEVBQUUsTUFBTSxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsa0JBQVUsQ0FBQyxPQUFPLEVBQUUsQ0FBQyxDQUFBO0tB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0FBQTtLQUNGO0lBRUQsT0FBTyxLQUFLLENBQUE7QUFDZCxDQUFDLENBQUEifQ==
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.asyncApi2Rules = exports.messageRules = exports.messageTraitsRules = void 0;
const types_1 = require("../types");
const jsonschema_1 = require("./jsonschema");
const helpers_1 = require("./helpers");
const correlationIdRules = {
"/": types_1.addNonBreaking,
"/location": types_1.addNonBreaking,
"/description": types_1.allAnnotation,
"/": helpers_1.addNonBreaking,
"/location": helpers_1.addNonBreaking,
"/description": helpers_1.allAnnotation,
};
const commonRules = {
"/summary": types_1.allAnnotation,
"/tags": types_1.allAnnotation,
"/externalDocs": types_1.allAnnotation,
"/bindings": types_1.allUnclassified,
"/summary": helpers_1.allAnnotation,
"/tags": helpers_1.allAnnotation,
"/externalDocs": helpers_1.allAnnotation,
"/bindings": helpers_1.allUnclassified,
};
const pubsubTraitsRules = Object.assign({ "/": types_1.addNonBreaking, "/*": types_1.addNonBreaking, "/operationId": types_1.addNonBreaking, "/description": types_1.allAnnotation }, commonRules);
exports.messageTraitsRules = Object.assign({ "/": types_1.addNonBreaking, "/*": types_1.addNonBreaking, "/headers": types_1.allUnclassified, "/correlationId": correlationIdRules, "/schemaFormat": types_1.allBreaking, "/contentType": types_1.addNonBreaking, "/name": types_1.allNonBreaking, "/title": types_1.allNonBreaking, "/examples": types_1.allAnnotation }, commonRules);
exports.messageRules = Object.assign({ "/": types_1.allBreaking, "/headers": types_1.allUnclassified, "/correlationId": correlationIdRules, "/schemaFormat": types_1.allBreaking, "/contentType": types_1.addNonBreaking, "/name": types_1.allNonBreaking, "/title": types_1.allNonBreaking, "/description": types_1.allNonBreaking, "/examples": types_1.allAnnotation, "/traits": exports.messageTraitsRules, "/payload": (0, jsonschema_1.jsonSchemaRules)(types_1.allBreaking) }, commonRules);
const pubsubRules = Object.assign({ "/": types_1.addNonBreaking, "/operationId": types_1.addNonBreaking, "/description": types_1.allAnnotation, "/traits": pubsubTraitsRules, "/message": exports.messageRules }, commonRules);
const pubsubTraitsRules = Object.assign({ "/": helpers_1.addNonBreaking, "/*": helpers_1.addNonBreaking, "/operationId": helpers_1.addNonBreaking, "/description": helpers_1.allAnnotation }, commonRules);
exports.messageTraitsRules = Object.assign({ "/": helpers_1.addNonBreaking, "/*": helpers_1.addNonBreaking, "/headers": helpers_1.allUnclassified, "/correlationId": correlationIdRules, "/schemaFormat": helpers_1.allBreaking, "/contentType": helpers_1.addNonBreaking, "/name": helpers_1.allNonBreaking, "/title": helpers_1.allNonBreaking, "/examples": helpers_1.allAnnotation }, commonRules);
exports.messageRules = Object.assign({ "/": helpers_1.allBreaking, "/headers": helpers_1.allUnclassified, "/correlationId": correlationIdRules, "/schemaFormat": helpers_1.allBreaking, "/contentType": helpers_1.addNonBreaking, "/name": helpers_1.allNonBreaking, "/title": helpers_1.allNonBreaking, "/description": helpers_1.allNonBreaking, "/examples": helpers_1.allAnnotation, "/traits": exports.messageTraitsRules, "/payload": (0, jsonschema_1.jsonSchemaRules)(helpers_1.allBreaking) }, commonRules);
const pubsubRules = Object.assign({ "/": helpers_1.addNonBreaking, "/operationId": helpers_1.addNonBreaking, "/description": helpers_1.allAnnotation, "/traits": pubsubTraitsRules, "/message": exports.messageRules }, commonRules);
const infoRules = {
"/": types_1.addNonBreaking,
"/version": types_1.addNonBreaking,
"/termsOfService": types_1.addNonBreaking,
"/": helpers_1.addNonBreaking,
"/version": helpers_1.addNonBreaking,
"/termsOfService": helpers_1.addNonBreaking,
"/license": {
"/": types_1.addNonBreaking,
"/name": types_1.allBreaking,
"/url": types_1.onlyAddBreaking,
"/": helpers_1.addNonBreaking,
"/name": helpers_1.allBreaking,
"/url": helpers_1.onlyAddBreaking,
},
"/title": types_1.allAnnotation,
"/description": types_1.allAnnotation,
"/title": helpers_1.allAnnotation,
"/description": helpers_1.allAnnotation,
"/contact": {
"/": types_1.allAnnotation,
"/name": types_1.allAnnotation,
"/url": types_1.allAnnotation,
"/email": types_1.allAnnotation,
"/": helpers_1.allAnnotation,
"/name": helpers_1.allAnnotation,
"/url": helpers_1.allAnnotation,
"/email": helpers_1.allAnnotation,
},
};
const serversRules = {
"/": types_1.addNonBreaking,
"/": helpers_1.addNonBreaking,
"/*": {
"/": types_1.addNonBreaking,
"/url": types_1.addNonBreaking,
"/description": types_1.allAnnotation,
"/protocol": types_1.allBreaking,
"/protocolVersion": types_1.allBreaking,
"/": helpers_1.addNonBreaking,
"/url": helpers_1.addNonBreaking,
"/description": helpers_1.allAnnotation,
"/protocol": helpers_1.allBreaking,
"/protocolVersion": helpers_1.allBreaking,
"/variables": {
"/": types_1.addNonBreaking,
"/": helpers_1.addNonBreaking,
"/*": {
"/": types_1.addNonBreaking,
"/": helpers_1.addNonBreaking,
"/enum": {
"/": types_1.addNonBreaking,
"/*": types_1.addNonBreaking,
"/": helpers_1.addNonBreaking,
"/*": helpers_1.addNonBreaking,
},
"/default": types_1.allBreaking,
"/description": types_1.allAnnotation,
"/examples": types_1.allAnnotation,
"/default": helpers_1.allBreaking,
"/description": helpers_1.allAnnotation,
"/examples": helpers_1.allAnnotation,
},
},
"/security": {
"/": types_1.allBreaking,
"/*": types_1.allBreaking,
"/": helpers_1.allBreaking,
"/*": helpers_1.allBreaking,
},
"/bindings": types_1.allUnclassified,
"/bindings": helpers_1.allUnclassified,
},
};
const channelRules = {
"/": types_1.addNonBreaking,
"/description": types_1.allNonBreaking,
"/bindings": types_1.allUnclassified,
"/": helpers_1.addNonBreaking,
"/description": helpers_1.allNonBreaking,
"/bindings": helpers_1.allUnclassified,
"/subscribe": pubsubRules,
"/publish": pubsubRules,
"/parameters": {
"/": types_1.allBreaking,
"/": helpers_1.allBreaking,
"/*": {
"/": types_1.addNonBreaking,
"/description": types_1.allNonBreaking,
"/schema": (0, jsonschema_1.jsonSchemaRules)(types_1.allBreaking),
"/location": types_1.allBreaking,
"/": helpers_1.addNonBreaking,
"/description": helpers_1.allNonBreaking,
"/schema": (0, jsonschema_1.jsonSchemaRules)(helpers_1.allBreaking),
"/location": helpers_1.allBreaking,
},

@@ -84,15 +84,15 @@ },

exports.asyncApi2Rules = {
"/asyncapi": types_1.addNonBreaking,
"/id": types_1.allAnnotation,
"/defaultContentType": types_1.allBreaking,
"/asyncapi": helpers_1.addNonBreaking,
"/id": helpers_1.allAnnotation,
"/defaultContentType": helpers_1.allBreaking,
"/info": infoRules,
"/servers": serversRules,
"/channels": {
"/": types_1.addNonBreaking,
"/": helpers_1.addNonBreaking,
"/*": channelRules,
},
"/components": types_1.allNonBreaking,
"/tags": types_1.allAnnotation,
"/externalDocs": types_1.allAnnotation,
"/components": helpers_1.allNonBreaking,
"/tags": helpers_1.allAnnotation,
"/externalDocs": helpers_1.allAnnotation,
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXN5bmNhcGkyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3J1bGVzL2FzeW5jYXBpMi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxvQ0FHaUI7QUFDakIsNkNBQThDO0FBRTlDLE1BQU0sa0JBQWtCLEdBQVU7SUFDaEMsR0FBRyxFQUFFLHNCQUFjO0lBQ25CLFdBQVcsRUFBRSxzQkFBYztJQUMzQixjQUFjLEVBQUUscUJBQWE7Q0FDOUIsQ0FBQTtBQUVELE1BQU0sV0FBVyxHQUFVO0lBQ3pCLFVBQVUsRUFBRSxxQkFBYTtJQUN6QixPQUFPLEVBQUUscUJBQWE7SUFDdEIsZUFBZSxFQUFFLHFCQUFhO0lBQzlCLFdBQVcsRUFBRSx1QkFBZTtDQUM3QixDQUFBO0FBRUQsTUFBTSxpQkFBaUIsbUJBQ3JCLEdBQUcsRUFBRSxzQkFBYyxFQUNuQixJQUFJLEVBQUUsc0JBQWMsRUFDcEIsY0FBYyxFQUFFLHNCQUFjLEVBQzlCLGNBQWMsRUFBRSxxQkFBYSxJQUMxQixXQUFXLENB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U8sRUFBRSx1QkFBYTtJQUN0QixlQUFlLEVBQUUsdUJBQWE7Q0FDL0IsQ0FBQSJ9
export * from "./asyncapi2";
export * from "./openapi3";
export * from "./jsonschema";
export * from "./helpers";

@@ -16,2 +16,3 @@ "use strict";

__exportStar(require("./jsonschema"), exports);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvcnVsZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0FBQUEsOENBQTJCO0FBQzNCLDZDQUEwQjtBQUMxQiwrQ0FBNEIifQ==
__exportStar(require("./helpers"), exports);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvcnVsZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0FBQUEsOENBQTJCO0FBQzNCLDZDQUEwQjtBQUMxQiwrQ0FBNEI7QUFDNUIsNENBQXlCIn0=
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.jsonSchemaRules = void 0;
const types_1 = require("../types");
const helpers_1 = require("./helpers");
const maxClassifier = [
types_1.breaking,
types_1.nonBreaking,
(b, a) => (0, types_1.breakingIf)(b < a)
helpers_1.breaking,
helpers_1.nonBreaking,
(b, a) => (0, helpers_1.breakingIf)(b < a)
];
const minClassifier = [
types_1.breaking,
types_1.nonBreaking,
(b, a) => (0, types_1.breakingIf)(b > a)
helpers_1.breaking,
helpers_1.nonBreaking,
(b, a) => (0, helpers_1.breakingIf)(b > a)
];
const exclusiveClassifier = [
types_1.breakingIfAfterTrue,
types_1.nonBreaking,
(b, a) => (0, types_1.breakingIf)(b < a)
helpers_1.breakingIfAfterTrue,
helpers_1.nonBreaking,
(b, a) => (0, helpers_1.breakingIf)(b < a)
];
const booleanClassifier = [
types_1.breakingIfAfterTrue,
types_1.nonBreaking,
types_1.breakingIfAfterTrue
helpers_1.breakingIfAfterTrue,
helpers_1.nonBreaking,
helpers_1.breakingIfAfterTrue
];
const multipleOfClassifier = [
types_1.breaking,
types_1.nonBreaking,
(b, a) => (0, types_1.breakingIf)(!!(b % a))
helpers_1.breaking,
helpers_1.nonBreaking,
(b, a) => (0, helpers_1.breakingIf)(!!(b % a))
];
const jsonSchemaRules = (rootRule = types_1.allUnclassified) => ({
const jsonSchemaRules = (rootRule = helpers_1.allUnclassified) => ({
"/": rootRule,
"/title": types_1.allAnnotation,
"/title": helpers_1.allAnnotation,
"/multipleOf": multipleOfClassifier,

@@ -40,3 +40,3 @@ "/maximum": maxClassifier,

"/minLength": minClassifier,
"/pattern": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/pattern": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/maxItems": maxClassifier,

@@ -48,59 +48,61 @@ "/minItems": minClassifier,

"/required": {
'/': types_1.onlyAddBreaking,
'/*': [types_1.breaking, types_1.nonBreaking, types_1.breaking]
"/": helpers_1.onlyAddBreaking,
"/*": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
},
"/enum": {
"/": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/*": [types_1.nonBreaking, types_1.breaking, types_1.breaking]
"/": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/*": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
},
"/type": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/type": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/not": {
'/': [types_1.breaking, types_1.nonBreaking, types_1.breaking],
'/*': () => (0, exports.jsonSchemaRules)(types_1.allBreaking)
"/": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/*": () => (0, exports.jsonSchemaRules)(helpers_1.allBreaking),
},
"/allOf": {
'/': [types_1.breaking, types_1.nonBreaking, types_1.breaking],
'/*': () => (0, exports.jsonSchemaRules)(types_1.allBreaking)
"/": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/*": () => (0, exports.jsonSchemaRules)(helpers_1.allBreaking),
},
"/oneOf": {
'/': [types_1.breaking, types_1.nonBreaking, types_1.breaking],
'/*': () => (0, exports.jsonSchemaRules)(types_1.addNonBreaking)
"/": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/*": () => (0, exports.jsonSchemaRules)(helpers_1.addNonBreaking),
},
"/anyOf": {
'/': [types_1.breaking, types_1.nonBreaking, types_1.breaking],
'/*': () => (0, exports.jsonSchemaRules)(types_1.addNonBreaking)
"/": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/*": () => (0, exports.jsonSchemaRules)(helpers_1.addNonBreaking),
},
"/items": () => (0, exports.jsonSchemaRules)(),
"/properties": {
"/": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/*": () => (0, exports.jsonSchemaRules)(),
},
"/additionalProperties": {
"/": [types_1.breaking, types_1.breaking, types_1.breakingIfAfterTrue],
'/*': () => (0, exports.jsonSchemaRules)(types_1.addNonBreaking)
"/": [helpers_1.breaking, helpers_1.breaking, helpers_1.breakingIfAfterTrue],
"/*": () => (0, exports.jsonSchemaRules)(helpers_1.addNonBreaking),
},
"/description": types_1.allAnnotation,
"/format": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/default": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/description": helpers_1.allAnnotation,
"/format": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/default": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/nullable": booleanClassifier,
"/discriminator": {
'/': types_1.allUnclassified,
'/propertyName': types_1.allUnclassified,
'/mapping': types_1.allUnclassified
// TODO
"/": helpers_1.allUnclassified,
"/propertyName": helpers_1.allUnclassified,
"/mapping": helpers_1.allUnclassified,
},
"/readOnly": booleanClassifier,
"/writeOnly": booleanClassifier,
"/example": types_1.allAnnotation,
"/externalDocs": types_1.allAnnotation,
"/example": helpers_1.allAnnotation,
"/externalDocs": helpers_1.allAnnotation,
"/deprecated": booleanClassifier,
"/xml": {
'/': types_1.allUnclassified,
"/name": types_1.allUnclassified,
"/namespace": types_1.allUnclassified,
"/prefix": types_1.allUnclassified,
"/attribute": types_1.allUnclassified,
"/wrapped": types_1.allUnclassified,
// TODO
"/": helpers_1.allUnclassified,
"/name": helpers_1.allUnclassified,
"/namespace": helpers_1.allUnclassified,
"/prefix": helpers_1.allUnclassified,
"/attribute": helpers_1.allUnclassified,
"/wrapped": helpers_1.allUnclassified,
},
});
exports.jsonSchemaRules = jsonSchemaRules;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianNvbnNjaGVtYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9ydWxlcy9qc29uc2NoZW1hLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLG9DQUdpQjtBQUVqQixNQUFNLGFBQWEsR0FBZTtJQUNoQyxnQkFBUTtJQUNSLG1CQUFXO0lBQ1gsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxJQUFBLGtCQUFVLEVBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQztDQUM1QixDQUFBO0FBRUQsTUFBTSxhQUFhLEdBQWU7SUFDaEMsZ0JBQVE7SUFDUixtQkFBVztJQUNYLENBQUMsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFLENBQUMsSUFBQSxrQkFBVSxFQUFDLENBQUMsR0FBRyxDQUFDLENBQUM7Q0FDNUIsQ0FBQTtBQ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LEVBQUUsa0JBQVEsRUFBRSw2QkFBbUIsQ0FBQztRQUM5QyxJQUFJLEVBQUUsR0FBRyxFQUFFLENBQUMsSUFBQSx1QkFBZSxFQUFDLHdCQUFjLENBQUM7S0FDNUM7SUFDRCxjQUFjLEVBQUUsdUJBQWE7SUFDN0IsU0FBUyxFQUFFLENBQUMsa0JBQVEsRUFBRSxxQkFBVyxFQUFFLGtCQUFRLENBQUM7SUFDNUMsVUFBVSxFQUFFLENBQUMscUJBQVcsRUFBRSxrQkFBUSxFQUFFLGtCQUFRLENBQUM7SUFDN0MsV0FBVyxFQUFFLGlCQUFpQjtJQUM5QixnQkFBZ0IsRUFBRTtRQUNoQixPQUFPO1FBQ1AsR0FBRyxFQUFFLHlCQUFlO1FBQ3BCLGVBQWUsRUFBRSx5QkFBZTtRQUNoQyxVQUFVLEVBQUUseUJBQWU7S0FDNUI7SUFDRCxXQUFXLEVBQUUsaUJBQWlCO0lBQzlCLFlBQVksRUFBRSxpQkFBaUI7SUFDL0IsVUFBVSxFQUFFLHVCQUFhO0lBQ3pCLGVBQWUsRUFBRSx1QkFBYTtJQUM5QixhQUFhLEVBQUUsaUJBQWlCO0lBQ2hDLE1BQU0sRUFBRTtRQUNOLE9BQU87UUFDUCxHQUFHLEVBQUUseUJBQWU7UUFDcEIsT0FBTyxFQUFFLHlCQUFlO1FBQ3hCLFlBQVksRUFBRSx5QkFBZTtRQUM3QixTQUFTLEVBQUUseUJBQWU7UUFDMUIsWUFBWSxFQUFFLHlCQUFlO1FBQzdCLFVBQVUsRUFBRSx5QkFBZTtLQUM1QjtDQUNGLENBQUMsQ0FBQTtBQTFFVyxRQUFBLGVBQWUsbUJBMEUxQiJ9
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.openapi3Rules = void 0;
const types_1 = require("../types");
const jsonschema_1 = require("./jsonschema");
const helpers_1 = require("./helpers");
const serversRules = {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/url": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/description": types_1.allAnnotation,
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/url": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/description": helpers_1.allAnnotation,
"/variables": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/enum": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/*": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
},
"/default": [types_1.breaking, types_1.breaking, types_1.breaking],
"/description": types_1.allAnnotation,
"/default": [helpers_1.breaking, helpers_1.breaking, helpers_1.breaking],
"/description": helpers_1.allAnnotation,
},

@@ -27,39 +27,39 @@ },

const parametersRules = {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/name": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/in": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/description": types_1.allAnnotation,
"/required": [types_1.breaking, types_1.nonBreaking, types_1.breakingIfAfterTrue],
"/deprecated": [types_1.breaking, types_1.nonBreaking, types_1.breakingIfAfterTrue],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/name": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/in": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/description": helpers_1.allAnnotation,
"/required": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breakingIfAfterTrue],
"/deprecated": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breakingIfAfterTrue],
},
};
const headersRules = {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/description": types_1.allAnnotation,
"/required": [types_1.breaking, types_1.nonBreaking, types_1.breakingIfAfterTrue],
"/deprecated": [types_1.breaking, types_1.nonBreaking, types_1.breakingIfAfterTrue],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/description": helpers_1.allAnnotation,
"/required": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breakingIfAfterTrue],
"/deprecated": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breakingIfAfterTrue],
},
};
const encodingRules = {
"/": [types_1.nonBreaking, types_1.nonBreaking, types_1.nonBreaking],
"/": [helpers_1.nonBreaking, helpers_1.nonBreaking, helpers_1.nonBreaking],
"/*": {
"/contentType": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/contentType": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/headers": headersRules,
"/style": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/explode": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/allowReserved": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/style": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/explode": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/allowReserved": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
},
};
const contentRules = {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"*": {
"/schema": (0, jsonschema_1.jsonSchemaRules)(types_1.allBreaking),
"/example": types_1.allAnnotation,
"/examples": types_1.allAnnotation,
"/schema": (0, jsonschema_1.jsonSchemaRules)(helpers_1.allBreaking),
"/example": helpers_1.allAnnotation,
"/examples": helpers_1.allAnnotation,
"/encoding": encodingRules,

@@ -70,15 +70,15 @@ },

const requestBodiesRules = {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/description": types_1.allAnnotation,
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/description": helpers_1.allAnnotation,
"/content": contentRules,
"/required": [types_1.breaking, types_1.nonBreaking, (_, a) => a ? types_1.breaking : types_1.nonBreaking],
"/required": [helpers_1.breaking, helpers_1.nonBreaking, (_, a) => (a ? helpers_1.breaking : helpers_1.nonBreaking)],
},
};
const responsesRules = {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/description": types_1.allAnnotation,
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/description": helpers_1.allAnnotation,
"/headers": headersRules,

@@ -89,15 +89,15 @@ "/content": contentRules,

const securityRules = {
"/": [types_1.breaking, types_1.nonBreaking, types_1.unclassified],
"/*": [types_1.breaking, types_1.nonBreaking, types_1.unclassified],
"/": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.unclassified],
"/*": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.unclassified],
};
const operationRules = {
"/tags": types_1.allAnnotation,
"/summary": types_1.allAnnotation,
"/description": types_1.allAnnotation,
"/externalDocs": types_1.allAnnotation,
"/operationId": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/tags": helpers_1.allAnnotation,
"/summary": helpers_1.allAnnotation,
"/description": helpers_1.allAnnotation,
"/externalDocs": helpers_1.allAnnotation,
"/operationId": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/parameters": parametersRules,
"/requestBody": requestBodiesRules,
"/responses": responsesRules,
"/deprecated": [types_1.breaking, types_1.nonBreaking, types_1.breakingIfAfterTrue],
"/deprecated": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breakingIfAfterTrue],
"/security": securityRules,

@@ -107,25 +107,25 @@ "/servers": serversRules,

exports.openapi3Rules = {
"/openapi": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/openapi": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/info": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/title": types_1.allAnnotation,
"/description": types_1.allAnnotation,
"/termsOfService": types_1.allAnnotation,
"/contact": types_1.allAnnotation,
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/title": helpers_1.allAnnotation,
"/description": helpers_1.allAnnotation,
"/termsOfService": helpers_1.allAnnotation,
"/contact": helpers_1.allAnnotation,
"/licence": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/name": [types_1.breaking, types_1.breaking, types_1.breaking],
"/url": [types_1.breaking, types_1.nonBreaking, types_1.nonBreaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/name": [helpers_1.breaking, helpers_1.breaking, helpers_1.breaking],
"/url": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.nonBreaking],
},
"/version": types_1.allAnnotation,
"/version": helpers_1.allAnnotation,
},
"/servers": serversRules,
"/paths": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/summary": types_1.allAnnotation,
"/description": types_1.allAnnotation,
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/summary": helpers_1.allAnnotation,
"/description": helpers_1.allAnnotation,
"/*": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": operationRules,

@@ -138,12 +138,12 @@ },

"/components": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.nonBreaking, helpers_1.nonBreaking],
"/schemas": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/*": (0, jsonschema_1.jsonSchemaRules)(types_1.addNonBreaking),
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": (0, jsonschema_1.jsonSchemaRules)(helpers_1.addNonBreaking),
},
"/responses": responsesRules,
"/parameters": parametersRules,
"/examples": types_1.allAnnotation,
"/examples": helpers_1.allAnnotation,
"/requestBodies": {
"/": [types_1.nonBreaking, types_1.breaking, types_1.breaking],
"/": [helpers_1.nonBreaking, helpers_1.breaking, helpers_1.breaking],
"/*": requestBodiesRules,

@@ -153,13 +153,13 @@ },

"/securitySchemes": {
"/": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/*": {
"/": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/type": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/description": types_1.allAnnotation,
"/name": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/in": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/scheme": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/bearerFormat": types_1.allAnnotation,
"/flows": [types_1.breaking, types_1.nonBreaking, types_1.breaking],
"/openIdConnectUrl": types_1.allAnnotation,
"/": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/type": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/description": helpers_1.allAnnotation,
"/name": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/in": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/scheme": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/bearerFormat": helpers_1.allAnnotation,
"/flows": [helpers_1.breaking, helpers_1.nonBreaking, helpers_1.breaking],
"/openIdConnectUrl": helpers_1.allAnnotation,
},

@@ -169,5 +169,5 @@ },

"/security": securityRules,
"/tags": types_1.allAnnotation,
"/externalDocs": types_1.allAnnotation,
"/tags": helpers_1.allAnnotation,
"/externalDocs": helpers_1.allAnnotation,
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3BlbmFwaTMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvcnVsZXMvb3BlbmFwaTMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsb0NBR2lCO0FBQ2pCLDZDQUE4QztBQUU5QyxNQUFNLFlBQVksR0FBVTtJQUMxQixHQUFHLEVBQUUsQ0FBQyxtQkFBVyxFQUFFLGdCQUFRLEVBQUUsZ0JBQVEsQ0FBQztJQUN0QyxJQUFJLEVBQUU7UUFDSixHQUFHLEVBQUUsQ0FBQyxtQkFBVyxFQUFFLGdCQUFRLEVBQUUsZ0JBQVEsQ0FBQztRQUN0QyxNQUFNLEVBQUUsQ0FBQyxtQkFBVyxFQUFFLGdCQUFRLEVBQUUsZ0JBQVEsQ0FBQztRQUN6QyxjQUFjLEVBQUUscUJBQWE7UUFDN0IsWUFBWSxFQUFFO1lBQ1osR0FBRyxFQUFFLENBQUMsbUJBQVcsRUFBRSxnQkFBUSxFQUFFLGdCQUFRLENBQUM7WUFDdEMsSUFBSSxFQUFFO2dCQUNKLEdBQUcsRUFBRSxDQUFDLG1CQUFXLEVBQUUsZ0JBQVEsRUFBRSxnQkFBUSxD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aking = "non-breaking";
export declare const annotation = "annotation";
export declare const unclassified = "unclassified";
export declare type ChangeType = typeof breaking | typeof nonBreaking | typeof unclassified | typeof annotation;
export declare type ChangeType = "breaking" | "non-breaking" | "annotation" | "unclassified";
export declare type AddChangeType = ChangeType | ChangeTypeFunc;

@@ -31,12 +27,4 @@ export declare type RemoveChangeType = ChangeType | ChangeTypeFunc;

} & {
'/'?: Classifier;
"/"?: Classifier;
};
export declare type BaseRulesType = "OpenApi3" | "AsyncApi2" | "JsonSchema";
export declare const allNonBreaking: Classifier;
export declare const allBreaking: Classifier;
export declare const onlyAddBreaking: Classifier;
export declare const addNonBreaking: Classifier;
export declare const allUnclassified: Classifier;
export declare const allAnnotation: Classifier;
export declare const breakingIf: (v: boolean) => ChangeType;
export declare const breakingIfAfterTrue: (_: any, a: any) => ChangeType;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.breakingIfAfterTrue = exports.breakingIf = exports.allAnnotation = exports.allUnclassified = exports.addNonBreaking = exports.onlyAddBreaking = exports.allBreaking = exports.allNonBreaking = exports.unclassified = exports.annotation = exports.nonBreaking = exports.breaking = exports.ActionType = void 0;
exports.ActionType = void 0;
var ActionType;

@@ -10,18 +10,2 @@ (function (ActionType) {

})(ActionType = exports.ActionType || (exports.ActionType = {}));
exports.breaking = "breaking";
exports.nonBreaking = "non-breaking";
exports.annotation = "annotation";
exports.unclassified = "unclassified";
// predefined classifiers
exports.allNonBreaking = [exports.nonBreaking, exports.nonBreaking, exports.nonBreaking];
exports.allBreaking = [exports.breaking, exports.breaking, exports.breaking];
exports.onlyAddBreaking = [exports.breaking, exports.nonBreaking, exports.nonBreaking];
exports.addNonBreaking = [exports.nonBreaking, exports.breaking, exports.breaking];
exports.allUnclassified = [exports.unclassified, exports.unclassified, exports.unclassified];
exports.allAnnotation = [exports.annotation, exports.annotation, exports.annotation];
// helpers
const breakingIf = (v) => v ? exports.breaking : exports.nonBreaking;
exports.breakingIf = breakingIf;
const breakingIfAfterTrue = (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DQUFDLENBQUE7QUFFNUUsUUFBUSxDQUFDLHFCQUFxQixFQUFFLEdBQUcsRUFBRTtJQUNuQyxFQUFFLENBQUMsMkNBQTJDLEVBQUUsR0FBRyxFQUFFO1FBQ25ELE1BQU0sSUFBSSxHQUFHLENBQUMsWUFBWSxFQUFFLEtBQUssRUFBRSxPQUFPLENBQUMsQ0FBQTtRQUMzQyxNQUFNLEtBQUssR0FBRyxNQUFNLENBQUE7UUFFcEIsTUFBTSxLQUFLLEdBQUcsZUFBZSxDQUFDLEtBQUssQ0FBQyxDQUFDLElBQUEsc0JBQVksRUFBQyxJQUFJLEVBQUUsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFBO1FBQ2hFLE1BQU0sSUFBSSxHQUFHLGVBQWUsQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUE7UUFDeEMsTUFBTSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUE7UUFDOUIsTUFBTSxDQUFDLElBQUksQ0FBQyxDQUFDLGFBQWEsQ0FBQyxDQUFDO2dCQUMxQixJQUFJO2dCQUNKLEtBQUssRUFBRSxLQUFLO2dCQUNaLElBQUksRUFBRSxnQkFBVTthQUNqQixDQUFDLENBQUMsQ0FBQTtJQUNMLENBQUMsQ0FBQyxDQUFBO0FBQ0osQ0FBQyxDQUFDLENBQUEifQ==
{
"name": "api-smart-diff",
"version": "0.1.0",
"description": "Compare two api specifications, supported formats: OpenAPI, AsyncAPI, JsonSchema",
"version": "0.1.1",
"description": "Generate the diff between two API specifications (OpenAPI, AsyncAPI, JsonSchema)",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "types": "dist/index.d.ts",

@@ -41,7 +41,11 @@ # api-smart-diff

### Browsers
Browser folder contains an Ubundle allowing you to either reference `api-smart-diff.min.js` in your HTML or import module using Require.js.
Reference `apispec-diff.min.js` in your HTML and use the global variable `ApiSmartDiff`.
A browser version of `api-smart-diff` is also available via SDN:
```html
<script src="https://cdn.jsdelivr.net/npm/api-smart-diff@latest/browser/api-smart-diff.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/api-smart-diff@latest/browser/api-smart-diff.js"></script>
```
Reference `api-smart-diff.min.js` in your HTML and use the global variable `ApiSmartDiff`.
```HTML
<script src="node_modules/api-smart-diff/browser/api-smart-diff.min.js"></script>
<script>

@@ -48,0 +52,0 @@ var diff = ApiSmartDiff.syncApiDiff (oldSpec, newSpec, "OpenApi3")

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc