dependency-cruiser
Version:
Validate and visualize dependencies. With your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.
1 lines • 15.8 kB
JavaScript
var Handlebars=require("handlebars/runtime"),template=Handlebars.template,templates=Handlebars.templates=Handlebars.templates||{};templates["error-html.template.hbs"]=template({1:function(n,l,e,o,t){var a=n.lookupProperty||function(n,l){if(Object.prototype.hasOwnProperty.call(n,l))return n[l]};return' <div style="float:left;padding-right:20px" class="ignore">\n <strong>'+n.escapeExpression(n.lambda(null!=(n=null!=l?a(l,"summary"):l)?a(n,"ignore"):n,l))+"</strong> ignored\n </div>\n"},3:function(n,l,e,o,t){return"<th>ignored</th>"},5:function(n,l,e,o,t,a,r){var i,s,u=null!=l?l:n.nullContext||{},d=n.hooks.helperMissing,c="function",p=n.escapeExpression,h=n.lookupProperty||function(n,l){if(Object.prototype.hasOwnProperty.call(n,l))return n[l]};return" <tr "+(null!=(i=h(e,"if").call(u,null!=l?h(l,"unviolated"):l,{name:"if",hash:{},fn:n.program(6,t,0,a,r),inverse:n.noop,data:t,loc:{start:{line:218,column:16},end:{line:218,column:60}}}))?i:"")+">\n <td>"+(null!=(i=h(e,"if").call(u,null!=l?h(l,"unviolated"):l,{name:"if",hash:{},fn:n.program(8,t,0,a,r),inverse:n.program(10,t,0,a,r),data:t,loc:{start:{line:219,column:20},end:{line:220,column:66}}}))?i:"")+"</td>\n <td class="+(null!=(i=h(e,"if").call(u,null!=l?h(l,"unviolated"):l,{name:"if",hash:{},fn:n.program(12,t,0,a,r),inverse:n.program(14,t,0,a,r),data:t,loc:{start:{line:221,column:26},end:{line:221,column:81}}}))?i:"")+">"+p(typeof(s=null!=(s=h(e,"severity")||(null!=l?h(l,"severity"):l))?s:d)==c?s.call(u,{name:"severity",hash:{},data:t,loc:{start:{line:221,column:82},end:{line:221,column:94}}}):s)+'</td>\n <td class="nowrap"><a href="#'+p(typeof(s=null!=(s=h(e,"name")||(null!=l?h(l,"name"):l))?s:d)==c?s.call(u,{name:"name",hash:{},data:t,loc:{start:{line:222,column:45},end:{line:222,column:53}}}):s)+'-instance" id="'+p(typeof(s=null!=(s=h(e,"name")||(null!=l?h(l,"name"):l))?s:d)==c?s.call(u,{name:"name",hash:{},data:t,loc:{start:{line:222,column:68},end:{line:222,column:76}}}):s)+'-definition" class="noiseless">'+p(typeof(s=null!=(s=h(e,"name")||(null!=l?h(l,"name"):l))?s:d)==c?s.call(u,{name:"name",hash:{},data:t,loc:{start:{line:222,column:107},end:{line:222,column:115}}}):s)+"</a>\n </td>\n <td><strong>"+p(typeof(s=null!=(s=h(e,"count")||(null!=l?h(l,"count"):l))?s:d)==c?s.call(u,{name:"count",hash:{},data:t,loc:{start:{line:224,column:28},end:{line:224,column:37}}}):s)+"</strong></td>\n "+(null!=(i=h(e,"if").call(u,null!=(i=null!=r[1]?h(r[1],"summary"):r[1])?h(i,"ignore"):i,{name:"if",hash:{},fn:n.program(16,t,0,a,r),inverse:n.noop,data:t,loc:{start:{line:225,column:16},end:{line:225,column:90}}}))?i:"")+"\n <td>"+p(typeof(s=null!=(s=h(e,"comment")||(null!=l?h(l,"comment"):l))?s:d)==c?s.call(u,{name:"comment",hash:{},data:t,loc:{start:{line:226,column:20},end:{line:226,column:31}}}):s)+"</td>\n </tr>\n"},6:function(n,l,e,o,t){return'class="unviolated" '},8:function(n,l,e,o,t){return'<span class="ok">✓</span>'},10:function(n,l,e,o,t){var a=n.lookupProperty||function(n,l){if(Object.prototype.hasOwnProperty.call(n,l))return n[l]};return'<span\n class="'+n.escapeExpression("function"==typeof(e=null!=(e=a(e,"severity")||(null!=l?a(l,"severity"):l))?e:n.hooks.helperMissing)?e.call(null!=l?l:n.nullContext||{},{name:"severity",hash:{},data:t,loc:{start:{line:220,column:31},end:{line:220,column:43}}}):e)+'">✗</span>'},12:function(n,l,e,o,t){var a=n.lookupProperty||function(n,l){if(Object.prototype.hasOwnProperty.call(n,l))return n[l]};return'"'+n.escapeExpression("function"==typeof(e=null!=(e=a(e,"ok")||(null!=l?a(l,"ok"):l))?e:n.hooks.helperMissing)?e.call(null!=l?l:n.nullContext||{},{name:"ok",hash:{},data:t,loc:{start:{line:221,column:45},end:{line:221,column:51}}}):e)+'"'},14:function(n,l,e,o,t){var a=n.lookupProperty||function(n,l){if(Object.prototype.hasOwnProperty.call(n,l))return n[l]};return'"'+n.escapeExpression("function"==typeof(e=null!=(e=a(e,"severity")||(null!=l?a(l,"severity"):l))?e:n.hooks.helperMissing)?e.call(null!=l?l:n.nullContext||{},{name:"severity",hash:{},data:t,loc:{start:{line:221,column:61},end:{line:221,column:73}}}):e)+'"'},16:function(n,l,e,o,t){var a=n.lookupProperty||function(n,l){if(Object.prototype.hasOwnProperty.call(n,l))return n[l]};return"<td><strong>"+n.escapeExpression("function"==typeof(e=null!=(e=a(e,"ignoredCount")||(null!=l?a(l,"ignoredCount"):l))?e:n.hooks.helperMissing)?e.call(null!=l?l:n.nullContext||{},{name:"ignoredCount",hash:{},data:t,loc:{start:{line:225,column:53},end:{line:225,column:69}}}):e)+"</strong></td>"},18:function(n,l,e,o,t){return'"6"'},20:function(n,l,e,o,t){return'"5"'},22:function(n,l,e,o,t,a,r){var i,s=n.lookupProperty||function(n,l){if(Object.prototype.hasOwnProperty.call(n,l))return n[l]};return' <span id="show-ignored-violations">\n <h2><svg class="p__svg--inline" viewBox="0 0 12 16" version="1.1" aria-hidden="true">\n <path fill-rule="evenodd"\n d="M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z">\n </path>\n </svg> All violations</h2>\n <table>\n <thead>\n <tr>\n <th>severity</th>\n <th>rule</th>\n <th>from</th>\n <th>to</th>\n </tr>\n </thead>\n <tbody>\n'+(null!=(i=n.hooks.blockHelperMissing.call(l,n.lambda(null!=(i=null!=l?s(l,"summary"):l)?s(i,"violations"):i,l),{name:"summary.violations",hash:{},fn:n.program(23,t,0,a,r),inverse:n.noop,data:t,loc:{start:{line:260,column:12},end:{line:269,column:35}}}))?i:"")+(null!=(i=s(e,"if").call(null!=l?l:n.nullContext||{},null!=(i=null!=l?s(l,"summary"):l)?s(i,"ignore"):i,{name:"if",hash:{},fn:n.program(25,t,0,a,r),inverse:n.noop,data:t,loc:{start:{line:270,column:12},end:{line:281,column:19}}}))?i:"")+" </tbody>\n </table>\n </span>\n"},23:function(n,l,e,o,t,a,r){var i,s=n.lambda,u=n.escapeExpression,d=null!=l?l:n.nullContext||{},c=n.hooks.helperMissing,p="function",n=n.lookupProperty||function(n,l){if(Object.prototype.hasOwnProperty.call(n,l))return n[l]};return' <tr class="'+u(s(null!=(i=null!=l?n(l,"rule"):l)?n(i,"severity"):i,l))+'d">\n <td class="'+u(s(null!=(i=null!=l?n(l,"rule"):l)?n(i,"severity"):i,l))+'">'+u(s(null!=(i=null!=l?n(l,"rule"):l)?n(i,"severity"):i,l))+'</td>\n <td class="nowrap"><a href="#'+u(s(null!=(i=null!=l?n(l,"rule"):l)?n(i,"name"):i,l))+'-definition" id="'+u(s(null!=(i=null!=l?n(l,"rule"):l)?n(i,"name"):i,l))+'-instance"\n class="noiseless">'+u(s(null!=(i=null!=l?n(l,"rule"):l)?n(i,"name"):i,l))+'</a></td>\n <td><a href="'+u(s(null!=(i=null!=(i=null!=r[1]?n(r[1],"summary"):r[1])?n(i,"optionsUsed"):i)?n(i,"prefix"):i,l))+u(typeof(s=null!=(s=n(e,"from")||(null!=l?n(l,"from"):l))?s:c)==p?s.call(d,{name:"from",hash:{},data:t,loc:{start:{line:265,column:62},end:{line:265,column:70}}}):s)+'">'+u(typeof(s=null!=(s=n(e,"from")||(null!=l?n(l,"from"):l))?s:c)==p?s.call(d,{name:"from",hash:{},data:t,loc:{start:{line:265,column:72},end:{line:265,column:80}}}):s)+"</a>"+(null!=(i=typeof(s=null!=(s=n(e,"fromExtras")||(null!=l?n(l,"fromExtras"):l))?s:c)==p?s.call(d,{name:"fromExtras",hash:{},data:t,loc:{start:{line:265,column:84},end:{line:265,column:100}}}):s)?i:"")+"</td>\n <td>"+(null!=(i=typeof(s=null!=(s=n(e,"to")||(null!=l?n(l,"to"):l))?s:c)==p?s.call(d,{name:"to",hash:{},data:t,loc:{start:{line:266,column:20},end:{line:266,column:28}}}):s)?i:"")+"</td>\n\n </tr>\n"},25:function(n,l,e,o,t){return' <tr>\n <td colspan="4" class="controls">\n <div id="show-ignored">\n ↓ <a href="#show-ignored-violations">also show ignored violations</a>\n </div>\n <div id="hide-ignored">\n ↑ <a href="">hide ignored violations</a>\n </div>\n </td>\n </tr>\n'},27:function(n,l,e,o,t){return' <h2><span aria-hidden="true">♥</span> No violations found</h2>\n <p>Get gummy bears to celebrate.</p>\n'},compiler:[8,">= 4.3.0"],main:function(n,l,e,o,t,a,r){var i,s=n.lambda,u=n.escapeExpression,d=null!=l?l:n.nullContext||{},c=n.lookupProperty||function(n,l){if(Object.prototype.hasOwnProperty.call(n,l))return n[l]};return'<!DOCTYPE html>\n<html lang="en">\n\n<head>\n <title>dependency-cruiser - results</title>\n <meta charset="utf-8">\n <meta name="viewport" content="width=device-width, initial-scale=1">\n\n <style type="text/css">\n body {\n font-family: sans-serif;\n margin: 0 auto;\n max-width: 90%;\n line-height: 1.6;\n font-size: 14px;\n color: #444;\n padding: 0 10px;\n background-color: #fff;\n }\n\n footer {\n color: gray;\n margin-top: 1.4em;\n border-top: solid 1px currentColor\n }\n\n a {\n text-decoration: none\n }\n\n a.noiseless {\n color: currentColor\n }\n\n h1,\n h2,\n h3 {\n line-height: 1.2\n }\n\n table {\n border-collapse: collapse;\n width: 100%;\n }\n\n th,\n td {\n text-align: left;\n padding: 4px;\n }\n\n tbody tr:nth-child(odd) {\n background-color: rgba(128, 128, 128, 0.2);\n }\n\n .error {\n color: red;\n }\n\n .warn {\n color: orange;\n }\n\n .info {\n color: blue;\n }\n\n .ignore {\n color:gray;\n }\n\n .ok {\n color: limegreen;\n }\n\n td.nowrap {\n white-space: nowrap\n }\n\n svg {\n fill: currentColor\n }\n\n #show-unviolated {\n display: block\n }\n\n #hide-unviolated {\n display: none\n }\n\n #show-all-the-rules:target #show-unviolated {\n display: none\n }\n\n #show-all-the-rules:target #hide-unviolated {\n display: block\n }\n\n tr.unviolated {\n display: none\n }\n\n #show-all-the-rules:target tr.unviolated {\n display: table-row;\n color: gray;\n }\n\n #show-ignored {\n display: block\n }\n\n #hide-ignored {\n display: none\n }\n\n #show-ignored-violations:target #show-ignored {\n display: none\n }\n\n #show-ignored-violations:target #hide-ignored {\n display: block\n }\n\n tr.ignored {\n display: none\n }\n\n #show-ignored-violations:target tr.ignored {\n display: table-row;\n color: gray;\n }\n\n .p__svg--inline {\n vertical-align: top;\n width: 1.2em;\n height: 1.2em\n }\n\n .controls {\n background-color: #fff;\n vertical-align: bottom;\n text-align: center\n }\n\n .controls:hover {\n opacity: 1;\n }\n\n .controls a {\n text-decoration: none;\n color: gray;\n }\n\n .controls a:hover {\n text-decoration: underline;\n color: blue;\n }\n\n .extra {\n color: gray;\n }\n </style>\n <style type="text/css" media="print">\n th,\n td {\n border: 1px solid #444;\n }\n\n .controls {\n display: none\n }\n </style>\n</head>\n\n<body>\n <h1>Forbidden dependency check - results</h1>\n <span id="show-all-the-rules">\n <h2><svg class="p__svg--inline" viewBox="0 0 14 16" version="1.1" aria-hidden="true">\n <path fill-rule="evenodd"\n d="M11.5 8L8.8 5.4 6.6 8.5 5.5 1.6 2.38 8H0v2h3.6l.9-1.8.9 5.4L9 8.5l1.6 1.5H14V8h-2.5z"></path>\n </svg> Summary</h2>\n <p>\n <div style="float:left;padding-right:20px">\n <strong>'+u(s(null!=(i=null!=l?c(l,"summary"):l)?c(i,"totalCruised"):i,l))+'</strong> modules\n </div>\n <div style="float:left;padding-right:20px">\n <strong>'+u(s(null!=(i=null!=l?c(l,"summary"):l)?c(i,"totalDependenciesCruised"):i,l))+'</strong> dependencies\n </div>\n <div style="float:left;padding-right:20px">\n <strong>'+u(s(null!=(i=null!=l?c(l,"summary"):l)?c(i,"error"):i,l))+'</strong> errors\n </div>\n <div style="float:left;padding-right:20px">\n <strong>'+u(s(null!=(i=null!=l?c(l,"summary"):l)?c(i,"warn"):i,l))+'</strong> warnings\n </div>\n <div style="float:left;padding-right:20px">\n <strong>'+u(s(null!=(i=null!=l?c(l,"summary"):l)?c(i,"info"):i,l))+"</strong> informational\n </div>\n"+(null!=(i=c(e,"if").call(d,null!=(i=null!=l?c(l,"summary"):l)?c(i,"ignore"):i,{name:"if",hash:{},fn:n.program(1,t,0,a,r),inverse:n.noop,data:t,loc:{start:{line:199,column:8},end:{line:203,column:15}}}))?i:"")+" \n </p>\n <table>\n <tbody>\n <thead>\n <tr>\n <th></th>\n <th>severity</th>\n <th>rule</th>\n <th>violations</th>\n "+(null!=(i=c(e,"if").call(d,null!=(i=null!=l?c(l,"summary"):l)?c(i,"ignore"):i,{name:"if",hash:{},fn:n.program(3,t,0,a,r),inverse:n.noop,data:t,loc:{start:{line:214,column:20},end:{line:214,column:65}}}))?i:"")+"\n <th>explanation</th>\n </thead>\n"+(null!=(i=n.hooks.blockHelperMissing.call(l,s(null!=(i=null!=l?c(l,"summary"):l)?c(i,"agggregateViolations"):i,l),{name:"summary.agggregateViolations",hash:{},fn:n.program(5,t,0,a,r),inverse:n.noop,data:t,loc:{start:{line:217,column:12},end:{line:228,column:45}}}))?i:"")+" <tr>\n <td colspan="+(null!=(i=c(e,"if").call(d,null!=(i=null!=l?c(l,"summary"):l)?c(i,"ignore"):i,{name:"if",hash:{},fn:n.program(18,t,0,a,r),inverse:n.program(20,t,0,a,r),data:t,loc:{start:{line:230,column:28},end:{line:230,column:68}}}))?i:"")+' class="controls">\n <div id="show-unviolated">\n ↓ <a href="#show-all-the-rules">also show unviolated rules</a>\n </div>\n <div id="hide-unviolated">\n ↑ <a href="">hide unviolated rules</a>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </span>\n\n'+(null!=(i=c(e,"if").call(d,null!=(i=null!=l?c(l,"summary"):l)?c(i,"violations"):i,{name:"if",hash:{},fn:n.program(22,t,0,a,r),inverse:n.program(27,t,0,a,r),data:t,loc:{start:{line:243,column:4},end:{line:288,column:11}}}))?i:"")+' <footer>\n <p><a href="https://github.com/sverweij/dependency-cruiser">'+u(s(null!=(i=null!=l?c(l,"summary"):l)?c(i,"depcruiseVersion"):i,l))+"</a> /\n "+u(s(null!=(i=null!=l?c(l,"summary"):l)?c(i,"runDate"):i,l))+"</p>\n </footer>\n</body>\n\n</html>"},useData:!0,useDepths:!0});