@webqit/webflo 0.20.43 → 0.20.45
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.20.
|
|
15
|
+
"version": "0.20.45",
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@webqit/fetch-plus": "^0.1.24",
|
|
51
51
|
"@webqit/keyval": "^0.2.17",
|
|
52
52
|
"@webqit/observer": "^3.8.14",
|
|
53
|
-
"@webqit/oohtml-ssr": "^2.2.
|
|
53
|
+
"@webqit/oohtml-ssr": "^2.2.4",
|
|
54
54
|
"@webqit/port-plus": "^0.1.19",
|
|
55
55
|
"@webqit/url-plus": "^0.1.4",
|
|
56
56
|
"@webqit/use-live": "^0.5.49",
|
|
@@ -937,7 +937,7 @@ export class WebfloServer extends AppRuntime {
|
|
|
937
937
|
document.body.append(dataScript);
|
|
938
938
|
}
|
|
939
939
|
|
|
940
|
-
const rendering = window.toString();
|
|
940
|
+
const rendering = window.document.toString();
|
|
941
941
|
document.documentElement.remove();
|
|
942
942
|
document.writeln('');
|
|
943
943
|
|
|
@@ -88,7 +88,7 @@ export class WebfloWorker extends AppRuntime {
|
|
|
88
88
|
// ONFETCH
|
|
89
89
|
const fetchHandler = (event) => {
|
|
90
90
|
// Handle special requests
|
|
91
|
-
if (!event.request.url.startsWith('http')
|
|
91
|
+
if (!event.request.url.startsWith('http')) {
|
|
92
92
|
return event.respondWith(fetch(event.request));
|
|
93
93
|
}
|
|
94
94
|
// Handle external requests
|
|
@@ -96,7 +96,8 @@ export class WebfloWorker extends AppRuntime {
|
|
|
96
96
|
return event.respondWith(this.remoteFetch(event.request));
|
|
97
97
|
}
|
|
98
98
|
event.respondWith((async (event) => {
|
|
99
|
-
|
|
99
|
+
let request = event.request;
|
|
100
|
+
const response = await this.navigate(request.url, request, { event });
|
|
100
101
|
return response;
|
|
101
102
|
})(event));
|
|
102
103
|
};
|
|
@@ -278,9 +279,9 @@ export class WebfloWorker extends AppRuntime {
|
|
|
278
279
|
}
|
|
279
280
|
|
|
280
281
|
async getRequestCache(request) {
|
|
281
|
-
const cacheName = request.headers.get('
|
|
282
|
-
? this.config.WORKER.cache_name + '
|
|
282
|
+
const cacheName = request.headers.get('Accept') === 'application/json'
|
|
283
|
+
? this.config.WORKER.cache_name + '_json'
|
|
283
284
|
: this.config.WORKER.cache_name;
|
|
284
285
|
return self.caches.open(cacheName);
|
|
285
286
|
}
|
|
286
|
-
}
|
|
287
|
+
}
|