json-server 0.14.2 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.js CHANGED
@@ -1,5 +1,5 @@
1
1
  module.exports = {
2
- extends: ['standard', 'standard-preact', 'prettier'],
2
+ extends: ['standard', 'prettier'],
3
3
  plugins: ['prettier'],
4
4
  rules: {
5
5
  'prettier/prettier': [
package/.travis.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  language: node_js
2
2
  node_js:
3
3
  - "node"
4
- - "6"
4
+ - "8"
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.15.0 - 2019-05-21
4
+
5
+ * __Breaking__ Require Node 8
6
+ * Upgrade dependencies
7
+ * Reduce package size
8
+
3
9
  ## 0.14.2 - 2018-12-26
4
10
 
5
11
  * Fix `db.getState is not a function`
package/README.md CHANGED
@@ -5,26 +5,55 @@ Get a full fake REST API with __zero coding__ in __less than 30 seconds__ (serio
5
5
  Created with <3 for front-end developers who need a quick back-end for prototyping and mocking.
6
6
 
7
7
  * [Egghead.io free video tutorial - Creating demo APIs with json-server](https://egghead.io/lessons/nodejs-creating-demo-apis-with-json-server)
8
- * [JSONPlaceholder - Live running version](http://jsonplaceholder.typicode.com)
8
+ * [JSONPlaceholder - Live running version](https://jsonplaceholder.typicode.com)
9
+ * [__My JSON Server__ - no installation required, use your own data](https://my-json-server.typicode.com)
9
10
 
10
11
  See also:
11
12
  * :dog: [husky - Git hooks made easy](https://github.com/typicode/husky)
12
13
  * :hotel: [hotel - developer tool with local .localhost domain and https out of the box](https://github.com/typicode/hotel)
13
- * ⚛️ 🔧 [react-lodash - lodash as React components](https://github.com/typicode/react-lodash)
14
14
 
15
15
  <a href="https://www.patreon.com/typicode">
16
16
  <img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160">
17
17
  </a>
18
18
 
19
- ## Sponsors
19
+ <h2 align="center">Sponsors</h2>
20
20
 
21
- __[[Become a sponsor and have your company logo here]](https://patreon.com/typicode)__
21
+ <h3 align="center">Gold</h3>
22
+
23
+ <p align="center">
24
+ <a href="https://tryretool.com/?utm_source=sponsor&utm_campaign=typicode" target="_blank">
25
+ <img src="https://i.imgur.com/IBItATn.png" height="60px">
26
+ </a>
27
+ </p>
28
+
29
+ <p align="center">
30
+ <a href="https://www.kickstarter.com/projects/leotrieu/build-your-on-demand-startup-for-jobs-and-freelanc?utm_source=typicode&utm_medium=github" target="_blank">
31
+ <img src="https://i.imgur.com/tBU7RZj.png" height="60px">
32
+ </a>
33
+ </p>
34
+
35
+ ---
36
+
37
+ <h3 align="center">Bronze</h3>
38
+
39
+ <p align="center">
40
+ <a href="https://www.zinggrid.com/hello/json-server?utm_source=jsonserver&utm_medium=github&utm_campaign=sponsorship" target="_blank">
41
+ <img src="https://i.imgur.com/3mJGTAQ.png" height="30px">
42
+ </a>
43
+ </p>
44
+
45
+ ---
46
+
47
+ <p>&nbsp;</p>
48
+
49
+ <p align="center">
50
+ <a href="https://patreon.com/typicode">Become a sponsor and have your company logo here</a>
51
+ </p>
22
52
 
23
53
  ## Table of contents
24
54
 
25
55
  <!-- toc -->
26
56
 
27
- - [Sponsorship](#sponsorship)
28
57
  - [Getting started](#getting-started)
29
58
  - [Routes](#routes)
30
59
  * [Plural routes](#plural-routes)
@@ -574,7 +603,7 @@ You can deploy JSON Server. For example, [JSONPlaceholder](http://jsonplaceholde
574
603
  * [Node Module Of The Week - json-server](http://nmotw.in/json-server/)
575
604
  * [Mock up your REST API with JSON Server](http://www.betterpixels.co.uk/projects/2015/05/09/mock-up-your-rest-api-with-json-server/)
576
605
  * [ng-admin: Add an AngularJS admin GUI to any RESTful API](http://marmelab.com/blog/2014/09/15/easy-backend-for-your-restful-api.html)
577
- * [Fast prototyping using Restangular and Json-server](http://glebbahmutov.com/blog/fast-prototyping-using-restangular-and-json-server/)
606
+ * [Fast prototyping using Restangular and Json-server](https://glebbahmutov.com/blog/fast-prototyping-restangular-and-json-server/)
578
607
  * [Create a Mock REST API in Seconds for Prototyping your Frontend](https://coligo.io/create-mock-rest-api-with-json-server/)
579
608
  * [No API? No Problem! Rapid Development via Mock APIs](https://medium.com/@housecor/rapid-development-via-mock-apis-e559087be066#.93d7w8oro)
580
609
  * [Zero Code REST With json-server](https://dzone.com/articles/zero-code-rest-with-json-server)
package/dist/index.html CHANGED
@@ -1,53 +1,82 @@
1
1
  <html>
2
+ <head>
3
+ <link
4
+ rel="stylesheet"
5
+ href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"
6
+ integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay"
7
+ crossorigin="anonymous"
8
+ />
9
+ <title>JSON Server</title>
10
+ <link rel="shortcut icon" href="favicon.ico"><link href="main.css" rel="stylesheet"></head>
2
11
 
3
- <head>
4
- <title>JSON Server</title>
5
- <link rel="shortcut icon" href="favicon.ico"><link href="main.css" rel="stylesheet"></head>
12
+ <body>
13
+ <header>
14
+ <div class="container">
15
+ <nav>
16
+ <ul>
17
+ <li class="title">
18
+ JSON Server
19
+ </li>
20
+ <li>
21
+ <a href="https://www.patreon.com/typicode">
22
+ <i class="fab fa-patreon"></i>Patreon
23
+ </a>
24
+ </li>
25
+ <li>
26
+ <a href="https://my-json-server.typicode.com">
27
+ <i class="fas fa-burn"></i>My JSON Server
28
+ </a>
29
+ </li>
30
+ <li>
31
+ <a href="https://thanks.typicode.com">
32
+ <i class="far fa-laugh"></i>Supporters
33
+ </a>
34
+ </li>
35
+ </ul>
36
+ </nav>
37
+ </div>
38
+ </header>
39
+ <main>
40
+ <div class="container">
41
+ <h1>Congrats!</h1>
42
+ <p>
43
+ You're successfully running JSON Server
44
+ <br />
45
+ ✧*。٩(ˊᗜˋ*)و✧*。
46
+ </p>
6
47
 
7
- <body>
8
- <header>
9
- <div class="container">
10
- <h3>JSON Server</h3>
11
- </div>
12
- </header>
13
- <main>
14
- <div class="container">
15
- <h4>Congrats!</h4>
16
- <p>
17
- You're successfully running JSON Server
18
- <br> ✧*。٩(ˊᗜˋ*)و✧*。
19
- </p>
48
+ <div id="resources"></div>
20
49
 
21
- <div id="resources"></div>
50
+ <p>
51
+ To access and modify resources, you can use any HTTP method:
52
+ </p>
53
+ <p>
54
+ <code>GET</code>
55
+ <code>POST</code>
56
+ <code>PUT</code>
57
+ <code>PATCH</code>
58
+ <code>DELETE</code>
59
+ <code>OPTIONS</code>
60
+ </p>
22
61
 
23
- <p>
24
- To access and modify resources, you can use any HTTP method
25
- <br>
26
- <code>GET</code>
27
- <code>POST</code>
28
- <code>PUT</code>
29
- <code>PATCH</code>
30
- <code>DELETE</code>
31
- <code>OPTIONS</code>
32
- </p>
62
+ <div id="custom-routes"></div>
33
63
 
34
- <div id="custom-routes"></div>
64
+ <h1>Documentation</h1>
65
+ <p>
66
+ <a href="https://github.com/typicode/json-server">
67
+ README
68
+ </a>
69
+ </p>
70
+ </div>
71
+ </main>
35
72
 
36
- <h4>Documentation</h4>
37
- <p>
38
- View
39
- <a href="https://github.com/typicode/json-server">README</a>
40
- </p>
41
- </div>
42
- </main>
43
-
44
- <footer>
45
- <div class="container">
46
- <p>
47
- To replace this page, create a
48
- <code>./public/index.html</code> file.
49
- </p>
50
- </div>
51
- </footer>
52
- <script type="text/javascript" src="main.js"></script></body>
73
+ <footer>
74
+ <div class="container">
75
+ <p>
76
+ To replace this page, create a
77
+ <code>./public/index.html</code> file.
78
+ </p>
79
+ </div>
80
+ </footer>
81
+ <script type="text/javascript" src="main.js"></script></body>
53
82
  </html>
package/dist/main.css CHANGED
@@ -1,625 +1,53 @@
1
- /*!
2
- * Milligram v1.3.0
3
- * https://milligram.github.io
4
- *
5
- * Copyright (c) 2017 CJ Patoilo
6
- * Licensed under the MIT license
7
- */
8
-
9
- *,
10
- *:after,
11
- *:before {
12
- box-sizing: inherit;
13
- }
14
-
15
- html {
16
- box-sizing: border-box;
17
- font-size: 62.5%;
18
- }
19
-
20
1
  body {
21
- color: #606c76;
22
- font-family: 'Roboto', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
23
- font-size: 1.6em;
24
- font-weight: 300;
25
- letter-spacing: .01em;
26
- line-height: 1.6;
27
- }
28
-
29
- blockquote {
30
- border-left: 0.3rem solid #d1d1d1;
31
- margin-left: 0;
32
- margin-right: 0;
33
- padding: 1rem 1.5rem;
34
- }
35
-
36
- blockquote *:last-child {
37
- margin-bottom: 0;
38
- }
39
-
40
- .button,
41
- button,
42
- input[type='button'],
43
- input[type='reset'],
44
- input[type='submit'] {
45
- background-color: #9b4dca;
46
- border: 0.1rem solid #9b4dca;
47
- border-radius: .4rem;
48
- color: #fff;
49
- cursor: pointer;
50
- display: inline-block;
51
- font-size: 1.1rem;
52
- font-weight: 700;
53
- height: 3.8rem;
54
- letter-spacing: .1rem;
55
- line-height: 3.8rem;
56
- padding: 0 3.0rem;
57
- text-align: center;
58
- text-decoration: none;
59
- text-transform: uppercase;
60
- white-space: nowrap;
61
- }
62
-
63
- .button:focus, .button:hover,
64
- button:focus,
65
- button:hover,
66
- input[type='button']:focus,
67
- input[type='button']:hover,
68
- input[type='reset']:focus,
69
- input[type='reset']:hover,
70
- input[type='submit']:focus,
71
- input[type='submit']:hover {
72
- background-color: #606c76;
73
- border-color: #606c76;
74
- color: #fff;
75
- outline: 0;
76
- }
77
-
78
- .button[disabled],
79
- button[disabled],
80
- input[type='button'][disabled],
81
- input[type='reset'][disabled],
82
- input[type='submit'][disabled] {
83
- cursor: default;
84
- opacity: .5;
85
- }
86
-
87
- .button[disabled]:focus, .button[disabled]:hover,
88
- button[disabled]:focus,
89
- button[disabled]:hover,
90
- input[type='button'][disabled]:focus,
91
- input[type='button'][disabled]:hover,
92
- input[type='reset'][disabled]:focus,
93
- input[type='reset'][disabled]:hover,
94
- input[type='submit'][disabled]:focus,
95
- input[type='submit'][disabled]:hover {
96
- background-color: #9b4dca;
97
- border-color: #9b4dca;
98
- }
99
-
100
- .button.button-outline,
101
- button.button-outline,
102
- input[type='button'].button-outline,
103
- input[type='reset'].button-outline,
104
- input[type='submit'].button-outline {
105
- background-color: transparent;
106
- color: #9b4dca;
107
- }
108
-
109
- .button.button-outline:focus, .button.button-outline:hover,
110
- button.button-outline:focus,
111
- button.button-outline:hover,
112
- input[type='button'].button-outline:focus,
113
- input[type='button'].button-outline:hover,
114
- input[type='reset'].button-outline:focus,
115
- input[type='reset'].button-outline:hover,
116
- input[type='submit'].button-outline:focus,
117
- input[type='submit'].button-outline:hover {
118
- background-color: transparent;
119
- border-color: #606c76;
120
- color: #606c76;
121
- }
122
-
123
- .button.button-outline[disabled]:focus, .button.button-outline[disabled]:hover,
124
- button.button-outline[disabled]:focus,
125
- button.button-outline[disabled]:hover,
126
- input[type='button'].button-outline[disabled]:focus,
127
- input[type='button'].button-outline[disabled]:hover,
128
- input[type='reset'].button-outline[disabled]:focus,
129
- input[type='reset'].button-outline[disabled]:hover,
130
- input[type='submit'].button-outline[disabled]:focus,
131
- input[type='submit'].button-outline[disabled]:hover {
132
- border-color: inherit;
133
- color: #9b4dca;
134
- }
135
-
136
- .button.button-clear,
137
- button.button-clear,
138
- input[type='button'].button-clear,
139
- input[type='reset'].button-clear,
140
- input[type='submit'].button-clear {
141
- background-color: transparent;
142
- border-color: transparent;
143
- color: #9b4dca;
144
- }
145
-
146
- .button.button-clear:focus, .button.button-clear:hover,
147
- button.button-clear:focus,
148
- button.button-clear:hover,
149
- input[type='button'].button-clear:focus,
150
- input[type='button'].button-clear:hover,
151
- input[type='reset'].button-clear:focus,
152
- input[type='reset'].button-clear:hover,
153
- input[type='submit'].button-clear:focus,
154
- input[type='submit'].button-clear:hover {
155
- background-color: transparent;
156
- border-color: transparent;
157
- color: #606c76;
158
- }
159
-
160
- .button.button-clear[disabled]:focus, .button.button-clear[disabled]:hover,
161
- button.button-clear[disabled]:focus,
162
- button.button-clear[disabled]:hover,
163
- input[type='button'].button-clear[disabled]:focus,
164
- input[type='button'].button-clear[disabled]:hover,
165
- input[type='reset'].button-clear[disabled]:focus,
166
- input[type='reset'].button-clear[disabled]:hover,
167
- input[type='submit'].button-clear[disabled]:focus,
168
- input[type='submit'].button-clear[disabled]:hover {
169
- color: #9b4dca;
170
- }
171
-
172
- code {
173
- background: #f4f5f6;
174
- border-radius: .4rem;
175
- font-size: 86%;
176
- margin: 0 .2rem;
177
- padding: .2rem .5rem;
178
- white-space: nowrap;
179
- }
180
-
181
- pre {
182
- background: #f4f5f6;
183
- border-left: 0.3rem solid #9b4dca;
184
- overflow-y: hidden;
185
- }
186
-
187
- pre > code {
188
- border-radius: 0;
189
- display: block;
190
- padding: 1rem 1.5rem;
191
- white-space: pre;
192
- }
193
-
194
- hr {
195
- border: 0;
196
- border-top: 0.1rem solid #f4f5f6;
197
- margin: 3.0rem 0;
198
- }
199
-
200
- input[type='email'],
201
- input[type='number'],
202
- input[type='password'],
203
- input[type='search'],
204
- input[type='tel'],
205
- input[type='text'],
206
- input[type='url'],
207
- textarea,
208
- select {
209
- -webkit-appearance: none;
210
- -moz-appearance: none;
211
- appearance: none;
212
- background-color: transparent;
213
- border: 0.1rem solid #d1d1d1;
214
- border-radius: .4rem;
215
- box-shadow: none;
216
- box-sizing: inherit;
217
- height: 3.8rem;
218
- padding: .6rem 1.0rem;
219
- width: 100%;
220
- }
221
-
222
- input[type='email']:focus,
223
- input[type='number']:focus,
224
- input[type='password']:focus,
225
- input[type='search']:focus,
226
- input[type='tel']:focus,
227
- input[type='text']:focus,
228
- input[type='url']:focus,
229
- textarea:focus,
230
- select:focus {
231
- border-color: #9b4dca;
232
- outline: 0;
233
- }
234
-
235
- select {
236
- background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="14" viewBox="0 0 29 14" width="29"><path fill="#d1d1d1" d="M9.37727 3.625l5.08154 6.93523L19.54036 3.625"/></svg>') center right no-repeat;
237
- padding-right: 3.0rem;
238
- }
239
-
240
- select:focus {
241
- background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="14" viewBox="0 0 29 14" width="29"><path fill="#9b4dca" d="M9.37727 3.625l5.08154 6.93523L19.54036 3.625"/></svg>');
242
- }
243
-
244
- textarea {
245
- min-height: 6.5rem;
246
- }
247
-
248
- label,
249
- legend {
250
- display: block;
251
- font-size: 1.6rem;
252
- font-weight: 700;
253
- margin-bottom: .5rem;
254
- }
255
-
256
- fieldset {
257
- border-width: 0;
258
- padding: 0;
259
- }
260
-
261
- input[type='checkbox'],
262
- input[type='radio'] {
263
- display: inline;
264
- }
265
-
266
- .label-inline {
267
- display: inline-block;
268
- font-weight: normal;
269
- margin-left: .5rem;
270
- }
271
-
272
- .container {
273
- margin: 0 auto;
274
- max-width: 112.0rem;
275
- padding: 0 2.0rem;
276
- position: relative;
277
- width: 100%;
278
- }
279
-
280
- .row {
281
2
  display: flex;
3
+ min-height: 100vh;
4
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
5
+ Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
282
6
  flex-direction: column;
283
7
  padding: 0;
284
- width: 100%;
285
- }
286
-
287
- .row.row-no-padding {
288
- padding: 0;
289
- }
290
-
291
- .row.row-no-padding > .column {
292
- padding: 0;
293
- }
294
-
295
- .row.row-wrap {
296
- flex-wrap: wrap;
297
- }
298
-
299
- .row.row-top {
300
- align-items: flex-start;
301
- }
302
-
303
- .row.row-bottom {
304
- align-items: flex-end;
305
- }
306
-
307
- .row.row-center {
308
- align-items: center;
309
- }
310
-
311
- .row.row-stretch {
312
- align-items: stretch;
313
- }
314
-
315
- .row.row-baseline {
316
- align-items: baseline;
317
- }
318
-
319
- .row .column {
320
- display: block;
321
- flex: 1 1 auto;
322
- margin-left: 0;
323
- max-width: 100%;
324
- width: 100%;
325
- }
326
-
327
- .row .column.column-offset-10 {
328
- margin-left: 10%;
329
- }
330
-
331
- .row .column.column-offset-20 {
332
- margin-left: 20%;
333
- }
334
-
335
- .row .column.column-offset-25 {
336
- margin-left: 25%;
337
- }
338
-
339
- .row .column.column-offset-33, .row .column.column-offset-34 {
340
- margin-left: 33.3333%;
341
- }
342
-
343
- .row .column.column-offset-50 {
344
- margin-left: 50%;
345
- }
346
-
347
- .row .column.column-offset-66, .row .column.column-offset-67 {
348
- margin-left: 66.6666%;
349
- }
350
-
351
- .row .column.column-offset-75 {
352
- margin-left: 75%;
353
- }
354
-
355
- .row .column.column-offset-80 {
356
- margin-left: 80%;
357
- }
358
-
359
- .row .column.column-offset-90 {
360
- margin-left: 90%;
361
- }
362
-
363
- .row .column.column-10 {
364
- flex: 0 0 10%;
365
- max-width: 10%;
366
- }
367
-
368
- .row .column.column-20 {
369
- flex: 0 0 20%;
370
- max-width: 20%;
371
- }
372
-
373
- .row .column.column-25 {
374
- flex: 0 0 25%;
375
- max-width: 25%;
376
- }
377
-
378
- .row .column.column-33, .row .column.column-34 {
379
- flex: 0 0 33.3333%;
380
- max-width: 33.3333%;
381
- }
382
-
383
- .row .column.column-40 {
384
- flex: 0 0 40%;
385
- max-width: 40%;
386
- }
387
-
388
- .row .column.column-50 {
389
- flex: 0 0 50%;
390
- max-width: 50%;
391
- }
392
-
393
- .row .column.column-60 {
394
- flex: 0 0 60%;
395
- max-width: 60%;
396
- }
397
-
398
- .row .column.column-66, .row .column.column-67 {
399
- flex: 0 0 66.6666%;
400
- max-width: 66.6666%;
401
- }
402
-
403
- .row .column.column-75 {
404
- flex: 0 0 75%;
405
- max-width: 75%;
406
- }
407
-
408
- .row .column.column-80 {
409
- flex: 0 0 80%;
410
- max-width: 80%;
411
- }
412
-
413
- .row .column.column-90 {
414
- flex: 0 0 90%;
415
- max-width: 90%;
416
- }
417
-
418
- .row .column .column-top {
419
- align-self: flex-start;
420
- }
421
-
422
- .row .column .column-bottom {
423
- align-self: flex-end;
8
+ margin: 0;
9
+ color: #3b4252;
10
+ letter-spacing: 0;
424
11
  }
425
12
 
426
- .row .column .column-center {
427
- -ms-grid-row-align: center;
428
- align-self: center;
13
+ .container {
14
+ max-width: 960px;
15
+ margin: auto;
16
+ padding: 1rem;
429
17
  }
430
18
 
431
- @media (min-width: 40rem) {
432
- .row {
433
- flex-direction: row;
434
- margin-left: -1.0rem;
435
- width: calc(100% + 2.0rem);
436
- }
437
- .row .column {
438
- margin-bottom: inherit;
439
- padding: 0 1.0rem;
440
- }
19
+ header {
20
+ border-bottom: 1px solid #eee;
441
21
  }
442
22
 
443
- a {
444
- color: #9b4dca;
23
+ header a {
24
+ color: inherit;
445
25
  text-decoration: none;
446
26
  }
447
27
 
448
- a:focus, a:hover {
449
- color: #606c76;
450
- }
451
-
452
- dl,
453
- ol,
454
- ul {
455
- list-style: none;
456
- margin-top: 0;
457
- padding-left: 0;
458
- }
459
-
460
- dl dl,
461
- dl ol,
462
- dl ul,
463
- ol dl,
464
- ol ol,
465
- ol ul,
466
- ul dl,
467
- ul ol,
468
- ul ul {
469
- font-size: 90%;
470
- margin: 1.5rem 0 1.5rem 3.0rem;
471
- }
472
-
473
- ol {
474
- list-style: decimal inside;
475
- }
476
-
477
- ul {
478
- list-style: circle inside;
479
- }
480
-
481
- .button,
482
- button,
483
- dd,
484
- dt,
485
- li {
486
- margin-bottom: 1.0rem;
487
- }
488
-
489
- fieldset,
490
- input,
491
- select,
492
- textarea {
493
- margin-bottom: 1.5rem;
494
- }
495
-
496
- blockquote,
497
- dl,
498
- figure,
499
- form,
500
- ol,
501
- p,
502
- pre,
503
- table,
504
- ul {
505
- margin-bottom: 2.5rem;
28
+ header a:hover {
29
+ text-decoration: underline;
506
30
  }
507
31
 
508
- table {
509
- border-spacing: 0;
510
- width: 100%;
32
+ nav ul {
33
+ display: flex;
34
+ flex-wrap: nowrap;
35
+ justify-content: space-between;
511
36
  }
512
37
 
513
- td,
514
- th {
515
- border-bottom: 0.1rem solid #e1e1e1;
516
- padding: 1.2rem 1.5rem;
38
+ nav li.title {
39
+ flex-grow: 5;
517
40
  text-align: left;
518
- }
519
-
520
- td:first-child,
521
- th:first-child {
522
- padding-left: 0;
523
- }
524
-
525
- td:last-child,
526
- th:last-child {
527
- padding-right: 0;
528
- }
529
-
530
- b,
531
- strong {
532
41
  font-weight: bold;
42
+ font-size: 1.4rem;
43
+ color: #3b4252;
533
44
  }
534
45
 
535
- p {
536
- margin-top: 0;
537
- }
538
-
539
- h1,
540
- h2,
541
- h3,
542
- h4,
543
- h5,
544
- h6 {
545
- font-weight: 300;
546
- letter-spacing: -.1rem;
547
- margin-bottom: 2.0rem;
548
- margin-top: 0;
549
- }
550
-
551
- h1 {
552
- font-size: 4.6rem;
553
- line-height: 1.2;
554
- }
555
-
556
- h2 {
557
- font-size: 3.6rem;
558
- line-height: 1.25;
559
- }
560
-
561
- h3 {
562
- font-size: 2.8rem;
563
- line-height: 1.3;
564
- }
565
-
566
- h4 {
567
- font-size: 2.2rem;
568
- letter-spacing: -.08rem;
569
- line-height: 1.35;
570
- }
571
-
572
- h5 {
573
- font-size: 1.8rem;
574
- letter-spacing: -.05rem;
575
- line-height: 1.5;
576
- }
577
-
578
- h6 {
579
- font-size: 1.6rem;
580
- letter-spacing: 0;
581
- line-height: 1.4;
582
- }
583
-
584
- img {
585
- max-width: 100%;
586
- }
587
-
588
- .clearfix:after {
589
- clear: both;
590
- content: ' ';
591
- display: table;
592
- }
593
-
594
- .float-left {
595
- float: left;
596
- }
597
-
598
- .float-right {
599
- float: right;
600
- }
601
- html {
602
- font-size: 70%;
603
- }
604
-
605
- body {
606
- display: flex;
607
- min-height: 100vh;
608
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
609
- flex-direction: column;
610
- padding:0;
611
- margin: 0;
612
- color: #333;
613
- letter-spacing: 0;
614
- }
615
-
616
- header {
617
- padding-top: 2.0rem;
618
- border-bottom: 1px solid #EEE;
619
- }
620
-
621
- header a, header a:hover {
622
- text-decoration: none;
46
+ nav li {
47
+ flex-grow: 1;
48
+ align-self: center;
49
+ text-align: right;
50
+ color: #4c566a;
623
51
  }
624
52
 
625
53
  main {
@@ -627,20 +55,25 @@ main {
627
55
  }
628
56
 
629
57
  footer {
630
- padding-top: 2.5rem;
631
- border-top: 1px solid #EEE;
58
+ margin-top: 4rem;
59
+ border-top: 1px solid #eee;
632
60
  }
633
61
 
634
- h4 {
62
+ h1 {
635
63
  margin-top: 4rem;
64
+ font-weight: normal;
65
+ }
66
+
67
+ i {
68
+ margin-right: 0.5rem;
636
69
  }
637
70
 
638
71
  a {
639
- color: #0275d8;
72
+ color: #5e81ac;
640
73
  }
641
74
 
642
75
  a:hover {
643
- color: #014c8c;
76
+ color: #81a1c1;
644
77
  text-decoration: underline;
645
78
  }
646
79
 
@@ -650,8 +83,7 @@ table {
650
83
 
651
84
  td {
652
85
  border: 0;
653
- padding: 0 1em .5em 0;
654
- color: #014c8c;
86
+ padding: 0 1em 0.5em 0;
655
87
  }
656
88
 
657
89
  td:first-child {
@@ -666,10 +98,13 @@ ul {
666
98
 
667
99
  li {
668
100
  list-style-type: none;
669
- margin-bottom: .2rem;
101
+ margin-bottom: 0.2rem;
670
102
  }
671
103
 
672
104
  code {
673
- border-radius: 0;
105
+ padding: 0.2rem;
106
+ margin: 0rem 0.2rem;
107
+ border-radius: 0.2rem;
108
+ background: #e5e9f0;
674
109
  }
675
110
 
package/dist/main.js CHANGED
@@ -1 +1 @@
1
- !function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)e.d(n,o,function(r){return t[r]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=9)}([function(t,r,e){"use strict";r.a=function(t){var r=this.constructor;return this.then(function(e){return r.resolve(t()).then(function(){return e})},function(e){return r.resolve(t()).then(function(){return r.reject(e)})})}},function(t,r){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,r,e){"use strict";(function(t){var n=e(0),o=setTimeout;function i(){}function s(t){if(!(this instanceof s))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],h(t,this)}function c(t,r){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,s._immediateFn(function(){var e=1===t._state?r.onFulfilled:r.onRejected;if(null!==e){var n;try{n=e(t._value)}catch(t){return void a(r.promise,t)}f(r.promise,n)}else(1===t._state?f:a)(r.promise,t._value)})):t._deferreds.push(r)}function f(t,r){try{if(r===t)throw new TypeError("A promise cannot be resolved with itself.");if(r&&("object"==typeof r||"function"==typeof r)){var e=r.then;if(r instanceof s)return t._state=3,t._value=r,void u(t);if("function"==typeof e)return void h((n=e,o=r,function(){n.apply(o,arguments)}),t)}t._state=1,t._value=r,u(t)}catch(r){a(t,r)}var n,o}function a(t,r){t._state=2,t._value=r,u(t)}function u(t){2===t._state&&0===t._deferreds.length&&s._immediateFn(function(){t._handled||s._unhandledRejectionFn(t._value)});for(var r=0,e=t._deferreds.length;r<e;r++)c(t,t._deferreds[r]);t._deferreds=null}function l(t,r,e){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof r?r:null,this.promise=e}function h(t,r){var e=!1;try{t(function(t){e||(e=!0,f(r,t))},function(t){e||(e=!0,a(r,t))})}catch(t){if(e)return;e=!0,a(r,t)}}s.prototype.catch=function(t){return this.then(null,t)},s.prototype.then=function(t,r){var e=new this.constructor(i);return c(this,new l(t,r,e)),e},s.prototype.finally=n.a,s.all=function(t){return new s(function(r,e){if(!t||void 0===t.length)throw new TypeError("Promise.all accepts an array");var n=Array.prototype.slice.call(t);if(0===n.length)return r([]);var o=n.length;function i(t,s){try{if(s&&("object"==typeof s||"function"==typeof s)){var c=s.then;if("function"==typeof c)return void c.call(s,function(r){i(t,r)},e)}n[t]=s,0==--o&&r(n)}catch(t){e(t)}}for(var s=0;s<n.length;s++)i(s,n[s])})},s.resolve=function(t){return t&&"object"==typeof t&&t.constructor===s?t:new s(function(r){r(t)})},s.reject=function(t){return new s(function(r,e){e(t)})},s.race=function(t){return new s(function(r,e){for(var n=0,o=t.length;n<o;n++)t[n].then(r,e)})},s._immediateFn="function"==typeof t&&function(r){t(r)}||function(t){o(t,0)},s._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},r.a=s}).call(this,e(4).setImmediate)},function(t,r,e){"use strict";(function(t){var r=e(2),n=e(0),o=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==t)return t;throw new Error("unable to locate global object")}();"Promise"in o?o.Promise.prototype.finally||(o.Promise.prototype.finally=n.a):o.Promise=r.a}).call(this,e(1))},function(t,r,e){(function(t){var n=void 0!==t&&t||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(t,r){this._id=t,this._clearFn=r}r.setTimeout=function(){return new i(o.call(setTimeout,n,arguments),clearTimeout)},r.setInterval=function(){return new i(o.call(setInterval,n,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(t){t&&t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(n,this._id)},r.enroll=function(t,r){clearTimeout(t._idleTimeoutId),t._idleTimeout=r},r.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},r._unrefActive=r.active=function(t){clearTimeout(t._idleTimeoutId);var r=t._idleTimeout;r>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},r))},e(5),r.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,r.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,e(1))},function(t,r,e){(function(t,r){!function(t,e){"use strict";if(!t.setImmediate){var n,o,i,s,c,f=1,a={},u=!1,l=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?n=function(t){r.nextTick(function(){d(t)})}:!function(){if(t.postMessage&&!t.importScripts){var r=!0,e=t.onmessage;return t.onmessage=function(){r=!1},t.postMessage("","*"),t.onmessage=e,r}}()?t.MessageChannel?((i=new MessageChannel).port1.onmessage=function(t){d(t.data)},n=function(t){i.port2.postMessage(t)}):l&&"onreadystatechange"in l.createElement("script")?(o=l.documentElement,n=function(t){var r=l.createElement("script");r.onreadystatechange=function(){d(t),r.onreadystatechange=null,o.removeChild(r),r=null},o.appendChild(r)}):n=function(t){setTimeout(d,0,t)}:(s="setImmediate$"+Math.random()+"$",c=function(r){r.source===t&&"string"==typeof r.data&&0===r.data.indexOf(s)&&d(+r.data.slice(s.length))},t.addEventListener?t.addEventListener("message",c,!1):t.attachEvent("onmessage",c),n=function(r){t.postMessage(s+r,"*")}),h.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var r=new Array(arguments.length-1),e=0;e<r.length;e++)r[e]=arguments[e+1];var o={callback:t,args:r};return a[f]=o,n(f),f++},h.clearImmediate=p}function p(t){delete a[t]}function d(t){if(u)setTimeout(d,0,t);else{var r=a[t];if(r){u=!0;try{!function(t){var r=t.callback,n=t.args;switch(n.length){case 0:r();break;case 1:r(n[0]);break;case 2:r(n[0],n[1]);break;case 3:r(n[0],n[1],n[2]);break;default:r.apply(e,n)}}(r)}finally{p(t),u=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,e(1),e(6))},function(t,r){var e,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function c(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var f,a=[],u=!1,l=-1;function h(){u&&f&&(u=!1,f.length?a=f.concat(a):l=-1,a.length&&p())}function p(){if(!u){var t=c(h);u=!0;for(var r=a.length;r;){for(f=a,a=[];++l<r;)f&&f[l].run();l=-1,r=a.length}f=null,u=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(r){try{return n.call(null,t)}catch(r){return n.call(this,t)}}}(t)}}function d(t,r){this.fun=t,this.array=r}function y(){}o.nextTick=function(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];a.push(new d(t,r)),1!==a.length||u||c(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,r,e){},function(t,r,e){},function(t,r,e){"use strict";e.r(r);e(3);var n={searchParams:"URLSearchParams"in self,iterable:"Symbol"in self&&"iterator"in Symbol,blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in self,arrayBuffer:"ArrayBuffer"in self};if(n.arrayBuffer)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],i=ArrayBuffer.isView||function(t){return t&&o.indexOf(Object.prototype.toString.call(t))>-1};function s(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function c(t){return"string"!=typeof t&&(t=String(t)),t}function f(t){var r={next:function(){var r=t.shift();return{done:void 0===r,value:r}}};return n.iterable&&(r[Symbol.iterator]=function(){return r}),r}function a(t){this.map={},t instanceof a?t.forEach(function(t,r){this.append(r,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(r){this.append(r,t[r])},this)}function u(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function l(t){return new Promise(function(r,e){t.onload=function(){r(t.result)},t.onerror=function(){e(t.error)}})}function h(t){var r=new FileReader,e=l(r);return r.readAsArrayBuffer(t),e}function p(t){if(t.slice)return t.slice(0);var r=new Uint8Array(t.byteLength);return r.set(new Uint8Array(t)),r.buffer}function d(){return this.bodyUsed=!1,this._initBody=function(t){var r;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:n.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:n.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():n.arrayBuffer&&n.blob&&((r=t)&&DataView.prototype.isPrototypeOf(r))?(this._bodyArrayBuffer=p(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||i(t))?this._bodyArrayBuffer=p(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n.blob&&(this.blob=function(){var t=u(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?u(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var t,r,e,n=u(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,r=new FileReader,e=l(r),r.readAsText(t),e;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var r=new Uint8Array(t),e=new Array(r.length),n=0;n<r.length;n++)e[n]=String.fromCharCode(r[n]);return e.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},n.formData&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}a.prototype.append=function(t,r){t=s(t),r=c(r);var e=this.map[t];this.map[t]=e?e+", "+r:r},a.prototype.delete=function(t){delete this.map[s(t)]},a.prototype.get=function(t){return t=s(t),this.has(t)?this.map[t]:null},a.prototype.has=function(t){return this.map.hasOwnProperty(s(t))},a.prototype.set=function(t,r){this.map[s(t)]=c(r)},a.prototype.forEach=function(t,r){for(var e in this.map)this.map.hasOwnProperty(e)&&t.call(r,this.map[e],e,this)},a.prototype.keys=function(){var t=[];return this.forEach(function(r,e){t.push(e)}),f(t)},a.prototype.values=function(){var t=[];return this.forEach(function(r){t.push(r)}),f(t)},a.prototype.entries=function(){var t=[];return this.forEach(function(r,e){t.push([e,r])}),f(t)},n.iterable&&(a.prototype[Symbol.iterator]=a.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(t,r){var e,n,o=(r=r||{}).body;if(t instanceof b){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,r.headers||(this.headers=new a(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,o||null==t._bodyInit||(o=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=r.credentials||this.credentials||"same-origin",!r.headers&&this.headers||(this.headers=new a(r.headers)),this.method=(e=r.method||this.method||"GET",n=e.toUpperCase(),y.indexOf(n)>-1?n:e),this.mode=r.mode||this.mode||null,this.signal=r.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function _(t){var r=new FormData;return t.trim().split("&").forEach(function(t){if(t){var e=t.split("="),n=e.shift().replace(/\+/g," "),o=e.join("=").replace(/\+/g," ");r.append(decodeURIComponent(n),decodeURIComponent(o))}}),r}function w(t,r){r||(r={}),this.type="default",this.status=void 0===r.status?200:r.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in r?r.statusText:"OK",this.headers=new a(r.headers),this.url=r.url||"",this._initBody(t)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},d.call(b.prototype),d.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new a(this.headers),url:this.url})},w.error=function(){var t=new w(null,{status:0,statusText:""});return t.type="error",t};var m=[301,302,303,307,308];w.redirect=function(t,r){if(-1===m.indexOf(r))throw new RangeError("Invalid status code");return new w(null,{status:r,headers:{location:t}})};var g=self.DOMException;try{new g}catch(t){(g=function(t,r){this.message=t,this.name=r;var e=Error(t);this.stack=e.stack}).prototype=Object.create(Error.prototype),g.prototype.constructor=g}function T(t,r){return new Promise(function(e,o){var i=new b(t,r);if(i.signal&&i.signal.aborted)return o(new g("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var t,r,n={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",r=new a,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var e=t.split(":"),n=e.shift().trim();if(n){var o=e.join(":").trim();r.append(n,o)}}),r)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var o="response"in s?s.response:s.responseText;e(new w(o,n))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new g("Aborted","AbortError"))},s.open(i.method,i.url,!0),"include"===i.credentials?s.withCredentials=!0:"omit"===i.credentials&&(s.withCredentials=!1),"responseType"in s&&n.blob&&(s.responseType="blob"),i.headers.forEach(function(t,r){s.setRequestHeader(r,t)}),i.signal&&(i.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&i.signal.removeEventListener("abort",c)}),s.send(void 0===i._bodyInit?null:i._bodyInit)})}T.polyfill=!0,self.fetch||(self.fetch=T,self.Headers=a,self.Request=b,self.Response=w);var E=function(){},x={},v=[],B=[];function j(t,r){var e,n,o,i,s=B;for(i=arguments.length;i-- >2;)v.push(arguments[i]);for(r&&null!=r.children&&(v.length||v.push(r.children),delete r.children);v.length;)if((n=v.pop())&&void 0!==n.pop)for(i=n.length;i--;)v.push(n[i]);else"boolean"==typeof n&&(n=null),(o="function"!=typeof t)&&(null==n?n="":"number"==typeof n?n=String(n):"string"!=typeof n&&(o=!1)),o&&e?s[s.length-1]+=n:s===B?s=[n]:s.push(n),e=o;var c=new E;return c.nodeName=t,c.children=s,c.attributes=null==r?void 0:r,c.key=null==r?void 0:r.key,void 0!==x.vnode&&x.vnode(c),c}function A(t,r){for(var e in r)t[e]=r[e];return t}function U(t,r){null!=t&&("function"==typeof t?t(r):t.current=r)}var F="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;var R=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,S=[];function O(t){!t._dirty&&(t._dirty=!0)&&1==S.push(t)&&(x.debounceRendering||F)(k)}function k(){for(var t;t=S.pop();)t._dirty&&Y(t)}function P(t,r){return t.normalizedNodeName===r||t.nodeName.toLowerCase()===r.toLowerCase()}function L(t){var r=A({},t.attributes);r.children=t.children;var e=t.nodeName.defaultProps;if(void 0!==e)for(var n in e)void 0===r[n]&&(r[n]=e[n]);return r}function D(t){var r=t.parentNode;r&&r.removeChild(t)}function I(t,r,e,n,o){if("className"===r&&(r="class"),"key"===r) ;else if("ref"===r)U(e,null),U(n,t);else if("class"!==r||o)if("style"===r){if(n&&"string"!=typeof n&&"string"!=typeof e||(t.style.cssText=n||""),n&&"object"==typeof n){if("string"!=typeof e)for(var i in e)i in n||(t.style[i]="");for(var i in n)t.style[i]="number"==typeof n[i]&&!1===R.test(i)?n[i]+"px":n[i]}}else if("dangerouslySetInnerHTML"===r)n&&(t.innerHTML=n.__html||"");else if("o"==r[0]&&"n"==r[1]){var s=r!==(r=r.replace(/Capture$/,""));r=r.toLowerCase().substring(2),n?e||t.addEventListener(r,M,s):t.removeEventListener(r,M,s),(t._listeners||(t._listeners={}))[r]=n}else if("list"!==r&&"type"!==r&&!o&&r in t){try{t[r]=null==n?"":n}catch(t){}null!=n&&!1!==n||"spellcheck"==r||t.removeAttribute(r)}else{var c=o&&r!==(r=r.replace(/^xlink:?/,""));null==n||!1===n?c?t.removeAttributeNS("http://www.w3.org/1999/xlink",r.toLowerCase()):t.removeAttribute(r):"function"!=typeof n&&(c?t.setAttributeNS("http://www.w3.org/1999/xlink",r.toLowerCase(),n):t.setAttribute(r,n))}else t.className=n||""}function M(t){return this._listeners[t.type](x.event&&x.event(t)||t)}var C=[],H=0,V=!1,W=!1;function q(){for(var t;t=C.shift();)x.afterMount&&x.afterMount(t),t.componentDidMount&&t.componentDidMount()}function G(t,r,e,n,o,i){H++||(V=null!=o&&void 0!==o.ownerSVGElement,W=null!=t&&!("__preactattr_"in t));var s=$(t,r,e,n,i);return o&&s.parentNode!==o&&o.appendChild(s),--H||(W=!1,i||q()),s}function $(t,r,e,n,o){var i=t,s=V;if(null!=r&&"boolean"!=typeof r||(r=""),"string"==typeof r||"number"==typeof r)return t&&void 0!==t.splitText&&t.parentNode&&(!t._component||o)?t.nodeValue!=r&&(t.nodeValue=r):(i=document.createTextNode(r),t&&(t.parentNode&&t.parentNode.replaceChild(i,t),z(t,!0))),i.__preactattr_=!0,i;var c,f,a=r.nodeName;if("function"==typeof a)return function(t,r,e,n){var o=t&&t._component,i=o,s=t,c=o&&t._componentConstructor===r.nodeName,f=c,a=L(r);for(;o&&!f&&(o=o._parentComponent);)f=o.constructor===r.nodeName;o&&f&&(!n||o._component)?(Q(o,a,3,e,n),t=o.base):(i&&!c&&(Z(i),t=s=null),o=J(r.nodeName,a,e),t&&!o.nextBase&&(o.nextBase=t,s=null),Q(o,a,1,e,n),t=o.base,s&&t!==s&&(s._component=null,z(s,!1)));return t}(t,r,e,n);if(V="svg"===a||"foreignObject"!==a&&V,a=String(a),(!t||!P(t,a))&&(c=a,(f=V?document.createElementNS("http://www.w3.org/2000/svg",c):document.createElement(c)).normalizedNodeName=c,i=f,t)){for(;t.firstChild;)i.appendChild(t.firstChild);t.parentNode&&t.parentNode.replaceChild(i,t),z(t,!0)}var u=i.firstChild,l=i.__preactattr_,h=r.children;if(null==l){l=i.__preactattr_={};for(var p=i.attributes,d=p.length;d--;)l[p[d].name]=p[d].value}return!W&&h&&1===h.length&&"string"==typeof h[0]&&null!=u&&void 0!==u.splitText&&null==u.nextSibling?u.nodeValue!=h[0]&&(u.nodeValue=h[0]):(h&&h.length||null!=u)&&function(t,r,e,n,o){var i,s,c,f,a,u=t.childNodes,l=[],h={},p=0,d=0,y=u.length,b=0,_=r?r.length:0;if(0!==y)for(var w=0;w<y;w++){var m=u[w],g=m.__preactattr_,T=_&&g?m._component?m._component.__key:g.key:null;null!=T?(p++,h[T]=m):(g||(void 0!==m.splitText?!o||m.nodeValue.trim():o))&&(l[b++]=m)}if(0!==_)for(var w=0;w<_;w++){f=r[w],a=null;var T=f.key;if(null!=T)p&&void 0!==h[T]&&(a=h[T],h[T]=void 0,p--);else if(d<b)for(i=d;i<b;i++)if(void 0!==l[i]&&(E=s=l[i],v=o,"string"==typeof(x=f)||"number"==typeof x?void 0!==E.splitText:"string"==typeof x.nodeName?!E._componentConstructor&&P(E,x.nodeName):v||E._componentConstructor===x.nodeName)){a=s,l[i]=void 0,i===b-1&&b--,i===d&&d++;break}a=$(a,f,e,n),c=u[w],a&&a!==t&&a!==c&&(null==c?t.appendChild(a):a===c.nextSibling?D(c):t.insertBefore(a,c))}var E,x,v;if(p)for(var w in h)void 0!==h[w]&&z(h[w],!1);for(;d<=b;)void 0!==(a=l[b--])&&z(a,!1)}(i,h,e,n,W||null!=l.dangerouslySetInnerHTML),function(t,r,e){var n;for(n in e)r&&null!=r[n]||null==e[n]||I(t,n,e[n],e[n]=void 0,V);for(n in r)"children"===n||"innerHTML"===n||n in e&&r[n]===("value"===n||"checked"===n?t[n]:e[n])||I(t,n,e[n],e[n]=r[n],V)}(i,r.attributes,l),V=s,i}function z(t,r){var e=t._component;e?Z(e):(null!=t.__preactattr_&&U(t.__preactattr_.ref,null),!1!==r&&null!=t.__preactattr_||D(t),N(t))}function N(t){for(t=t.lastChild;t;){var r=t.previousSibling;z(t,!0),t=r}}var X=[];function J(t,r,e){var n,o=X.length;for(t.prototype&&t.prototype.render?(n=new t(r,e),tt.call(n,r,e)):((n=new tt(r,e)).constructor=t,n.render=K);o--;)if(X[o].constructor===t)return n.nextBase=X[o].nextBase,X.splice(o,1),n;return n}function K(t,r,e){return this.constructor(t,e)}function Q(t,r,e,n,o){t._disable||(t._disable=!0,t.__ref=r.ref,t.__key=r.key,delete r.ref,delete r.key,void 0===t.constructor.getDerivedStateFromProps&&(!t.base||o?t.componentWillMount&&t.componentWillMount():t.componentWillReceiveProps&&t.componentWillReceiveProps(r,n)),n&&n!==t.context&&(t.prevContext||(t.prevContext=t.context),t.context=n),t.prevProps||(t.prevProps=t.props),t.props=r,t._disable=!1,0!==e&&(1!==e&&!1===x.syncComponentUpdates&&t.base?O(t):Y(t,1,o)),U(t.__ref,t))}function Y(t,r,e,n){if(!t._disable){var o,i,s,c=t.props,f=t.state,a=t.context,u=t.prevProps||c,l=t.prevState||f,h=t.prevContext||a,p=t.base,d=t.nextBase,y=p||d,b=t._component,_=!1,w=h;if(t.constructor.getDerivedStateFromProps&&(f=A(A({},f),t.constructor.getDerivedStateFromProps(c,f)),t.state=f),p&&(t.props=u,t.state=l,t.context=h,2!==r&&t.shouldComponentUpdate&&!1===t.shouldComponentUpdate(c,f,a)?_=!0:t.componentWillUpdate&&t.componentWillUpdate(c,f,a),t.props=c,t.state=f,t.context=a),t.prevProps=t.prevState=t.prevContext=t.nextBase=null,t._dirty=!1,!_){o=t.render(c,f,a),t.getChildContext&&(a=A(A({},a),t.getChildContext())),p&&t.getSnapshotBeforeUpdate&&(w=t.getSnapshotBeforeUpdate(u,l));var m,g,T=o&&o.nodeName;if("function"==typeof T){var E=L(o);(i=b)&&i.constructor===T&&E.key==i.__key?Q(i,E,1,a,!1):(m=i,t._component=i=J(T,E,a),i.nextBase=i.nextBase||d,i._parentComponent=t,Q(i,E,0,a,!1),Y(i,1,e,!0)),g=i.base}else s=y,(m=b)&&(s=t._component=null),(y||1===r)&&(s&&(s._component=null),g=G(s,o,a,e||!p,y&&y.parentNode,!0));if(y&&g!==y&&i!==b){var v=y.parentNode;v&&g!==v&&(v.replaceChild(g,y),m||(y._component=null,z(y,!1)))}if(m&&Z(m),t.base=g,g&&!n){for(var B=t,j=t;j=j._parentComponent;)(B=j).base=g;g._component=B,g._componentConstructor=B.constructor}}for(!p||e?C.push(t):_||(t.componentDidUpdate&&t.componentDidUpdate(u,l,w),x.afterUpdate&&x.afterUpdate(t));t._renderCallbacks.length;)t._renderCallbacks.pop().call(t);H||n||q()}}function Z(t){x.beforeUnmount&&x.beforeUnmount(t);var r=t.base;t._disable=!0,t.componentWillUnmount&&t.componentWillUnmount(),t.base=null;var e=t._component;e?Z(e):r&&(null!=r.__preactattr_&&U(r.__preactattr_.ref,null),t.nextBase=r,D(r),X.push(t),N(r)),U(t.__ref,null)}function tt(t,r){this._dirty=!0,this.context=r,this.props=t,this.state=this.state||{},this._renderCallbacks=[]}function rt(t,r,e){return G(e,t,{},!1,r,!1)}A(tt.prototype,{setState:function(t,r){this.prevState||(this.prevState=this.state),this.state=A(A({},this.state),"function"==typeof t?t(this.state,this.props):t),r&&this._renderCallbacks.push(r),O(this)},forceUpdate:function(t){t&&this._renderCallbacks.push(t),Y(this,2)},render:function(){}});e(7),e(8);function et(t){var r=t.name,e=t.length;return j("li",null,j("a",{href:r},"/",r)," ",j("sup",null,e?"".concat(e,"x"):"object"))}function nt(t){var r=t.db;return j("ul",null,Object.keys(r).map(function(t){return j(et,{name:t,length:Array.isArray(r[t])&&r[t].length})}))}function ot(){return j("p",null,"No resources found")}function it(t){var r=t.db;return j("div",null,j("h4",null,"Resources"),Object.keys(r).length?j(nt,{db:r}):j(ot,null))}function st(t){var r=t.customRoutes,e=Object.keys(r);if(e.length)return j("div",null,j("h4",null,"Custom Routes"),j("table",null,e.map(function(t){return j("tr",null,j("td",null,t),j("td",null,"⇢ ",r[t]))})))}window.fetch("db").then(function(t){return t.json()}).then(function(t){return rt(j(it,{db:t}),document.getElementById("resources"))}),window.fetch("__rules").then(function(t){return t.json()}).then(function(t){rt(j(st,{customRoutes:t}),document.getElementById("custom-routes"))})}]);
1
+ !function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=8)}([function(t,e,n){"use strict";e.a=function(t){var e=this.constructor;return this.then(function(n){return e.resolve(t()).then(function(){return n})},function(n){return e.resolve(t()).then(function(){return e.reject(n)})})}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";(function(t){var r=n(0),o=setTimeout;function i(){}function s(t){if(!(this instanceof s))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],d(t,this)}function a(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,s._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(t){return void c(e.promise,t)}u(e.promise,r)}else(1===t._state?u:c)(e.promise,t._value)})):t._deferreds.push(e)}function u(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof s)return t._state=3,t._value=e,void f(t);if("function"==typeof n)return void d((r=n,o=e,function(){r.apply(o,arguments)}),t)}t._state=1,t._value=e,f(t)}catch(e){c(t,e)}var r,o}function c(t,e){t._state=2,t._value=e,f(t)}function f(t){2===t._state&&0===t._deferreds.length&&s._immediateFn(function(){t._handled||s._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e<n;e++)a(t,t._deferreds[e]);t._deferreds=null}function l(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function d(t,e){var n=!1;try{t(function(t){n||(n=!0,u(e,t))},function(t){n||(n=!0,c(e,t))})}catch(t){if(n)return;n=!0,c(e,t)}}s.prototype.catch=function(t){return this.then(null,t)},s.prototype.then=function(t,e){var n=new this.constructor(i);return a(this,new l(t,e,n)),n},s.prototype.finally=r.a,s.all=function(t){return new s(function(e,n){if(!t||void 0===t.length)throw new TypeError("Promise.all accepts an array");var r=Array.prototype.slice.call(t);if(0===r.length)return e([]);var o=r.length;function i(t,s){try{if(s&&("object"==typeof s||"function"==typeof s)){var a=s.then;if("function"==typeof a)return void a.call(s,function(e){i(t,e)},n)}r[t]=s,0==--o&&e(r)}catch(t){n(t)}}for(var s=0;s<r.length;s++)i(s,r[s])})},s.resolve=function(t){return t&&"object"==typeof t&&t.constructor===s?t:new s(function(e){e(t)})},s.reject=function(t){return new s(function(e,n){n(t)})},s.race=function(t){return new s(function(e,n){for(var r=0,o=t.length;r<o;r++)t[r].then(e,n)})},s._immediateFn="function"==typeof t&&function(e){t(e)}||function(t){o(t,0)},s._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},e.a=s}).call(this,n(4).setImmediate)},function(t,e,n){"use strict";(function(t){var e=n(2),r=n(0),o=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==t)return t;throw new Error("unable to locate global object")}();"Promise"in o?o.Promise.prototype.finally||(o.Promise.prototype.finally=r.a):o.Promise=e.a}).call(this,n(1))},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(5),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(1))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,o,i,s,a,u=1,c={},f=!1,l=t.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(t);d=d&&d.setTimeout?d:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick(function(){p(t)})}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((i=new MessageChannel).port1.onmessage=function(t){p(t.data)},r=function(t){i.port2.postMessage(t)}):l&&"onreadystatechange"in l.createElement("script")?(o=l.documentElement,r=function(t){var e=l.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,o.removeChild(e),e=null},o.appendChild(e)}):r=function(t){setTimeout(p,0,t)}:(s="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&p(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),r=function(e){t.postMessage(s+e,"*")}),d.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var o={callback:t,args:e};return c[u]=o,r(u),u++},d.clearImmediate=h}function h(t){delete c[t]}function p(t){if(f)setTimeout(p,0,t);else{var e=c[t];if(e){f=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(n,r)}}(e)}finally{h(t),f=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(1),n(6))},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var u,c=[],f=!1,l=-1;function d(){f&&u&&(f=!1,u.length?c=u.concat(c):l=-1,c.length&&h())}function h(){if(!f){var t=a(d);f=!0;for(var e=c.length;e;){for(u=c,c=[];++l<e;)u&&u[l].run();l=-1,e=c.length}u=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new p(t,e)),1!==c.length||f||a(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){},function(t,e,n){"use strict";n.r(e);n(3);var r={searchParams:"URLSearchParams"in self,iterable:"Symbol"in self&&"iterator"in Symbol,blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in self,arrayBuffer:"ArrayBuffer"in self};if(r.arrayBuffer)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],i=ArrayBuffer.isView||function(t){return t&&o.indexOf(Object.prototype.toString.call(t))>-1};function s(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function a(t){return"string"!=typeof t&&(t=String(t)),t}function u(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r.iterable&&(e[Symbol.iterator]=function(){return e}),e}function c(t){this.map={},t instanceof c?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function f(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function l(t){return new Promise(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function d(t){var e=new FileReader,n=l(e);return e.readAsArrayBuffer(t),n}function h(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:r.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:r.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():r.arrayBuffer&&r.blob&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=h(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):r.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||i(t))?this._bodyArrayBuffer=h(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r.blob&&(this.blob=function(){var t=f(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var t,e,n,r=f(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=l(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},r.formData&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(t,e){t=s(t),e=a(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},c.prototype.delete=function(t){delete this.map[s(t)]},c.prototype.get=function(t){return t=s(t),this.has(t)?this.map[t]:null},c.prototype.has=function(t){return this.map.hasOwnProperty(s(t))},c.prototype.set=function(t,e){this.map[s(t)]=a(e)},c.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},c.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),u(t)},c.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),u(t)},c.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),u(t)},r.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function m(t,e){var n,r,o=(e=e||{}).body;if(t instanceof m){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new c(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,o||null==t._bodyInit||(o=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new c(e.headers)),this.method=(n=e.method||this.method||"GET",r=n.toUpperCase(),y.indexOf(r)>-1?r:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function b(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(o))}}),e}function v(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new c(e.headers),this.url=e.url||"",this._initBody(t)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},p.call(m.prototype),p.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},v.error=function(){var t=new v(null,{status:0,statusText:""});return t.type="error",t};var w=[301,302,303,307,308];v.redirect=function(t,e){if(-1===w.indexOf(e))throw new RangeError("Invalid status code");return new v(null,{status:e,headers:{location:t}})};var g=self.DOMException;try{new g}catch(t){(g=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack}).prototype=Object.create(Error.prototype),g.prototype.constructor=g}function _(t,e){return new Promise(function(n,o){var i=new m(t,e);if(i.signal&&i.signal.aborted)return o(new g("Aborted","AbortError"));var s=new XMLHttpRequest;function a(){s.abort()}s.onload=function(){var t,e,r={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new c,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();e.append(r,o)}}),e)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var o="response"in s?s.response:s.responseText;n(new v(o,r))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new g("Aborted","AbortError"))},s.open(i.method,i.url,!0),"include"===i.credentials?s.withCredentials=!0:"omit"===i.credentials&&(s.withCredentials=!1),"responseType"in s&&r.blob&&(s.responseType="blob"),i.headers.forEach(function(t,e){s.setRequestHeader(e,t)}),i.signal&&(i.signal.addEventListener("abort",a),s.onreadystatechange=function(){4===s.readyState&&i.signal.removeEventListener("abort",a)}),s.send(void 0===i._bodyInit?null:i._bodyInit)})}_.polyfill=!0,self.fetch||(self.fetch=_,self.Headers=c,self.Request=m,self.Response=v);n(7);function T({db:t}){return`\n <div>\n <h1>Resources</h1>\n ${Object.keys(t).length?function({db:t}){return`\n <ul>\n ${Object.keys(t).map(e=>(function({name:t,length:e}){return`\n <li>\n <a href="${t}">/${t}</a>\n <sup>${e?`${e}x`:"object"}</sup>\n </li>\n `})({name:e,length:Array.isArray(t[e])&&t[e].length})).join("")}\n </ul>\n `}({db:t}):"<p>No resources found</p>"}\n </div>\n `}window.fetch("db").then(t=>t.json()).then(t=>document.getElementById("resources").innerHTML=T({db:t})),window.fetch("__rules").then(t=>t.json()).then(t=>document.getElementById("custom-routes").innerHTML=function({customRoutes:t}){const e=Object.keys(t);if(e.length)return`\n <div>\n <h1>Custom Routes</h1>\n <table>\n ${e.map(e=>`<tr>\n <td>${e}</td>\n <td><code>⇢</code> ${t[e]}</td>\n </tr>`).join("")}\n </table>\n </div>\n `}({customRoutes:t}))}]);
@@ -4,64 +4,74 @@ require("promise-polyfill/src/polyfill");
4
4
 
5
5
  require("whatwg-fetch");
6
6
 
7
- var _preact = require("preact");
8
-
9
- require("milligram/dist/milligram.css");
10
-
11
7
  require("./style.css");
12
8
 
13
- function ResourceItem(_ref) {
14
- var name = _ref.name,
15
- length = _ref.length;
16
- return (0, _preact.h)("li", null, (0, _preact.h)("a", {
17
- href: name
18
- }, "/", name), " ", (0, _preact.h)("sup", null, length ? "".concat(length, "x") : 'object'));
9
+ function ResourceItem({
10
+ name,
11
+ length
12
+ }) {
13
+ return `
14
+ <li>
15
+ <a href="${name}">/${name}</a>
16
+ <sup>${length ? `${length}x` : 'object'}</sup>
17
+ </li>
18
+ `;
19
19
  }
20
20
 
21
- function ResourceList(_ref2) {
22
- var db = _ref2.db;
23
- return (0, _preact.h)("ul", null, Object.keys(db).map(function (name) {
24
- return (0, _preact.h)(ResourceItem, {
25
- name: name,
26
- length: Array.isArray(db[name]) && db[name].length
27
- });
28
- }));
21
+ function ResourceList({
22
+ db
23
+ }) {
24
+ return `
25
+ <ul>
26
+ ${Object.keys(db).map(name => ResourceItem({
27
+ name,
28
+ length: Array.isArray(db[name]) && db[name].length
29
+ })).join('')}
30
+ </ul>
31
+ `;
29
32
  }
30
33
 
31
34
  function NoResources() {
32
- return (0, _preact.h)("p", null, "No resources found");
35
+ return `<p>No resources found</p>`;
33
36
  }
34
37
 
35
- function ResourcesBlock(_ref3) {
36
- var db = _ref3.db;
37
- return (0, _preact.h)("div", null, (0, _preact.h)("h4", null, "Resources"), Object.keys(db).length ? (0, _preact.h)(ResourceList, {
38
- db: db
39
- }) : (0, _preact.h)(NoResources, null));
38
+ function ResourcesBlock({
39
+ db
40
+ }) {
41
+ return `
42
+ <div>
43
+ <h1>Resources</h1>
44
+ ${Object.keys(db).length ? ResourceList({
45
+ db
46
+ }) : NoResources()}
47
+ </div>
48
+ `;
40
49
  }
41
50
 
42
- window.fetch('db').then(function (response) {
43
- return response.json();
44
- }).then(function (db) {
45
- return (0, _preact.render)((0, _preact.h)(ResourcesBlock, {
46
- db: db
47
- }), document.getElementById('resources'));
48
- });
51
+ window.fetch('db').then(response => response.json()).then(db => document.getElementById('resources').innerHTML = ResourcesBlock({
52
+ db
53
+ }));
49
54
 
50
- function CustomRoutesBlock(_ref4) {
51
- var customRoutes = _ref4.customRoutes;
52
- var rules = Object.keys(customRoutes);
55
+ function CustomRoutesBlock({
56
+ customRoutes
57
+ }) {
58
+ const rules = Object.keys(customRoutes);
53
59
 
54
60
  if (rules.length) {
55
- return (0, _preact.h)("div", null, (0, _preact.h)("h4", null, "Custom Routes"), (0, _preact.h)("table", null, rules.map(function (rule) {
56
- return (0, _preact.h)("tr", null, (0, _preact.h)("td", null, rule), (0, _preact.h)("td", null, "\u21E2 ", customRoutes[rule]));
57
- })));
61
+ return `
62
+ <div>
63
+ <h1>Custom Routes</h1>
64
+ <table>
65
+ ${rules.map(rule => `<tr>
66
+ <td>${rule}</td>
67
+ <td><code>⇢</code> ${customRoutes[rule]}</td>
68
+ </tr>`).join('')}
69
+ </table>
70
+ </div>
71
+ `;
58
72
  }
59
73
  }
60
74
 
61
- window.fetch('__rules').then(function (response) {
62
- return response.json();
63
- }).then(function (customRoutes) {
64
- (0, _preact.render)((0, _preact.h)(CustomRoutesBlock, {
65
- customRoutes: customRoutes
66
- }), document.getElementById('custom-routes'));
67
- });
75
+ window.fetch('__rules').then(response => response.json()).then(customRoutes => document.getElementById('custom-routes').innerHTML = CustomRoutesBlock({
76
+ customRoutes
77
+ }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "json-server",
3
- "version": "0.14.2",
3
+ "version": "0.15.0",
4
4
  "description": "Serves JSON files through REST routes.",
5
5
  "main": "./lib/server/index.js",
6
6
  "bin": "./lib/cli/bin.js",
@@ -19,13 +19,13 @@
19
19
  "prepublishOnly": "npm test && npm run build && pkg-ok"
20
20
  },
21
21
  "dependencies": {
22
- "body-parser": "^1.18.3",
23
- "chalk": "^2.4.1",
24
- "compression": "^1.7.3",
22
+ "body-parser": "^1.19.0",
23
+ "chalk": "^2.4.2",
24
+ "compression": "^1.7.4",
25
25
  "connect-pause": "^0.1.1",
26
26
  "cors": "^2.8.5",
27
- "errorhandler": "^1.2.0",
28
- "express": "^4.16.4",
27
+ "errorhandler": "^1.5.1",
28
+ "express": "^4.17.0",
29
29
  "express-urlrewrite": "^1.2.0",
30
30
  "json-parse-helpfulerror": "^1.0.3",
31
31
  "lodash": "^4.17.11",
@@ -33,61 +33,52 @@
33
33
  "lowdb": "^1.0.0",
34
34
  "method-override": "^3.0.0",
35
35
  "morgan": "^1.9.1",
36
- "nanoid": "^2.0.0",
37
- "object-assign": "^4.0.1",
36
+ "nanoid": "^2.0.2",
37
+ "object-assign": "^4.1.1",
38
38
  "please-upgrade-node": "^3.1.1",
39
39
  "pluralize": "^7.0.0",
40
40
  "request": "^2.88.0",
41
41
  "server-destroy": "^1.0.1",
42
- "update-notifier": "^2.5.0",
43
- "yargs": "^12.0.2"
42
+ "update-notifier": "^3.0.0",
43
+ "yargs": "^13.2.4"
44
44
  },
45
45
  "devDependencies": {
46
- "@babel/cli": "^7.2.3",
47
- "@babel/core": "^7.2.2",
46
+ "@babel/cli": "^7.4.4",
47
+ "@babel/core": "^7.4.4",
48
48
  "@babel/node": "^7.2.2",
49
- "@babel/plugin-syntax-jsx": "^7.2.0",
50
- "@babel/plugin-transform-react-jsx": "^7.2.0",
51
- "@babel/plugin-transform-regenerator": "^7.0.0",
52
- "@babel/polyfill": "^7.2.5",
53
- "@babel/preset-env": "^7.2.3",
54
- "@babel/register": "^7.0.0",
55
- "babel-core": "^7.0.0-bridge.0",
56
- "babel-loader": "^8.0.4",
57
- "babel-preset-preact": "^1.1.0",
58
- "babel-preset-react": "^6.24.1",
59
- "clean-webpack-plugin": "^0.1.19",
49
+ "@babel/plugin-transform-regenerator": "^7.4.4",
50
+ "@babel/polyfill": "^7.4.4",
51
+ "@babel/preset-env": "^7.4.4",
52
+ "@babel/register": "^7.4.4",
53
+ "babel-loader": "^8.0.6",
54
+ "clean-webpack-plugin": "^2.0.2",
60
55
  "cross-env": "^5.2.0",
61
- "css-loader": "^1.0.1",
62
- "eslint": "^5.11.0",
63
- "eslint-config-prettier": "^3.3.0",
56
+ "css-loader": "^2.1.1",
57
+ "eslint": "^5.16.0",
58
+ "eslint-config-prettier": "^4.3.0",
64
59
  "eslint-config-standard": "^12.0.0",
65
- "eslint-config-standard-preact": "^1.1.6",
66
- "eslint-plugin-import": "^2.14.0",
67
- "eslint-plugin-node": "^8.0.0",
68
- "eslint-plugin-prettier": "^3.0.0",
69
- "eslint-plugin-promise": "^4.0.1",
70
- "eslint-plugin-react": "^7.10.0",
60
+ "eslint-plugin-import": "^2.17.2",
61
+ "eslint-plugin-node": "^9.0.1",
62
+ "eslint-plugin-prettier": "^3.1.0",
63
+ "eslint-plugin-promise": "^4.1.1",
71
64
  "eslint-plugin-standard": "^4.0.0",
72
65
  "html-webpack-plugin": "^3.2.0",
73
- "husky": "^1.2.1",
74
- "jest": "^23.6.0",
66
+ "husky": "^2.3.0",
67
+ "jest": "^24.8.0",
75
68
  "markdown-toc": "^1.2.0",
76
- "milligram": "^1.3.0",
77
- "mini-css-extract-plugin": "^0.4.5",
69
+ "mini-css-extract-plugin": "^0.6.0",
78
70
  "mkdirp": "^0.5.1",
79
71
  "npm-run-all": "^4.1.5",
80
72
  "os-tmpdir": "^2.0.0",
81
73
  "pkg-ok": "^2.3.1",
82
- "preact": "^8.4.2",
83
- "prettier": "^1.15.3",
74
+ "prettier": "^1.17.1",
84
75
  "promise-polyfill": "^8.1.0",
85
- "rimraf": "^2.6.2",
76
+ "rimraf": "^2.6.3",
86
77
  "server-ready": "^0.3.1",
87
- "supertest": "^3.3.0",
88
- "temp-write": "^3.4.0",
89
- "webpack": "^4.28.2",
90
- "webpack-cli": "^3.1.2",
78
+ "supertest": "^4.0.2",
79
+ "temp-write": "^4.0.0",
80
+ "webpack": "^4.31.0",
81
+ "webpack-cli": "^3.3.2",
91
82
  "whatwg-fetch": "^3.0.0"
92
83
  },
93
84
  "repository": {
@@ -117,7 +108,7 @@
117
108
  },
118
109
  "homepage": "https://github.com/typicode/json-server",
119
110
  "engines": {
120
- "node": ">=6"
111
+ "node": ">=8"
121
112
  },
122
113
  "husky": {
123
114
  "hooks": {
package/postinstall.js ADDED
@@ -0,0 +1,4 @@
1
+ const chalk = require('chalk')
2
+
3
+ console.log('Like JSON Server? You can support the project on Patreon:')
4
+ console.log(chalk.cyan('https://www.patreon.com/typicode'), '❤')
package/webpack.config.js CHANGED
@@ -11,7 +11,7 @@ module.exports = {
11
11
  ]
12
12
  },
13
13
  plugins: [
14
- new CleanWebpackPlugin(['dist']),
14
+ new CleanWebpackPlugin(),
15
15
  new HtmlWebpackPlugin({
16
16
  favicon: 'src/front/favicon.ico',
17
17
  template: 'src/front/index.html'