@webqit/webflo 1.0.0 → 1.0.1

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": "1.0.0",
15
+ "version": "1.0.1",
16
16
  "license": "MIT",
17
17
  "repository": {
18
18
  "type": "git",
@@ -26,10 +26,12 @@ export async function generate() {
26
26
  throw new Error(`The Client configurator "config.deployment.Layout" is required in context.`);
27
27
  }
28
28
  const clientConfig = await (new cx.config.runtime.Client(cx)).read();
29
+ clientConfig.env = {};
29
30
  if (clientConfig.service_worker?.filename && !cx.config.runtime.client?.Worker) {
30
31
  throw new Error(`The Service Worker configurator "config.runtime.client.Worker" is required in context.`);
31
32
  }
32
33
  const workerConfig = await (new cx.config.runtime.client.Worker(cx)).read();
34
+ workerConfig.env = {};
33
35
  // -----------
34
36
  if (!cx.config.deployment?.Layout) {
35
37
  throw new Error(`The Layout configurator "config.deployment.Layout" is required in context.`);
@@ -48,11 +50,9 @@ export async function generate() {
48
50
  for (const key in envConfig.entries) {
49
51
  if (!key.includes('PUBLIC_') && !key.includes('_PUBLIC')) continue;
50
52
  if (clientConfig.bundle_public_env) {
51
- if (!clientConfig.env) { clientConfig.env = {}; }
52
53
  clientConfig.env[key] = envConfig.entries[key];
53
54
  }
54
55
  if (workerConfig.bundle_public_env) {
55
- if (!workerConfig.env) { workerConfig.env = {}; }
56
56
  workerConfig.env[key] = envConfig.entries[key];
57
57
  }
58
58
  }
@@ -3,8 +3,8 @@ import { WebfloRootClient2 } from './WebfloRootClient2.js';
3
3
  import { WebfloSubClient } from './WebfloSubClient.js';
4
4
 
5
5
  export function start() {
6
- const Controller = window.navigation ? WebfloRootClient2 : WebfloRootClient1;
7
- const instance = Controller.create(document, this || {});
6
+ const WebfloRootClient = window.navigation ? WebfloRootClient2 : WebfloRootClient1;
7
+ const instance = WebfloRootClient.create(document, this || {});
8
8
  instance.initialize();
9
9
  WebfloSubClient.defineElement();
10
10
  }