@webqit/webflo 0.20.34 → 0.20.35
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 +9 -3
- package/src/index.js +7 -7
- package/src/{build-pi → webflo-build}/index.js +4 -4
- package/src/{config-pi → webflo-config}/deployment/Env.js +0 -4
- package/src/{config-pi → webflo-config}/deployment/Layout.js +0 -4
- package/src/{config-pi → webflo-config}/deployment/Origins.js +0 -4
- package/src/{config-pi → webflo-config}/deployment/Proxy.js +0 -4
- package/src/{config-pi → webflo-config}/deployment/index.js +0 -7
- package/src/{config-pi → webflo-config}/index.js +0 -7
- package/src/{config-pi → webflo-config}/static/Init.js +0 -4
- package/src/{config-pi → webflo-config}/static/Manifest.js +0 -4
- package/src/{config-pi → webflo-config}/static/Ssg.js +0 -4
- package/src/{config-pi → webflo-config}/static/index.js +0 -7
- package/src/{deployment-pi → webflo-deployment}/index.js +0 -7
- package/src/{deployment-pi → webflo-deployment}/origins/index.js +0 -13
- package/src/webflo-exports/ui/index.js +1 -0
- package/src/{init-pi → webflo-init}/index.js +1 -1
- package/src/{runtime-pi → webflo-runtime}/webflo-client/bootstrap.js +1 -1
- package/src/{runtime-pi → webflo-runtime}/webflo-client/webflo-elements.js +195 -117
- package/src/webflo-runtime/webflo-client/webflo-embedded.js +56 -0
- package/src/{runtime-pi → webflo-runtime}/webflo-server/WebfloServer.js +1 -1
- package/src/{runtime-pi → webflo-runtime}/webflo-server/bootstrap.js +1 -1
- package/src/{runtime-pi → webflo-runtime}/webflo-worker/bootstrap.js +1 -1
- package/src/{services-pi → webflo-services}/cert/http-auth-hook.js +1 -1
- package/test/browser/elements.src.build.js +1239 -0
- package/test/browser/elements.src.build.js.map +7 -0
- package/test/browser/elements.src.js +3 -0
- package/test/browser/index.html +419 -0
- package/src/runtime-pi/webflo-client/webflo-embedded.js +0 -54
- package/test/index.test.js +0 -26
- package/test/site/package.json +0 -9
- package/test/site/public/bundle.html +0 -6
- package/test/site/public/bundle.html.json +0 -4
- package/test/site/public/bundle.js +0 -2
- package/test/site/public/bundle.js.gz +0 -0
- package/test/site/public/bundle.webflo.js +0 -15
- package/test/site/public/bundle.webflo.js.gz +0 -0
- package/test/site/public/index.html +0 -30
- package/test/site/public/index1.html +0 -35
- package/test/site/public/page-2/bundle.html +0 -5
- package/test/site/public/page-2/bundle.html.json +0 -1
- package/test/site/public/page-2/bundle.js +0 -2
- package/test/site/public/page-2/bundle.js.gz +0 -0
- package/test/site/public/page-2/index.html +0 -46
- package/test/site/public/page-2/logo-130x130.png +0 -0
- package/test/site/public/page-2/main.html +0 -3
- package/test/site/public/page-3/logo-130x130.png +0 -0
- package/test/site/public/page-4/subpage/bundle.html.json +0 -1
- package/test/site/public/page-4/subpage/bundle.js +0 -2
- package/test/site/public/page-4/subpage/bundle.js.gz +0 -0
- package/test/site/public/page-4/subpage/index.html +0 -31
- package/test/site/public/sparoots.json +0 -5
- package/test/site/public/worker.js +0 -3
- package/test/site/public/worker.js.gz +0 -0
- package/test/site/server/index.js +0 -16
- /package/src/{build-pi → webflo-build}/esbuild-plugin-uselive-transform.js +0 -0
- /package/src/{config-pi → webflo-config}/runtime/Client.js +0 -0
- /package/src/{config-pi → webflo-config}/runtime/Server.js +0 -0
- /package/src/{config-pi → webflo-config}/runtime/client/Worker.js +0 -0
- /package/src/{config-pi → webflo-config}/runtime/client/index.js +0 -0
- /package/src/{config-pi → webflo-config}/runtime/index.js +0 -0
- /package/src/{config-pi → webflo-config}/runtime/server/Headers.js +0 -0
- /package/src/{config-pi → webflo-config}/runtime/server/Redirects.js +0 -0
- /package/src/{config-pi → webflo-config}/runtime/server/index.js +0 -0
- /package/src/{deployment-pi → webflo-deployment}/util.js +0 -0
- /package/{test/site/public/page-4/subpage/bundle.html → src/webflo-exports/index.js} +0 -0
- /package/src/{init-pi → webflo-init}/templates/pwa/.gitignore +0 -0
- /package/src/{init-pi → webflo-init}/templates/pwa/.webqit/webflo/client.json +0 -0
- /package/src/{init-pi → webflo-init}/templates/pwa/.webqit/webflo/layout.json +0 -0
- /package/src/{init-pi → webflo-init}/templates/pwa/app/handler.server.js +0 -0
- /package/src/{init-pi → webflo-init}/templates/pwa/app/page.html +0 -0
- /package/src/{init-pi → webflo-init}/templates/pwa/package.json +0 -0
- /package/src/{init-pi → webflo-init}/templates/pwa/public/assets/app.css +0 -0
- /package/src/{init-pi → webflo-init}/templates/pwa/public/index.html +0 -0
- /package/src/{init-pi → webflo-init}/templates/pwa/public/manifest.json +0 -0
- /package/src/{init-pi → webflo-init}/templates/web/.gitignore +0 -0
- /package/src/{init-pi → webflo-init}/templates/web/.webqit/webflo/client.json +0 -0
- /package/src/{init-pi → webflo-init}/templates/web/.webqit/webflo/layout.json +0 -0
- /package/src/{init-pi → webflo-init}/templates/web/app/handler.server.js +0 -0
- /package/src/{init-pi → webflo-init}/templates/web/app/page.html +0 -0
- /package/src/{init-pi → webflo-init}/templates/web/package.json +0 -0
- /package/src/{init-pi → webflo-init}/templates/web/public/assets/app.css +0 -0
- /package/src/{init-pi → webflo-init}/templates/web/public/index.html +0 -0
- /package/src/{runtime-pi → webflo-runtime}/AppBootstrap.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/AppRuntime.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/index.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-client/ClientSideWorkport.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-client/DeviceCapabilities.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-client/WebfloClient.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-client/WebfloRootClientA.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-client/WebfloRootClientB.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-client/WebfloSubClient.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-client/index.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-client/webflo-devmode.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-messaging/ClientPortMixin.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-messaging/ClientRequestPort001.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-messaging/ClientRequestPort010.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-messaging/ClientRequestPort100.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-messaging/WebfloTenancy001.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-messaging/WebfloTenant001.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-routing/HttpCookies101.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-routing/HttpCookies110.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-routing/HttpEvent111.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-routing/HttpKeyvalInterface.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-routing/HttpSession001.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-routing/HttpSession110.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-routing/HttpThread111.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-routing/HttpUser111.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-routing/KeyvalsFactory001.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-routing/KeyvalsFactory110.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-routing/KeyvalsFactoryInterface.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-routing/WebfloRouter111.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-server/index.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-server/webflo-devmode.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-worker/WebfloWorker.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-worker/WorkerSideWorkport.js +0 -0
- /package/src/{runtime-pi → webflo-runtime}/webflo-worker/index.js +0 -0
- /package/src/{services-pi → webflo-services}/cert/http-cleanup-hook.js +0 -0
- /package/src/{services-pi → webflo-services}/cert/index.js +0 -0
- /package/src/{services-pi → webflo-services}/index.js +0 -0
- /package/src/{services-pi → webflo-services}/push/index.js +0 -0
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { WebfloSubClient } from './WebfloSubClient.js';
|
|
2
|
-
|
|
3
|
-
export function defineElement() {
|
|
4
|
-
const embedTagName = 'webflo-embedded';
|
|
5
|
-
|
|
6
|
-
window.customElements.define(embedTagName, class extends HTMLElement {
|
|
7
|
-
|
|
8
|
-
#superRuntime;
|
|
9
|
-
#lifecycleController;
|
|
10
|
-
#location;
|
|
11
|
-
#reflectAction;
|
|
12
|
-
|
|
13
|
-
static get observedAttributes() { return ['location']; }
|
|
14
|
-
|
|
15
|
-
get location() {
|
|
16
|
-
if (!this.#location) {
|
|
17
|
-
this.#location = new URL(this.getAttribute('location') || '', window.location.origin);
|
|
18
|
-
}
|
|
19
|
-
return this.#location;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
set location(value) {
|
|
23
|
-
if (!(value instanceof URL)) {
|
|
24
|
-
value = new URL(value, window.location.origin);
|
|
25
|
-
}
|
|
26
|
-
if (value.href === this.location.href) return;
|
|
27
|
-
this.#location = value;
|
|
28
|
-
this.setAttribute('location', value.href.replace(value.origin, ''));
|
|
29
|
-
if (!this.#reflectAction) {
|
|
30
|
-
this.webfloRuntime.navigate(value);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
reflectLocation(location) {
|
|
35
|
-
this.#reflectAction = true;
|
|
36
|
-
this.location = location;
|
|
37
|
-
this.#reflectAction = false;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
attributeChangedCallback(name, oldValue, newValue) {
|
|
41
|
-
if (oldValue === newValue) return;
|
|
42
|
-
this.location = newValue;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
async connectedCallback() {
|
|
46
|
-
this.#superRuntime = (this.parentNode?.closest(embedTagName) || document).webfloRuntime;
|
|
47
|
-
this.#lifecycleController = await WebfloSubClient.create(this.#superRuntime, this).initialize();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
disconnectedCallback() {
|
|
51
|
-
this.#lifecycleController.abort();
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}
|
package/test/index.test.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* @imports
|
|
4
|
-
*/
|
|
5
|
-
import { config, runtime, Context } from '../src/index.js';
|
|
6
|
-
|
|
7
|
-
let client = {
|
|
8
|
-
handle: function( httpEvent ) {
|
|
9
|
-
return new httpEvent.Response({ abcd: '1234' }, {
|
|
10
|
-
status: 302,
|
|
11
|
-
headers: {
|
|
12
|
-
//location: '/dddd',
|
|
13
|
-
cookies: {
|
|
14
|
-
cookie1: { value: 'value1' },
|
|
15
|
-
cookie2: { value: 'value2' },
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const cx = Context.create( { config: config, } );
|
|
23
|
-
const clientCallback = ( _cx, hostName, defaultClientCallback ) => client;
|
|
24
|
-
const app = await runtime.server.start.call( cx, clientCallback );
|
|
25
|
-
|
|
26
|
-
const response = await app.go( 'http://localhost/', { headers: { range: 'bytes=0-5, 6' } } );
|
package/test/site/package.json
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Webflo Test",
|
|
3
|
-
"type": "module",
|
|
4
|
-
"scripts": {
|
|
5
|
-
"generate": "webflo generate::client --recursive --compression --auto-embed",
|
|
6
|
-
"bundle": "cd public && oohtml bundle --recursive --auto-embed=routes",
|
|
7
|
-
"build": "npm run generate && npm run bundle"
|
|
8
|
-
}
|
|
9
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
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:"/",subroots:["/page-2","/page-4/subpage"],targets:2}};e.call({layout:r,params:o});
|
|
Binary file
|