@webqit/webflo 0.11.60 → 0.11.61
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 +79 -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 +19 -19
- package/src/runtime-pi/Application.js +28 -28
- package/src/runtime-pi/Cookies.js +81 -81
- package/src/runtime-pi/HttpEvent.js +106 -106
- package/src/runtime-pi/Router.js +130 -130
- package/src/runtime-pi/Runtime.js +20 -20
- package/src/runtime-pi/client/Application.js +76 -100
- package/src/runtime-pi/client/Context.js +7 -7
- package/src/runtime-pi/client/Router.js +48 -48
- package/src/runtime-pi/client/Runtime.js +524 -331
- package/src/runtime-pi/client/Url.js +204 -205
- package/src/runtime-pi/client/Workport.js +190 -178
- package/src/runtime-pi/client/createStorage.js +57 -56
- package/src/runtime-pi/client/generate.js +480 -471
- package/src/runtime-pi/client/index.js +21 -21
- package/src/runtime-pi/client/worker/Application.js +44 -44
- package/src/runtime-pi/client/worker/Context.js +7 -7
- package/src/runtime-pi/client/worker/Runtime.js +274 -268
- package/src/runtime-pi/client/worker/Workport.js +77 -89
- package/src/runtime-pi/client/worker/index.js +21 -21
- package/src/runtime-pi/index.js +13 -13
- package/src/runtime-pi/server/Application.js +100 -115
- package/src/runtime-pi/server/Context.js +15 -15
- package/src/runtime-pi/server/Router.js +159 -159
- package/src/runtime-pi/server/Runtime.js +557 -556
- package/src/runtime-pi/server/index.js +21 -21
- package/src/runtime-pi/util-http.js +85 -85
- package/src/runtime-pi/util-url.js +146 -146
- package/src/runtime-pi/xFormData.js +23 -23
- package/src/runtime-pi/xHeaders.js +145 -145
- package/src/runtime-pi/xRequest.js +45 -45
- package/src/runtime-pi/xRequestHeaders.js +108 -108
- package/src/runtime-pi/xResponse.js +32 -32
- package/src/runtime-pi/xResponseHeaders.js +116 -116
- package/src/runtime-pi/xURL.js +105 -105
- package/src/runtime-pi/xfetch.js +22 -22
- package/src/runtime-pi/xxHttpMessage.js +101 -101
- 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/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
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* @imports
|
|
4
|
-
*/
|
|
5
|
-
import Context from './Context.js';
|
|
6
|
-
import Application from './Application.js';
|
|
7
|
-
import Runtime from './Runtime.js';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @start
|
|
11
|
-
*/
|
|
12
|
-
export async function start(applicationInstance = null) {
|
|
13
|
-
const cx = this || {};
|
|
14
|
-
const defaultApplicationInstance = _cx => new Application(_cx);
|
|
15
|
-
return new Runtime(Context.create(cx), applicationInstance || defaultApplicationInstance);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @APIS
|
|
20
|
-
*/
|
|
21
|
-
export * as APIS from './Runtime.js';
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* @imports
|
|
4
|
+
*/
|
|
5
|
+
import Context from './Context.js';
|
|
6
|
+
import Application from './Application.js';
|
|
7
|
+
import Runtime from './Runtime.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @start
|
|
11
|
+
*/
|
|
12
|
+
export async function start(applicationInstance = null) {
|
|
13
|
+
const cx = this || {};
|
|
14
|
+
const defaultApplicationInstance = _cx => new Application(_cx);
|
|
15
|
+
return new Runtime(Context.create(cx), applicationInstance || defaultApplicationInstance);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @APIS
|
|
20
|
+
*/
|
|
21
|
+
export * as APIS from './Runtime.js';
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* @imports
|
|
4
|
-
*/
|
|
5
|
-
import Router from '../Router.js';
|
|
6
|
-
import _Application from '../../Application.js';
|
|
7
|
-
|
|
8
|
-
export default class Application extends _Application {
|
|
9
|
-
|
|
10
|
-
// Returns router class
|
|
11
|
-
get Router() {
|
|
12
|
-
return Router;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Handles HTTP events.
|
|
17
|
-
*
|
|
18
|
-
* @param HttpEvent httpEvent
|
|
19
|
-
* @param Function remoteFetch
|
|
20
|
-
*
|
|
21
|
-
* @return Response
|
|
22
|
-
*/
|
|
23
|
-
async handle(httpEvent, remoteFetch) {
|
|
24
|
-
// The app router
|
|
25
|
-
const router = new this.Router(this.cx, httpEvent.url.pathname);
|
|
26
|
-
const handle = async () => {
|
|
27
|
-
// --------
|
|
28
|
-
// ROUTE FOR DATA
|
|
29
|
-
// --------
|
|
30
|
-
return router.route([httpEvent.request.method, 'default'], httpEvent, {}, async event => {
|
|
31
|
-
if (event !== httpEvent) {
|
|
32
|
-
// This was nexted()
|
|
33
|
-
if (!event.request.headers.has('Accept')) {
|
|
34
|
-
event.request.headers.set('Accept', 'application/json');
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return remoteFetch(event.request);
|
|
38
|
-
}, remoteFetch);
|
|
39
|
-
};
|
|
40
|
-
return handle();
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* @imports
|
|
4
|
+
*/
|
|
5
|
+
import Router from '../Router.js';
|
|
6
|
+
import _Application from '../../Application.js';
|
|
7
|
+
|
|
8
|
+
export default class Application extends _Application {
|
|
9
|
+
|
|
10
|
+
// Returns router class
|
|
11
|
+
get Router() {
|
|
12
|
+
return Router;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Handles HTTP events.
|
|
17
|
+
*
|
|
18
|
+
* @param HttpEvent httpEvent
|
|
19
|
+
* @param Function remoteFetch
|
|
20
|
+
*
|
|
21
|
+
* @return Response
|
|
22
|
+
*/
|
|
23
|
+
async handle(httpEvent, remoteFetch) {
|
|
24
|
+
// The app router
|
|
25
|
+
const router = new this.Router(this.cx, httpEvent.url.pathname);
|
|
26
|
+
const handle = async () => {
|
|
27
|
+
// --------
|
|
28
|
+
// ROUTE FOR DATA
|
|
29
|
+
// --------
|
|
30
|
+
return router.route([httpEvent.request.method, 'default'], httpEvent, {}, async event => {
|
|
31
|
+
if (event !== httpEvent) {
|
|
32
|
+
// This was nexted()
|
|
33
|
+
if (!event.request.headers.has('Accept')) {
|
|
34
|
+
event.request.headers.set('Accept', 'application/json');
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return remoteFetch(event.request);
|
|
38
|
+
}, remoteFetch);
|
|
39
|
+
};
|
|
40
|
+
return handle();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
}
|
|
44
|
+
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* @imports
|
|
4
|
-
*/
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
export default class Context extends
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* @imports
|
|
4
|
+
*/
|
|
5
|
+
import _Context from '../Context.js';
|
|
6
|
+
|
|
7
|
+
export default class Context extends _Context {}
|