@lwrjs/view-registry 0.9.0-alpha.23 → 0.9.0-alpha.26

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.
@@ -39,7 +39,7 @@ async function getHtmlResources(view, viewParams, resourceContext) {
39
39
  resourceRegistry,
40
40
  viewMetadata
41
41
  } = resourceContext;
42
- const {id: appName, bootstrap: {services} = {services: []}} = view;
42
+ const {id: appName, bootstrap: {services, module: bootstrapModule} = {services: []}} = view;
43
43
  const {lwrVersion, format, hmrEnabled, bundle, debug, minify} = runtimeEnvironment;
44
44
  const {customElements} = viewMetadata;
45
45
  const version = lwrVersion;
@@ -49,7 +49,7 @@ async function getHtmlResources(view, viewParams, resourceContext) {
49
49
  format: runtimeEnvironment.format,
50
50
  resourceType: import_identity.AppResourceEnum.MODULE
51
51
  };
52
- const bootstrapSpecifier = (0, import_identity.getAppSpecifier)(appIdentity);
52
+ const bootstrapSpecifier = bootstrapModule || (0, import_identity.getAppSpecifier)(appIdentity);
53
53
  const moduleResources = [];
54
54
  const requiredResources = [];
55
55
  const configResources = [];
@@ -39,7 +39,7 @@ async function getHtmlResources(view, viewParams, resourceContext) {
39
39
  resourceRegistry,
40
40
  viewMetadata
41
41
  } = resourceContext;
42
- const {id: appName, bootstrap: {services} = {services: []}} = view;
42
+ const {id: appName, bootstrap: {services, module: bootstrapModule} = {services: []}} = view;
43
43
  const {lwrVersion, format, hmrEnabled, bundle, debug, minify} = runtimeEnvironment;
44
44
  const {customElements} = viewMetadata;
45
45
  const defRegistry = bundle ? moduleBundler : moduleRegistry;
@@ -50,7 +50,7 @@ async function getHtmlResources(view, viewParams, resourceContext) {
50
50
  format: runtimeEnvironment.format,
51
51
  resourceType: import_identity.AppResourceEnum.MODULE
52
52
  };
53
- const bootstrapSpecifier = (0, import_identity.getAppSpecifier)(appIdentity);
53
+ const bootstrapSpecifier = bootstrapModule || (0, import_identity.getAppSpecifier)(appIdentity);
54
54
  const moduleResources = [];
55
55
  const requiredResources = [];
56
56
  const configResources = [];
@@ -4,18 +4,20 @@ import { generateHtmlTag, getModuleResource, getModuleResourceByUri } from '../u
4
4
  import { flattenCustomElements, getViewBootstrapConfigurationResource, getViewHmrConfigurationResource, } from './utils.js';
