@lwrjs/view-registry 0.9.0-alpha.23 → 0.9.0-alpha.24
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/build/cjs/linkers/legacy_view_bootstrap.cjs +2 -2
- package/build/cjs/linkers/utils.cjs +1 -1
- package/build/cjs/linkers/view_bootstrap.cjs +2 -2
- package/build/es/linkers/legacy_view_bootstrap.js +5 -3
- package/build/es/linkers/utils.js +1 -1
- package/build/es/linkers/view_bootstrap.js +5 -3
- package/package.json +7 -7
|
@@ -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 = [];
|
|
@@ -53,7 +53,7 @@ function getViewBootstrapConfigurationResource(viewInfo, config, runtimeEnvironm
|
|
|
53
53
|
...config,
|
|
54
54
|
endpoints
|
|
55
55
|
})});`,
|
|
56
|
-
`globalThis.process = { env: { NODE_ENV: "${runtimeEnvironment.
|
|
56
|
+
`globalThis.process = { env: { NODE_ENV: "${runtimeEnvironment.env.NODE_ENV}" } };`
|
|
57
57
|
].filter(Boolean).join("\n");
|
|
58
58
|
if (viewInfo.configAsSrc) {
|
|
59
59
|
const viewUrl = viewInfo.url || "/";
|
|
@@ -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
|
|
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,7 +25,7 @@ export function getViewBootstrapConfigurationResource(viewInfo, config, runtimeE
|
|
|
25
25
|
...config,
|
|
26
26
|
endpoints,
|
|
27
27
|
})});`,
|
|
28
|
-
`globalThis.process = { env: { NODE_ENV: "${runtimeEnvironment.
|
|
28
|
+
`globalThis.process = { env: { NODE_ENV: "${runtimeEnvironment.env.NODE_ENV}" } };`,
|
|
29
29
|
]
|
|
30
30
|
.filter(Boolean)
|
|
31
31
|
.join('\n');
|
|
@@ -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
|
|
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.
|
|
7
|
+
"version": "0.9.0-alpha.24",
|
|
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.
|
|
34
|
-
"@lwrjs/diagnostics": "0.9.0-alpha.
|
|
35
|
-
"@lwrjs/shared-utils": "0.9.0-alpha.
|
|
33
|
+
"@lwrjs/app-service": "0.9.0-alpha.24",
|
|
34
|
+
"@lwrjs/diagnostics": "0.9.0-alpha.24",
|
|
35
|
+
"@lwrjs/shared-utils": "0.9.0-alpha.24"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@lwrjs/types": "0.9.0-alpha.
|
|
38
|
+
"@lwrjs/types": "0.9.0-alpha.24"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
|
-
"node": ">=
|
|
41
|
+
"node": ">=16.0.0 <20"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "94326d9e8c80254cfab9c17b2235b10fdee13b4d"
|
|
44
44
|
}
|