mockaton 8.20.2 → 8.20.4
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/README.md +5 -4
- package/package.json +2 -2
- package/src/Api.js +1 -1
- package/src/Dashboard.css +6 -6
- package/src/Dashboard.js +7 -6
- package/src/staticCollection.js +1 -1
package/README.md
CHANGED
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
[](https://github.com/ericfortis/mockaton/actions/workflows/test.yml)
|
|
6
6
|
[](https://github.com/ericfortis/mockaton/actions/workflows/github-code-scanning/codeql)
|
|
7
7
|
|
|
8
|
-
An HTTP mock server for simulating APIs with minimal setup
|
|
9
|
-
difficult to reproduce states.
|
|
10
|
-
Similarly, if you are a frontend developer, triggering it on your project’s backend.
|
|
8
|
+
An HTTP mock server for simulating APIs with minimal setup
|
|
9
|
+
— ideal for testing difficult to reproduce states.
|
|
11
10
|
|
|
12
11
|
<br/>
|
|
13
12
|
|
|
@@ -17,7 +16,9 @@ Similarly, if you are a frontend developer, triggering it on your project’s ba
|
|
|
17
16
|
With Mockaton, developers can achieve correctness without sacrificing speed.
|
|
18
17
|
|
|
19
18
|
### Correctness
|
|
20
|
-
- Enables testing of complex
|
|
19
|
+
- Enables testing of complex scenarios that would otherwise be
|
|
20
|
+
skipped. For example, triggering an error on a third-party API. Or if
|
|
21
|
+
you are a frontend developer, triggering it on your project’s backend.
|
|
21
22
|
- Allows for deterministic, comprehensive, and consistent state.
|
|
22
23
|
|
|
23
24
|
### Speed
|
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.20.
|
|
5
|
+
"version": "8.20.4",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"types": "index.d.ts",
|
|
8
8
|
"license": "MIT",
|
|
@@ -27,6 +27,6 @@
|
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"pixaton": "1.1.2",
|
|
30
|
-
"puppeteer": "24.
|
|
30
|
+
"puppeteer": "24.18.0"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/src/Api.js
CHANGED
package/src/Dashboard.css
CHANGED
|
@@ -165,6 +165,7 @@ header {
|
|
|
165
165
|
border: 0;
|
|
166
166
|
border-right: 3px solid transparent;
|
|
167
167
|
margin-top: 4px;
|
|
168
|
+
outline: 1px solid var(--colorSecondaryActionBorder);
|
|
168
169
|
color: var(--colorText);
|
|
169
170
|
font-size: 11px;
|
|
170
171
|
background-color: var(--colorComboBoxHeaderBackground);
|
|
@@ -252,7 +253,7 @@ header {
|
|
|
252
253
|
main {
|
|
253
254
|
display: grid;
|
|
254
255
|
min-height: 0;
|
|
255
|
-
grid-template-columns: min
|
|
256
|
+
grid-template-columns: minmax(min-content, max-content) 1fr;
|
|
256
257
|
|
|
257
258
|
@media (max-width: 1160px) {
|
|
258
259
|
grid-template-columns: min(620px) 1fr;
|
|
@@ -322,13 +323,11 @@ table {
|
|
|
322
323
|
.MockSelector {
|
|
323
324
|
width: 100%;
|
|
324
325
|
height: 26px;
|
|
325
|
-
padding-right:
|
|
326
|
-
padding-left:
|
|
327
|
-
text-align: right;
|
|
328
|
-
direction: rtl;
|
|
326
|
+
padding-right: 8px;
|
|
327
|
+
padding-left: 8px;
|
|
329
328
|
text-overflow: ellipsis;
|
|
330
329
|
font-size: 12px;
|
|
331
|
-
background-position:
|
|
330
|
+
background-position: calc(100% - 4px) center;
|
|
332
331
|
|
|
333
332
|
&.nonDefault {
|
|
334
333
|
font-weight: bold;
|
|
@@ -519,6 +518,7 @@ table {
|
|
|
519
518
|
|
|
520
519
|
.ProgressBar {
|
|
521
520
|
position: relative;
|
|
521
|
+
top: -4px;
|
|
522
522
|
width: 100%;
|
|
523
523
|
height: 2px;
|
|
524
524
|
background: var(--colorComboBoxHeaderBackground);
|
package/src/Dashboard.js
CHANGED
|
@@ -597,8 +597,8 @@ async function previewMock(method, urlMask, href) {
|
|
|
597
597
|
previewMock.controller?.abort()
|
|
598
598
|
previewMock.controller = new AbortController
|
|
599
599
|
|
|
600
|
-
renderProgressBar()
|
|
601
600
|
payloadViewerTitleRef.current.replaceChildren(r('span', null, Strings.fetching))
|
|
601
|
+
payloadViewerRef.current.replaceChildren(PayloadViewerProgressBar())
|
|
602
602
|
|
|
603
603
|
try {
|
|
604
604
|
const response = await fetch(href, {
|
|
@@ -607,10 +607,9 @@ async function previewMock(method, urlMask, href) {
|
|
|
607
607
|
})
|
|
608
608
|
await updatePayloadViewer(method, urlMask, response)
|
|
609
609
|
}
|
|
610
|
-
catch {
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
payloadViewerRef.current.replaceChildren(PayloadViewerProgressBar())
|
|
610
|
+
catch (err) {
|
|
611
|
+
onError(err)
|
|
612
|
+
payloadViewerRef.current.replaceChildren()
|
|
614
613
|
}
|
|
615
614
|
}
|
|
616
615
|
|
|
@@ -755,7 +754,9 @@ async function poll() {
|
|
|
755
754
|
/** # Utils */
|
|
756
755
|
|
|
757
756
|
function className(...args) {
|
|
758
|
-
return {
|
|
757
|
+
return {
|
|
758
|
+
className: args.filter(Boolean).join(' ')
|
|
759
|
+
}
|
|
759
760
|
}
|
|
760
761
|
|
|
761
762
|
|
package/src/staticCollection.js
CHANGED