5
5
  export async function getHtmlResources(view, viewParams, resourceContext) {
6
6
  const { runtimeEnvironment, runtimeParams, moduleRegistry, moduleBundler, resourceRegistry, viewMetadata, } = resourceContext;
7
- const { id: appName, bootstrap: { services } = { services: [] } } = view;
7
+ const { id: appName, bootstrap: { services, module: bootstrapModule } = { services: [] } } = view;
8
8
  const { lwrVersion, format, hmrEnabled, bundle, debug, minify } = runtimeEnvironment;
9
9
  const { customElements } = viewMetadata;
10
10
  const version = lwrVersion;
11
11
  const isAMD = format === 'amd';
12
- // Application Bootstrap (ABS) module resource: "@lwrjs/app-service/{appName}/module/{format}"
12
+ // The Application Bootstrap (ABS) module resource is EITHER
13
+ // - configured as routes[x].bootstrap.module OR
14
+ // - defaulted as "@lwrjs/app-service/{appName}/module/{format}"
13
15
  const appIdentity = {
14
16
  appName,
15
17
  format: runtimeEnvironment.format,
16
18
  resourceType: AppResourceEnum.MODULE,
17
19
  };
18
- const bootstrapSpecifier = getAppSpecifier(appIdentity);
20
+ const bootstrapSpecifier = bootstrapModule || getAppSpecifier(appIdentity);
19
21
  /*
20
22
  Internal module and module dependency related resources used by the view to render view related components.
21
23
  */
@@ -25,6 +25,7 @@ export function getViewBootstrapConfigurationResource(viewInfo, config, runtimeE
25
25
  ...config,
26
26
  endpoints,
27
27
  })});`,
28
+ // TODO: W-12639529 change after addressing downstream customers
28
29
  `globalThis.process = { env: { NODE_ENV: "${runtimeEnvironment.serverMode}" } };`,
29
30
  ]
30
31
  .filter(Boolean)
@@ -4,19 +4,21 @@ import { generateHtmlTag, getModuleResource, getModuleResourceByUri } from '../u
4
4
  import { flattenCustomElements, getViewBootstrapConfigurationResource, getViewHmrConfigurationResource, } from './utils.js';
5
5
  export async function getHtmlResources(view, viewParams, resourceContext) {
6
6
  const { runtimeEnvironment, runtimeParams, moduleRegistry, moduleBundler, resourceRegistry, viewMetadata, } = resourceContext;
7
- const { id: appName, bootstrap: { services } = { services: [] } } = view;
7
+ const { id: appName, bootstrap: { services, module: bootstrapModule } = { services: [] } } = view;
8
8
  const { lwrVersion, format, hmrEnabled, bundle, debug, minify } = runtimeEnvironment;
9
9
  const { customElements } = viewMetadata;
10
10
  const defRegistry = bundle ? moduleBundler : moduleRegistry;
11
11
  const version = lwrVersion;
12
12
  const isAMD = format === 'amd';
13
- // Application Bootstrap (ABS) module resource: "@lwrjs/app-service/{appName}/module/{format}"
13
+ // The Application Bootstrap (ABS) module resource is EITHER
14
+ // - configured as routes[x].bootstrap.module OR
15
+ // - defaulted as "@lwrjs/app-service/{appName}/module/{format}"
14
16
  const appIdentity = {
15
17
  appName,
16
18
  format: runtimeEnvironment.format,
17
19
  resourceType: AppResourceEnum.MODULE,
18
20
  };
19
- const bootstrapSpecifier = getAppSpecifier(appIdentity);
21
+ const bootstrapSpecifier = bootstrapModule || getAppSpecifier(appIdentity);
20
22
  /*
21
23
  Internal module and module dependency related resources used by the view to render view related components.
22
24
  */
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.9.0-alpha.23",
7
+ "version": "0.9.0-alpha.26",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -30,15 +30,15 @@
30
30
  "build/**/*.d.ts"
31
31
  ],
32
32
  "dependencies": {
33
- "@lwrjs/app-service": "0.9.0-alpha.23",
34
- "@lwrjs/diagnostics": "0.9.0-alpha.23",
35
- "@lwrjs/shared-utils": "0.9.0-alpha.23"
33
+ "@lwrjs/app-service": "0.9.0-alpha.26",
34
+ "@lwrjs/diagnostics": "0.9.0-alpha.26",
35
+ "@lwrjs/shared-utils": "0.9.0-alpha.26"
36
36
  },
37
37
  "devDependencies": {
38
- "@lwrjs/types": "0.9.0-alpha.23"
38
+ "@lwrjs/types": "0.9.0-alpha.26"
39
39
  },
40
40
  "engines": {
41
- "node": ">=14.15.4 <19"
41
+ "node": ">=16.0.0 <20"
42
42
  },
43
- "gitHead": "13106b8a0e5011dfd0fab2e361aa9b518f409fbb"
43
+ "gitHead": "6da956eb29622d49423b0a6ee63300de1f3e121c"
44
44
  }