dependency-cruiser
Version:
Validate and visualize dependencies. With your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.
1 lines • 196 kB
JavaScript
"use strict";export const validate=K;export default K;const ze={type:"object",required:["SHA1","changes"],properties:{cacheFormatVersion:{type:"number"},SHA1:{type:"string"},changes:{type:"array",items:{type:"object",required:["name","type"],properties:{name:{type:"string"},type:{type:"string",enum:["added","copied","deleted","modified","renamed","type changed","unmerged","pairing broken","unknown","unmodified","untracked","ignored"]},oldName:{type:"string"},checksum:{type:"string"},args:{type:"array",items:{type:"string"}},rulesFile:{type:"string"}}}}}};const Be={type:"object",required:["source","dependencies","valid"],additionalProperties:!1,properties:{source:{type:"string"},valid:{type:"boolean"},dependencies:{$ref:"#/definitions/DependenciesType"},dependents:{type:"array",items:{type:"string"}},followable:{type:"boolean"},matchesDoNotFollow:{type:"boolean"},matchesFocus:{type:"boolean"},matchesReaches:{type:"boolean"},matchesHighlight:{type:"boolean"},coreModule:{type:"boolean"},couldNotResolve:{type:"boolean"},dependencyTypes:{type:"array",items:{$ref:"#/definitions/DependencyTypeType"}},license:{type:"string"},orphan:{type:"boolean"},reachable:{type:"array",items:{$ref:"#/definitions/ReachableType"}},reaches:{type:"array",items:{$ref:"#/definitions/ReachesType"}},rules:{type:"array",items:{$ref:"#/definitions/RuleSummaryType"}},consolidated:{type:"boolean"},instability:{type:"number"},experimentalStats:{$ref:"#/definitions/ExperimentalStatsType"},checksum:{type:"string"}}},_e={type:"string",enum:["aliased-subpath-import","aliased-tsconfig-base-url","aliased-tsconfig-paths","aliased-tsconfig","aliased-webpack","aliased-workspace","aliased","amd-define","amd-require","amd-exotic-require","core","deprecated","dynamic-import","exotic-require","export","import-equals","import","jsdoc","jsdoc-bracket-import","jsdoc-import-tag","local","localmodule","npm-bundled","npm-dev","npm-no-pkg","npm-optional","npm-peer","npm-unknown","npm","pre-compilation-only","process-get-builtin-module","require","triple-slash-amd-dependency","triple-slash-directive","triple-slash-file-reference","triple-slash-type-reference","type-import","type-only","undetermined","unknown"]};const je=Object.prototype.hasOwnProperty;const Ve={type:"object",required:["circular","coreModule","couldNotResolve","dependencyTypes","exoticallyRequired","dynamic","followable","module","moduleSystem","resolved","valid"],additionalProperties:!1,properties:{module:{type:"string"},protocol:{type:"string",enum:["data:","file:","node:","bun:"]},mimeType:{type:"string"},resolved:{type:"string"},coreModule:{type:"boolean"},dependencyTypes:{type:"array",items:{$ref:"#/definitions/DependencyTypeType"}},license:{type:"string"},followable:{type:"boolean"},dynamic:{type:"boolean"},exoticallyRequired:{type:"boolean"},exoticRequire:{type:"string"},matchesDoNotFollow:{type:"boolean"},couldNotResolve:{type:"boolean"},preCompilationOnly:{type:"boolean"},typeOnly:{type:"boolean"},circular:{type:"boolean"},cycle:{type:"array",items:{$ref:"#/definitions/MiniDependency"}},moduleSystem:{$ref:"#/definitions/ModuleSystemType"},valid:{type:"boolean"},rules:{type:"array",items:{$ref:"#/definitions/RuleSummaryType"}},instability:{type:"number"}}},He={type:"string",enum:["cjs","es6","amd","tsd"]};function G(s,{instancePath:t="",parentData:C,parentDataProperty:M,rootData:A=s}={}){let r=null,e=0;if(e===0)if(s&&typeof s=="object"&&!Array.isArray(s)){let n;if(s.name===void 0&&(n="name")||s.dependencyTypes===void 0&&(n="dependencyTypes"))return G.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:n},message:"must have required property '"+n+"'"}],!1;{const o=e;for(const m in s)if(!(m==="name"||m==="dependencyTypes")){return G.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;break}if(o===e){if(s.name!==void 0){const m=e;if(typeof s.name!="string")return G.errors=[{instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var i=m===e}else var i=!0;if(i)if(s.dependencyTypes!==void 0){let m=s.dependencyTypes;const d=e;if(e===d)if(Array.isArray(m)){var f=!0;const b=m.length;for(let R=0;R<b;R++){let l=m[R];const a=e;if(typeof l!="string")return G.errors=[{instancePath:t+"/dependencyTypes/"+R,schemaPath:"#/definitions/DependencyTypeType/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(l==="aliased-subpath-import"||l==="aliased-tsconfig-base-url"||l==="aliased-tsconfig-paths"||l==="aliased-tsconfig"||l==="aliased-webpack"||l==="aliased-workspace"||l==="aliased"||l==="amd-define"||l==="amd-require"||l==="amd-exotic-require"||l==="core"||l==="deprecated"||l==="dynamic-import"||l==="exotic-require"||l==="export"||l==="import-equals"||l==="import"||l==="jsdoc"||l==="jsdoc-bracket-import"||l==="jsdoc-import-tag"||l==="local"||l==="localmodule"||l==="npm-bundled"||l==="npm-dev"||l==="npm-no-pkg"||l==="npm-optional"||l==="npm-peer"||l==="npm-unknown"||l==="npm"||l==="pre-compilation-only"||l==="process-get-builtin-module"||l==="require"||l==="triple-slash-amd-dependency"||l==="triple-slash-directive"||l==="triple-slash-file-reference"||l==="triple-slash-type-reference"||l==="type-import"||l==="type-only"||l==="undetermined"||l==="unknown"))return G.errors=[{instancePath:t+"/dependencyTypes/"+R,schemaPath:"#/definitions/DependencyTypeType/enum",keyword:"enum",params:{allowedValues:_e.enum},message:"must be equal to one of the allowed values"}],!1;var f=a===e;if(!f)break}}else return G.errors=[{instancePath:t+"/dependencyTypes",schemaPath:"#/properties/dependencyTypes/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var i=d===e}else var i=!0}}}else return G.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return G.errors=r,e===0}const xe={type:"string",enum:["error","warn","info","ignore"]};function Q(s,{instancePath:t="",parentData:C,parentDataProperty:M,rootData:A=s}={}){let r=null,e=0;if(e===0)if(s&&typeof s=="object"&&!Array.isArray(s)){let f;if(s.name===void 0&&(f="name")||s.severity===void 0&&(f="severity"))return Q.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const n=e;for(const o in s)if(!(o==="name"||o==="severity")){return Q.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"}],!1;break}if(n===e){if(s.name!==void 0){const o=e;if(typeof s.name!="string")return Q.errors=[{instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var i=o===e}else var i=!0;if(i)if(s.severity!==void 0){let o=s.severity;const m=e;if(typeof o!="string")return Q.errors=[{instancePath:t+"/severity",schemaPath:"#/definitions/SeverityType/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(o==="error"||o==="warn"||o==="info"||o==="ignore"))return Q.errors=[{instancePath:t+"/severity",schemaPath:"#/definitions/SeverityType/enum",keyword:"enum",params:{allowedValues:xe.enum},message:"must be equal to one of the allowed values"}],!1;var i=m===e}else var i=!0}}}else return Q.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return Q.errors=r,e===0}function U(s,{instancePath:t="",parentData:C,parentDataProperty:M,rootData:A=s}={}){let r=null,e=0;if(e===0)if(s&&typeof s=="object"&&!Array.isArray(s)){let m;if(s.circular===void 0&&(m="circular")||s.coreModule===void 0&&(m="coreModule")||s.couldNotResolve===void 0&&(m="couldNotResolve")||s.dependencyTypes===void 0&&(m="dependencyTypes")||s.exoticallyRequired===void 0&&(m="exoticallyRequired")||s.dynamic===void 0&&(m="dynamic")||s.followable===void 0&&(m="followable")||s.module===void 0&&(m="module")||s.moduleSystem===void 0&&(m="moduleSystem")||s.resolved===void 0&&(m="resolved")||s.valid===void 0&&(m="valid"))return U.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:m},message:"must have required property '"+m+"'"}],!1;{const d=e;for(const p in s)if(!je.call(Ve.properties,p)){return U.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;break}if(d===e){if(s.module!==void 0){const p=e;if(typeof s.module!="string")return U.errors=[{instancePath:t+"/module",schemaPath:"#/properties/module/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var i=p===e}else var i=!0;if(i){if(s.protocol!==void 0){let p=s.protocol;const b=e;if(typeof p!="string")return U.errors=[{instancePath:t+"/protocol",schemaPath:"#/properties/protocol/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(p==="data:"||p==="file:"||p==="node:"||p==="bun:"))return U.errors=[{instancePath:t+"/protocol",schemaPath:"#/properties/protocol/enum",keyword:"enum",params:{allowedValues:Ve.properties.protocol.enum},message:"must be equal to one of the allowed values"}],!1;var i=b===e}else var i=!0;if(i){if(s.mimeType!==void 0){const p=e;if(typeof s.mimeType!="string")return U.errors=[{instancePath:t+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var i=p===e}else var i=!0;if(i){if(s.resolved!==void 0){const p=e;if(typeof s.resolved!="string")return U.errors=[{instancePath:t+"/resolved",schemaPath:"#/properties/resolved/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var i=p===e}else var i=!0;if(i){if(s.coreModule!==void 0){const p=e;if(typeof s.coreModule!="boolean")return U.errors=[{instancePath:t+"/coreModule",schemaPath:"#/properties/coreModule/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var i=p===e}else var i=!0;if(i){if(s.dependencyTypes!==void 0){let p=s.dependencyTypes;const b=e;if(e===b)if(Array.isArray(p)){var f=!0;const l=p.length;for(let a=0;a<l;a++){let u=p[a];const S=e;if(typeof u!="string")return U.errors=[{instancePath:t+"/dependencyTypes/"+a,schemaPath:"#/definitions/DependencyTypeType/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(u==="aliased-subpath-import"||u==="aliased-tsconfig-base-url"||u==="aliased-tsconfig-paths"||u==="aliased-tsconfig"||u==="aliased-webpack"||u==="aliased-workspace"||u==="aliased"||u==="amd-define"||u==="amd-require"||u==="amd-exotic-require"||u==="core"||u==="deprecated"||u==="dynamic-import"||u==="exotic-require"||u==="export"||u==="import-equals"||u==="import"||u==="jsdoc"||u==="jsdoc-bracket-import"||u==="jsdoc-import-tag"||u==="local"||u==="localmodule"||u==="npm-bundled"||u==="npm-dev"||u==="npm-no-pkg"||u==="npm-optional"||u==="npm-peer"||u==="npm-unknown"||u==="npm"||u==="pre-compilation-only"||u==="process-get-builtin-module"||u==="require"||u==="triple-slash-amd-dependency"||u==="triple-slash-directive"||u==="triple-slash-file-reference"||u==="triple-slash-type-reference"||u==="type-import"||u==="type-only"||u==="undetermined"||u==="unknown"))return U.errors=[{instancePath:t+"/dependencyTypes/"+a,schemaPath:"#/definitions/DependencyTypeType/enum",keyword:"enum",params:{allowedValues:_e.enum},message:"must be equal to one of the allowed values"}],!1;var f=S===e;if(!f)break}}else return U.errors=[{instancePath:t+"/dependencyTypes",schemaPath:"#/properties/dependencyTypes/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var i=b===e}else var i=!0;if(i){if(s.license!==void 0){const p=e;if(typeof s.license!="string")return U.errors=[{instancePath:t+"/license",schemaPath:"#/properties/license/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var i=p===e}else var i=!0;if(i){if(s.followable!==void 0){const p=e;if(typeof s.followable!="boolean")return U.errors=[{instancePath:t+"/followable",schemaPath:"#/properties/followable/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var i=p===e}else var i=!0;if(i){if(s.dynamic!==void 0){const p=e;if(typeof s.dynamic!="boolean")return U.errors=[{instancePath:t+"/dynamic",schemaPath:"#/properties/dynamic/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var i=p===e}else var i=!0;if(i){if(s.exoticallyRequired!==void 0){const p=e;if(typeof s.exoticallyRequired!="boolean")return U.errors=[{instancePath:t+"/exoticallyRequired",schemaPath:"#/properties/exoticallyRequired/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var i=p===e}else var i=!0;if(i){if(s.exoticRequire!==void 0){const p=e;if(typeof s.exoticRequire!="string")return U.errors=[{instancePath:t+"/exoticRequire",schemaPath:"#/properties/exoticRequire/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var i=p===e}else var i=!0;if(i){if(s.matchesDoNotFollow!==void 0){const p=e;if(typeof s.matchesDoNotFollow!="boolean")return U.errors=[{instancePath:t+"/matchesDoNotFollow",schemaPath:"#/properties/matchesDoNotFollow/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var i=p===e}else var i=!0;if(i){if(s.couldNotResolve!==void 0){const p=e;if(typeof s.couldNotResolve!="boolean")return U.errors=[{instancePath:t+"/couldNotResolve",schemaPath:"#/properties/couldNotResolve/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var i=p===e}else var i=!0;if(i){if(s.preCompilationOnly!==void 0){const p=e;if(typeof s.preCompilationOnly!="boolean")return U.errors=[{instancePath:t+"/preCompilationOnly",schemaPath:"#/properties/preCompilationOnly/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var i=p===e}else var i=!0;if(i){if(s.typeOnly!==void 0){const p=e;if(typeof s.typeOnly!="boolean")return U.errors=[{instancePath:t+"/typeOnly",schemaPath:"#/properties/typeOnly/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var i=p===e}else var i=!0;if(i){if(s.circular!==void 0){const p=e;if(typeof s.circular!="boolean")return U.errors=[{instancePath:t+"/circular",schemaPath:"#/properties/circular/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var i=p===e}else var i=!0;if(i){if(s.cycle!==void 0){let p=s.cycle;const b=e;if(e===b)if(Array.isArray(p)){var n=!0;const l=p.length;for(let a=0;a<l;a++){const u=e;G(p[a],{instancePath:t+"/cycle/"+a,parentData:p,parentDataProperty:a,rootData:A})||(r=r===null?G.errors:r.concat(G.errors),e=r.length);var n=u===e;if(!n)break}}else return U.errors=[{instancePath:t+"/cycle",schemaPath:"#/properties/cycle/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var i=b===e}else var i=!0;if(i){if(s.moduleSystem!==void 0){let p=s.moduleSystem;const b=e;if(typeof p!="string")return U.errors=[{instancePath:t+"/moduleSystem",schemaPath:"#/definitions/ModuleSystemType/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(p==="cjs"||p==="es6"||p==="amd"||p==="tsd"))return U.errors=[{instancePath:t+"/moduleSystem",schemaPath:"#/definitions/ModuleSystemType/enum",keyword:"enum",params:{allowedValues:He.enum},message:"must be equal to one of the allowed values"}],!1;var i=b===e}else var i=!0;if(i){if(s.valid!==void 0){const p=e;if(typeof s.valid!="boolean")return U.errors=[{instancePath:t+"/valid",schemaPath:"#/properties/valid/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var i=p===e}else var i=!0;if(i){if(s.rules!==void 0){let p=s.rules;const b=e;if(e===b)if(Array.isArray(p)){var o=!0;const l=p.length;for(let a=0;a<l;a++){const u=e;Q(p[a],{instancePath:t+"/rules/"+a,parentData:p,parentDataProperty:a,rootData:A})||(r=r===null?Q.errors:r.concat(Q.errors),e=r.length);var o=u===e;if(!o)break}}else return U.errors=[{instancePath:t+"/rules",schemaPath:"#/properties/rules/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var i=b===e}else var i=!0;if(i)if(s.instability!==void 0){let p=s.instability;const b=e;if(!(typeof p=="number"&&isFinite(p)))return U.errors=[{instancePath:t+"/instability",schemaPath:"#/properties/instability/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var i=b===e}else var i=!0}}}}}}}}}}}}}}}}}}}}}}else return U.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return U.errors=r,e===0}function qe(s,{instancePath:t="",parentData:C,parentDataProperty:M,rootData:A=s}={}){let r=null,e=0;if(e===0)if(Array.isArray(s)){var i=!0;const f=s.length;for(let n=0;n<f;n++){const o=e;U(s[n],{instancePath:t+"/"+n,parentData:s,parentDataProperty:n,rootData:A})||(r=r===null?U.errors:r.concat(U.errors),e=r.length);var i=o===e;if(!i)break}}else return qe.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;return qe.errors=r,e===0}function X(s,{instancePath:t="",parentData:C,parentDataProperty:M,rootData:A=s}={}){let r=null,e=0;if(e===0)if(s&&typeof s=="object"&&!Array.isArray(s)){let m;if(s.modules===void 0&&(m="modules")||s.asDefinedInRule===void 0&&(m="asDefinedInRule"))return X.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:m},message:"must have required property '"+m+"'"}],!1;{const d=e;for(const p in s)if(!(p==="modules"||p==="asDefinedInRule")){return X.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;break}if(d===e){if(s.modules!==void 0){let p=s.modules;const b=e;if(e===b)if(Array.isArray(p)){var i=!0;const R=p.length;for(let l=0;l<R;l++){let a=p[l];const u=e;if(e===u)if(a&&typeof a=="object"&&!Array.isArray(a)){let g;if(a.source===void 0&&(g="source")||a.via===void 0&&(g="via"))return X.errors=[{instancePath:t+"/modules/"+l,schemaPath:"#/properties/modules/items/required",keyword:"required",params:{missingProperty:g},message:"must have required property '"+g+"'"}],!1;{const c=e;for(const h in a)if(!(h==="source"||h==="via")){return X.errors=[{instancePath:t+"/modules/"+l,schemaPath:"#/properties/modules/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"}],!1;break}if(c===e){if(a.source!==void 0){const h=e;if(typeof a.source!="string")return X.errors=[{instancePath:t+"/modules/"+l+"/source",schemaPath:"#/properties/modules/items/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=h===e}else var f=!0;if(f)if(a.via!==void 0){let h=a.via;const x=e;if(e===x)if(Array.isArray(h)){var n=!0;const L=h.length;for(let $=0;$<L;$++){const _=e;G(h[$],{instancePath:t+"/modules/"+l+"/via/"+$,parentData:h,parentDataProperty:$,rootData:A})||(r=r===null?G.errors:r.concat(G.errors),e=r.length);var n=_===e;if(!n)break}}else return X.errors=[{instancePath:t+"/modules/"+l+"/via",schemaPath:"#/properties/modules/items/properties/via/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var f=x===e}else var f=!0}}}else return X.errors=[{instancePath:t+"/modules/"+l,schemaPath:"#/properties/modules/items/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var i=u===e;if(!i)break}}else return X.errors=[{instancePath:t+"/modules",schemaPath:"#/properties/modules/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var o=b===e}else var o=!0;if(o)if(s.asDefinedInRule!==void 0){const p=e;if(typeof s.asDefinedInRule!="string")return X.errors=[{instancePath:t+"/asDefinedInRule",schemaPath:"#/properties/asDefinedInRule/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var o=p===e}else var o=!0}}}else return X.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return X.errors=r,e===0}function I(s,{instancePath:t="",parentData:C,parentDataProperty:M,rootData:A=s}={}){let r=null,e=0;if(e===0)if(s&&typeof s=="object"&&!Array.isArray(s)){let R;if(s.source===void 0&&(R="source")||s.dependencies===void 0&&(R="dependencies")||s.valid===void 0&&(R="valid"))return I.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const l=e;for(const a in s)if(!je.call(Be.properties,a)){return I.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;break}if(l===e){if(s.source!==void 0){const a=e;if(typeof s.source!="string")return I.errors=[{instancePath:t+"/source",schemaPath:"#/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var i=a===e}else var i=!0;if(i){if(s.valid!==void 0){const a=e;if(typeof s.valid!="boolean")return I.errors=[{instancePath:t+"/valid",schemaPath:"#/properties/valid/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var i=a===e}else var i=!0;if(i){if(s.dependencies!==void 0){const a=e;qe(s.dependencies,{instancePath:t+"/dependencies",parentData:s,parentDataProperty:"dependencies",rootData:A})||(r=r===null?qe.errors:r.concat(qe.errors),e=r.length);var i=a===e}else var i=!0;if(i){if(s.dependents!==void 0){let a=s.dependents;const u=e;if(e===u)if(Array.isArray(a)){var f=!0;const g=a.length;for(let c=0;c<g;c++){const h=e;if(typeof a[c]!="string")return I.errors=[{instancePath:t+"/dependents/"+c,schemaPath:"#/properties/dependents/items/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=h===e;if(!f)break}}else return I.errors=[{instancePath:t+"/dependents",schemaPath:"#/properties/dependents/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var i=u===e}else var i=!0;if(i){if(s.followable!==void 0){const a=e;if(typeof s.followable!="boolean")return I.errors=[{instancePath:t+"/followable",schemaPath:"#/properties/followable/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var i=a===e}else var i=!0;if(i){if(s.matchesDoNotFollow!==void 0){const a=e;if(typeof s.matchesDoNotFollow!="boolean")return I.errors=[{instancePath:t+"/matchesDoNotFollow",schemaPath:"#/properties/matchesDoNotFollow/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var i=a===e}else var i=!0;if(i){if(s.matchesFocus!==void 0){const a=e;if(typeof s.matchesFocus!="boolean")return I.errors=[{instancePath:t+"/matchesFocus",schemaPath:"#/properties/matchesFocus/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var i=a===e}else var i=!0;if(i){if(s.matchesReaches!==void 0){const a=e;if(typeof s.matchesReaches!="boolean")return I.errors=[{instancePath:t+"/matchesReaches",schemaPath:"#/properties/matchesReaches/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var i=a===e}else var i=!0;if(i){if(s.matchesHighlight!==void 0){const a=e;if(typeof s.matchesHighlight!="boolean")return I.errors=[{instancePath:t+"/matchesHighlight",schemaPath:"#/properties/matchesHighlight/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var i=a===e}else var i=!0;if(i){if(s.coreModule!==void 0){const a=e;if(typeof s.coreModule!="boolean")return I.errors=[{instancePath:t+"/coreModule",schemaPath:"#/properties/coreModule/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var i=a===e}else var i=!0;if(i){if(s.couldNotResolve!==void 0){const a=e;if(typeof s.couldNotResolve!="boolean")return I.errors=[{instancePath:t+"/couldNotResolve",schemaPath:"#/properties/couldNotResolve/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var i=a===e}else var i=!0;if(i){if(s.dependencyTypes!==void 0){let a=s.dependencyTypes;const u=e;if(e===u)if(Array.isArray(a)){var n=!0;const g=a.length;for(let c=0;c<g;c++){let h=a[c];const x=e;if(typeof h!="string")return I.errors=[{instancePath:t+"/dependencyTypes/"+c,schemaPath:"#/definitions/DependencyTypeType/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(h==="aliased-subpath-import"||h==="aliased-tsconfig-base-url"||h==="aliased-tsconfig-paths"||h==="aliased-tsconfig"||h==="aliased-webpack"||h==="aliased-workspace"||h==="aliased"||h==="amd-define"||h==="amd-require"||h==="amd-exotic-require"||h==="core"||h==="deprecated"||h==="dynamic-import"||h==="exotic-require"||h==="export"||h==="import-equals"||h==="import"||h==="jsdoc"||h==="jsdoc-bracket-import"||h==="jsdoc-import-tag"||h==="local"||h==="localmodule"||h==="npm-bundled"||h==="npm-dev"||h==="npm-no-pkg"||h==="npm-optional"||h==="npm-peer"||h==="npm-unknown"||h==="npm"||h==="pre-compilation-only"||h==="process-get-builtin-module"||h==="require"||h==="triple-slash-amd-dependency"||h==="triple-slash-directive"||h==="triple-slash-file-reference"||h==="triple-slash-type-reference"||h==="type-import"||h==="type-only"||h==="undetermined"||h==="unknown"))return I.errors=[{instancePath:t+"/dependencyTypes/"+c,schemaPath:"#/definitions/DependencyTypeType/enum",keyword:"enum",params:{allowedValues:_e.enum},message:"must be equal to one of the allowed values"}],!1;var n=x===e;if(!n)break}}else return I.errors=[{instancePath:t+"/dependencyTypes",schemaPath:"#/properties/dependencyTypes/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var i=u===e}else var i=!0;if(i){if(s.license!==void 0){const a=e;if(typeof s.license!="string")return I.errors=[{instancePath:t+"/license",schemaPath:"#/properties/license/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var i=a===e}else var i=!0;if(i){if(s.orphan!==void 0){const a=e;if(typeof s.orphan!="boolean")return I.errors=[{instancePath:t+"/orphan",schemaPath:"#/properties/orphan/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var i=a===e}else var i=!0;if(i){if(s.reachable!==void 0){let a=s.reachable;const u=e;if(e===u)if(Array.isArray(a)){var o=!0;const g=a.length;for(let c=0;c<g;c++){let h=a[c];const x=e;if(e===e)if(h&&typeof h=="object"&&!Array.isArray(h)){let $;if(h.value===void 0&&($="value")||h.asDefinedInRule===void 0&&($="asDefinedInRule")||h.matchedFrom===void 0&&($="matchedFrom"))return I.errors=[{instancePath:t+"/reachable/"+c,schemaPath:"#/definitions/ReachableType/required",keyword:"required",params:{missingProperty:$},message:"must have required property '"+$+"'"}],!1;{const _=e;for(const D in h)if(!(D==="value"||D==="asDefinedInRule"||D==="matchedFrom")){return I.errors=[{instancePath:t+"/reachable/"+c,schemaPath:"#/definitions/ReachableType/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:D},message:"must NOT have additional properties"}],!1;break}if(_===e){if(h.value!==void 0){const D=e;if(typeof h.value!="boolean")return I.errors=[{instancePath:t+"/reachable/"+c+"/value",schemaPath:"#/definitions/ReachableType/properties/value/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var m=D===e}else var m=!0;if(m){if(h.asDefinedInRule!==void 0){const D=e;if(typeof h.asDefinedInRule!="string")return I.errors=[{instancePath:t+"/reachable/"+c+"/asDefinedInRule",schemaPath:"#/definitions/ReachableType/properties/asDefinedInRule/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var m=D===e}else var m=!0;if(m)if(h.matchedFrom!==void 0){const D=e;if(typeof h.matchedFrom!="string")return I.errors=[{instancePath:t+"/reachable/"+c+"/matchedFrom",schemaPath:"#/definitions/ReachableType/properties/matchedFrom/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var m=D===e}else var m=!0}}}}else return I.errors=[{instancePath:t+"/reachable/"+c,schemaPath:"#/definitions/ReachableType/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var o=x===e;if(!o)break}}else return I.errors=[{instancePath:t+"/reachable",schemaPath:"#/properties/reachable/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var i=u===e}else var i=!0;if(i){if(s.reaches!==void 0){let a=s.reaches;const u=e;if(e===u)if(Array.isArray(a)){var d=!0;const g=a.length;for(let c=0;c<g;c++){const h=e;X(a[c],{instancePath:t+"/reaches/"+c,parentData:a,parentDataProperty:c,rootData:A})||(r=r===null?X.errors:r.concat(X.errors),e=r.length);var d=h===e;if(!d)break}}else return I.errors=[{instancePath:t+"/reaches",schemaPath:"#/properties/reaches/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var i=u===e}else var i=!0;if(i){if(s.rules!==void 0){let a=s.rules;const u=e;if(e===u)if(Array.isArray(a)){var p=!0;const g=a.length;for(let c=0;c<g;c++){const h=e;Q(a[c],{instancePath:t+"/rules/"+c,parentData:a,parentDataProperty:c,rootData:A})||(r=r===null?Q.errors:r.concat(Q.errors),e=r.length);var p=h===e;if(!p)break}}else return I.errors=[{instancePath:t+"/rules",schemaPath:"#/properties/rules/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var i=u===e}else var i=!0;if(i){if(s.consolidated!==void 0){const a=e;if(typeof s.consolidated!="boolean")return I.errors=[{instancePath:t+"/consolidated",schemaPath:"#/properties/consolidated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var i=a===e}else var i=!0;if(i){if(s.instability!==void 0){let a=s.instability;const u=e;if(!(typeof a=="number"&&isFinite(a)))return I.errors=[{instancePath:t+"/instability",schemaPath:"#/properties/instability/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var i=u===e}else var i=!0;if(i){if(s.experimentalStats!==void 0){let a=s.experimentalStats;const u=e;if(e===e)if(a&&typeof a=="object"&&!Array.isArray(a)){let c;if(a.size===void 0&&(c="size")||a.topLevelStatementCount===void 0&&(c="topLevelStatementCount"))return I.errors=[{instancePath:t+"/experimentalStats",schemaPath:"#/definitions/ExperimentalStatsType/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const h=e;for(const x in a)if(!(x==="topLevelStatementCount"||x==="size")){return I.errors=[{instancePath:t+"/experimentalStats",schemaPath:"#/definitions/ExperimentalStatsType/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:x},message:"must NOT have additional properties"}],!1;break}if(h===e){if(a.topLevelStatementCount!==void 0){let x=a.topLevelStatementCount;const q=e;if(!(typeof x=="number"&&isFinite(x)))return I.errors=[{instancePath:t+"/experimentalStats/topLevelStatementCount",schemaPath:"#/definitions/ExperimentalStatsType/properties/topLevelStatementCount/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var b=q===e}else var b=!0;if(b)if(a.size!==void 0){let x=a.size;const q=e;if(!(typeof x=="number"&&isFinite(x)))return I.errors=[{instancePath:t+"/experimentalStats/size",schemaPath:"#/definitions/ExperimentalStatsType/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var b=q===e}else var b=!0}}}else return I.errors=[{instancePath:t+"/experimentalStats",schemaPath:"#/definitions/ExperimentalStatsType/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var i=u===e}else var i=!0;if(i)if(s.checksum!==void 0){const a=e;if(typeof s.checksum!="string")return I.errors=[{instancePath:t+"/checksum",schemaPath:"#/properties/checksum/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var i=a===e}else var i=!0}}}}}}}}}}}}}}}}}}}}}}else return I.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return I.errors=r,e===0}function Ee(s,{instancePath:t="",parentData:C,parentDataProperty:M,rootData:A=s}={}){let r=null,e=0;if(e===0)if(Array.isArray(s)){var i=!0;const f=s.length;for(let n=0;n<f;n++){const o=e;I(s[n],{instancePath:t+"/"+n,parentData:s,parentDataProperty:n,rootData:A})||(r=r===null?I.errors:r.concat(I.errors),e=r.length);var i=o===e;if(!i)break}}else return Ee.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;return Ee.errors=r,e===0}function z(s,{instancePath:t="",parentData:C,parentDataProperty:M,rootData:A=s}={}){let r=null,e=0;if(e===0)if(s&&typeof s=="object"&&!Array.isArray(s)){let b;if(s.name===void 0&&(b="name")||s.moduleCount===void 0&&(b="moduleCount"))return z.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:b},message:"must have required property '"+b+"'"}],!1;{const R=e;for(const l in s)if(!(l==="name"||l==="dependents"||l==="dependencies"||l==="moduleCount"||l==="afferentCouplings"||l==="efferentCouplings"||l==="instability"||l==="experimentalStats")){return z.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:l},message:"must NOT have additional properties"}],!1;break}if(R===e){if(s.name!==void 0){const l=e;if(typeof s.name!="string")return z.errors=[{instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var i=l===e}else var i=!0;if(i){if(s.dependents!==void 0){let l=s.dependents;const a=e;if(e===a)if(Array.isArray(l)){var f=!0;const S=l.length;for(let g=0;g<S;g++){let c=l[g];const h=e;if(e===h)if(c&&typeof c=="object"&&!Array.isArray(c)){let q;if(c.name===void 0&&(q="name"))return z.errors=[{instancePath:t+"/dependents/"+g,schemaPath:"#/properties/dependents/items/required",keyword:"required",params:{missingProperty:q},message:"must have required property '"+q+"'"}],!1;{const L=e;for(const $ in c)if($!=="name"){return z.errors=[{instancePath:t+"/dependents/"+g,schemaPath:"#/properties/dependents/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"}],!1;break}if(L===e&&c.name!==void 0&&typeof c.name!="string")return z.errors=[{instancePath:t+"/dependents/"+g+"/name",schemaPath:"#/properties/dependents/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1}}else return z.errors=[{instancePath:t+"/dependents/"+g,schemaPath:"#/properties/dependents/items/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=h===e;if(!f)break}}else return z.errors=[{instancePath:t+"/dependents",schemaPath:"#/properties/dependents/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var i=a===e}else var i=!0;if(i){if(s.dependencies!==void 0){let l=s.dependencies;const a=e;if(e===a)if(Array.isArray(l)){var n=!0;const S=l.length;for(let g=0;g<S;g++){let c=l[g];const h=e;if(e===h)if(c&&typeof c=="object"&&!Array.isArray(c)){let q;if(c.name===void 0&&(q="name")||c.valid===void 0&&(q="valid")||c.circular===void 0&&(q="circular"))return z.errors=[{instancePath:t+"/dependencies/"+g,schemaPath:"#/properties/dependencies/items/required",keyword:"required",params:{missingProperty:q},message:"must have required property '"+q+"'"}],!1;{const L=e;for(const $ in c)if(!($==="name"||$==="instability"||$==="valid"||$==="circular"||$==="cycle"||$==="rules")){return z.errors=[{instancePath:t+"/dependencies/"+g,schemaPath:"#/properties/dependencies/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"}],!1;break}if(L===e){if(c.name!==void 0){const $=e;if(typeof c.name!="string")return z.errors=[{instancePath:t+"/dependencies/"+g+"/name",schemaPath:"#/properties/dependencies/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var o=$===e}else var o=!0;if(o){if(c.instability!==void 0){let $=c.instability;const _=e;if(!(typeof $=="number"&&isFinite($)))return z.errors=[{instancePath:t+"/dependencies/"+g+"/instability",schemaPath:"#/properties/dependencies/items/properties/instability/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var o=_===e}else var o=!0;if(o){if(c.valid!==void 0){const $=e;if(typeof c.valid!="boolean")return z.errors=[{instancePath:t+"/dependencies/"+g+"/valid",schemaPath:"#/properties/dependencies/items/properties/valid/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var o=$===e}else var o=!0;if(o){if(c.circular!==void 0){const $=e;if(typeof c.circular!="boolean")return z.errors=[{instancePath:t+"/dependencies/"+g+"/circular",schemaPath:"#/properties/dependencies/items/properties/circular/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var o=$===e}else var o=!0;if(o){if(c.cycle!==void 0){let $=c.cycle;const _=e;if(e===_)if(Array.isArray($)){var m=!0;const E=$.length;for(let y=0;y<E;y++){const T=e;G($[y],{instancePath:t+"/dependencies/"+g+"/cycle/"+y,parentData:$,parentDataProperty:y,rootData:A})||(r=r===null?G.errors:r.concat(G.errors),e=r.length);var m=T===e;if(!m)break}}else return z.errors=[{instancePath:t+"/dependencies/"+g+"/cycle",schemaPath:"#/properties/dependencies/items/properties/cycle/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var o=_===e}else var o=!0;if(o)if(c.rules!==void 0){let $=c.rules;const _=e;if(e===_)if(Array.isArray($)){var d=!0;const E=$.length;for(let y=0;y<E;y++){const T=e;Q($[y],{instancePath:t+"/dependencies/"+g+"/rules/"+y,parentData:$,parentDataProperty:y,rootData:A})||(r=r===null?Q.errors:r.concat(Q.errors),e=r.length);var d=T===e;if(!d)break}}else return z.errors=[{instancePath:t+"/dependencies/"+g+"/rules",schemaPath:"#/properties/dependencies/items/properties/rules/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var o=_===e}else var o=!0}}}}}}}else return z.errors=[{instancePath:t+"/dependencies/"+g,schemaPath:"#/properties/dependencies/items/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var n=h===e;if(!n)break}}else return z.errors=[{instancePath:t+"/dependencies",schemaPath:"#/properties/dependencies/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var i=a===e}else var i=!0;if(i){if(s.moduleCount!==void 0){let l=s.moduleCount;const a=e;if(!(typeof l=="number"&&isFinite(l)))return z.errors=[{instancePath:t+"/moduleCount",schemaPath:"#/properties/moduleCount/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var i=a===e}else var i=!0;if(i){if(s.afferentCouplings!==void 0){let l=s.afferentCouplings;const a=e;if(!(typeof l=="number"&&isFinite(l)))return z.errors=[{instancePath:t+"/afferentCouplings",schemaPath:"#/properties/afferentCouplings/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var i=a===e}else var i=!0;if(i){if(s.efferentCouplings!==void 0){let l=s.efferentCouplings;const a=e;if(!(typeof l=="number"&&isFinite(l)))return z.errors=[{instancePath:t+"/efferentCouplings",schemaPath:"#/properties/efferentCouplings/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var i=a===e}else var i=!0;if(i){if(s.instability!==void 0){let l=s.instability;const a=e;if(!(typeof l=="number"&&isFinite(l)))return z.errors=[{instancePath:t+"/instability",schemaPath:"#/properties/instability/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var i=a===e}else var i=!0;if(i)if(s.experimentalStats!==void 0){let l=s.experimentalStats;const a=e;if(e===e)if(l&&typeof l=="object"&&!Array.isArray(l)){let g;if(l.size===void 0&&(g="size")||l.topLevelStatementCount===void 0&&(g="topLevelStatementCount"))return z.errors=[{instancePath:t+"/experimentalStats",schemaPath:"#/definitions/ExperimentalStatsType/required",keyword:"required",params:{missingProperty:g},message:"must have required property '"+g+"'"}],!1;{const c=e;for(const h in l)if(!(h==="topLevelStatementCount"||h==="size")){return z.errors=[{instancePath:t+"/experimentalStats",schemaPath:"#/definitions/ExperimentalStatsType/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"}],!1;break}if(c===e){if(l.topLevelStatementCount!==void 0){let h=l.topLevelStatementCount;const x=e;if(!(typeof h=="number"&&isFinite(h)))return z.errors=[{instancePath:t+"/experimentalStats/topLevelStatementCount",schemaPath:"#/definitions/ExperimentalStatsType/properties/topLevelStatementCount/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var p=x===e}else var p=!0;if(p)if(l.size!==void 0){let h=l.size;const x=e;if(!(typeof h=="number"&&isFinite(h)))return z.errors=[{instancePath:t+"/experimentalStats/size",schemaPath:"#/definitions/ExperimentalStatsType/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var p=x===e}else var p=!0}}}else return z.errors=[{instancePath:t+"/experimentalStats",schemaPath:"#/definitions/ExperimentalStatsType/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var i=a===e}else var i=!0}}}}}}}}}else return z.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return z.errors=r,e===0}function $e(s,{instancePath:t="",parentData:C,parentDataProperty:M,rootData:A=s}={}){let r=null,e=0;if(e===0)if(Array.isArray(s)){var i=!0;const f=s.length;for(let n=0;n<f;n++){const o=e;z(s[n],{instancePath:t+"/"+n,parentData:s,parentDataProperty:n,rootData:A})||(r=r===null?z.errors:r.concat(z.errors),e=r.length);var i=o===e;if(!i)break}}else return $e.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;return $e.errors=r,e===0}const Je={type:"object",required:["violations","error","warn","info","totalCruised","optionsUsed"],additionalProperties:!1,properties:{violations:{$ref:"#/definitions/ViolationsType"},error:{type:"number"},warn:{type:"number"},info:{type:"number"},ignore:{type:"number"},totalCruised:{type:"number"},totalDependenciesCruised:{type:"number"},ruleSetUsed:{$ref:"#/definitions/RuleSetType"},optionsUsed:{$ref:"#/definitions/OptionsUsedType"}}};const Ge={type:"string",enum:["dependency","module","reachability","cycle","instability","folder"]};function J(s,{instancePath:t="",parentData:C,parentDataProperty:M,rootData:A=s}={}){let r=null,e=0;if(e===0)if(s&&typeof s=="object"&&!Array.isArray(s)){let m;if(s.from===void 0&&(m="from")||s.to===void 0&&(m="to")||s.rule===void 0&&(m="rule"))return J.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:m},message:"must have required property '"+m+"'"}],!1;{const d=e;for(const p in s)if(!(p==="from"||p==="to"||p==="type"||p==="rule"||p==="cycle"||p==="via"||p==="metrics"||p==="comment")){return J.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;break}if(d===e){if(s.from!==void 0){const p=e;if(typeof s.from!="string")return J.errors=[{instancePath:t+"/from",schemaPath:"#/properties/from/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var i=p===e}else var i=!0;if(i){if(s.to!==void 0){const p=e;if(typeof s.to!="string")return J.errors=[{instancePath:t+"/to",schemaPath:"#/properties/to/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var i=p===e}else var i=!0;if(i){if(s.type!==void 0){let p=s.type;const b=e;if(typeof p!="string")return J.errors=[{instancePath:t+"/type",schemaPath:"#/definitions/ViolationTypeType/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(p==="dependency"||p==="module"||p==="reachability"||p==="cycle"||p==="instability"||p==="folder"))return J.errors=[{instancePath:t+"/type",schemaPath:"#/definitions/ViolationTypeType/enum",keyword:"enum",params:{allowedValues:Ge.enum},message:"must be equal to one of the allowed values"}],!1;var i=b===e}else var i=!0;if(i){if(s.rule!==void 0){const p=e;Q(s.rule,{instancePath:t+"/rule",parentData:s,parentDataProperty:"rule",rootData:A})||(r=r===null?Q.errors:r.concat(Q.errors),e=r.length);var i=p===e}else var i=!0;if(i){if(s.cycle!==void 0){let p=s.cycle;const b=e;if(e===b)if(Array.isArray(p)){var f=!0;const l=p.length;for(let a=0;a<l;a++){const u=e;G(p[a],{instancePath:t+"/cycle/"+a,parentData:p,parentDataProperty:a,rootData:A})||(r=r===null?G.errors:r.concat(G.errors),e=r.length);var f=u===e;if(!f)break}}else return J.errors=[{instancePath:t+"/cycle",schemaPath:"#/properties/cycle/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var i=b===e}else var i=!0;if(i){if(s.via!==void 0){let p=s.via;const b=e;if(e===b)if(Array.isArray(p)){var n=!0;const l=p.length;for(let a=0;a<l;a++){const u=e;G(p[a],{instancePath:t+"/via/"+a,parentData:p,parentDataProperty:a,rootData:A})||(r=r===null?G.errors:r.concat(G.errors),e=r.length);var n=u===e;if(!n)break}}else return J.errors=[{instancePath:t+"/via",schemaPath:"#/properties/via/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var i=b===e}else var i=!0;if(i){if(s.metrics!==void 0){let p=s.metrics;const b=e;if(e===b)if(p&&typeof p=="object"&&!Array.isArray(p)){let l;if(p.from===void 0&&(l="from")||p.to===void 0&&(l="to"))return J.errors=[{instancePath:t+"/metrics",schemaPath:"#/properties/metrics/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!1;{const a=e;for(const u in p)if(!(u==="from"||u==="to")){return J.errors=[{instancePath:t+"/metrics",schemaPath:"#/properties/metrics/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:u},message:"must NOT have additional properties"}],!1;break}if(a===e){if(p.from!==void 0){let u=p.from;const S=e;if(e===S)if(u&&typeof u=="object"&&!Array.isArray(u)){let g;if(u.instability===void 0&&(g="instability"))return J.errors=[{instancePath:t+"/metrics/from",schemaPath:"#/properties/metrics/properties/from/required",keyword:"required",params:{missingProperty:g},message:"must have required property '"+g+"'"}],!1;{const c=e;for(const h in u)if(h!=="instability"){return J.errors=[{instancePath:t+"/metrics/from",schemaPath:"#/properties/metrics/properties/from/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"}],!1;break}if(c===e&&u.instability!==void 0){let h=u.instability;if(!(typeof h=="number"&&isFinite(h)))return J.errors=[{instancePath:t+"/metrics/from/instability",schemaPath:"#/properties/metrics/properties/from/properties/instability/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1}}}else return J.errors=[{instancePath:t+"/metrics/from",schemaPath:"#/properties/metrics/properties/from/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var o=S===e}else var o=!0;if(o)if(p.to!==void 0){let u=p.to;const S=e;if(e===S)if(u&&typeof u=="object"&&!Array.isArray(u)){let c;if(u.instability===void 0&&(c="instability"))return J.errors=[{instancePath:t+"/metrics/to",schemaPath:"#/properties/metrics/properties/to/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const h=e;for(const x in u)if(x!=="instability"){return J.errors=[{instancePath:t+"/metrics/to",schemaPath:"#/properties/metrics/properties/to/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:x},message:"must NOT have additional properties"}],!1;break}if(h===e&&u.instability!==void 0){let x=u.instability;if(!(typeof x=="number"&&isFinite(x)))return J.errors=[{instancePath:t+"/metrics/to/instability",schemaPath:"#/properties/metrics/properties/to/properties/instability/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1}}}else return J.errors=[{instancePath:t+"/metrics/to",schemaPath:"#/properties/metrics/properties/to/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var o=S===e}else var o=!0}}}else return J.errors=[{instancePath:t+"/metrics",schemaPath:"#/properties/metrics/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var i=b===e}else var i=!0;if(i)if(s.comment!==void 0){const p=e;if(typeof s.comment!="string")return J.errors=[{instancePath:t+"/comment",schemaPath:"#/properties/comment/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var i=p===e}else var i=!0}}}}}}}}}else return J.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return J.errors=r,e===0}function Re(s,{instancePath:t="",parentData:C,parentDataProperty:M,rootData:A=s}={}){let r=null,e=0;if(e===0)if(Array.isArray(s)){var i=!0;const f=s.length;for(let n=0;n<f;n++){const o=e;J(s[n],{instancePath:t+"/"+n,parentData:s,parentDataProperty:n,rootData:A})||(r=r===null?J.errors:r.concat(J.errors),e=r.length);var i=o===e;if(!i)break}}else return Re.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;return Re.errors=r,e===0}const Ke={type:"object",required:["from","to"],additionalProperties:!1,properties:{name:{type:"string"},severity:{$ref:"#/definitions/SeverityType"},scope:{type:"string",enum:["module","folder"]},comment:{type:"string"},from:{$ref:"#/definitions/FromRestrictionType"},to:{$ref:"#/definitions/ToRestrictionType"}}};function oe(s,{instancePath:t="",parentData:C,parentDataProperty:M,rootData:A=s}={}){let r=null,e=0;if(e===0)if(s&&typeof s=="object"&&!Array.isArray(s)){const d=e;for(const p in s)if(!(p==="path"||p==="pathNot"||p==="orphan")){return oe.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;bre