diff options
author | Bastien Wirtz <bastien.wirtz@gmail.com> | 2018-06-13 22:14:05 -0700 |
---|---|---|
committer | Bastien Wirtz <bastien.wirtz@gmail.com> | 2018-06-13 22:21:09 -0700 |
commit | 09763dbf6a6f24263cdff535a3aca64da35a0abb (patch) | |
tree | 13967839553c98e12ea5219a5d88e6eb8da08043 | |
parent | b21bf8b1af775e17833da4432d48ffc18a294ebc (diff) | |
download | homer-09763dbf6a6f24263cdff535a3aca64da35a0abb.tar.gz homer-09763dbf6a6f24263cdff535a3aca64da35a0abb.tar.zst homer-09763dbf6a6f24263cdff535a3aca64da35a0abb.zip |
Initial commit
-rw-r--r-- | README.md | 83 | ||||
-rw-r--r-- | app.css | 130 | ||||
-rw-r--r-- | app.css.map | 7 | ||||
-rw-r--r-- | app.js | 58 | ||||
-rw-r--r-- | app.scss | 204 | ||||
-rw-r--r-- | assets/favicon.png | bin | 0 -> 49200 bytes | |||
-rw-r--r-- | assets/homer.png | bin | 0 -> 49200 bytes | |||
-rw-r--r-- | assets/tools/elastic.png | bin | 0 -> 1208 bytes | |||
-rw-r--r-- | assets/tools/grafana.png | bin | 0 -> 13832 bytes | |||
-rw-r--r-- | assets/tools/jenkins.png | bin | 0 -> 6453 bytes | |||
-rw-r--r-- | assets/tools/kibana.png | bin | 0 -> 8839 bytes | |||
-rw-r--r-- | assets/tools/monit.png | bin | 0 -> 16823 bytes | |||
-rw-r--r-- | assets/tools/pingdom.png | bin | 0 -> 22125 bytes | |||
-rw-r--r-- | assets/tools/rabbitmq.png | bin | 0 -> 31047 bytes | |||
-rw-r--r-- | config.yml | 63 | ||||
-rw-r--r-- | index.html | 107 | ||||
-rw-r--r-- | screenshot.png | bin | 0 -> 123174 bytes | |||
-rw-r--r-- | vendors/js-yaml.min.js | 1 |
18 files changed, 651 insertions, 2 deletions
@@ -1,2 +1,81 @@ | |||
1 | # homer | 1 | # Homer |
2 | A very simple static homepage for your server. | 2 | A very simple static HOMepage for your servER. |
3 | Add all your useful service, external links, notes... or anything. | ||
4 | |||
5 | If you need authentication support, you're on your own (it can be secured using a web server auth module or exposing it only through a VPN network / SSH tunneling, ...) | ||
6 | |||
7 | ![screenshot](https://github.com/bastienwirtz/homer/blob/master/screenshot.png) | ||
8 | |||
9 | **How to build / install it? Where is the webpack config?** | ||
10 | There is no build system (😱), use it like that! It'meant to be stupid simple & zero maintenance required. just copy the static files somewhere, and visit the `index.html`. | ||
11 | |||
12 | |||
13 | ## configuration | ||
14 | |||
15 | Title, icons, links, colors, and services can be configured in the `config.yml` file, using [yaml](http://yaml.org/) format. | ||
16 | |||
17 | |||
18 | ```yaml | ||
19 | --- | ||
20 | # Homepage configuration | ||
21 | # See https://fontawesome.com/v4.7.0/icons/ for icons options | ||
22 | |||
23 | title: "Simple homepage" | ||
24 | subtitle: "Homer" | ||
25 | logo: "assets/homer.png" | ||
26 | |||
27 | # Optional message | ||
28 | message: | ||
29 | title: "Optional message!" | ||
30 | content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque risus mi, tempus quis placerat ut, porta nec nulla. Vestibulum rhoncus ac ex sit amet fringilla. Nullam gravida purus diam, et dictum felis venenatis efficitur. Aenean ac eleifend lacus, in mollis lectus. Donec sodales, arcu et sollicitudin porttitor, tortor urna tempor ligula." | ||
31 | |||
32 | # Optional navbar | ||
33 | links: | ||
34 | - name: "ansible" | ||
35 | icon: "fa-github" | ||
36 | url: "https://github.com/xxxxx/ansible/" | ||
37 | - name: "Wiki" | ||
38 | icon: "fa-book" | ||
39 | url: "https://wiki.xxxxxx.com/" | ||
40 | |||
41 | # Services | ||
42 | # First level array represent a group. | ||
43 | # Leave only a "items" key if not using group (group name & icon are optional, section separation will not be displayed). | ||
44 | services: | ||
45 | - name: "DevOps" | ||
46 | icon: "fa-code-fork" | ||
47 | items: | ||
48 | - name: "Jenkins" | ||
49 | logo: "/assets/tools/jenkins.png" | ||
50 | subtitle: "Continuous integration server" | ||
51 | tag: "CI" | ||
52 | url: "#" | ||
53 | - name: "RabbitMQ Management" | ||
54 | logo: "/assets/tools/rabbitmq.png" | ||
55 | subtitle: "Manage & monitor RabbitMQ server" | ||
56 | tag: "haproxy" | ||
57 | url: "#" | ||
58 | - name: "Monitoring" | ||
59 | icon: "fa-heartbeat" | ||
60 | items: | ||
61 | - name: "M/Monit" | ||
62 | logo: "/assets/tools/monit.png" | ||
63 | subtitle: "Monitor & manage all monit enabled hosts" | ||
64 | tag: "monit" | ||
65 | url: "#" | ||
66 | - name: "Grafana" | ||
67 | logo: "/assets/tools/grafana.png" | ||
68 | subtitle: "Metric analytics & dashboards" | ||
69 | url: "#" | ||
70 | - name: "Kibana" | ||
71 | logo: "/assets/tools/elastic.png" | ||
72 | subtitle: "Explore & visualize logs" | ||
73 | tag: "elk" | ||
74 | url: "#" | ||
75 | - name: "Website monitoring" | ||
76 | logo: "/assets/tools/pingdom.png" | ||
77 | subtitle: "Pingdom public reports overview" | ||
78 | tag: "CI" | ||
79 | url: "#" | ||
80 | |||
81 | ``` \ No newline at end of file | ||
@@ -0,0 +1,130 @@ | |||
1 | body { | ||
2 | font-family: 'Raleway', sans-serif; | ||
3 | background-color: #F5F5F5; | ||
4 | height: 100%; } | ||
5 | body h1, body h2, body h3, body h4, body h5, body h6 { | ||
6 | font-family: 'Lato', sans-serif; } | ||
7 | body h1 { | ||
8 | font-size: 2rem; } | ||
9 | body h2 { | ||
10 | font-size: 1.7rem; | ||
11 | margin-top: 3rem; | ||
12 | margin-bottom: 1rem; } | ||
13 | body h2 .fa { | ||
14 | margin-right: 10px; | ||
15 | color: #4285f4; } | ||
16 | body h2 span { | ||
17 | font-weight: bold; | ||
18 | color: #4285f4; } | ||
19 | body [v-cloak] { | ||
20 | display: none; } | ||
21 | body #bighead { | ||
22 | color: #ffffff; } | ||
23 | body #bighead .dashboard-title { | ||
24 | padding: 6px 0 0 80px; } | ||
25 | body #bighead .first-line { | ||
26 | height: 100px; | ||
27 | vertical-align: center; | ||
28 | background-color: #3367d6; } | ||
29 | body #bighead .first-line h1 { | ||
30 | margin-top: -12px; | ||
31 | font-size: 2rem; } | ||
32 | body #bighead .first-line .headline { | ||
33 | margin-top: 5px; | ||
34 | font-size: 0.9rem; } | ||
35 | body #bighead .first-line .container { | ||
36 | height: 80px; | ||
37 | padding: 10px 0; } | ||
38 | body #bighead .first-line img { | ||
39 | float: left; | ||
40 | max-height: 70px; | ||
41 | max-width: 70px; | ||
42 | padding: 10px; } | ||
43 | body #bighead .navbar { | ||
44 | background-color: #4285f4; } | ||
45 | body #bighead .navbar a { | ||
46 | color: #152138; } | ||
47 | body #bighead .navbar a:hover { | ||
48 | background-color: #5a95f5; } | ||
49 | body #main-section { | ||
50 | margin-bottom: 3rem; | ||
51 | padding: 0; } | ||
52 | body #main-section h2 { | ||
53 | border-bottom: 1px dashed #ccc; | ||
54 | padding-bottom: 10px; } | ||
55 | body #main-section .title { | ||
56 | font-size: 1.1em; } | ||
57 | body #main-section .subtitle { | ||
58 | font-size: .9em; } | ||
59 | body #main-section .column { | ||
60 | padding: 1.2rem .75rem; } | ||
61 | body #main-section .message { | ||
62 | margin-top: 45px; | ||
63 | box-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.1); } | ||
64 | body #main-section .message .message-header { | ||
65 | font-weight: bold; } | ||
66 | body #main-section .message .message-body { | ||
67 | border: none; } | ||
68 | body .media-content { | ||
69 | overflow: inherit; } | ||
70 | body .tag { | ||
71 | color: #4285f4; | ||
72 | background-color: #4285f4; | ||
73 | position: absolute; | ||
74 | top: 1rem; | ||
75 | right: -0.3rem; | ||
76 | width: 3px; | ||
77 | overflow: hidden; | ||
78 | transition: all 0.2s ease-out; | ||
79 | padding: 0; } | ||
80 | body .card { | ||
81 | border-radius: 5px; | ||
82 | border: none; | ||
83 | box-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.1); | ||
84 | transition: cubic-bezier(0.165, 0.84, 0.44, 1) 300ms; } | ||
85 | body .card:hover { | ||
86 | background-color: #FFFFFF; | ||
87 | transform: translate(0, -3px); } | ||
88 | body .card:hover .tag { | ||
89 | width: auto; | ||
90 | color: #ffffff; | ||
91 | padding: 0 0.75em; } | ||
92 | body .card-content { | ||
93 | height: 110px; } | ||
94 | body .footer { | ||
95 | position: fixed; | ||
96 | left: 0; | ||
97 | right: 0; | ||
98 | bottom: 0; | ||
99 | padding: 1rem 0.5rem; | ||
100 | text-align: left; | ||
101 | background-color: #fafafa; | ||
102 | border-top: 1px solid #F5F5F5; } | ||
103 | body .search-bar { | ||
104 | position: relative; } | ||
105 | body .search-bar #search { | ||
106 | border: none; | ||
107 | background-color: #5f98f6; | ||
108 | border-radius: 5px; | ||
109 | padding: 2px 12px 2px 30px; | ||
110 | margin: 10px 0; | ||
111 | transition: all 100ms linear; | ||
112 | color: #ffffff; | ||
113 | height: 30px; | ||
114 | width: 100px; } | ||
115 | body .search-bar #search:focus { | ||
116 | color: #000000; | ||
117 | width: 250px; | ||
118 | background-color: #ffffff; } | ||
119 | body .search-bar .search-label::before { | ||
120 | font-family: 'FontAwesome'; | ||
121 | position: absolute; | ||
122 | top: 12px; | ||
123 | left: 8px; | ||
124 | content: "\f002"; | ||
125 | width: 20px; | ||
126 | height: 20px; } | ||
127 | body .search-bar:focus-within .search-label::before { | ||
128 | color: #4a4a4a; } | ||
129 | |||
130 | /*# sourceMappingURL=app.css.map */ | ||
diff --git a/app.css.map b/app.css.map new file mode 100644 index 0000000..9e5dc0c --- /dev/null +++ b/app.css.map | |||
@@ -0,0 +1,7 @@ | |||
1 | { | ||
2 | "version": 3, | ||
3 | "mappings": "AAGA,IAAK;EACH,WAAW,EAAE,qBAAqB;EAClC,gBAAgB,EAAE,OAAO;EACzB,MAAM,EAAE,IAAI;EAEZ,oDAAuB;IACrB,WAAW,EAAE,kBAAkB;EAGjC,OAAG;IACD,SAAS,EAAE,IAAI;EAGjB,OAAG;IACD,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE,IAAI;IAChB,aAAa,EAAE,IAAI;IAEnB,WAAI;MACF,YAAY,EAAE,IAAI;MAClB,KAAK,EAtBO,OAAO;IAyBrB,YAAK;MACH,WAAW,EAAE,IAAI;MACjB,KAAK,EA3BO,OAAO;EA+BvB,cAAU;IACR,OAAO,EAAE,IAAI;EAGf,aAAS;IACP,KAAK,EAAE,OAAO;IAEd,8BAAiB;MACf,OAAO,EAAE,YAAY;IAGvB,yBAAY;MACV,MAAM,EAAE,KAAK;MACb,cAAc,EAAE,MAAM;MACtB,gBAAgB,EA9CN,OAAO;MAgDjB,4BAAG;QACD,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,IAAI;MAGjB,mCAAU;QACR,UAAU,EAAE,GAAG;QACf,SAAS,EAAE,MAAM;MAGnB,oCAAW;QACT,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,MAAM;MAGjB,6BAAI;QACF,KAAK,EAAE,IAAI;QACX,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,IAAI;IAGjB,qBAAQ;MACN,gBAAgB,EAtEJ,OAAO;MAwEnB,uBAAE;QACA,KAAK,EAAE,OAAO;QAEd,6BAAQ;UACN,gBAAgB,EAAE,OAA+B;EAMzD,kBAAc;IACZ,aAAa,EAAE,IAAI;IACnB,OAAO,EAAE,CAAC;IAEV,qBAAG;MACD,aAAa,EAAE,eAAe;MAC9B,cAAc,EAAE,IAAI;IAGtB,yBAAO;MACL,SAAS,EAAE,KAAK;IAGlB,4BAAU;MACR,SAAS,EAAE,IAAI;IAGjB,0BAAQ;MACN,OAAO,EAAE,aAAa;IAGxB,2BAAS;MACP,UAAU,EAAE,IAAI;MAChB,UAAU,EAAE,+BAA+B;MAE3C,2CAAgB;QACd,WAAW,EAAE,IAAI;MAGnB,yCAAc;QACZ,MAAM,EAAE,IAAI;EAKlB,mBAAe;IACb,QAAQ,EAAE,OAAO;EAGnB,SAAK;IACH,KAAK,EA1HS,OAAO;IA2HrB,gBAAgB,EA3HF,OAAO;IA4HrB,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,IAAI;IACT,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,GAAG;IACV,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,iBAAiB;IAC7B,OAAO,EAAE,CAAC;EAGZ,UAAM;IACJ,aAAa,EAAE,GAAG;IAClB,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,+BAA+B;IAC3C,UAAU,EAAE,wCACd;EAEA,gBAAY;IACV,gBAAgB,EAAE,OAAO;IACzB,SAAS,EAAE,kBAAkB;IAE7B,qBAAK;MACH,KAAK,EAAE,IAAI;MACX,KAAK,EAAE,OAAO;MACd,OAAO,EAAE,QAAQ;EAIrB,kBAAc;IACZ,MAAM,EAAE,KAAK;EAGf,YAAQ;IACN,QAAQ,EAAE,KAAK;IACf,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;IACT,OAAO,EAAE,WAAW;IACpB,UAAU,EAAE,IAAI;IAChB,gBAAgB,EAAE,OAAO;IACzB,UAAU,EAAE,iBAAiB;EAG/B,gBAAY;IACV,QAAQ,EAAE,QAAQ;IAClB,wBAAQ;MACN,MAAM,EAAE,IAAI;MACZ,gBAAgB,EAAE,OAA+B;MACjD,aAAa,EAAE,GAAG;MAClB,OAAO,EAAE,iBAAiB;MAC1B,MAAM,EAAE,MAAM;MACd,UAAU,EAAE,gBAAgB;MAC5B,KAAK,EAAE,OAAO;MACd,MAAM,EAAE,IAAI;MACZ,KAAK,EAAE,KAAK;MAGZ,8BAAQ;QACN,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,KAAK;QACZ,gBAAgB,EAAE,OAAO;IAI7B,sCAAsB;MACpB,WAAW,EAAE,aAAa;MAC1B,QAAQ,EAAE,QAAQ;MAClB,GAAG,EAAE,IAAI;MACT,IAAI,EAAE,GAAG;MACT,OAAO,EAAE,OAAO;MAChB,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,IAAI;IAGZ,mDAAqC;MACjC,KAAK,EAAE,OAAO", | ||
4 | "sources": ["app.scss"], | ||
5 | "names": [], | ||
6 | "file": "app.css" | ||
7 | } \ No newline at end of file | ||
@@ -0,0 +1,58 @@ | |||
1 | var app = new Vue({ | ||
2 | el: '#app', | ||
3 | data: { | ||
4 | config: null, | ||
5 | filter: '' | ||
6 | }, | ||
7 | beforeCreate () { | ||
8 | var that = this; | ||
9 | return getConfig().then(function (config) { | ||
10 | // Splice services list into groups of 3 for flex column display | ||
11 | var size = 3; | ||
12 | config.services.forEach(function(service) { | ||
13 | service.rows = []; | ||
14 | items = service.items; | ||
15 | while (items.length) { | ||
16 | service.rows.push(items.splice(0, size)); | ||
17 | } | ||
18 | |||
19 | if (service.rows.length) { | ||
20 | var last = service.rows.length-1; | ||
21 | service.rows[last] = service.rows[last].concat(Array(size - service.rows[last].length)); | ||
22 | } | ||
23 | }); | ||
24 | that.config = config; | ||
25 | }); | ||
26 | } | ||
27 | }); | ||
28 | |||
29 | |||
30 | function getConfig() { | ||
31 | return new Promise(function (resolve, reject) { | ||
32 | var xhr = new XMLHttpRequest(); | ||
33 | xhr.open('GET', 'config.yml'); | ||
34 | xhr.onload = function () { | ||
35 | if (this.status >= 200 && this.status < 300) { | ||
36 | try { | ||
37 | var data = jsyaml.load(xhr.response); | ||
38 | resolve(data); | ||
39 | } catch (e) { | ||
40 | console.error('fail to parse config file'); | ||
41 | reject(); | ||
42 | } | ||
43 | } else { | ||
44 | reject({ | ||
45 | status: this.status, | ||
46 | statusText: xhr.statusText | ||
47 | }); | ||
48 | } | ||
49 | }; | ||
50 | xhr.onerror = function () { | ||
51 | reject({ | ||
52 | status: this.status, | ||
53 | statusText: xhr.statusText | ||
54 | }); | ||
55 | }; | ||
56 | xhr.send(); | ||
57 | }); | ||
58 | } \ No newline at end of file | ||
diff --git a/app.scss b/app.scss new file mode 100644 index 0000000..6391c2d --- /dev/null +++ b/app.scss | |||
@@ -0,0 +1,204 @@ | |||
1 | $primary-color: #3367d6; | ||
2 | $secondary-color: #4285f4; | ||
3 | |||
4 | body { | ||
5 | font-family: 'Raleway', sans-serif; | ||
6 | background-color: #F5F5F5; | ||
7 | height: 100%; | ||
8 | |||
9 | h1, h2, h3, h4, h5, h6 { | ||
10 | font-family: 'Lato', sans-serif; | ||
11 | } | ||
12 | |||
13 | h1 { | ||
14 | font-size: 2rem; | ||
15 | } | ||
16 | |||
17 | h2 { | ||
18 | font-size: 1.7rem; | ||
19 | margin-top: 3rem; | ||
20 | margin-bottom: 1rem; | ||
21 | |||
22 | .fa { | ||
23 | margin-right: 10px; | ||
24 | color: $secondary-color; | ||
25 | } | ||
26 | |||
27 | span { | ||
28 | font-weight: bold; | ||
29 | color: $secondary-color; | ||
30 | } | ||
31 | } | ||
32 | |||
33 | [v-cloak] { | ||
34 | display: none | ||
35 | } | ||
36 | |||
37 | #bighead { | ||
38 | color: #ffffff; | ||
39 | |||
40 | .dashboard-title { | ||
41 | padding: 6px 0 0 80px; | ||
42 | } | ||
43 | |||
44 | .first-line { | ||
45 | height: 100px; | ||
46 | vertical-align: center; | ||
47 | background-color: $primary-color; | ||
48 | |||
49 | h1 { | ||
50 | margin-top: -12px; | ||
51 | font-size: 2rem; | ||
52 | } | ||
53 | |||
54 | .headline { | ||
55 | margin-top: 5px; | ||
56 | font-size: 0.9rem; | ||
57 | } | ||
58 | |||
59 | .container { | ||
60 | height: 80px; | ||
61 | padding: 10px 0; | ||
62 | } | ||
63 | |||
64 | img { | ||
65 | float: left; | ||
66 | max-height: 70px; | ||
67 | max-width: 70px; | ||
68 | padding: 10px; | ||
69 | } | ||
70 | } | ||
71 | .navbar { | ||
72 | background-color: $secondary-color; | ||
73 | |||
74 | a { | ||
75 | color: #152138; | ||
76 | |||
77 | &:hover { | ||
78 | background-color: lighten( $secondary-color, 5% ); | ||
79 | } | ||
80 | } | ||
81 | } | ||
82 | } | ||
83 | |||
84 | #main-section { | ||
85 | margin-bottom: 3rem; | ||
86 | padding: 0; | ||
87 | |||
88 | h2 { | ||
89 | border-bottom: 1px dashed #ccc; | ||
90 | padding-bottom: 10px; | ||
91 | } | ||
92 | |||
93 | .title { | ||
94 | font-size: 1.1em; | ||
95 | } | ||
96 | |||
97 | .subtitle { | ||
98 | font-size: .9em; | ||
99 | } | ||
100 | |||
101 | .column { | ||
102 | padding: 1.2rem .75rem; | ||
103 | } | ||
104 | |||
105 | .message { | ||
106 | margin-top: 45px; | ||
107 | box-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.1); | ||
108 | |||
109 | .message-header { | ||
110 | font-weight: bold; | ||
111 | } | ||
112 | |||
113 | .message-body { | ||
114 | border: none; | ||
115 | } | ||
116 | } | ||
117 | } | ||
118 | |||
119 | .media-content { | ||
120 | overflow: inherit; | ||
121 | } | ||
122 | |||
123 | .tag { | ||
124 | color: $secondary-color; | ||
125 | background-color: $secondary-color; | ||
126 | position: absolute; | ||
127 | top: 1rem; | ||
128 | right: -0.3rem; | ||
129 | width: 3px; | ||
130 | overflow: hidden; | ||
131 | transition: all 0.2s ease-out; | ||
132 | padding: 0; | ||
133 | } | ||
134 | |||
135 | .card { | ||
136 | border-radius: 5px; | ||
137 | border: none; | ||
138 | box-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.1); | ||
139 | transition: cubic-bezier(0.165, 0.84, 0.44, 1) 300ms | ||
140 | } | ||
141 | |||
142 | .card:hover { | ||
143 | background-color: #FFFFFF; | ||
144 | transform: translate(0, -3px); | ||
145 | |||
146 | .tag { | ||
147 | width: auto; | ||
148 | color: #ffffff; | ||
149 | padding: 0 0.75em; | ||
150 | } | ||
151 | } | ||
152 | |||
153 | .card-content { | ||
154 | height: 110px; | ||
155 | } | ||
156 | |||
157 | .footer { | ||
158 | position: fixed; | ||
159 | left: 0; | ||
160 | right: 0; | ||
161 | bottom: 0; | ||
162 | padding: 1rem 0.5rem; | ||
163 | text-align: left; | ||
164 | background-color: #fafafa; | ||
165 | border-top: 1px solid #F5F5F5; | ||
166 | } | ||
167 | |||
168 | .search-bar { | ||
169 | position: relative; | ||
170 | #search { | ||
171 | border: none; | ||
172 | background-color: lighten( $secondary-color, 6% ); | ||
173 | border-radius: 5px; | ||
174 | padding: 2px 12px 2px 30px; | ||
175 | margin: 10px 0; | ||
176 | transition: all 100ms linear; | ||
177 | color: #ffffff; | ||
178 | height: 30px; | ||
179 | width: 100px; | ||
180 | |||
181 | |||
182 | &:focus { | ||
183 | color: #000000; | ||
184 | width: 250px; | ||
185 | background-color: #ffffff; | ||
186 | } | ||
187 | } | ||
188 | |||
189 | .search-label::before { | ||
190 | font-family: 'FontAwesome'; | ||
191 | position: absolute; | ||
192 | top: 12px; | ||
193 | left: 8px; | ||
194 | content: "\f002"; | ||
195 | width: 20px; | ||
196 | height: 20px; | ||
197 | } | ||
198 | |||
199 | &:focus-within .search-label::before { | ||
200 | color: #4a4a4a; | ||
201 | } | ||
202 | } | ||
203 | |||
204 | } | ||
diff --git a/assets/favicon.png b/assets/favicon.png new file mode 100644 index 0000000..6fa8ee8 --- /dev/null +++ b/assets/favicon.png | |||
Binary files differ | |||
diff --git a/assets/homer.png b/assets/homer.png new file mode 100644 index 0000000..6fa8ee8 --- /dev/null +++ b/assets/homer.png | |||
Binary files differ | |||
diff --git a/assets/tools/elastic.png b/assets/tools/elastic.png new file mode 100644 index 0000000..11d655f --- /dev/null +++ b/assets/tools/elastic.png | |||
Binary files differ | |||
diff --git a/assets/tools/grafana.png b/assets/tools/grafana.png new file mode 100644 index 0000000..65de946 --- /dev/null +++ b/assets/tools/grafana.png | |||
Binary files differ | |||
diff --git a/assets/tools/jenkins.png b/assets/tools/jenkins.png new file mode 100644 index 0000000..6afeb65 --- /dev/null +++ b/assets/tools/jenkins.png | |||
Binary files differ | |||
diff --git a/assets/tools/kibana.png b/assets/tools/kibana.png new file mode 100644 index 0000000..c38b32b --- /dev/null +++ b/assets/tools/kibana.png | |||
Binary files differ | |||
diff --git a/assets/tools/monit.png b/assets/tools/monit.png new file mode 100644 index 0000000..1aa8c95 --- /dev/null +++ b/assets/tools/monit.png | |||
Binary files differ | |||
diff --git a/assets/tools/pingdom.png b/assets/tools/pingdom.png new file mode 100644 index 0000000..ec290ed --- /dev/null +++ b/assets/tools/pingdom.png | |||
Binary files differ | |||
diff --git a/assets/tools/rabbitmq.png b/assets/tools/rabbitmq.png new file mode 100644 index 0000000..90e2178 --- /dev/null +++ b/assets/tools/rabbitmq.png | |||
Binary files differ | |||
diff --git a/config.yml b/config.yml new file mode 100644 index 0000000..09dd14e --- /dev/null +++ b/config.yml | |||
@@ -0,0 +1,63 @@ | |||
1 | --- | ||
2 | # Homepage configuration | ||
3 | # See https://fontawesome.com/v4.7.0/icons/ for icons options | ||
4 | |||
5 | title: "Simple homepage" | ||
6 | subtitle: "Homer" | ||
7 | logo: "assets/homer.png" | ||
8 | |||
9 | # Optional message | ||
10 | # See https://bulma.io/documentation/components/message/#colors for styling options. | ||
11 | message: | ||
12 | style: "is-warning" | ||
13 | title: "Optional message!" | ||
14 | content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque risus mi, tempus quis placerat ut, porta nec nulla. Vestibulum rhoncus ac ex sit amet fringilla. Nullam gravida purus diam, et dictum felis venenatis efficitur. Aenean ac eleifend lacus, in mollis lectus. Donec sodales, arcu et sollicitudin porttitor, tortor urna tempor ligula." | ||
15 | |||
16 | # Optional navbar | ||
17 | links: | ||
18 | - name: "ansible" | ||
19 | icon: "fa-github" | ||
20 | url: "https://github.com/xxxxx/ansible/" | ||
21 | - name: "Wiki" | ||
22 | icon: "fa-book" | ||
23 | url: "https://wiki.xxxxxx.com/" | ||
24 | |||
25 | # Services | ||
26 | # First level array represent a group. | ||
27 | # Leave only a "items" key if not using group (group name & icon are optional, section separation will not be displayed). | ||
28 | services: | ||
29 | - name: "DevOps" | ||
30 | icon: "fa-code-fork" | ||
31 | items: | ||
32 | - name: "Jenkins" | ||
33 | logo: "/assets/tools/jenkins.png" | ||
34 | subtitle: "Continuous integration server" | ||
35 | tag: "CI" | ||
36 | url: "#" | ||
37 | - name: "RabbitMQ Management" | ||
38 | logo: "/assets/tools/rabbitmq.png" | ||
39 | subtitle: "Manage & monitor RabbitMQ server" | ||
40 | tag: "haproxy" | ||
41 | url: "#" | ||
42 | - name: "Monitoring" | ||
43 | icon: "fa-heartbeat" | ||
44 | items: | ||
45 | - name: "M/Monit" | ||
46 | logo: "/assets/tools/monit.png" | ||
47 | subtitle: "Monitor & manage all monit enabled hosts" | ||
48 | tag: "monit" | ||
49 | url: "#" | ||
50 | - name: "Grafana" | ||
51 | logo: "/assets/tools/grafana.png" | ||
52 | subtitle: "Metric analytics & dashboards" | ||
53 | url: "#" | ||
54 | - name: "Kibana" | ||
55 | logo: "/assets/tools/elastic.png" | ||
56 | subtitle: "Explore & visualize logs" | ||
57 | tag: "elk" | ||
58 | url: "#" | ||
59 | - name: "Website monitoring" | ||
60 | logo: "/assets/tools/pingdom.png" | ||
61 | subtitle: "Pingdom public reports overview" | ||
62 | tag: "CI" | ||
63 | url: "#" | ||
diff --git a/index.html b/index.html new file mode 100644 index 0000000..9e946bf --- /dev/null +++ b/index.html | |||
@@ -0,0 +1,107 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <meta charset="utf-8"> | ||
5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
6 | <meta name="robots" content="noindex"> | ||
7 | <link rel="icon" type="image/png" href="assets/favicon.png"> | ||
8 | <title>Homer</title> | ||
9 | <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> | ||
10 | <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.6.2/css/bulma.min.css"> | ||
11 | <link href="https://fonts.googleapis.com/css?family=Lato|Raleway" rel="stylesheet"> | ||
12 | <link rel="stylesheet" href="app.css"> | ||
13 | </head> | ||
14 | <body> | ||
15 | <div id="app" v-if="config"> | ||
16 | <div id="bighead"> | ||
17 | <section class="first-line"> | ||
18 | <div class="container"> | ||
19 | <img v-if="config.logo" :src="config.logo" /> | ||
20 | <div class="dashboard-title"> | ||
21 | <span v-cloak class="headline">{{ config.subtitle }}</span> | ||
22 | <h1 v-cloak>{{ config.title }}</h1> | ||
23 | </div> | ||
24 | </div> | ||
25 | </section> | ||
26 | <div v-if="config.links" class="container-fluid"> | ||
27 | <nav class="navbar" role="navigation" aria-label="main navigation"> | ||
28 | <div class="container"> | ||
29 | <div class="navbar-menu"> | ||
30 | <div class="navbar-start"> | ||
31 | <a v-for="link in config.links" class="navbar-item" :href="link.url"> | ||
32 | <i v-if="link.icon" style="margin-right: 6px;" class="fa" :class="link.icon"></i> | ||
33 | {{ link.name }} | ||
34 | </a> | ||
35 | </div> | ||
36 | <div class="end"> | ||
37 | <div class="search-bar"> | ||
38 | <label for="search" class="search-label"></label> | ||
39 | <input type="text" id="search" v-model="filter"/> | ||
40 | </div> | ||
41 | </div> | ||
42 | </div> | ||
43 | </div> | ||
44 | </nav> | ||
45 | </div> | ||
46 | </div> | ||
47 | |||
48 | <section id="main-section" class="section"> | ||
49 | <div class="container"> | ||
50 | <!-- Optional messages --> | ||
51 | <article v-cloak v-if="config && config.message" class="message" :class="config.message.style"> | ||
52 | <div v-if="config.message.title" class="message-header"> | ||
53 | <p>{{ config.message.title }}</p> | ||
54 | </div> | ||
55 | <div v-if="config.message.content" class="message-body"> | ||
56 | {{ config.message.content }} | ||
57 | </div> | ||
58 | </article> | ||
59 | |||
60 | <h2 v-cloak v-if="filter"><i class="fa fa-search"></i> Search</h2> | ||
61 | |||
62 | <div v-for="(group, index) in config.services"> | ||
63 | <h2 v-if="!filter && group.name"><i v-if="group.icon" class="fa" :class="group.icon"></i><span v-else>#</span> {{ group.name }}</h2> | ||
64 | <div v-for="items in group.rows"> | ||
65 | <div class="columns"> | ||
66 | <div v-for="item in items" v-if="!filter || (item && (item.name.toLowerCase().includes(filter.toLowerCase()) || (item.tag && item.tag.toLowerCase().includes(filter.toLowerCase()))))" class="column"> | ||
67 | <div> | ||
68 | <div v-if='item' class="card"> | ||
69 | <a :href="item.url"> | ||
70 | <div class="card-content"> | ||
71 | <div class="media"> | ||
72 | <div v-if="item.logo" class="media-left"> | ||
73 | <figure class="image is-48x48"> | ||
74 | <img :src="item.logo" /> | ||
75 | </figure> | ||
76 | </div> | ||
77 | <div class="media-content"> | ||
78 | <p class="title is-4">{{ item.name }}</p> | ||
79 | <p class="subtitle is-6">{{ item.subtitle }}</p> | ||
80 | </div> | ||
81 | </div> | ||
82 | <strong v-if="item.tag" class="tag">#{{ item.tag }}</strong> | ||
83 | </div> | ||
84 | </a> | ||
85 | </div> | ||
86 | </div> | ||
87 | </div> | ||
88 | </div> | ||
89 | </div> | ||
90 | </div> | ||
91 | </div> | ||
92 | </section> | ||
93 | </div> | ||
94 | |||
95 | <footer class="footer"> | ||
96 | <div class="container"> | ||
97 | <div class="content has-text-centered"> | ||
98 | <p>Created with <span class="has-text-danger">❤️</span> with <a href="#">bulma</a>, <a href="#">vuejs</a> & <a href="#">font awesome</a>// Fork me on <a href="https://github.com/bastienwirtz/homer"><i class="fa fa-github-alt"></i></a>.</p> | ||
99 | </div> | ||
100 | </div> | ||
101 | </footer> | ||
102 | |||
103 | <script src="https://unpkg.com/vue"></script> | ||
104 | <script src="vendors/js-yaml.min.js"></script> | ||
105 | <script src="app.js"></script> | ||
106 | </body> | ||
107 | </html> \ No newline at end of file | ||
diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..d45ecbc --- /dev/null +++ b/screenshot.png | |||
Binary files differ | |||
diff --git a/vendors/js-yaml.min.js b/vendors/js-yaml.min.js new file mode 100644 index 0000000..0dcb7ba --- /dev/null +++ b/vendors/js-yaml.min.js | |||
@@ -0,0 +1 @@ | |||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).jsyaml=e()}}(function(){return function o(a,s,c){function u(t,e){if(!s[t]){if(!a[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}var r=s[t]={exports:{}};a[t][0].call(r.exports,function(e){return u(a[t][1][e]||e)},r,r.exports,o,a,s,c)}return s[t].exports}for(var l="function"==typeof require&&require,e=0;e<c.length;e++)u(c[e]);return u}({1:[function(e,t,n){"use strict";var i=e("./js-yaml/loader"),r=e("./js-yaml/dumper");function o(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}t.exports.Type=e("./js-yaml/type"),t.exports.Schema=e("./js-yaml/schema"),t.exports.FAILSAFE_SCHEMA=e("./js-yaml/schema/failsafe"),t.exports.JSON_SCHEMA=e("./js-yaml/schema/json"),t.exports.CORE_SCHEMA=e("./js-yaml/schema/core"),t.exports.DEFAULT_SAFE_SCHEMA=e("./js-yaml/schema/default_safe"),t.exports.DEFAULT_FULL_SCHEMA=e("./js-yaml/schema/default_full"),t.exports.load=i.load,t.exports.loadAll=i.loadAll,t.exports.safeLoad=i.safeLoad,t.exports.safeLoadAll=i.safeLoadAll,t.exports.dump=r.dump,t.exports.safeDump=r.safeDump,t.exports.YAMLException=e("./js-yaml/exception"),t.exports.MINIMAL_SCHEMA=e("./js-yaml/schema/failsafe"),t.exports.SAFE_SCHEMA=e("./js-yaml/schema/default_safe"),t.exports.DEFAULT_SCHEMA=e("./js-yaml/schema/default_full"),t.exports.scan=o("scan"),t.exports.parse=o("parse"),t.exports.compose=o("compose"),t.exports.addConstructor=o("addConstructor")},{"./js-yaml/dumper":3,"./js-yaml/exception":4,"./js-yaml/loader":5,"./js-yaml/schema":7,"./js-yaml/schema/core":8,"./js-yaml/schema/default_full":9,"./js-yaml/schema/default_safe":10,"./js-yaml/schema/failsafe":11,"./js-yaml/schema/json":12,"./js-yaml/type":13}],2:[function(e,t,n){"use strict";function i(e){return null==e}t.exports.isNothing=i,t.exports.isObject=function(e){return"object"==typeof e&&null!==e},t.exports.toArray=function(e){return Array.isArray(e)?e:i(e)?[]:[e]},t.exports.repeat=function(e,t){var n,i="";for(n=0;n<t;n+=1)i+=e;return i},t.exports.isNegativeZero=function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},t.exports.extend=function(e,t){var n,i,r,o;if(t)for(n=0,i=(o=Object.keys(t)).length;n<i;n+=1)e[r=o[n]]=t[r];return e}},{}],3:[function(e,t,n){"use strict";var c=e("./common"),d=e("./exception"),i=e("./schema/default_full"),r=e("./schema/default_safe"),l=Object.prototype.toString,u=Object.prototype.hasOwnProperty,o=9,h=10,a=32,m=33,g=34,y=35,x=37,v=38,A=39,b=42,w=44,C=45,k=58,j=62,S=63,I=64,E=91,O=93,F=96,_=123,N=124,M=125,s={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},p=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function f(e){var t,n,i;if(t=e.toString(16).toUpperCase(),e<=255)n="x",i=2;else if(e<=65535)n="u",i=4;else{if(!(e<=4294967295))throw new d("code point within a string may not be greater than 0xFFFFFFFF");n="U",i=8}return"\\"+n+c.repeat("0",i-t.length)+t}function T(e){this.schema=e.schema||i,this.indent=Math.max(1,e.indent||2),this.skipInvalid=e.skipInvalid||!1,this.flowLevel=c.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var n,i,r,o,a,s,c;if(null===t)return{};for(n={},r=0,o=(i=Object.keys(t)).length;r<o;r+=1)a=i[r],s=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(c=e.compiledTypeMap.fallback[a])&&u.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[a]=s;return n}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function L(e,t){for(var n,i=c.repeat(" ",t),r=0,o=-1,a="",s=e.length;r<s;)-1===(o=e.indexOf("\n",r))?(n=e.slice(r),r=s):(n=e.slice(r,o+1),r=o+1),n.length&&"\n"!==n&&(a+=i),a+=n;return a}function D(e,t){return"\n"+c.repeat(" ",e.indent*t)}function U(e){return e===a||e===o}function q(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&65279!==e||65536<=e&&e<=1114111}function Y(e){return q(e)&&65279!==e&&e!==w&&e!==E&&e!==O&&e!==_&&e!==M&&e!==k&&e!==y}function R(e){return/^\n* /.test(e)}var B=1,P=2,W=3,K=4,$=5;function H(e,t,n,i,r){var o,a,s,c=!1,u=!1,l=-1!==i,p=-1,f=q(s=e.charCodeAt(0))&&65279!==s&&!U(s)&&s!==C&&s!==S&&s!==k&&s!==w&&s!==E&&s!==O&&s!==_&&s!==M&&s!==y&&s!==v&&s!==b&&s!==m&&s!==N&&s!==j&&s!==A&&s!==g&&s!==x&&s!==I&&s!==F&&!U(e.charCodeAt(e.length-1));if(t)for(o=0;o<e.length;o++){if(!q(a=e.charCodeAt(o)))return $;f=f&&Y(a)}else{for(o=0;o<e.length;o++){if((a=e.charCodeAt(o))===h)c=!0,l&&(u=u||i<o-p-1&&" "!==e[p+1],p=o);else if(!q(a))return $;f=f&&Y(a)}u=u||l&&i<o-p-1&&" "!==e[p+1]}return c||u?9<n&&R(e)?$:u?K:W:f&&!r(e)?B:P}function G(i,r,o,a){i.dump=function(){if(0===r.length)return"''";if(!i.noCompatMode&&-1!==p.indexOf(r))return"'"+r+"'";var e=i.indent*Math.max(1,o),t=-1===i.lineWidth?-1:Math.max(Math.min(i.lineWidth,40),i.lineWidth-e),n=a||-1<i.flowLevel&&o>=i.flowLevel;switch(H(r,n,i.indent,t,function(e){return function(e,t){var n,i;for(n=0,i=e.implicitTypes.length;n<i;n+=1)if(e.implicitTypes[n].resolve(t))return!0;return!1}(i,e)})){case B:return r;case P:return"'"+r.replace(/'/g,"''")+"'";case W:return"|"+V(r,i.indent)+Z(L(r,e));case K:return">"+V(r,i.indent)+Z(L(function(e,t){var n,i,r=/(\n+)([^\n]*)/g,o=(s=e.indexOf("\n"),s=-1!==s?s:e.length,r.lastIndex=s,z(e.slice(0,s),t)),a="\n"===e[0]||" "===e[0];var s;for(;i=r.exec(e);){var c=i[1],u=i[2];n=" "===u[0],o+=c+(a||n||""===u?"":"\n")+z(u,t),a=n}return o}(r,t),e));case $:return'"'+function(e){for(var t,n,i,r="",o=0;o<e.length;o++)55296<=(t=e.charCodeAt(o))&&t<=56319&&56320<=(n=e.charCodeAt(o+1))&&n<=57343?(r+=f(1024*(t-55296)+n-56320+65536),o++):(i=s[t],r+=!i&&q(t)?e[o]:i||f(t));return r}(r)+'"';default:throw new d("impossible error: invalid scalar style")}}()}function V(e,t){var n=R(e)?String(t):"",i="\n"===e[e.length-1];return n+(i&&("\n"===e[e.length-2]||"\n"===e)?"+":i?"":"-")+"\n"}function Z(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function z(e,t){if(""===e||" "===e[0])return e;for(var n,i,r=/ [^ ]/g,o=0,a=0,s=0,c="";n=r.exec(e);)t<(s=n.index)-o&&(i=o<a?a:s,c+="\n"+e.slice(o,i),o=i+1),a=s;return c+="\n",e.length-o>t&&o<a?c+=e.slice(o,a)+"\n"+e.slice(a+1):c+=e.slice(o),c.slice(1)}function J(e,t,n){var i,r,o,a,s,c;for(o=0,a=(r=n?e.explicitTypes:e.implicitTypes).length;o<a;o+=1)if(((s=r[o]).instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof t&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(e.tag=n?s.tag:"?",s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,"[object Function]"===l.call(s.represent))i=s.represent(t,c);else{if(!u.call(s.represent,c))throw new d("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');i=s.represent[c](t,c)}e.dump=i}return!0}return!1}function Q(e,t,n,i,r,o){e.tag=null,e.dump=n,J(e,n,!1)||J(e,n,!0);var a=l.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var s,c,u="[object Object]"===a||"[object Array]"===a;if(u&&(c=-1!==(s=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||c||2!==e.indent&&0<t)&&(r=!1),c&&e.usedDuplicates[s])e.dump="*ref_"+s;else{if(u&&c&&!e.usedDuplicates[s]&&(e.usedDuplicates[s]=!0),"[object Object]"===a)i&&0!==Object.keys(e.dump).length?(!function(e,t,n,i){var r,o,a,s,c,u,l="",p=e.tag,f=Object.keys(n);if(!0===e.sortKeys)f.sort();else if("function"==typeof e.sortKeys)f.sort(e.sortKeys);else if(e.sortKeys)throw new d("sortKeys must be a boolean or a function");for(r=0,o=f.length;r<o;r+=1)u="",i&&0===r||(u+=D(e,t)),s=n[a=f[r]],Q(e,t+1,a,!0,!0,!0)&&((c=null!==e.tag&&"?"!==e.tag||e.dump&&1024<e.dump.length)&&(e.dump&&h===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,c&&(u+=D(e,t)),Q(e,t+1,s,!0,c)&&(e.dump&&h===e.dump.charCodeAt(0)?u+=":":u+=": ",l+=u+=e.dump));e.tag=p,e.dump=l||"{}"}(e,t,e.dump,r),c&&(e.dump="&ref_"+s+e.dump)):(!function(e,t,n){var i,r,o,a,s,c="",u=e.tag,l=Object.keys(n);for(i=0,r=l.length;i<r;i+=1)s=e.condenseFlow?'"':"",0!==i&&(s+=", "),a=n[o=l[i]],Q(e,t,o,!1,!1)&&(1024<e.dump.length&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Q(e,t,a,!1,!1)&&(c+=s+=e.dump));e.tag=u,e.dump="{"+c+"}"}(e,t,e.dump),c&&(e.dump="&ref_"+s+" "+e.dump));else if("[object Array]"===a)i&&0!==e.dump.length?(!function(e,t,n,i){var r,o,a="",s=e.tag;for(r=0,o=n.length;r<o;r+=1)Q(e,t+1,n[r],!0,!0)&&(i&&0===r||(a+=D(e,t)),e.dump&&h===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}(e,t,e.dump,r),c&&(e.dump="&ref_"+s+e.dump)):(!function(e,t,n){var i,r,o="",a=e.tag;for(i=0,r=n.length;i<r;i+=1)Q(e,t,n[i],!1,!1)&&(0!==i&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=a,e.dump="["+o+"]"}(e,t,e.dump),c&&(e.dump="&ref_"+s+" "+e.dump));else{if("[object String]"!==a){if(e.skipInvalid)return!1;throw new d("unacceptable kind of an object to dump "+a)}"?"!==e.tag&&G(e,e.dump,t,o)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function X(e,t){var n,i,r=[],o=[];for(function e(t,n,i){var r,o,a;if(null!==t&&"object"==typeof t)if(-1!==(o=n.indexOf(t)))-1===i.indexOf(o)&&i.push(o);else if(n.push(t),Array.isArray(t))for(o=0,a=t.length;o<a;o+=1)e(t[o],n,i);else for(r=Object.keys(t),o=0,a=r.length;o<a;o+=1)e(t[r[o]],n,i)}(e,r,o),n=0,i=o.length;n<i;n+=1)t.duplicates.push(r[o[n]]);t.usedDuplicates=new Array(i)}function ee(e,t){var n=new T(t=t||{});return n.noRefs||X(e,n),Q(n,0,e,!0,!0)?n.dump+"\n":""}t.exports.dump=ee,t.exports.safeDump=function(e,t){return ee(e,c.extend({schema:r},t))}},{"./common":2,"./exception":4,"./schema/default_full":9,"./schema/default_safe":10}],4:[function(e,t,n){"use strict";function i(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}((i.prototype=Object.create(Error.prototype)).constructor=i).prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},t.exports=i},{}],5:[function(e,t,n){"use strict";var g=e("./common"),i=e("./exception"),r=e("./mark"),o=e("./schema/default_safe"),a=e("./schema/default_full"),y=Object.prototype.hasOwnProperty,x=1,v=2,A=3,b=4,w=1,C=2,k=3,c=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,s=/[\x85\u2028\u2029]/,u=/[,\[\]\{\}]/,l=/^(?:!|!!|![a-z\-]+!)$/i,p=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function j(e){return 10===e||13===e}function S(e){return 9===e||32===e}function I(e){return 9===e||32===e||10===e||13===e}function E(e){return 44===e||91===e||93===e||123===e||125===e}function f(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e?"\t":9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?" ":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}for(var O=new Array(256),F=new Array(256),d=0;d<256;d++)O[d]=f(d)?1:0,F[d]=f(d);function h(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||a,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function m(e,t){return new i(t,new r(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function _(e,t){throw m(e,t)}function N(e,t){e.onWarning&&e.onWarning.call(null,m(e,t))}var M={YAML:function(e,t,n){var i,r,o;null!==e.version&&_(e,"duplication of %YAML directive"),1!==n.length&&_(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&_(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&_(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&N(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r;2!==n.length&&_(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],l.test(i)||_(e,"ill-formed tag handle (first argument) of the TAG directive"),y.call(e.tagMap,i)&&_(e,'there is a previously declared suffix for "'+i+'" tag handle'),p.test(r)||_(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[i]=r}};function T(e,t,n,i){var r,o,a,s;if(t<n){if(s=e.input.slice(t,n),i)for(r=0,o=s.length;r<o;r+=1)9===(a=s.charCodeAt(r))||32<=a&&a<=1114111||_(e,"expected valid JSON character");else c.test(s)&&_(e,"the stream contains non-printable characters");e.result+=s}}function L(e,t,n,i){var r,o,a,s;for(g.isObject(n)||_(e,"cannot merge mappings; the provided source object is unacceptable"),a=0,s=(r=Object.keys(n)).length;a<s;a+=1)o=r[a],y.call(t,o)||(t[o]=n[o],i[o]=!0)}function D(e,t,n,i,r,o,a,s){var c,u;if(r=String(r),null===t&&(t={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(o))for(c=0,u=o.length;c<u;c+=1)L(e,t,o[c],n);else L(e,t,o,n);else e.json||y.call(n,r)||!y.call(t,r)||(e.line=a||e.line,e.position=s||e.position,_(e,"duplicated mapping key")),t[r]=o,delete n[r];return t}function U(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):_(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function q(e,t,n){for(var i=0,r=e.input.charCodeAt(e.position);0!==r;){for(;S(r);)r=e.input.charCodeAt(++e.position);if(t&&35===r)for(;10!==(r=e.input.charCodeAt(++e.position))&&13!==r&&0!==r;);if(!j(r))break;for(U(e),r=e.input.charCodeAt(e.position),i++,e.lineIndent=0;32===r;)e.lineIndent++,r=e.input.charCodeAt(++e.position)}return-1!==n&&0!==i&&e.lineIndent<n&&N(e,"deficient indentation"),i}function Y(e){var t,n=e.position;return!(45!==(t=e.input.charCodeAt(n))&&46!==t||t!==e.input.charCodeAt(n+1)||t!==e.input.charCodeAt(n+2)||(n+=3,0!==(t=e.input.charCodeAt(n))&&!I(t)))}function R(e,t){1===t?e.result+=" ":1<t&&(e.result+=g.repeat("\n",t-1))}function B(e,t){var n,i,r=e.tag,o=e.anchor,a=[],s=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),i=e.input.charCodeAt(e.position);0!==i&&45===i&&I(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,q(e,!0,-1)&&e.lineIndent<=t)a.push(null),i=e.input.charCodeAt(e.position);else if(n=e.line,K(e,t,A,!1,!0),a.push(e.result),q(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)_(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!s&&(e.tag=r,e.anchor=o,e.kind="sequence",e.result=a,!0)}function P(e){var t,n,i,r,o=!1,a=!1;if(33!==(r=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&_(e,"duplication of a tag property"),60===(r=e.input.charCodeAt(++e.position))?(o=!0,r=e.input.charCodeAt(++e.position)):33===r?(a=!0,n="!!",r=e.input.charCodeAt(++e.position)):n="!",t=e.position,o){for(;0!==(r=e.input.charCodeAt(++e.position))&&62!==r;);e.position<e.length?(i=e.input.slice(t,e.position),r=e.input.charCodeAt(++e.position)):_(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==r&&!I(r);)33===r&&(a?_(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),l.test(n)||_(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),r=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),u.test(i)&&_(e,"tag suffix cannot contain flow indicator characters")}return i&&!p.test(i)&&_(e,"tag name cannot contain such characters: "+i),o?e.tag=i:y.call(e.tagMap,n)?e.tag=e.tagMap[n]+i:"!"===n?e.tag="!"+i:"!!"===n?e.tag="tag:yaml.org,2002:"+i:_(e,'undeclared tag handle "'+n+'"'),!0}function W(e){var t,n;if(38!==(n=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&_(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!I(n)&&!E(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&_(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function K(e,t,n,i,r){var o,a,s,c,u,l,p,f,d=1,h=!1,m=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=a=s=b===n||A===n,i&&q(e,!0,-1)&&(h=!0,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)),1===d)for(;P(e)||W(e);)q(e,!0,-1)?(h=!0,s=o,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)):s=!1;if(s&&(s=h||r),1!==d&&b!==n||(p=x===n||v===n?t:t+1,f=e.position-e.lineStart,1===d?s&&(B(e,f)||function(e,t,n){var i,r,o,a,s,c=e.tag,u=e.anchor,l={},p={},f=null,d=null,h=null,m=!1,g=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=l),s=e.input.charCodeAt(e.position);0!==s;){if(i=e.input.charCodeAt(e.position+1),o=e.line,a=e.position,63!==s&&58!==s||!I(i)){if(!K(e,n,v,!1,!0))break;if(e.line===o){for(s=e.input.charCodeAt(e.position);S(s);)s=e.input.charCodeAt(++e.position);if(58===s)I(s=e.input.charCodeAt(++e.position))||_(e,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(D(e,l,p,f,d,null),f=d=h=null),r=m=!(g=!0),f=e.tag,d=e.result;else{if(!g)return e.tag=c,e.anchor=u,!0;_(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!g)return e.tag=c,e.anchor=u,!0;_(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===s?(m&&(D(e,l,p,f,d,null),f=d=h=null),r=m=g=!0):m?r=!(m=!1):_(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,s=i;if((e.line===o||e.lineIndent>t)&&(K(e,t,b,!0,r)&&(m?d=e.result:h=e.result),m||(D(e,l,p,f,d,h,o,a),f=d=h=null),q(e,!0,-1),s=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==s)_(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return m&&D(e,l,p,f,d,null),g&&(e.tag=c,e.anchor=u,e.kind="mapping",e.result=l),g}(e,f,p))||function(e,t){var n,i,r,o,a,s,c,u,l,p,f=!0,d=e.tag,h=e.anchor,m={};if(91===(p=e.input.charCodeAt(e.position)))s=!(r=93),i=[];else{if(123!==p)return!1;r=125,s=!0,i={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),p=e.input.charCodeAt(++e.position);0!==p;){if(q(e,!0,t),(p=e.input.charCodeAt(e.position))===r)return e.position++,e.tag=d,e.anchor=h,e.kind=s?"mapping":"sequence",e.result=i,!0;f||_(e,"missed comma between flow collection entries"),l=null,o=a=!1,63===p&&I(e.input.charCodeAt(e.position+1))&&(o=a=!0,e.position++,q(e,!0,t)),n=e.line,K(e,t,x,!1,!0),u=e.tag,c=e.result,q(e,!0,t),p=e.input.charCodeAt(e.position),!a&&e.line!==n||58!==p||(o=!0,p=e.input.charCodeAt(++e.position),q(e,!0,t),K(e,t,x,!1,!0),l=e.result),s?D(e,i,m,u,c,l):o?i.push(D(e,null,m,u,c,l)):i.push(c),q(e,!0,t),44===(p=e.input.charCodeAt(e.position))?(f=!0,p=e.input.charCodeAt(++e.position)):f=!1}_(e,"unexpected end of the stream within a flow collection")}(e,p)?m=!0:(a&&function(e,t){var n,i,r,o,a,s=w,c=!1,u=!1,l=t,p=0,f=!1;if(124===(o=e.input.charCodeAt(e.position)))i=!1;else{if(62!==o)return!1;i=!0}for(e.kind="scalar",e.result="";0!==o;)if(43===(o=e.input.charCodeAt(++e.position))||45===o)w===s?s=43===o?k:C:_(e,"repeat of a chomping mode identifier");else{if(!(0<=(r=48<=(a=o)&&a<=57?a-48:-1)))break;0===r?_(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?_(e,"repeat of an indentation width identifier"):(l=t+r-1,u=!0)}if(S(o)){for(;S(o=e.input.charCodeAt(++e.position)););if(35===o)for(;!j(o=e.input.charCodeAt(++e.position))&&0!==o;);}for(;0!==o;){for(U(e),e.lineIndent=0,o=e.input.charCodeAt(e.position);(!u||e.lineIndent<l)&&32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position);if(!u&&e.lineIndent>l&&(l=e.lineIndent),j(o))p++;else{if(e.lineIndent<l){s===k?e.result+=g.repeat("\n",c?1+p:p):s===w&&c&&(e.result+="\n");break}for(i?S(o)?(f=!0,e.result+=g.repeat("\n",c?1+p:p)):f?(f=!1,e.result+=g.repeat("\n",p+1)):0===p?c&&(e.result+=" "):e.result+=g.repeat("\n",p):e.result+=g.repeat("\n",c?1+p:p),u=c=!0,p=0,n=e.position;!j(o)&&0!==o;)o=e.input.charCodeAt(++e.position);T(e,n,e.position,!1)}}return!0}(e,p)||function(e,t){var n,i,r;if(39!==(n=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,i=r=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(T(e,i,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0;i=e.position,e.position++,r=e.position}else j(n)?(T(e,i,r,!0),R(e,q(e,!1,t)),i=r=e.position):e.position===e.lineStart&&Y(e)?_(e,"unexpected end of the document within a single quoted scalar"):(e.position++,r=e.position);_(e,"unexpected end of the stream within a single quoted scalar")}(e,p)||function(e,t){var n,i,r,o,a,s,c,u,l,p;if(34!==(s=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(s=e.input.charCodeAt(e.position));){if(34===s)return T(e,n,e.position,!0),e.position++,!0;if(92===s){if(T(e,n,e.position,!0),j(s=e.input.charCodeAt(++e.position)))q(e,!1,t);else if(s<256&&O[s])e.result+=F[s],e.position++;else if(0<(a=120===(p=s)?2:117===p?4:85===p?8:0)){for(r=a,o=0;0<r;r--)s=e.input.charCodeAt(++e.position),l=void 0,0<=(a=48<=(u=s)&&u<=57?u-48:97<=(l=32|u)&&l<=102?l-97+10:-1)?o=(o<<4)+a:_(e,"expected hexadecimal character");e.result+=(c=o)<=65535?String.fromCharCode(c):String.fromCharCode(55296+(c-65536>>10),56320+(c-65536&1023)),e.position++}else _(e,"unknown escape sequence");n=i=e.position}else j(s)?(T(e,n,i,!0),R(e,q(e,!1,t)),n=i=e.position):e.position===e.lineStart&&Y(e)?_(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}_(e,"unexpected end of the stream within a double quoted scalar")}(e,p)?m=!0:!function(e){var t,n,i;if(42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!I(i)&&!E(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&_(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||_(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],q(e,!0,-1),!0}(e)?function(e,t,n){var i,r,o,a,s,c,u,l,p=e.kind,f=e.result;if(I(l=e.input.charCodeAt(e.position))||E(l)||35===l||38===l||42===l||33===l||124===l||62===l||39===l||34===l||37===l||64===l||96===l)return!1;if((63===l||45===l)&&(I(i=e.input.charCodeAt(e.position+1))||n&&E(i)))return!1;for(e.kind="scalar",e.result="",r=o=e.position,a=!1;0!==l;){if(58===l){if(I(i=e.input.charCodeAt(e.position+1))||n&&E(i))break}else if(35===l){if(I(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&Y(e)||n&&E(l))break;if(j(l)){if(s=e.line,c=e.lineStart,u=e.lineIndent,q(e,!1,-1),e.lineIndent>=t){a=!0,l=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=c,e.lineIndent=u;break}}a&&(T(e,r,o,!1),R(e,e.line-s),r=o=e.position,a=!1),S(l)||(o=e.position+1),l=e.input.charCodeAt(++e.position)}return T(e,r,o,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,p,x===n)&&(m=!0,null===e.tag&&(e.tag="?")):(m=!0,null===e.tag&&null===e.anchor||_(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===d&&(m=s&&B(e,f))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(c=0,u=e.implicitTypes.length;c<u;c+=1)if((l=e.implicitTypes[c]).resolve(e.result)){e.result=l.construct(e.result),e.tag=l.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else y.call(e.typeMap[e.kind||"fallback"],e.tag)?(l=e.typeMap[e.kind||"fallback"][e.tag],null!==e.result&&l.kind!==e.kind&&_(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):_(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):_(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||m}function $(e){var t,n,i,r,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(r=e.input.charCodeAt(e.position))&&(q(e,!0,-1),r=e.input.charCodeAt(e.position),!(0<e.lineIndent||37!==r));){for(a=!0,r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!I(r);)r=e.input.charCodeAt(++e.position);for(i=[],(n=e.input.slice(t,e.position)).length<1&&_(e,"directive name must not be less than one character in length");0!==r;){for(;S(r);)r=e.input.charCodeAt(++e.position);if(35===r){for(;0!==(r=e.input.charCodeAt(++e.position))&&!j(r););break}if(j(r))break;for(t=e.position;0!==r&&!I(r);)r=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==r&&U(e),y.call(M,n)?M[n](e,n,i):N(e,'unknown document directive "'+n+'"')}q(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,q(e,!0,-1)):a&&_(e,"directives end mark is expected"),K(e,e.lineIndent-1,b,!1,!0),q(e,!0,-1),e.checkLineBreaks&&s.test(e.input.slice(o,e.position))&&N(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Y(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,q(e,!0,-1)):e.position<e.length-1&&_(e,"end of the stream or a document separator is expected")}function H(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new h(e,t);for(n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)$(n);return n.documents}function G(e,t,n){var i,r,o=H(e,n);if("function"!=typeof t)return o;for(i=0,r=o.length;i<r;i+=1)t(o[i])}function V(e,t){var n=H(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new i("expected a single document in the stream, but found more")}}t.exports.loadAll=G,t.exports.load=V,t.exports.safeLoadAll=function(e,t,n){if("function"!=typeof t)return G(e,g.extend({schema:o},n));G(e,t,g.extend({schema:o},n))},t.exports.safeLoad=function(e,t){return V(e,g.extend({schema:o},t))}},{"./common":2,"./exception":4,"./mark":6,"./schema/default_full":9,"./schema/default_safe":10}],6:[function(e,t,n){"use strict";var s=e("./common");function i(e,t,n,i,r){this.name=e,this.buffer=t,this.position=n,this.line=i,this.column=r}i.prototype.getSnippet=function(e,t){var n,i,r,o,a;if(!this.buffer)return null;for(e=e||4,t=t||75,n="",i=this.position;0<i&&-1==="\0\r\n \u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>t/2-1){n=" ... ",i+=5;break}for(r="",o=this.position;o<this.buffer.length&&-1==="\0\r\n \u2028\u2029".indexOf(this.buffer.charAt(o));)if((o+=1)-this.position>t/2-1){r=" ... ",o-=5;break}return a=this.buffer.slice(i,o),s.repeat(" ",e)+n+a+r+"\n"+s.repeat(" ",e+this.position-i+n.length)+"^"},i.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},t.exports=i},{"./common":2}],7:[function(e,t,n){"use strict";var i=e("./common"),r=e("./exception"),o=e("./type");function a(e,t,i){var r=[];return e.include.forEach(function(e){i=a(e,t,i)}),e[t].forEach(function(n){i.forEach(function(e,t){e.tag===n.tag&&e.kind===n.kind&&r.push(t)}),i.push(n)}),i.filter(function(e,t){return-1===r.indexOf(t)})}function s(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=a(this,"implicit",[]),this.compiledExplicit=a(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{}};function i(e){n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(i);return n}(this.compiledImplicit,this.compiledExplicit)}s.DEFAULT=null,s.create=function(){var e,t;switch(arguments.length){case 1:e=s.DEFAULT,t=arguments[0];break;case 2:e=arguments[0],t=arguments[1];break;default:throw new r("Wrong number of arguments for Schema.create function")}if(e=i.toArray(e),t=i.toArray(t),!e.every(function(e){return e instanceof s}))throw new r("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!t.every(function(e){return e instanceof o}))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new s({include:e,explicit:t})},t.exports=s},{"./common":2,"./exception":4,"./type":13}],8:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({include:[e("./json")]})},{"../schema":7,"./json":12}],9:[function(e,t,n){"use strict";var i=e("../schema");t.exports=i.DEFAULT=new i({include:[e("./default_safe")],explicit:[e("../type/js/undefined"),e("../type/js/regexp"),e("../type/js/function")]})},{"../schema":7,"../type/js/function":18,"../type/js/regexp":19,"../type/js/undefined":20,"./default_safe":10}],10:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({include:[e("./core")],implicit:[e("../type/timestamp"),e("../type/merge")],explicit:[e("../type/binary"),e("../type/omap"),e("../type/pairs"),e("../type/set")]})},{"../schema":7,"../type/binary":14,"../type/merge":22,"../type/omap":24,"../type/pairs":25,"../type/set":27,"../type/timestamp":29,"./core":8}],11:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({explicit:[e("../type/str"),e("../type/seq"),e("../type/map")]})},{"../schema":7,"../type/map":21,"../type/seq":26,"../type/str":28}],12:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({include:[e("./failsafe")],implicit:[e("../type/null"),e("../type/bool"),e("../type/int"),e("../type/float")]})},{"../schema":7,"../type/bool":15,"../type/float":16,"../type/int":17,"../type/null":23,"./failsafe":11}],13:[function(e,t,n){"use strict";var r=e("./exception"),o=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],a=["scalar","sequence","mapping"];t.exports=function(t,e){var n,i;if(e=e||{},Object.keys(e).forEach(function(e){if(-1===o.indexOf(e))throw new r('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(e){return e},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=(n=e.styleAliases||null,i={},null!==n&&Object.keys(n).forEach(function(t){n[t].forEach(function(e){i[String(e)]=t})}),i),-1===a.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}},{"./exception":4}],14:[function(e,t,n){"use strict";var c;try{c=e("buffer").Buffer}catch(e){}var i=e("../type"),u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new i("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=0,r=e.length,o=u;for(n=0;n<r;n++)if(!(64<(t=o.indexOf(e.charAt(n))))){if(t<0)return!1;i+=6}return i%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),r=i.length,o=u,a=0,s=[];for(t=0;t<r;t++)t%4==0&&t&&(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|o.indexOf(i.charAt(t));return 0==(n=r%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===n?(s.push(a>>10&255),s.push(a>>2&255)):12===n&&s.push(a>>4&255),c?c.from?c.from(s):new c(s):s},predicate:function(e){return c&&c.isBuffer(e)},represent:function(e){var t,n,i="",r=0,o=e.length,a=u;for(t=0;t<o;t++)t%3==0&&t&&(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+e[t];return 0==(n=o%3)?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}})},{"../type":13}],15:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":13}],16:[function(e,t,n){"use strict";var i=e("../common"),r=e("../type"),o=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var a=/^[-+]?[0-9]+e/;t.exports=new r("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!o.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n,i,r;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,r=[],0<="+-".indexOf(t[0])&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:0<=t.indexOf(":")?(t.split(":").forEach(function(e){r.unshift(parseFloat(e,10))}),t=0,i=1,r.forEach(function(e){t+=e*i,i*=60}),n*t):n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||i.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(i.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},{"../common":2,"../type":13}],17:[function(e,t,n){"use strict";var i=e("../common"),r=e("../type");t.exports=new r("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i,r,o=e.length,a=0,s=!1;if(!o)return!1;if("-"!==(t=e[a])&&"+"!==t||(t=e[++a]),"0"===t){if(a+1===o)return!0;if("b"===(t=e[++a])){for(a++;a<o;a++)if("_"!==(t=e[a])){if("0"!==t&&"1"!==t)return!1;s=!0}return s&&"_"!==t}if("x"===t){for(a++;a<o;a++)if("_"!==(t=e[a])){if(!(48<=(i=e.charCodeAt(a))&&i<=57||65<=i&&i<=70||97<=i&&i<=102))return!1;s=!0}return s&&"_"!==t}for(;a<o;a++)if("_"!==(t=e[a])){if(!(48<=(n=e.charCodeAt(a))&&n<=55))return!1;s=!0}return s&&"_"!==t}if("_"===t)return!1;for(;a<o;a++)if("_"!==(t=e[a])){if(":"===t)break;if(!(48<=(r=e.charCodeAt(a))&&r<=57))return!1;s=!0}return!(!s||"_"===t)&&(":"!==t||/^(:[0-5]?[0-9])+$/.test(e.slice(a)))},construct:function(e){var t,n,i=e,r=1,o=[];return-1!==i.indexOf("_")&&(i=i.replace(/_/g,"")),"-"!==(t=i[0])&&"+"!==t||("-"===t&&(r=-1),t=(i=i.slice(1))[0]),"0"===i?0:"0"===t?"b"===i[1]?r*parseInt(i.slice(2),2):"x"===i[1]?r*parseInt(i,16):r*parseInt(i,8):-1!==i.indexOf(":")?(i.split(":").forEach(function(e){o.unshift(parseInt(e,10))}),i=0,n=1,o.forEach(function(e){i+=e*n,n*=60}),r*i):r*parseInt(i,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!i.isNegativeZero(e)},represent:{binary:function(e){return 0<=e?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return 0<=e?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return 0<=e?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":2,"../type":13}],18:[function(e,t,n){"use strict";var o;try{o=e("esprima")}catch(e){"undefined"!=typeof window&&(o=window.esprima)}var i=e("../../type");t.exports=new i("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",n=o.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&("ArrowFunctionExpression"===n.body[0].expression.type||"FunctionExpression"===n.body[0].expression.type)}catch(e){return!1}},construct:function(e){var t,n="("+e+")",i=o.parse(n,{range:!0}),r=[];if("Program"!==i.type||1!==i.body.length||"ExpressionStatement"!==i.body[0].type||"ArrowFunctionExpression"!==i.body[0].expression.type&&"FunctionExpression"!==i.body[0].expression.type)throw new Error("Failed to resolve function");return i.body[0].expression.params.forEach(function(e){r.push(e.name)}),t=i.body[0].expression.body.range,"BlockStatement"===i.body[0].expression.body.type?new Function(r,n.slice(t[0]+1,t[1]-1)):new Function(r,"return "+n.slice(t[0],t[1]))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}})},{"../../type":13}],19:[function(e,t,n){"use strict";var i=e("../../type");t.exports=new i("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,n=/\/([gim]*)$/.exec(e),i="";if("/"===t[0]){if(n&&(i=n[1]),3<i.length)return!1;if("/"!==t[t.length-i.length-1])return!1}return!0},construct:function(e){var t=e,n=/\/([gim]*)$/.exec(e),i="";return"/"===t[0]&&(n&&(i=n[1]),t=t.slice(1,t.length-i.length-1)),new RegExp(t,i)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},{"../../type":13}],20:[function(e,t,n){"use strict";var i=e("../../type");t.exports=new i("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(e){return void 0===e},represent:function(){return""}})},{"../../type":13}],21:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},{"../type":13}],22:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},{"../type":13}],23:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":13}],24:[function(e,t,n){"use strict";var i=e("../type"),c=Object.prototype.hasOwnProperty,u=Object.prototype.toString;t.exports=new i("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,r,o,a=[],s=e;for(t=0,n=s.length;t<n;t+=1){if(i=s[t],o=!1,"[object Object]"!==u.call(i))return!1;for(r in i)if(c.call(i,r)){if(o)return!1;o=!0}if(!o)return!1;if(-1!==a.indexOf(r))return!1;a.push(r)}return!0},construct:function(e){return null!==e?e:[]}})},{"../type":13}],25:[function(e,t,n){"use strict";var i=e("../type"),s=Object.prototype.toString;t.exports=new i("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,r,o,a=e;for(o=new Array(a.length),t=0,n=a.length;t<n;t+=1){if(i=a[t],"[object Object]"!==s.call(i))return!1;if(1!==(r=Object.keys(i)).length)return!1;o[t]=[r[0],i[r[0]]]}return!0},construct:function(e){if(null===e)return[];var t,n,i,r,o,a=e;for(o=new Array(a.length),t=0,n=a.length;t<n;t+=1)i=a[t],r=Object.keys(i),o[t]=[r[0],i[r[0]]];return o}})},{"../type":13}],26:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},{"../type":13}],27:[function(e,t,n){"use strict";var i=e("../type"),r=Object.prototype.hasOwnProperty;t.exports=new i("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,n=e;for(t in n)if(r.call(n,t)&&null!==n[t])return!1;return!0},construct:function(e){return null!==e?e:{}}})},{"../type":13}],28:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},{"../type":13}],29:[function(e,t,n){"use strict";var i=e("../type"),p=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),f=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");t.exports=new i("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==p.exec(e)||null!==f.exec(e))},construct:function(e){var t,n,i,r,o,a,s,c,u=0,l=null;if(null===(t=p.exec(e))&&(t=f.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],i=+t[2]-1,r=+t[3],!t[4])return new Date(Date.UTC(n,i,r));if(o=+t[4],a=+t[5],s=+t[6],t[7]){for(u=t[7].slice(0,3);u.length<3;)u+="0";u=+u}return t[9]&&(l=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(l=-l)),c=new Date(Date.UTC(n,i,r,o,a,s,u)),l&&c.setTime(c.getTime()-l),c},instanceOf:Date,represent:function(e){return e.toISOString()}})},{"../type":13}],"/":[function(e,t,n){"use strict";var i=e("./lib/js-yaml.js");t.exports=i},{"./lib/js-yaml.js":1}]},{},[])("/")}); | |||