@lwrjs/view-registry 0.13.0-alpha.12 → 0.13.0-alpha.14
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/view_bootstrap.cjs +2 -2
- package/build/cjs/view-handler.cjs +3 -1
- package/build/es/linkers/legacy_view_bootstrap.js +3 -2
- package/build/es/linkers/view_bootstrap.js +3 -2
- package/build/es/view-handler.js +3 -1
- package/package.json +7 -7
|
@@ -49,9 +49,8 @@ async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
49
49
|
resourceRegistry,
|
|
50
50
|
viewMetadata
|
|
51
51
|
} = resourceContext;
|
|
52
|
-
const {
|
|
52
|
+
const {format, hmrEnabled, bundle, debug, minify} = runtimeEnvironment;
|
|
53
53
|
const {customElements, serverData, serverDebug} = viewMetadata;
|
|
54
|
-
const version = lwrVersion;
|
|
55
54
|
const isAMD = format === "amd";
|
|
56
55
|
const {bundleConfig} = resourceContext;
|
|
57
56
|
const {external = {}, exclude = []} = bundleConfig;
|
|
@@ -101,6 +100,7 @@ async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
101
100
|
groups: new Map()
|
|
102
101
|
};
|
|
103
102
|
const isSSR = view.bootstrap?.ssr;
|
|
103
|
+
const version = view.bootstrap?.lwrVersion;
|
|
104
104
|
const nonce = (0, import_utils.getViewNonce)(viewParams);
|
|
105
105
|
let bootstrapModuleRef, versionedSpecifier = bootstrapSpecifier;
|
|
106
106
|
const customElementsRecords = [];
|
|
@@ -41,10 +41,9 @@ async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
41
41
|
resourceRegistry,
|
|
42
42
|
viewMetadata
|
|
43
43
|
} = resourceContext;
|
|
44
|
-
const {
|
|
44
|
+
const {format, hmrEnabled, bundle, debug, minify} = runtimeEnvironment;
|
|
45
45
|
const {customElements, serverData, serverDebug} = viewMetadata;
|
|
46
46
|
const defRegistry = bundle ? moduleBundler : moduleRegistry;
|
|
47
|
-
const version = lwrVersion;
|
|
48
47
|
const isAMD = format === "amd";
|
|
49
48
|
const depth = isAMD ? {static: import_shared_utils.GraphDepth.ALL, dynamic: 1} : {static: import_shared_utils.GraphDepth.NONE, dynamic: 1};
|
|
50
49
|
const {bundleConfig} = resourceContext;
|
|
@@ -90,6 +89,7 @@ async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
90
89
|
groups: new Map()
|
|
91
90
|
};
|
|
92
91
|
const isSSR = view.bootstrap?.ssr;
|
|
92
|
+
const version = view.bootstrap?.lwrVersion;
|
|
93
93
|
const nonce = (0, import_utils.getViewNonce)(viewParams);
|
|
94
94
|
let bootstrapModuleRef, versionedSpecifier = bootstrapSpecifier;
|
|
95
95
|
let importMetadata = {imports: {}};
|
|
@@ -130,6 +130,8 @@ var LwrViewHandler = class {
|
|
|
130
130
|
const paths = {rootDir, assets, contentDir, layoutsDir};
|
|
131
131
|
const locale = runtimeParams.locale;
|
|
132
132
|
const basePath = runtimeParams.basePath;
|
|
133
|
+
const assetBasePath = runtimeParams.assetBasePath;
|
|
134
|
+
const uiBasePath = runtimeParams.assetBasePath;
|
|
133
135
|
const viewApi = this.getBoundApi(viewRequest, route, runtimeEnvironment, runtimeParams);
|
|
134
136
|
const response = await (0, import_instrumentation.getTracer)().trace({
|
|
135
137
|
name: import_instrumentation.ViewSpan.ExecuteRouteHandler,
|
|
@@ -139,7 +141,7 @@ var LwrViewHandler = class {
|
|
|
139
141
|
}
|
|
140
142
|
}, async () => {
|
|
141
143
|
try {
|
|
142
|
-
return await routeHandlerFn({...viewRequest, locale, basePath}, {route, viewApi, ...paths}, routeHandlerOptions);
|
|
144
|
+
return await routeHandlerFn({...viewRequest, locale, basePath, assetBasePath, uiBasePath}, {route, viewApi, ...paths}, routeHandlerOptions);
|
|
143
145
|
} catch (err) {
|
|
144
146
|
if (err instanceof import_diagnostics.DiagnosticsError) {
|
|
145
147
|
throw err;
|
|
@@ -17,9 +17,8 @@ function includeIdFactory(bundleConfig) {
|
|
|
17
17
|
}
|
|
18
18
|
export async function getHtmlResources(view, viewParams, resourceContext) {
|
|
19
19
|
const { runtimeEnvironment, runtimeParams, moduleRegistry, moduleBundler, resourceRegistry, viewMetadata, } = resourceContext;
|
|
20
|
-
const {
|
|
20
|
+
const { format, hmrEnabled, bundle, debug, minify } = runtimeEnvironment;
|
|
21
21
|
const { customElements, serverData, serverDebug } = viewMetadata;
|
|
22
|
-
const version = lwrVersion;
|
|
23
22
|
const isAMD = format === 'amd';
|
|
24
23
|
const { bundleConfig } = resourceContext;
|
|
25
24
|
const { external = {}, exclude = [] } = bundleConfig;
|
|
@@ -92,6 +91,8 @@ export async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
92
91
|
};
|
|
93
92
|
// Determine if server side rendering view modules
|
|
94
93
|
const isSSR = view.bootstrap?.ssr;
|
|
94
|
+
// Determine the LWR client version
|
|
95
|
+
const version = view.bootstrap?.lwrVersion;
|
|
95
96
|
// Page level nonce for script tags
|
|
96
97
|
const nonce = getViewNonce(viewParams);
|
|
97
98
|
// ABS module and custom element references
|
|
@@ -6,10 +6,9 @@ import { flattenCustomElements, getViewBootstrapConfigurationResource, getViewHm
|
|
|
6
6
|
import { setPreloadModulesMeta, getPreloadModulesMeta } from './preload-utils.js';
|
|
7
7
|
export async function getHtmlResources(view, viewParams, resourceContext) {
|
|
8
8
|
const { runtimeEnvironment, runtimeParams, moduleRegistry, moduleBundler, resourceRegistry, viewMetadata, } = resourceContext;
|
|
9
|
-
const {
|
|
9
|
+
const { format, hmrEnabled, bundle, debug, minify } = runtimeEnvironment;
|
|
10
10
|
const { customElements, serverData, serverDebug } = viewMetadata;
|
|
11
11
|
const defRegistry = bundle ? moduleBundler : moduleRegistry;
|
|
12
|
-
const version = lwrVersion;
|
|
13
12
|
const isAMD = format === 'amd';
|
|
14
13
|
const depth = isAMD
|
|
15
14
|
? { static: GraphDepth.ALL, dynamic: 1 }
|
|
@@ -75,6 +74,8 @@ export async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
75
74
|
};
|
|
76
75
|
// Determine if server side rendering view modules
|
|
77
76
|
const isSSR = view.bootstrap?.ssr;
|
|
77
|
+
// Determine the LWR client version
|
|
78
|
+
const version = view.bootstrap?.lwrVersion;
|
|
78
79
|
// Page level nonce for script tags
|
|
79
80
|
const nonce = getViewNonce(viewParams);
|
|
80
81
|
// ABS module and custom element references
|
package/build/es/view-handler.js
CHANGED
|
@@ -146,6 +146,8 @@ export class LwrViewHandler {
|
|
|
146
146
|
const paths = { rootDir, assets, contentDir, layoutsDir };
|
|
147
147
|
const locale = runtimeParams.locale;
|
|
148
148
|
const basePath = runtimeParams.basePath;
|
|
149
|
+
const assetBasePath = runtimeParams.assetBasePath;
|
|
150
|
+
const uiBasePath = runtimeParams.assetBasePath;
|
|
149
151
|
const viewApi = this.getBoundApi(viewRequest, route, runtimeEnvironment, runtimeParams);
|
|
150
152
|
const response = await getTracer().trace({
|
|
151
153
|
name: ViewSpan.ExecuteRouteHandler,
|
|
@@ -155,7 +157,7 @@ export class LwrViewHandler {
|
|
|
155
157
|
},
|
|
156
158
|
}, async () => {
|
|
157
159
|
try {
|
|
158
|
-
return await routeHandlerFn({ ...viewRequest, locale, basePath }, { route: route, viewApi, ...paths }, routeHandlerOptions);
|
|
160
|
+
return await routeHandlerFn({ ...viewRequest, locale, basePath, assetBasePath, uiBasePath }, { route: route, viewApi, ...paths }, routeHandlerOptions);
|
|
159
161
|
}
|
|
160
162
|
catch (err) {
|
|
161
163
|
if (err instanceof DiagnosticsError) {
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.13.0-alpha.
|
|
7
|
+
"version": "0.13.0-alpha.14",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -30,17 +30,17 @@
|
|
|
30
30
|
"build/**/*.d.ts"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@lwrjs/app-service": "0.13.0-alpha.
|
|
34
|
-
"@lwrjs/diagnostics": "0.13.0-alpha.
|
|
35
|
-
"@lwrjs/instrumentation": "0.13.0-alpha.
|
|
36
|
-
"@lwrjs/shared-utils": "0.13.0-alpha.
|
|
33
|
+
"@lwrjs/app-service": "0.13.0-alpha.14",
|
|
34
|
+
"@lwrjs/diagnostics": "0.13.0-alpha.14",
|
|
35
|
+
"@lwrjs/instrumentation": "0.13.0-alpha.14",
|
|
36
|
+
"@lwrjs/shared-utils": "0.13.0-alpha.14",
|
|
37
37
|
"lru-cache": "^10.2.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@lwrjs/types": "0.13.0-alpha.
|
|
40
|
+
"@lwrjs/types": "0.13.0-alpha.14"
|
|
41
41
|
},
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": ">=18.0.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "7276973cd522d9117256026fbd35ca12a9032304"
|
|
46
46
|
}
|