mockaton 8.23.4 → 8.24.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/package.json +2 -2
- package/src/ApiCommander.js +1 -1
- package/src/Dashboard.css +2 -6
- package/src/MockDispatcher.js +1 -1
- package/src/StaticDispatcher.js +3 -0
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "mockaton",
|
|
3
3
|
"description": "HTTP Mock Server",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "8.
|
|
5
|
+
"version": "8.24.0",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"types": "index.d.ts",
|
|
8
8
|
"license": "MIT",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"outdated": "npm outdated --parseable | awk -F: '{ printf \"npm i %-30s ;# %s\\n\", $4, $2 }'"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"pixaton": "1.1.
|
|
28
|
+
"pixaton": "1.1.3",
|
|
29
29
|
"puppeteer": "24.19.0"
|
|
30
30
|
},
|
|
31
31
|
"optionalDependencies": {
|
package/src/ApiCommander.js
CHANGED
|
@@ -60,7 +60,7 @@ export class Commander {
|
|
|
60
60
|
|
|
61
61
|
/** @type {JsonPromise<number>} */
|
|
62
62
|
getSyncVersion(currentSyncVersion, abortSignal) {
|
|
63
|
-
return fetch(API.syncVersion, {
|
|
63
|
+
return fetch(this.#addr + API.syncVersion, {
|
|
64
64
|
signal: AbortSignal.any([abortSignal, AbortSignal.timeout(LONG_POLL_SERVER_TIMEOUT + 1000)]),
|
|
65
65
|
headers: {
|
|
66
66
|
[DF.syncVersion]: currentSyncVersion
|
package/src/Dashboard.css
CHANGED
|
@@ -80,14 +80,15 @@ body {
|
|
|
80
80
|
grid-template-rows: auto 1fr;
|
|
81
81
|
background: var(--colorBackground);
|
|
82
82
|
color: var(--colorText);
|
|
83
|
+
font-family: system-ui, sans-serif;
|
|
83
84
|
}
|
|
84
85
|
|
|
85
86
|
* {
|
|
86
87
|
box-sizing: border-box;
|
|
87
88
|
padding: 0;
|
|
88
89
|
border: 0;
|
|
90
|
+
font-family: inherit;
|
|
89
91
|
margin: 0;
|
|
90
|
-
font-family: system-ui, sans-serif;
|
|
91
92
|
font-size: 100%;
|
|
92
93
|
outline: 0;
|
|
93
94
|
scrollbar-width: thin;
|
|
@@ -535,11 +536,6 @@ table {
|
|
|
535
536
|
code {
|
|
536
537
|
white-space: pre;
|
|
537
538
|
tab-size: 2;
|
|
538
|
-
font-family: monospace;
|
|
539
|
-
|
|
540
|
-
* {
|
|
541
|
-
font-family: monospace;
|
|
542
|
-
}
|
|
543
539
|
|
|
544
540
|
.json {
|
|
545
541
|
color: var(--colorSecondaryAction);
|
package/src/MockDispatcher.js
CHANGED
|
@@ -22,7 +22,7 @@ export async function dispatchMock(req, response) {
|
|
|
22
22
|
return
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
console.log('%s → %s', decodeURIComponent(req.url), broker.file)
|
|
25
|
+
console.log('%s %s → %s', new Date().toISOString(), decodeURIComponent(req.url), broker.file)
|
|
26
26
|
response.statusCode = broker.status
|
|
27
27
|
|
|
28
28
|
if (cookie.getCurrent())
|
package/src/StaticDispatcher.js
CHANGED
|
@@ -15,6 +15,9 @@ export async function dispatchStatic(req, response) {
|
|
|
15
15
|
sendNotFound(response)
|
|
16
16
|
return
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
console.log('%s %s (static)', new Date().toISOString(), decodeURIComponent(req.url))
|
|
20
|
+
|
|
18
21
|
const file = join(config.staticDir, broker.route)
|
|
19
22
|
if (req.headers.range)
|
|
20
23
|
await sendPartialContent(response, req.headers.range, file)
|