@webqit/webflo 0.11.59 → 0.11.61-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 +1 -1
- package/src/runtime-pi/client/worker/Workport.js +13 -17
- package/src/runtime-pi/server/Application.js +1 -1
- package/src/runtime-pi/xRequest.js +1 -1
- package/src/services-pi/cert/http-auth-hook.js +1 -1
- package/src/services-pi/cert/http-cleanup-hook.js +1 -1
- package/src/webflo.js +1 -1
package/package.json
CHANGED
|
@@ -12,24 +12,20 @@ export default class Workport {
|
|
|
12
12
|
return this.post;
|
|
13
13
|
},
|
|
14
14
|
listen: (callback, client = this.client) => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
responsePort.postMessage(response);
|
|
27
|
-
}
|
|
15
|
+
(client || self).addEventListener('message', evt => {
|
|
16
|
+
this.client = evt.source;
|
|
17
|
+
const response = callback(evt);
|
|
18
|
+
let responsePort = evt.ports[0];
|
|
19
|
+
if (responsePort) {
|
|
20
|
+
if (response instanceof Promise) {
|
|
21
|
+
response.then(data => {
|
|
22
|
+
responsePort.postMessage(data);
|
|
23
|
+
});
|
|
24
|
+
} else {
|
|
25
|
+
responsePort.postMessage(response);
|
|
28
26
|
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
client.addEventListener('message', callback);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
33
29
|
return this.post;
|
|
34
30
|
},
|
|
35
31
|
request: (message, client = this.client) => {
|
|
@@ -107,7 +107,7 @@ export default class Application extends _Application {
|
|
|
107
107
|
if (window.document.templates) {
|
|
108
108
|
window.document.body.setAttribute('template', 'routes/' + httpEvent.url.pathname.split('/').filter(a => a).map(a => a + '+-').join('/'));
|
|
109
109
|
}
|
|
110
|
-
await new Promise(res => setTimeout(res,
|
|
110
|
+
await new Promise(res => setTimeout(res, 60));
|
|
111
111
|
return window;
|
|
112
112
|
});
|
|
113
113
|
return rendering + '';
|
|
@@ -35,7 +35,7 @@ export default class xRequest extends mxHttpMessage(Request, xRequestHeaders) {
|
|
|
35
35
|
'method', 'headers', 'mode', 'credentials', 'cache', 'redirect', 'referrer', 'integrity',
|
|
36
36
|
].reduce((init, prop) => ({ [prop]: request[prop], ...init }), {});
|
|
37
37
|
if (!['GET', 'HEAD'].includes(request.method)) {
|
|
38
|
-
requestInit.body = await request.arrayBuffer();
|
|
38
|
+
requestInit.body = await request.clone().arrayBuffer();
|
|
39
39
|
}
|
|
40
40
|
if (requestInit.mode === 'navigate') {
|
|
41
41
|
requestInit.mode = 'cors';
|
package/src/webflo.js
CHANGED