@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 CHANGED
@@ -12,7 +12,7 @@
12
12
  "vanila-javascript"
13
13
  ],
14
14
  "homepage": "https://webqit.io/tooling/webflo",
15
- "version": "0.11.59",
15
+ "version": "0.11.61-0",
16
16
  "license": "MIT",
17
17
  "repository": {
18
18
  "type": "git",
@@ -12,24 +12,20 @@ export default class Workport {
12
12
  return this.post;
13
13
  },
14
14
  listen: (callback, client = this.client) => {
15
- if (!client) {
16
- self.addEventListener('message', evt => {
17
- this.client = evt.source;
18
- const response = callback(evt);
19
- let responsePort = evt.ports[0];
20
- if (responsePort) {
21
- if (response instanceof Promise) {
22
- response.then(data => {
23
- responsePort.postMessage(data);
24
- });
25
- } else {
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
- return this.post;
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, 10));
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';
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
 
3
3
  /**
4
4
  * imports
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
 
3
3
  /**
4
4
  * imports
package/src/webflo.js CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
 
3
3
  /**
4
4
  * @imports