mockaton 13.4.0 → 13.4.2
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
package/src/client/app.css
CHANGED
|
@@ -119,12 +119,12 @@ header {
|
|
|
119
119
|
|
|
120
120
|
.Logo {
|
|
121
121
|
align-self: end;
|
|
122
|
-
margin-right:
|
|
123
|
-
margin-bottom:
|
|
122
|
+
margin-right: 18px;
|
|
123
|
+
margin-bottom: 2px;
|
|
124
124
|
transition: opacity 240ms ease-in-out;
|
|
125
125
|
|
|
126
126
|
svg {
|
|
127
|
-
width:
|
|
127
|
+
width: 122px;
|
|
128
128
|
pointer-events: none;
|
|
129
129
|
fill: var(--colorText);
|
|
130
130
|
}
|
|
@@ -185,6 +185,7 @@ header {
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
.HelpLink {
|
|
188
|
+
opacity: 0.8;
|
|
188
189
|
width: 22px;
|
|
189
190
|
height: 22px;
|
|
190
191
|
flex-shrink: 0;
|
|
@@ -197,6 +198,7 @@ header {
|
|
|
197
198
|
|
|
198
199
|
&:hover {
|
|
199
200
|
background: var(--colorAccent);
|
|
201
|
+
opacity: 1;
|
|
200
202
|
}
|
|
201
203
|
|
|
202
204
|
svg {
|
package/src/client/graphics.js
CHANGED
|
@@ -2,10 +2,10 @@ import { createSvgElement as s } from './utils/dom.js'
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
export const Logo = () =>
|
|
5
|
-
s('svg', { viewBox: '0 0
|
|
6
|
-
s('path', { d: '
|
|
7
|
-
s('path', { fill: 'currentColor', d: '
|
|
8
|
-
s('path', { d: '
|
|
5
|
+
s('svg', { viewBox: '0 0 460 80' },
|
|
6
|
+
s('path', { d: 'm332 29v34.9q0 2.5 1.06 3.84t4.51 1.34h2.5q3.74 0 3.55 4.42 0 4.51-3.55 4.51h-3.17q-3.07 0-5.76-0.768-2.69-0.864-5.18-2.4v0.096q-4.7-3.07-4.7-10.9v-35h-3.74q-3.46 0-3.65-4.51 0-4.51 3.65-4.51h3.74v-10.3q0-4.61 5.47-4.61 5.28 0 5.28 4.61v10.3h7.97q3.74 0 3.55 4.51 0 4.51-3.55 4.51zm50.9-9.02q2.5 0 5.09 1.06 2.69 1.06 5.18 2.69h-0.096q2.5 1.82 3.84 4.8 1.34 2.88 1.34 6.72v27.3q0 7.87-5.18 11.6-5.09 3.65-10.2 3.65h-15.4q-2.5 0-5.09-0.864t-5.09-2.78q-5.18-3.65-5.18-11.6v-27.3q0-3.84 1.34-6.72 1.34-2.98 3.84-4.8h-0.096q2.4-1.63 5.09-2.69t5.18-1.06zm-1.73 48.8q3.55 0 4.99-2.02 1.54-2.02 1.54-4.32v-27.1q0-2.4-1.54-4.32-1.44-2.02-4.99-2.02h-11.9q-3.55 0-5.09 2.02-1.44 1.92-1.44 4.32v27.1q0 2.3 1.44 4.32 1.54 2.02 5.09 2.02zm40 4.99q0 4.61-5.28 4.61t-5.28-4.61v-38.6q0-3.94 1.25-6.82t3.94-4.7q5.09-3.65 10.2-3.65h15.5q4.9 0 10.2 3.65 5.18 3.65 5.18 11.5v38.6q0 4.61-5.28 4.61t-5.28-4.61v-37.7q0-2.5-1.54-4.8l0.096 0.096q-1.25-2.3-5.09-2.3h-12q-3.94 0-5.18 2.3-1.34 2.02-1.34 4.7z' }),
|
|
7
|
+
s('path', { fill: 'currentColor', d: 'm282 11-21 64.5v-0.096q-0.576 1.44-1.63 2.4-0.96 0.864-2.4 0.864-0.768 0-1.54-0.192-0.672-0.096-1.44-0.288h0.096q-5.47-1.73-4.03-6.14l21.9-66.5q0.48-1.54 1.63-2.59 1.25-1.06 2.88-1.25 1.63-0.288 3.17-0.384 1.54-0.192 2.4-0.192t2.4 0.192q1.54 0.096 3.17 0.288 1.34 0.192 2.59 1.44 1.34 1.25 2.02 2.5 5.38 16.5 10.8 33.3 5.57 16.7 10.9 33.2 1.34 4.42-4.03 6.14-0.768 0.192-1.44 0.288-0.576 0.192-1.34 0.192-1.34 0-2.5-0.864-1.06-0.96-1.54-2.4v0.096zm7.2 43.8q0 3.07-2.21 5.28-2.11 2.11-5.18 2.11t-5.18-2.11q-2.11-2.21-2.11-5.28t2.11-5.18q2.11-2.21 5.18-2.21t5.18 2.21q2.21 2.11 2.21 5.18z' }),
|
|
8
|
+
s('path', { d: 'm31.4 36q0-1.25-0.384-2.4-0.384-1.25-0.96-2.3-1.25-2.3-5.18-2.3h-6.14q-3.94 0-5.28 2.3-1.15 2.21-1.15 4.7v38q0 4.51-5.28 4.51-5.47 0-5.47-4.51v-38.9q0-7.87 5.18-11.5 5.28-3.65 10.3-3.65h9.7q2.21 0 4.9 0.864t5.18 2.69q2.4-1.82 4.99-2.69 2.69-0.864 5.09-0.864h9.6q5.09 0 10.2 3.65 5.28 3.55 5.28 11.5v38.9q0 4.51-5.38 4.51t-5.38-4.51v-38q0-1.25-0.288-2.5t-1.06-2.3l0.096 0.096q-0.768-1.25-1.92-1.73-1.15-0.576-3.36-0.576h-6.05q-4.03 0-5.28 2.3-1.25 2.11-1.25 4.7v38q0 4.51-5.28 4.51-5.38 0-5.38-4.51zm83.2-16q2.5 0 5.09 1.06 2.69 1.06 5.18 2.69h-0.096q2.5 1.82 3.84 4.8 1.34 2.88 1.34 6.72v27.3q0 7.87-5.18 11.6-5.09 3.65-10.2 3.65h-15.4q-2.5 0-5.09-0.864t-5.09-2.78q-5.18-3.65-5.18-11.6v-27.3q0-3.84 1.34-6.72 1.34-2.98 3.84-4.8h-0.096q2.4-1.63 5.09-2.69t5.18-1.06zm-1.73 48.8q3.55 0 4.99-2.02 1.54-2.02 1.54-4.32v-27.1q0-2.4-1.54-4.32-1.44-2.02-4.99-2.02h-11.9q-3.55 0-5.09 2.02-1.44 1.92-1.44 4.32v27.1q0 2.3 1.44 4.32 1.54 2.02 5.09 2.02zm75.6-6.24q0 7.87-5.18 11.6-5.09 3.65-10.2 3.65h-16.1q-5.09 0-9.89-3.65-2.3-1.92-3.55-4.8-1.25-2.98-1.25-6.82v-27.4q0-7.78 4.8-11.5 2.4-1.73 4.9-2.69 2.59-1.06 4.99-1.06h16.1q2.3 0 5.09 0.96 2.78 0.864 5.18 2.4 2.3 1.63 3.65 4.51 1.44 2.88 1.44 6.82v4.8q0 4.61-5.28 4.61t-5.28-4.61v-4.13q0-2.4-1.54-4.32-1.44-2.02-4.99-2.02h-12q-3.55 0-5.09 2.02-1.44 1.92-1.44 4.32v27.2q0 2.3 1.44 4.32 1.54 2.02 5.09 2.02h12q3.55 0 4.99-2.02 1.54-2.02 1.54-4.32v-4.42q0-4.51 5.28-4.51t5.28 4.51zm22.8-0.768v12.2q0 4.51-5.28 4.51t-5.28-4.51v-68.4q0-4.61 5.28-4.61t5.28 4.61v40.7q2.4-2.88 5.28-6.14 2.98-3.36 5.86-6.72 2.98-3.46 5.86-6.72 2.88-3.36 5.38-6.24v0.096q1.73-2.02 3.46-2.02 0.96 0 1.82 0.48 0.96 0.384 2.02 1.15h-0.096q2.3 1.92 2.3 3.84 0 0.672-0.288 1.54-0.288 0.768-0.96 1.34zm32.1 9.6q0.672 1.25 0.672 2.59 0 2.5-2.88 3.74-1.92 1.15-3.46 1.15-1.06 0-2.02-0.768-0.96-0.672-1.54-1.73l-9.6-18.5q-0.864-1.44-0.864-2.88 0-2.4 2.5-4.03 0.672-0.48 1.34-0.864 0.768-0.384 1.63-0.576 1.06-0.192 2.02 0.384t1.63 1.54z' }))
|
|
9
9
|
|
|
10
10
|
export const TimerIcon = () =>
|
|
11
11
|
s('svg', { viewBox: '0 0 24 24' },
|
|
@@ -74,7 +74,7 @@ function request(path, options = {}) {
|
|
|
74
74
|
class Fixture {
|
|
75
75
|
constructor(file, body = '') {
|
|
76
76
|
this.file = file
|
|
77
|
-
this.body = body || `Body for ${file}`
|
|
77
|
+
this.body = body || `Body for: ${file}`
|
|
78
78
|
const t = parseFilename(file)
|
|
79
79
|
this.urlMask = t.urlMask
|
|
80
80
|
this.method = t.method
|
|
@@ -336,7 +336,8 @@ describe('Proxy Fallback', () => {
|
|
|
336
336
|
response.writeHead(423, {
|
|
337
337
|
'custom_header': 'my_custom_header',
|
|
338
338
|
'content-type': mimeFor('.json'),
|
|
339
|
-
'set-cookie': CUSTOM_COOKIES
|
|
339
|
+
'set-cookie': CUSTOM_COOKIES,
|
|
340
|
+
'cache-control': 'public'
|
|
340
341
|
})
|
|
341
342
|
response.end(JSON.stringify(BODY_PAYLOAD))
|
|
342
343
|
})
|
|
@@ -359,6 +360,9 @@ describe('Proxy Fallback', () => {
|
|
|
359
360
|
|
|
360
361
|
equal(r1.headers.get('set-cookie'), CUSTOM_COOKIES.join(', '))
|
|
361
362
|
equal(r2.headers.get('set-cookie'), CUSTOM_COOKIES.join(', '))
|
|
363
|
+
|
|
364
|
+
equal(r1.headers.get('cache-control'), 'no-cache') // unsets cache
|
|
365
|
+
equal(r2.headers.get('cache-control'), 'no-cache')
|
|
362
366
|
|
|
363
367
|
deepEqual(await r2.json(), BODY_PAYLOAD)
|
|
364
368
|
deepEqual(await r1.json(), BODY_PAYLOAD)
|
package/src/server/ProxyRelay.js
CHANGED
|
@@ -34,7 +34,8 @@ export async function proxy(req, response, delay) {
|
|
|
34
34
|
|
|
35
35
|
response.writeHead(proxyResponse.status, {
|
|
36
36
|
...Object.fromEntries(proxyResponse.headers),
|
|
37
|
-
'
|
|
37
|
+
'set-cookie': proxyResponse.headers.getSetCookie(), // parses multiple into an array
|
|
38
|
+
'cache-control': 'no-cache'
|
|
38
39
|
})
|
|
39
40
|
const body = await proxyResponse.text()
|
|
40
41
|
setTimeout(() => response.end(body), delay) // TESTME
|