@webqit/webflo 0.10.2 → 0.10.5

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.
Files changed (50) hide show
  1. package/README.md +750 -3
  2. package/package.json +3 -3
  3. package/src/Context.js +8 -4
  4. package/src/config-pi/deployment/Env.js +2 -2
  5. package/src/config-pi/deployment/Layout.js +2 -2
  6. package/src/config-pi/deployment/Origins.js +2 -2
  7. package/src/config-pi/deployment/Virtualization.js +2 -2
  8. package/src/config-pi/runtime/Client.js +45 -14
  9. package/src/config-pi/runtime/Server.js +26 -10
  10. package/src/config-pi/runtime/client/Worker.js +2 -2
  11. package/src/config-pi/runtime/server/Headers.js +2 -2
  12. package/src/config-pi/runtime/server/Redirects.js +2 -2
  13. package/src/config-pi/static/Manifest.js +2 -2
  14. package/src/config-pi/static/Ssg.js +2 -2
  15. package/src/runtime-pi/client/Runtime.js +28 -23
  16. package/src/runtime-pi/client/RuntimeClient.js +28 -15
  17. package/src/runtime-pi/client/generate.js +251 -77
  18. package/src/runtime-pi/client/{generate.oohtml.js → oohtml/full.js} +0 -0
  19. package/src/runtime-pi/client/oohtml/namespacing.js +7 -0
  20. package/src/runtime-pi/client/oohtml/scripting.js +8 -0
  21. package/src/runtime-pi/client/oohtml/templating.js +8 -0
  22. package/src/runtime-pi/client/worker/Worker.js +21 -23
  23. package/src/runtime-pi/server/Router.js +2 -2
  24. package/src/runtime-pi/server/Runtime.js +8 -3
  25. package/src/runtime-pi/server/RuntimeClient.js +21 -11
  26. package/src/webflo.js +7 -9
  27. package/test/site/public/bundle.html +3 -0
  28. package/test/site/public/bundle.html.json +3 -0
  29. package/test/site/public/bundle.js +2 -0
  30. package/test/site/public/bundle.js.gz +0 -0
  31. package/test/site/public/bundle.webflo.js +15 -0
  32. package/test/site/public/bundle.webflo.js.gz +0 -0
  33. package/test/site/public/index.html +30 -0
  34. package/test/site/public/page-2/bundle.html +5 -0
  35. package/test/site/public/page-2/bundle.html.json +1 -0
  36. package/test/site/public/page-2/bundle.js +2 -0
  37. package/test/site/public/page-2/bundle.js.gz +0 -0
  38. package/test/site/public/page-2/index.html +47 -0
  39. package/test/site/public/page-2/logo-130x130.png +0 -0
  40. package/test/site/public/page-2/main.html +3 -0
  41. package/test/site/public/page-4/subpage/bundle.html +0 -0
  42. package/test/site/public/page-4/subpage/bundle.html.json +1 -0
  43. package/test/site/public/page-4/subpage/bundle.js +2 -0
  44. package/test/site/public/page-4/subpage/bundle.js.gz +0 -0
  45. package/test/site/public/page-4/subpage/index.html +31 -0
  46. package/test/site/public/worker.js +3 -0
  47. package/test/site/public/worker.js.gz +0 -0
  48. package/test/site/server/index.js +8 -0
  49. package/src/Cli.js +0 -131
  50. package/src/Configurator.js +0 -97
package/src/webflo.js CHANGED
@@ -5,23 +5,21 @@
5
5
  */
6
6
  import Url from 'url';
7
7
  import Path from 'path';
8
- import { read as readJsonFile } from '@webqit/backpack/src/dotfiles/DotJson.js';
9
- import logger from '@webqit/backpack/src/cli/Ui.js';
8
+ import { jsonFile } from '@webqit/backpack/src/dotfile/index.js';
9
+ import { Logger, Cli } from '@webqit/backpack';
10
10
  import * as WebfloPI from './index.js';
11
- import Context from './Context.js';
12
- import Cli from './Cli.js';
13
11
 
14
12
  const dirSelf = Path.dirname(Url.fileURLToPath(import.meta.url));
15
- const webfloJson = readJsonFile(Path.join(dirSelf, '../package.json'));
16
- const appJson = readJsonFile('./package.json');
13
+ const webfloJson = jsonFile.read(Path.join(dirSelf, '../package.json'));
14
+ const appJson = jsonFile.read('./package.json');
17
15
 
18
16
  /**
19
17
  * @cx
20
18
  */
21
- const cx = Context.create({
22
- webflo: { title: webfloJson.title, version: webfloJson.version },
19
+ const cx = WebfloPI.Context.create({
20
+ meta: { title: webfloJson.title, version: webfloJson.version },
23
21
  app: { title: appJson.title, version: appJson.version },
24
- logger,
22
+ logger: Logger,
25
23
  config: WebfloPI.config,
26
24
  middlewares: [ WebfloPI.deployment.origins.webhook, ],
27
25
  });
@@ -0,0 +1,3 @@
1
+
2
+ <template name="page-4">
3
+ </template>
@@ -0,0 +1,3 @@
1
+ {
2
+ "page-4": {}
3
+ }
@@ -0,0 +1,2 @@
1
+ /** @webqit/webflo */
2
+ var{start:e}=WebQit.Webflo,s={},r={bundle_filename:"bundle.js",public_base_url:"/",address_bar_synchrony:"standard",oohtml_support:"full",service_worker_support:!0,worker_scope:"/",worker_filename:"worker.js",routing:{scope:"/",subscopes:["/page-2","/page-4/subpage"],passes:1}};e.call({layout:s,params:r});
Binary file