@percy/core 1.1.0 → 1.1.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/dist/api.js +17 -1
- package/package.json +6 -6
package/dist/api.js
CHANGED
|
@@ -12,7 +12,23 @@ export function createPercyServer(percy, port) {
|
|
|
12
12
|
return new Server({
|
|
13
13
|
port
|
|
14
14
|
}) // facilitate logger websocket connections
|
|
15
|
-
.websocket(
|
|
15
|
+
.websocket('/(logger)?', ws => {
|
|
16
|
+
ws.addEventListener('message', ({
|
|
17
|
+
data
|
|
18
|
+
}) => {
|
|
19
|
+
let {
|
|
20
|
+
log,
|
|
21
|
+
messages = []
|
|
22
|
+
} = JSON.parse(data);
|
|
23
|
+
|
|
24
|
+
for (let m of messages) logger.instance.messages.add(m);
|
|
25
|
+
|
|
26
|
+
if (log) logger.instance.log(...log);
|
|
27
|
+
});
|
|
28
|
+
ws.send(JSON.stringify({
|
|
29
|
+
loglevel: logger.loglevel()
|
|
30
|
+
}));
|
|
31
|
+
}) // general middleware
|
|
16
32
|
.route((req, res, next) => {
|
|
17
33
|
// treat all request bodies as json
|
|
18
34
|
if (req.body) try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percy/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"test:types": "tsd"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@percy/client": "1.1.
|
|
43
|
-
"@percy/config": "1.1.
|
|
44
|
-
"@percy/dom": "1.1.
|
|
45
|
-
"@percy/logger": "1.1.
|
|
42
|
+
"@percy/client": "1.1.1",
|
|
43
|
+
"@percy/config": "1.1.1",
|
|
44
|
+
"@percy/dom": "1.1.1",
|
|
45
|
+
"@percy/logger": "1.1.1",
|
|
46
46
|
"content-disposition": "^0.5.4",
|
|
47
47
|
"cross-spawn": "^7.0.3",
|
|
48
48
|
"extract-zip": "^2.0.1",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"rimraf": "^3.0.2",
|
|
54
54
|
"ws": "^8.0.0"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "d74af6a294f89fcb23c4ec598bb68a884ce47907"
|
|
57
57
|
}
|