@webqit/webflo 0.11.61-0 → 1.0.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/.gitignore +7 -7
- package/LICENSE +20 -20
- package/README.md +2079 -2074
- package/docker/Dockerfile +42 -42
- package/docker/README.md +91 -91
- package/docker/package.json +2 -2
- package/package.json +80 -81
- package/src/{Context.js → AbstractContext.js} +71 -79
- package/src/config-pi/deployment/Env.js +68 -68
- package/src/config-pi/deployment/Layout.js +63 -63
- package/src/config-pi/deployment/Origins.js +139 -139
- package/src/config-pi/deployment/Proxy.js +74 -74
- package/src/config-pi/deployment/index.js +17 -17
- package/src/config-pi/index.js +15 -15
- package/src/config-pi/runtime/Client.js +116 -98
- package/src/config-pi/runtime/Server.js +125 -125
- package/src/config-pi/runtime/client/Worker.js +109 -134
- package/src/config-pi/runtime/client/index.js +11 -11
- package/src/config-pi/runtime/index.js +17 -17
- package/src/config-pi/runtime/server/Headers.js +74 -74
- package/src/config-pi/runtime/server/Redirects.js +69 -69
- package/src/config-pi/runtime/server/index.js +13 -13
- package/src/config-pi/static/Manifest.js +319 -319
- package/src/config-pi/static/Ssg.js +49 -49
- package/src/config-pi/static/index.js +13 -13
- package/src/deployment-pi/index.js +10 -10
- package/src/deployment-pi/origins/index.js +216 -216
- package/src/index.js +11 -19
- package/src/runtime-pi/HttpEvent.js +126 -106
- package/src/runtime-pi/HttpUser.js +126 -0
- package/src/runtime-pi/MessagingOverBroadcast.js +9 -0
- package/src/runtime-pi/MessagingOverChannel.js +85 -0
- package/src/runtime-pi/MessagingOverSocket.js +106 -0
- package/src/runtime-pi/MultiportMessagingAPI.js +81 -0
- package/src/runtime-pi/WebfloCookieStorage.js +27 -0
- package/src/runtime-pi/WebfloEventTarget.js +39 -0
- package/src/runtime-pi/WebfloMessageEvent.js +58 -0
- package/src/runtime-pi/WebfloMessagingAPI.js +69 -0
- package/src/runtime-pi/{Router.js → WebfloRouter.js} +99 -130
- package/src/runtime-pi/WebfloRuntime.js +52 -0
- package/src/runtime-pi/WebfloStorage.js +109 -0
- package/src/runtime-pi/client/ClientMessaging.js +5 -0
- package/src/runtime-pi/client/Context.js +3 -7
- package/src/runtime-pi/client/CookieStorage.js +17 -0
- package/src/runtime-pi/client/Router.js +38 -48
- package/src/runtime-pi/client/SessionStorage.js +33 -0
- package/src/runtime-pi/client/Url.js +156 -205
- package/src/runtime-pi/client/WebfloClient.js +544 -0
- package/src/runtime-pi/client/WebfloRootClient1.js +179 -0
- package/src/runtime-pi/client/WebfloRootClient2.js +109 -0
- package/src/runtime-pi/client/WebfloSubClient.js +165 -0
- package/src/runtime-pi/client/Workport.js +118 -178
- package/src/runtime-pi/client/generate.js +480 -471
- package/src/runtime-pi/client/index.js +16 -21
- package/src/runtime-pi/client/worker/ClientMessaging.js +5 -0
- package/src/runtime-pi/client/worker/Context.js +3 -7
- package/src/runtime-pi/client/worker/CookieStorage.js +17 -0
- package/src/runtime-pi/client/worker/SessionStorage.js +13 -0
- package/src/runtime-pi/client/worker/WebfloWorker.js +294 -0
- package/src/runtime-pi/client/worker/Workport.js +17 -85
- package/src/runtime-pi/client/worker/index.js +10 -21
- package/src/runtime-pi/index.js +6 -13
- package/src/runtime-pi/server/ClientMessaging.js +18 -0
- package/src/runtime-pi/server/ClientMessagingRegistry.js +57 -0
- package/src/runtime-pi/server/Context.js +11 -15
- package/src/runtime-pi/server/CookieStorage.js +17 -0
- package/src/runtime-pi/server/Router.js +93 -159
- package/src/runtime-pi/server/SessionStorage.js +53 -0
- package/src/runtime-pi/server/WebfloServer.js +755 -0
- package/src/runtime-pi/server/index.js +10 -21
- package/src/runtime-pi/util-http.js +322 -86
- package/src/runtime-pi/util-url.js +146 -146
- package/src/runtime-pi/xURL.js +108 -105
- package/src/runtime-pi/xfetch.js +22 -22
- package/src/services-pi/cert/http-auth-hook.js +22 -22
- package/src/services-pi/cert/http-cleanup-hook.js +22 -22
- package/src/services-pi/cert/index.js +79 -79
- package/src/services-pi/index.js +8 -8
- package/src/static-pi/index.js +10 -10
- package/src/webflo.js +30 -30
- package/test/index.test.js +26 -26
- package/test/site/package.json +9 -9
- package/test/site/public/bundle.html +5 -5
- package/test/site/public/bundle.html.json +3 -3
- package/test/site/public/bundle.js +2 -2
- package/test/site/public/bundle.webflo.js +15 -15
- package/test/site/public/index.html +29 -29
- package/test/site/public/index1.html +34 -34
- package/test/site/public/page-2/bundle.html +4 -4
- package/test/site/public/page-2/bundle.js +2 -2
- package/test/site/public/page-2/index.html +45 -45
- package/test/site/public/page-2/main.html +2 -2
- package/test/site/public/page-4/subpage/bundle.js +2 -2
- package/test/site/public/page-4/subpage/index.html +30 -30
- package/test/site/public/sparoots.json +4 -4
- package/test/site/public/worker.js +3 -3
- package/test/site/server/index.js +15 -15
- package/src/runtime-pi/Application.js +0 -29
- package/src/runtime-pi/Cookies.js +0 -82
- package/src/runtime-pi/Runtime.js +0 -21
- package/src/runtime-pi/client/Application.js +0 -100
- package/src/runtime-pi/client/Runtime.js +0 -332
- package/src/runtime-pi/client/createStorage.js +0 -57
- package/src/runtime-pi/client/oohtml/full.js +0 -7
- package/src/runtime-pi/client/oohtml/namespacing.js +0 -7
- package/src/runtime-pi/client/oohtml/scripting.js +0 -8
- package/src/runtime-pi/client/oohtml/templating.js +0 -8
- package/src/runtime-pi/client/worker/Application.js +0 -44
- package/src/runtime-pi/client/worker/Runtime.js +0 -269
- package/src/runtime-pi/server/Application.js +0 -116
- package/src/runtime-pi/server/Runtime.js +0 -557
- package/src/runtime-pi/xFormData.js +0 -24
- package/src/runtime-pi/xHeaders.js +0 -146
- package/src/runtime-pi/xRequest.js +0 -46
- package/src/runtime-pi/xRequestHeaders.js +0 -109
- package/src/runtime-pi/xResponse.js +0 -33
- package/src/runtime-pi/xResponseHeaders.js +0 -117
- package/src/runtime-pi/xxHttpMessage.js +0 -102
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head>
|
|
2
|
-
<title>Home</title>
|
|
3
|
-
|
|
4
|
-
<script type="module" src="/bundle.webflo.js" by="webflo"></script>
|
|
5
|
-
<script type="module" src="/bundle.js" by="webflo"></script>
|
|
6
|
-
|
|
7
|
-
<template name="routes" src="/bundle.html" by="oohtml-cli"></template>
|
|
8
|
-
</head><body><h1>Home</h1>
|
|
9
|
-
|
|
10
|
-
<a href="#">Hash</a>
|
|
11
|
-
|
|
12
|
-
<ul>
|
|
13
|
-
<li><a href="/">Home</a></li>
|
|
14
|
-
<li><a href="/page-1">Page 1</a></li>
|
|
15
|
-
<li><a href="/page-2">Page 2</a>
|
|
16
|
-
<ul>
|
|
17
|
-
<li><a href="/page-2/subpage">Subpage</a></li>
|
|
18
|
-
</ul>
|
|
19
|
-
</li>
|
|
20
|
-
<li><a href="/page-3">Page 3</a></li>
|
|
21
|
-
<li><a href="/page-4">Page 4</a>
|
|
22
|
-
<ul>
|
|
23
|
-
<li><a href="/page-4/subpage">Subpage</a></li>
|
|
24
|
-
</ul>
|
|
25
|
-
</li>
|
|
26
|
-
<li><a href="/page-5">Page 5</a></li>
|
|
27
|
-
</ul>
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
<!DOCTYPE html><html><head>
|
|
2
|
+
<title>Home</title>
|
|
3
|
+
|
|
4
|
+
<script type="module" src="/bundle.webflo.js" by="webflo"></script>
|
|
5
|
+
<script type="module" src="/bundle.js" by="webflo"></script>
|
|
6
|
+
|
|
7
|
+
<template name="routes" src="/bundle.html" by="oohtml-cli"></template>
|
|
8
|
+
</head><body><h1>Home</h1>
|
|
9
|
+
|
|
10
|
+
<a href="#">Hash</a>
|
|
11
|
+
|
|
12
|
+
<ul>
|
|
13
|
+
<li><a href="/">Home</a></li>
|
|
14
|
+
<li><a href="/page-1">Page 1</a></li>
|
|
15
|
+
<li><a href="/page-2">Page 2</a>
|
|
16
|
+
<ul>
|
|
17
|
+
<li><a href="/page-2/subpage">Subpage</a></li>
|
|
18
|
+
</ul>
|
|
19
|
+
</li>
|
|
20
|
+
<li><a href="/page-3">Page 3</a></li>
|
|
21
|
+
<li><a href="/page-4">Page 4</a>
|
|
22
|
+
<ul>
|
|
23
|
+
<li><a href="/page-4/subpage">Subpage</a></li>
|
|
24
|
+
</ul>
|
|
25
|
+
</li>
|
|
26
|
+
<li><a href="/page-5">Page 5</a></li>
|
|
27
|
+
</ul>
|
|
28
|
+
|
|
29
|
+
|
|
30
30
|
</body></html>
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head>
|
|
2
|
-
<title>Home</title>
|
|
3
|
-
<style>
|
|
4
|
-
b, i, a, span {
|
|
5
|
-
background-color: aqua;
|
|
6
|
-
}
|
|
7
|
-
div, ul, ol, li, p, h1, h2, h3, h4, h5, h6 {
|
|
8
|
-
background-color: yellow;
|
|
9
|
-
}
|
|
10
|
-
li {
|
|
11
|
-
background-color: violet;
|
|
12
|
-
}
|
|
13
|
-
</style>
|
|
14
|
-
<script type="module" src="/bundle.webflo.js" by="webflo"></script>
|
|
15
|
-
<script type="module" src="/bundle.js" by="webflo"></script></head>
|
|
16
|
-
|
|
17
|
-
<body>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
This i s some text this This is some text this This is some text this This is some text this
|
|
21
|
-
This is some text this This is <b>some text this</b> This is some <div>text this This
|
|
22
|
-
is some text this This is some text this This is some text this This is some text this This
|
|
23
|
-
is some <i>text this</i> This</div> is some text this
|
|
24
|
-
|
|
25
|
-
<ul>
|
|
26
|
-
<li>Item 1</li>
|
|
27
|
-
<li>Item 2</li>
|
|
28
|
-
<li>Item 3</li>
|
|
29
|
-
<li>Item 4</li>
|
|
30
|
-
<li>Item 5</li>
|
|
31
|
-
</ul>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
<!DOCTYPE html><html><head>
|
|
2
|
+
<title>Home</title>
|
|
3
|
+
<style>
|
|
4
|
+
b, i, a, span {
|
|
5
|
+
background-color: aqua;
|
|
6
|
+
}
|
|
7
|
+
div, ul, ol, li, p, h1, h2, h3, h4, h5, h6 {
|
|
8
|
+
background-color: yellow;
|
|
9
|
+
}
|
|
10
|
+
li {
|
|
11
|
+
background-color: violet;
|
|
12
|
+
}
|
|
13
|
+
</style>
|
|
14
|
+
<script type="module" src="/bundle.webflo.js" by="webflo"></script>
|
|
15
|
+
<script type="module" src="/bundle.js" by="webflo"></script></head>
|
|
16
|
+
|
|
17
|
+
<body>
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
This i s some text this This is some text this This is some text this This is some text this
|
|
21
|
+
This is some text this This is <b>some text this</b> This is some <div>text this This
|
|
22
|
+
is some text this This is some text this This is some text this This is some text this This
|
|
23
|
+
is some <i>text this</i> This</div> is some text this
|
|
24
|
+
|
|
25
|
+
<ul>
|
|
26
|
+
<li>Item 1</li>
|
|
27
|
+
<li>Item 2</li>
|
|
28
|
+
<li>Item 3</li>
|
|
29
|
+
<li>Item 4</li>
|
|
30
|
+
<li>Item 5</li>
|
|
31
|
+
</ul>
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
35
|
</body></html>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
<img src="/
|
|
3
|
-
<div
|
|
4
|
-
<h2>Main Content</h2>
|
|
1
|
+
|
|
2
|
+
<img src="/logo-130x130.png" def="logo-130x130.png" />
|
|
3
|
+
<div def="main.html">
|
|
4
|
+
<h2>Main Content</h2>
|
|
5
5
|
</div>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/** @webqit/webflo */
|
|
2
|
-
var{start:r}=WebQit.Webflo,e={},o={bundle_filename:"bundle.js",public_base_url:"/",spa_routing:!0,oohtml_support:"full",service_worker_support:!0,worker_scope:"/",worker_filename:"worker.js",routing:{root:"/page-2",subroots:[],targets:0}};r.call({layout:e,params:o});
|
|
1
|
+
/** @webqit/webflo */
|
|
2
|
+
var{start:r}=WebQit.Webflo,e={},o={bundle_filename:"bundle.js",public_base_url:"/",spa_routing:!0,oohtml_support:"full",service_worker_support:!0,worker_scope:"/",worker_filename:"worker.js",routing:{root:"/page-2",subroots:[],targets:0}};r.call({layout:e,params:o});
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head>
|
|
2
|
-
<title>Page 2</title>
|
|
3
|
-
<!--
|
|
4
|
-
<script src="http://localhost:4000/oohtml/dist/main.js"></script>
|
|
5
|
-
-->
|
|
6
|
-
<script type="module" src="/bundle.webflo.js" by="webflo"></script>
|
|
7
|
-
<script type="module" src="/page-2/bundle.js" by="webflo"></script>
|
|
8
|
-
<template name="routes" src="/page-2/bundle.html" by="oohtml-cli"></template></head>
|
|
9
|
-
<body>
|
|
10
|
-
|
|
11
|
-
<h1>Page 2</h1>
|
|
12
|
-
|
|
13
|
-
<!--
|
|
14
|
-
<import template="routes" name="main.html"></import>
|
|
15
|
-
-->
|
|
16
|
-
|
|
17
|
-
<ul>
|
|
18
|
-
<li><a href="/">Home</a></li>
|
|
19
|
-
<li><a href="/page-1">Page 1</a></li>
|
|
20
|
-
<li><a href="/page-2">Page 2</a>
|
|
21
|
-
<ul>
|
|
22
|
-
<li><a href="/page-2/subpage">Subpage</a></li>
|
|
23
|
-
</ul>
|
|
24
|
-
</li>
|
|
25
|
-
<li><a href="/page-3">Page 3</a></li>
|
|
26
|
-
<li><a href="/page-4">Page 4</a>
|
|
27
|
-
<ul>
|
|
28
|
-
<li><a href="/page-4/subpage">Subpage</a></li>
|
|
29
|
-
</ul>
|
|
30
|
-
</li>
|
|
31
|
-
<li><a href="/page-5">Page 5</a></li>
|
|
32
|
-
</ul>
|
|
33
|
-
|
|
34
|
-
<script>
|
|
35
|
-
setTimeout(() => {
|
|
36
|
-
let importEl = document.createElement('import');
|
|
37
|
-
importEl.setAttribute('template', 'routes');
|
|
38
|
-
importEl.setAttribute('name', 'main.html');
|
|
39
|
-
document.body.append('importEl');
|
|
40
|
-
document.body.appendChild(importEl);
|
|
41
|
-
}, 2000);
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
1
|
+
<!DOCTYPE html><html><head>
|
|
2
|
+
<title>Page 2</title>
|
|
3
|
+
<!--
|
|
4
|
+
<script src="http://localhost:4000/oohtml/dist/main.js"></script>
|
|
5
|
+
-->
|
|
6
|
+
<script type="module" src="/bundle.webflo.js" by="webflo"></script>
|
|
7
|
+
<script type="module" src="/page-2/bundle.js" by="webflo"></script>
|
|
8
|
+
<template name="routes" src="/page-2/bundle.html" by="oohtml-cli"></template><template def="routes" src="/bundle.html" ssr="" by="oohtml-cli"></template></head>
|
|
9
|
+
<body>
|
|
10
|
+
|
|
11
|
+
<h1>Page 2</h1>
|
|
12
|
+
|
|
13
|
+
<!--
|
|
14
|
+
<import template="routes" name="main.html"></import>
|
|
15
|
+
-->
|
|
16
|
+
|
|
17
|
+
<ul>
|
|
18
|
+
<li><a href="/">Home</a></li>
|
|
19
|
+
<li><a href="/page-1">Page 1</a></li>
|
|
20
|
+
<li><a href="/page-2">Page 2</a>
|
|
21
|
+
<ul>
|
|
22
|
+
<li><a href="/page-2/subpage">Subpage</a></li>
|
|
23
|
+
</ul>
|
|
24
|
+
</li>
|
|
25
|
+
<li><a href="/page-3">Page 3</a></li>
|
|
26
|
+
<li><a href="/page-4">Page 4</a>
|
|
27
|
+
<ul>
|
|
28
|
+
<li><a href="/page-4/subpage">Subpage</a></li>
|
|
29
|
+
</ul>
|
|
30
|
+
</li>
|
|
31
|
+
<li><a href="/page-5">Page 5</a></li>
|
|
32
|
+
</ul>
|
|
33
|
+
|
|
34
|
+
<script>
|
|
35
|
+
setTimeout(() => {
|
|
36
|
+
let importEl = document.createElement('import');
|
|
37
|
+
importEl.setAttribute('template', 'routes');
|
|
38
|
+
importEl.setAttribute('name', 'main.html');
|
|
39
|
+
document.body.append('importEl');
|
|
40
|
+
document.body.appendChild(importEl);
|
|
41
|
+
}, 2000);
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
46
|
</body></html>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<div>
|
|
2
|
-
<h2>Main Content</h2>
|
|
1
|
+
<div>
|
|
2
|
+
<h2>Main Content</h2>
|
|
3
3
|
</div>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/** @webqit/webflo */
|
|
2
|
-
var{start:e}=WebQit.Webflo,r={},o={bundle_filename:"bundle.js",public_base_url:"/",spa_routing:!0,oohtml_support:"full",service_worker_support:!0,worker_scope:"/",worker_filename:"worker.js",routing:{root:"/page-4/subpage",subroots:[],targets:0}};e.call({layout:r,params:o});
|
|
1
|
+
/** @webqit/webflo */
|
|
2
|
+
var{start:e}=WebQit.Webflo,r={},o={bundle_filename:"bundle.js",public_base_url:"/",spa_routing:!0,oohtml_support:"full",service_worker_support:!0,worker_scope:"/",worker_filename:"worker.js",routing:{root:"/page-4/subpage",subroots:[],targets:0}};e.call({layout:r,params:o});
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head>
|
|
2
|
-
<title>Page 4 / Subpage</title>
|
|
3
|
-
<script type="module" src="/bundle.webflo.js" by="webflo"></script>
|
|
4
|
-
<script type="module" src="/page-4/subpage/bundle.js" by="webflo"></script>
|
|
5
|
-
<template name="page" src="/page-4/subpage/bundle.html" by="oohtml-cli"></template>
|
|
6
|
-
|
|
7
|
-
<body>
|
|
8
|
-
|
|
9
|
-
<h1>Page 4 / Subpage</h1>
|
|
10
|
-
|
|
11
|
-
<ul>
|
|
12
|
-
<li><a href="/">Home</a></li>
|
|
13
|
-
<li><a href="/page-1">Page 1</a></li>
|
|
14
|
-
<li><a href="/page-2">Page 2</a>
|
|
15
|
-
<ul>
|
|
16
|
-
<li><a href="/page-2/subpage">Subpage</a></li>
|
|
17
|
-
</ul>
|
|
18
|
-
</li>
|
|
19
|
-
<li><a href="/page-3">Page 3</a></li>
|
|
20
|
-
<li><a href="/page-4">Page 4</a>
|
|
21
|
-
<ul>
|
|
22
|
-
<li><a href="/page-4/subpage">Subpage</a></li>
|
|
23
|
-
</ul>
|
|
24
|
-
</li>
|
|
25
|
-
<li><a href="/page-5">Page 5</a></li>
|
|
26
|
-
</ul>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
<!DOCTYPE html><html><head>
|
|
2
|
+
<title>Page 4 / Subpage</title>
|
|
3
|
+
<script type="module" src="/bundle.webflo.js" by="webflo"></script>
|
|
4
|
+
<script type="module" src="/page-4/subpage/bundle.js" by="webflo"></script>
|
|
5
|
+
<template name="page" src="/page-4/subpage/bundle.html" by="oohtml-cli"></template>
|
|
6
|
+
<template def="routes" src="/bundle.html" ssr="" by="oohtml-cli"></template></head>
|
|
7
|
+
<body>
|
|
8
|
+
|
|
9
|
+
<h1>Page 4 / Subpage</h1>
|
|
10
|
+
|
|
11
|
+
<ul>
|
|
12
|
+
<li><a href="/">Home</a></li>
|
|
13
|
+
<li><a href="/page-1">Page 1</a></li>
|
|
14
|
+
<li><a href="/page-2">Page 2</a>
|
|
15
|
+
<ul>
|
|
16
|
+
<li><a href="/page-2/subpage">Subpage</a></li>
|
|
17
|
+
</ul>
|
|
18
|
+
</li>
|
|
19
|
+
<li><a href="/page-3">Page 3</a></li>
|
|
20
|
+
<li><a href="/page-4">Page 4</a>
|
|
21
|
+
<ul>
|
|
22
|
+
<li><a href="/page-4/subpage">Subpage</a></li>
|
|
23
|
+
</ul>
|
|
24
|
+
</li>
|
|
25
|
+
<li><a href="/page-5">Page 5</a></li>
|
|
26
|
+
</ul>
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
31
|
</body></html>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
[
|
|
2
|
-
"/",
|
|
3
|
-
"/page-2",
|
|
4
|
-
"/page-4/subpage"
|
|
1
|
+
[
|
|
2
|
+
"/",
|
|
3
|
+
"/page-2",
|
|
4
|
+
"/page-4/subpage"
|
|
5
5
|
]
|