mockaton 7.6.0 → 7.6.1

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "mockaton",
3
3
  "description": "A deterministic server-side for developing and testing frontend clients",
4
4
  "type": "module",
5
- "version": "7.6.0",
5
+ "version": "7.6.1",
6
6
  "main": "index.js",
7
7
  "types": "index.d.ts",
8
8
  "license": "MIT",
@@ -3,10 +3,33 @@
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
5
  <meta content="width=device-width" name="viewport">
6
- <link rel="icon" href="favicon.svg" type="image/svg+xml">
6
+ <link rel="icon" href="data:">
7
7
  <title>Another Entry Point</title>
8
8
  </head>
9
9
  <body>
10
10
  <h1>Another Entry Point</h1>
11
+
12
+ <h2>/api/user</h2>
13
+ <pre></pre>
14
+ <script>
15
+ (async () => {
16
+ let output = ''
17
+ try {
18
+ const response = await fetch('/api/user')
19
+ if (response.ok) {
20
+ const json = await response.json()
21
+ output = JSON.stringify(json, null, 2)
22
+ }
23
+ else
24
+ throw response.status
25
+ }
26
+ catch (error) {
27
+ output = 'Error: ' + error
28
+ }
29
+ finally {
30
+ document.querySelector('pre').innerText = output
31
+ }
32
+ })()
33
+ </script>
11
34
  </body>
12
- </html>
35
+ </html>
Binary file
@@ -3,11 +3,35 @@
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
5
  <meta content="width=device-width" name="viewport">
6
+ <link rel="icon" href="data:">
6
7
  <title>Title</title>
7
8
  </head>
8
9
  <body>
9
- <h1>Sample</h1>
10
+ <h1>Welcome!</h1>
10
11
  <video src="assets/video.mp4" width="720" controls></video>
11
- <script src="assets/app.js"></script>
12
+
13
+ <h2>/api/user</h2>
14
+ <pre></pre>
15
+
16
+ <script>
17
+ (async () => {
18
+ let output = ''
19
+ try {
20
+ const response = await fetch('/api/user')
21
+ if (response.ok) {
22
+ const json = await response.json()
23
+ output = JSON.stringify(json, null, 2)
24
+ }
25
+ else
26
+ throw response.status
27
+ }
28
+ catch (error) {
29
+ output = 'Error: ' + error
30
+ }
31
+ finally {
32
+ document.querySelector('pre').innerText = output
33
+ }
34
+ })()
35
+ </script>
12
36
  </body>
13
- </html>
37
+ </html>
package/src/Dashboard.css CHANGED
@@ -326,7 +326,7 @@ main {
326
326
  a {
327
327
  color: var(--colorAccent);
328
328
  text-decoration: none;
329
- padding: 3px 0;
329
+ padding: 6px 0;
330
330
  display: inline-block;
331
331
 
332
332
  &:hover {
@@ -1 +0,0 @@
1
- console.log('app')