@lwrjs/view-registry 0.19.6 → 0.20.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.
|
@@ -72,15 +72,15 @@ async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
72
72
|
const {specifier} = (0, import_shared_utils.explodeSpecifier)(rawSpecifier);
|
|
73
73
|
if (Object.keys(external).some((e) => specifier === e))
|
|
74
74
|
return;
|
|
75
|
-
const
|
|
76
|
-
if (!
|
|
75
|
+
const uri = uriMap[rawSpecifier];
|
|
76
|
+
if (!uri && (exclude.includes(specifier) || (0, import_shared_utils.isGroupie)(specifier, groups))) {
|
|
77
77
|
import_diagnostics.logger.warn({
|
|
78
78
|
label: "view-registry",
|
|
79
79
|
message: `Skipping preload of unknown static import: ${rawSpecifier}`
|
|
80
80
|
});
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
|
-
return
|
|
83
|
+
return uri;
|
|
84
84
|
};
|
|
85
85
|
const {
|
|
86
86
|
id: appName,
|
|
@@ -171,24 +171,18 @@ async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
171
171
|
resources: configResources
|
|
172
172
|
};
|
|
173
173
|
versionedSpecifier = bootstrapModuleGraph.graphs[0].specifier;
|
|
174
|
-
const
|
|
175
|
-
if (!
|
|
174
|
+
const uri = bootstrapModuleGraph.uriMap[versionedSpecifier];
|
|
175
|
+
if (!uri) {
|
|
176
176
|
throw Error(`Invalid Module Resource ${versionedSpecifier}`);
|
|
177
177
|
}
|
|
178
|
-
const
|
|
179
|
-
|
|
180
|
-
moduleResources.push((0, import_utils.getModuleResourceByUri)(bootstrapUri, runtimeEnvironment, {
|
|
181
|
-
integrity: bootstrapIntegrity,
|
|
182
|
-
isPreload: false,
|
|
183
|
-
isSSR,
|
|
184
|
-
nonce
|
|
185
|
-
}));
|
|
178
|
+
const integrity = (0, import_utils2.getBundleIntegrity)(bootstrapModuleGraph, versionedSpecifier);
|
|
179
|
+
moduleResources.push((0, import_utils.getModuleResourceByUri)(uri, runtimeEnvironment, {integrity, isPreload: false, isSSR, nonce}));
|
|
186
180
|
for (const depSpecifier of bootstrapModuleGraph.graphs[0].static) {
|
|
187
|
-
const
|
|
188
|
-
if (
|
|
189
|
-
const
|
|
190
|
-
const
|
|
191
|
-
(0, import_preload_utils.setPreloadModulesMeta)(depSpecifier,
|
|
181
|
+
const uri2 = getPreloadUri(depSpecifier, bootstrapModuleGraph.uriMap);
|
|
182
|
+
if (uri2) {
|
|
183
|
+
const integrity2 = (0, import_utils2.getBundleIntegrity)(bootstrapModuleGraph, depSpecifier);
|
|
184
|
+
const depDef = bootstrapModuleGraph.linkedDefinitions[depSpecifier];
|
|
185
|
+
(0, import_preload_utils.setPreloadModulesMeta)(depSpecifier, uri2, integrity2, groups, viewPreloads, depDef?.bundleRecord?.includedModules);
|
|
192
186
|
}
|
|
193
187
|
}
|
|
194
188
|
if ((0, import_shared_utils.isBundler)(defRegistry)) {
|
|
@@ -198,25 +192,20 @@ async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
198
192
|
}
|
|
199
193
|
if (isAMD) {
|
|
200
194
|
requiredAmdModules.push(versionedSpecifier);
|
|
201
|
-
imports[versionedSpecifier] =
|
|
202
|
-
addIncludedModulesToImports(bootstrapBundleDef, imports, bootstrapUri);
|
|
195
|
+
imports[versionedSpecifier] = uri;
|
|
203
196
|
const levels = (0, import_shared_utils.isMrtBundle)() ? bootstrapModuleGraph.graphs.length : 1;
|
|
204
197
|
for (let i = 0; i < levels; i++) {
|
|
205
198
|
for (const staticDep of bootstrapModuleGraph.graphs[i].static) {
|
|
206
|
-
const
|
|
207
|
-
|
|
208
|
-
imports[staticDep] = staticDepUri;
|
|
209
|
-
addIncludedModulesToImports(staticBundleDef, imports, staticDepUri);
|
|
199
|
+
const uri2 = bootstrapModuleGraph.uriMap[staticDep];
|
|
200
|
+
imports[staticDep] = uri2;
|
|
210
201
|
if (services?.length && i === 0) {
|
|
211
202
|
requiredAmdModules.push(staticDep);
|
|
212
203
|
}
|
|
213
204
|
}
|
|
214
205
|
for (const dynamicDep of bootstrapModuleGraph.graphs[i].dynamicRefs) {
|
|
215
|
-
const
|
|
216
|
-
if (
|
|
217
|
-
|
|
218
|
-
imports[dynamicDep] = dynamicDepUri;
|
|
219
|
-
addIncludedModulesToImports(dynamicBundleDef, imports, dynamicDepUri);
|
|
206
|
+
const uri2 = bootstrapModuleGraph.uriMap[dynamicDep];
|
|
207
|
+
if (uri2) {
|
|
208
|
+
imports[dynamicDep] = uri2;
|
|
220
209
|
} else {
|
|
221
210
|
import_diagnostics.logger.warn({
|
|
222
211
|
label: `view-registry`,
|
|
@@ -245,38 +234,33 @@ async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
245
234
|
customElementsRecords.push({elementName: element, flatGraph: graph});
|
|
246
235
|
if (!isSSR || (0, import_shared_utils.getHydrateDirective)(props)) {
|
|
247
236
|
const specifier = graph.graphs[0].specifier;
|
|
248
|
-
const
|
|
249
|
-
const
|
|
250
|
-
const
|
|
251
|
-
const includedModules =
|
|
252
|
-
(0, import_preload_utils.setPreloadModulesMeta)(specifier,
|
|
237
|
+
const uri = graph.uriMap[specifier];
|
|
238
|
+
const integrity = (0, import_utils2.getBundleIntegrity)(graph, specifier);
|
|
239
|
+
const bundleDef = graph.linkedDefinitions[specifier];
|
|
240
|
+
const includedModules = bundleDef?.bundleRecord ? bundleDef.bundleRecord.includedModules : [];
|
|
241
|
+
(0, import_preload_utils.setPreloadModulesMeta)(specifier, uri, integrity, groups, viewPreloads, includedModules);
|
|
253
242
|
if (bundle) {
|
|
254
243
|
for (const depSpecifier of graph.graphs[0].static) {
|
|
255
|
-
const
|
|
256
|
-
if (
|
|
257
|
-
const
|
|
258
|
-
const
|
|
259
|
-
(0, import_preload_utils.setPreloadModulesMeta)(depSpecifier,
|
|
244
|
+
const depUri = getPreloadUri(depSpecifier, graph.uriMap);
|
|
245
|
+
if (depUri) {
|
|
246
|
+
const integrity2 = (0, import_utils2.getBundleIntegrity)(graph, depSpecifier);
|
|
247
|
+
const depDef = graph.linkedDefinitions[depSpecifier];
|
|
248
|
+
(0, import_preload_utils.setPreloadModulesMeta)(depSpecifier, depUri, integrity2, groups, viewPreloads, depDef?.bundleRecord?.includedModules);
|
|
260
249
|
}
|
|
261
250
|
}
|
|
262
251
|
}
|
|
263
252
|
rootComponents.push(specifier);
|
|
264
|
-
imports[specifier] =
|
|
265
|
-
addIncludedModulesToImports(elementBundleDef, imports, elementUri);
|
|
253
|
+
imports[specifier] = uri;
|
|
266
254
|
if (isAMD) {
|
|
267
255
|
const levels = (0, import_shared_utils.isMrtBundle)() ? graph.graphs.length : 1;
|
|
268
256
|
for (let i = 0; i < levels; i++) {
|
|
269
257
|
for (const staticDep of graph.graphs[i].static) {
|
|
270
|
-
const
|
|
271
|
-
|
|
272
|
-
imports[staticDep] = elementStaticDepUri;
|
|
273
|
-
addIncludedModulesToImports(elementStaticBundleDef, imports, elementStaticDepUri);
|
|
258
|
+
const uri2 = graph.uriMap[staticDep];
|
|
259
|
+
imports[staticDep] = uri2;
|
|
274
260
|
}
|
|
275
261
|
for (const dynamicDep of graph.graphs[i].dynamicRefs) {
|
|
276
|
-
const
|
|
277
|
-
|
|
278
|
-
imports[dynamicDep] = elementDynamicDepUri;
|
|
279
|
-
addIncludedModulesToImports(elementDynamicBundleDef, imports, elementDynamicDepUri);
|
|
262
|
+
const uri2 = graph.uriMap[dynamicDep];
|
|
263
|
+
imports[dynamicDep] = uri2;
|
|
280
264
|
}
|
|
281
265
|
}
|
|
282
266
|
}
|
|
@@ -316,9 +300,9 @@ async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
316
300
|
}
|
|
317
301
|
const dedupedUris = [...new Set(viewPreloads.uris)];
|
|
318
302
|
for (const preloadUri of dedupedUris) {
|
|
319
|
-
const
|
|
303
|
+
const integrity = viewPreloads.integrities.get(preloadUri);
|
|
320
304
|
moduleResources.push((0, import_utils.getModuleResourceByUri)(preloadUri, runtimeEnvironment, {
|
|
321
|
-
integrity
|
|
305
|
+
integrity,
|
|
322
306
|
isPreload: true,
|
|
323
307
|
isSSR,
|
|
324
308
|
nonce
|
|
@@ -335,12 +319,3 @@ async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
335
319
|
}
|
|
336
320
|
};
|
|
337
321
|
}
|
|
338
|
-
function addIncludedModulesToImports(bundleDef, imports, uri) {
|
|
339
|
-
if ((0, import_shared_utils.isMrtBundle)()) {
|
|
340
|
-
bundleDef?.bundleRecord?.includedModules?.forEach((module2) => {
|
|
341
|
-
if (!imports[module2]) {
|
|
342
|
-
imports[module2] = uri;
|
|
343
|
-
}
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
}
|
|
@@ -25,7 +25,6 @@ var __toModule = (module2) => {
|
|
|
25
25
|
__markAsModule(exports);
|
|
26
26
|
__export(exports, {
|
|
27
27
|
flattenCustomElements: () => flattenCustomElements,
|
|
28
|
-
getBundleDefinition: () => getBundleDefinition,
|
|
29
28
|
getBundleIntegrity: () => getBundleIntegrity,
|
|
30
29
|
getViewBootstrapConfigurationResource: () => getViewBootstrapConfigurationResource,
|
|
31
30
|
getViewHmrConfigurationResource: () => getViewHmrConfigurationResource
|
|
@@ -142,6 +141,3 @@ function getBundleIntegrity(bootstrapModuleGraph, versionedSpecifier) {
|
|
|
142
141
|
const integrity = def?.integrity;
|
|
143
142
|
return integrity;
|
|
144
143
|
}
|
|
145
|
-
function getBundleDefinition(bootstrapModuleGraph, versionedSpecifier) {
|
|
146
|
-
return bootstrapModuleGraph.linkedDefinitions[versionedSpecifier];
|
|
147
|
-
}
|
|
@@ -2,7 +2,7 @@ import { logger } from '@lwrjs/diagnostics';
|
|
|
2
2
|
import { kebabCaseToModuleSpecifier, getModuleGraphs, GraphDepth, getModuleUriPrefix, explodeSpecifier, isBundler, getHydrateDirective, isGroupie, isExternalSpecifier, isLocalDev, isLambdaEnv, isMrtBundle, } from '@lwrjs/shared-utils';
|
|
3
3
|
import { AppResourceEnum, getAppSpecifier } from '@lwrjs/app-service/identity';
|
|
4
4
|
import { addExternalScriptNonce, generateHtmlTag, getModuleResource, getModuleResourceByUri, getViewNonce, getModuleGraphCacheKey, } from '../utils.js';
|
|
5
|
-
import { flattenCustomElements,
|
|
5
|
+
import { flattenCustomElements, getBundleIntegrity, getViewBootstrapConfigurationResource, getViewHmrConfigurationResource, } from './utils.js';
|
|
6
6
|
import { setPreloadModulesMeta, getPreloadModulesMeta, getPreloadModuleList, } from './preload-utils.js';
|
|
7
7
|
import { LRUCache } from 'lru-cache';
|
|
8
8
|
function includeIdFactory(bundleConfig) {
|
|
@@ -45,10 +45,10 @@ export async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
45
45
|
// do not preload externals; this is the app's responsibility
|
|
46
46
|
if (Object.keys(external).some((e) => specifier === e))
|
|
47
47
|
return;
|
|
48
|
-
const
|
|
48
|
+
const uri = uriMap[rawSpecifier];
|
|
49
49
|
// if there is no uri for an exclude or groupie, they've been handled via another specifier
|
|
50
50
|
// eg: if a bundle group has already been added to the URI map, its groups will not also be added
|
|
51
|
-
if (!
|
|
51
|
+
if (!uri && (exclude.includes(specifier) || isGroupie(specifier, groups))) {
|
|
52
52
|
// warn instead of throwing from setPreloadModulesMeta()
|
|
53
53
|
logger.warn({
|
|
54
54
|
label: 'view-registry',
|
|
@@ -56,7 +56,7 @@ export async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
56
56
|
});
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
|
-
return
|
|
59
|
+
return uri;
|
|
60
60
|
};
|
|
61
61
|
const { id: appName, bootstrap: { services, module: bootstrapModule, preloadModules = [] } = {
|
|
62
62
|
services: [],
|
|
@@ -190,26 +190,20 @@ export async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
190
190
|
};
|
|
191
191
|
// ADD bootstrap module uri as a script resource
|
|
192
192
|
versionedSpecifier = bootstrapModuleGraph.graphs[0].specifier;
|
|
193
|
-
const
|
|
193
|
+
const uri = bootstrapModuleGraph.uriMap[versionedSpecifier];
|
|
194
194
|
// Throw a very specific error if we get this back and the uri property is not set
|
|
195
|
-
if (!
|
|
195
|
+
if (!uri) {
|
|
196
196
|
throw Error(`Invalid Module Resource ${versionedSpecifier}`);
|
|
197
197
|
}
|
|
198
|
-
const
|
|
199
|
-
|
|
200
|
-
moduleResources.push(getModuleResourceByUri(bootstrapUri, runtimeEnvironment, {
|
|
201
|
-
integrity: bootstrapIntegrity,
|
|
202
|
-
isPreload: false,
|
|
203
|
-
isSSR,
|
|
204
|
-
nonce,
|
|
205
|
-
}));
|
|
198
|
+
const integrity = getBundleIntegrity(bootstrapModuleGraph, versionedSpecifier);
|
|
199
|
+
moduleResources.push(getModuleResourceByUri(uri, runtimeEnvironment, { integrity, isPreload: false, isSSR, nonce }));
|
|
206
200
|
// PRELOAD the bootstrap module static dependencies as preloaded script resources
|
|
207
201
|
for (const depSpecifier of bootstrapModuleGraph.graphs[0].static) {
|
|
208
|
-
const
|
|
209
|
-
if (
|
|
210
|
-
const
|
|
211
|
-
const
|
|
212
|
-
setPreloadModulesMeta(depSpecifier,
|
|
202
|
+
const uri = getPreloadUri(depSpecifier, bootstrapModuleGraph.uriMap);
|
|
203
|
+
if (uri) {
|
|
204
|
+
const integrity = getBundleIntegrity(bootstrapModuleGraph, depSpecifier);
|
|
205
|
+
const depDef = bootstrapModuleGraph.linkedDefinitions[depSpecifier];
|
|
206
|
+
setPreloadModulesMeta(depSpecifier, uri, integrity, groups, viewPreloads, depDef?.bundleRecord?.includedModules);
|
|
213
207
|
}
|
|
214
208
|
}
|
|
215
209
|
// PRELOAD configured preloadModules as preloaded script resources
|
|
@@ -223,19 +217,14 @@ export async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
223
217
|
// ADD bootstrap module as required
|
|
224
218
|
requiredAmdModules.push(versionedSpecifier);
|
|
225
219
|
// AMD ADD bootstrap module uri addressability
|
|
226
|
-
imports[versionedSpecifier] =
|
|
227
|
-
// Add included modules to imports if not already present
|
|
228
|
-
addIncludedModulesToImports(bootstrapBundleDef, imports, bootstrapUri);
|
|
220
|
+
imports[versionedSpecifier] = uri;
|
|
229
221
|
const levels = isMrtBundle() ? bootstrapModuleGraph.graphs.length : 1;
|
|
230
222
|
for (let i = 0; i < levels; i++) {
|
|
231
223
|
// PRELOAD bootstrap module static deps as link resource
|
|
232
224
|
for (const staticDep of bootstrapModuleGraph.graphs[i].static) {
|
|
233
|
-
const
|
|
234
|
-
const staticBundleDef = getBundleDefinition(bootstrapModuleGraph, staticDep);
|
|
225
|
+
const uri = bootstrapModuleGraph.uriMap[staticDep];
|
|
235
226
|
// AMD ADD static module dep uri addressability
|
|
236
|
-
imports[staticDep] =
|
|
237
|
-
// Add included modules to imports if not already present
|
|
238
|
-
addIncludedModulesToImports(staticBundleDef, imports, staticDepUri);
|
|
227
|
+
imports[staticDep] = uri;
|
|
239
228
|
// ADD bootstrap module static deps to requiredAmdModules if services, otherwise preloadModules
|
|
240
229
|
if (services?.length && i === 0) {
|
|
241
230
|
requiredAmdModules.push(staticDep);
|
|
@@ -243,12 +232,9 @@ export async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
243
232
|
}
|
|
244
233
|
// AMD Add import mappings for known dynamic imports
|
|
245
234
|
for (const dynamicDep of bootstrapModuleGraph.graphs[i].dynamicRefs) {
|
|
246
|
-
const
|
|
247
|
-
if (
|
|
248
|
-
|
|
249
|
-
imports[dynamicDep] = dynamicDepUri;
|
|
250
|
-
// Add included modules to imports if not already present
|
|
251
|
-
addIncludedModulesToImports(dynamicBundleDef, imports, dynamicDepUri);
|
|
235
|
+
const uri = bootstrapModuleGraph.uriMap[dynamicDep];
|
|
236
|
+
if (uri) {
|
|
237
|
+
imports[dynamicDep] = uri;
|
|
252
238
|
}
|
|
253
239
|
else {
|
|
254
240
|
logger.warn({
|
|
@@ -283,47 +269,37 @@ export async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
283
269
|
if (!isSSR || getHydrateDirective(props)) {
|
|
284
270
|
// PRELOAD the custom element module as a link resource
|
|
285
271
|
const specifier = graph.graphs[0].specifier;
|
|
286
|
-
const
|
|
287
|
-
const
|
|
288
|
-
const
|
|
289
|
-
const includedModules =
|
|
290
|
-
|
|
291
|
-
: [];
|
|
292
|
-
setPreloadModulesMeta(specifier, elementUri, elementIntegrity, groups, viewPreloads, includedModules);
|
|
272
|
+
const uri = graph.uriMap[specifier];
|
|
273
|
+
const integrity = getBundleIntegrity(graph, specifier);
|
|
274
|
+
const bundleDef = graph.linkedDefinitions[specifier];
|
|
275
|
+
const includedModules = bundleDef?.bundleRecord ? bundleDef.bundleRecord.includedModules : [];
|
|
276
|
+
setPreloadModulesMeta(specifier, uri, integrity, groups, viewPreloads, includedModules);
|
|
293
277
|
// PRELOAD custom element static deps as link resources when bundling is ON
|
|
294
278
|
if (bundle) {
|
|
295
279
|
for (const depSpecifier of graph.graphs[0].static) {
|
|
296
|
-
const
|
|
297
|
-
if (
|
|
298
|
-
const
|
|
299
|
-
const
|
|
300
|
-
setPreloadModulesMeta(depSpecifier,
|
|
280
|
+
const depUri = getPreloadUri(depSpecifier, graph.uriMap);
|
|
281
|
+
if (depUri) {
|
|
282
|
+
const integrity = getBundleIntegrity(graph, depSpecifier);
|
|
283
|
+
const depDef = graph.linkedDefinitions[depSpecifier];
|
|
284
|
+
setPreloadModulesMeta(depSpecifier, depUri, integrity, groups, viewPreloads, depDef?.bundleRecord?.includedModules);
|
|
301
285
|
}
|
|
302
286
|
}
|
|
303
287
|
}
|
|
304
288
|
// ADD register custom elements as a uri addressable rootComponents
|
|
305
289
|
rootComponents.push(specifier);
|
|
306
|
-
imports[specifier] =
|
|
307
|
-
// Add included modules to imports if not already present
|
|
308
|
-
addIncludedModulesToImports(elementBundleDef, imports, elementUri);
|
|
290
|
+
imports[specifier] = uri;
|
|
309
291
|
if (isAMD) {
|
|
310
292
|
const levels = isMrtBundle() ? graph.graphs.length : 1;
|
|
311
293
|
for (let i = 0; i < levels; i++) {
|
|
312
294
|
for (const staticDep of graph.graphs[i].static) {
|
|
313
|
-
const
|
|
314
|
-
const elementStaticBundleDef = getBundleDefinition(graph, staticDep);
|
|
295
|
+
const uri = graph.uriMap[staticDep];
|
|
315
296
|
// AMD ADD static module dep uri addressability
|
|
316
|
-
imports[staticDep] =
|
|
317
|
-
// Add included modules to imports if not already present
|
|
318
|
-
addIncludedModulesToImports(elementStaticBundleDef, imports, elementStaticDepUri);
|
|
297
|
+
imports[staticDep] = uri;
|
|
319
298
|
}
|
|
320
299
|
// AMD ADD dynamic imports module dep uri addressability
|
|
321
300
|
for (const dynamicDep of graph.graphs[i].dynamicRefs) {
|
|
322
|
-
const
|
|
323
|
-
|
|
324
|
-
imports[dynamicDep] = elementDynamicDepUri;
|
|
325
|
-
// Add included modules to imports if not already present
|
|
326
|
-
addIncludedModulesToImports(elementDynamicBundleDef, imports, elementDynamicDepUri);
|
|
301
|
+
const uri = graph.uriMap[dynamicDep];
|
|
302
|
+
imports[dynamicDep] = uri;
|
|
327
303
|
}
|
|
328
304
|
}
|
|
329
305
|
}
|
|
@@ -367,9 +343,9 @@ export async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
367
343
|
const dedupedUris = [...new Set(viewPreloads.uris)];
|
|
368
344
|
// PRELOAD script resources for preload module URIs after the bootstrap module
|
|
369
345
|
for (const preloadUri of dedupedUris) {
|
|
370
|
-
const
|
|
346
|
+
const integrity = viewPreloads.integrities.get(preloadUri);
|
|
371
347
|
moduleResources.push(getModuleResourceByUri(preloadUri, runtimeEnvironment, {
|
|
372
|
-
integrity
|
|
348
|
+
integrity,
|
|
373
349
|
isPreload: true,
|
|
374
350
|
isSSR,
|
|
375
351
|
nonce,
|
|
@@ -387,14 +363,4 @@ export async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
387
363
|
},
|
|
388
364
|
};
|
|
389
365
|
}
|
|
390
|
-
// Add included modules to imports if not already present
|
|
391
|
-
function addIncludedModulesToImports(bundleDef, imports, uri) {
|
|
392
|
-
if (isMrtBundle()) {
|
|
393
|
-
bundleDef?.bundleRecord?.includedModules?.forEach((module) => {
|
|
394
|
-
if (!imports[module]) {
|
|
395
|
-
imports[module] = uri;
|
|
396
|
-
}
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
366
|
//# sourceMappingURL=legacy_view_bootstrap.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { ClientBootstrapConfig, RuntimeEnvironment, RuntimeParams, ResourceDefinition, RenderedViewMetadata, CustomElementReference, View, ViewInfo, FlattenedModuleGraphs
|
|
1
|
+
import type { ClientBootstrapConfig, RuntimeEnvironment, RuntimeParams, ResourceDefinition, RenderedViewMetadata, CustomElementReference, View, ViewInfo, FlattenedModuleGraphs } from '@lwrjs/types';
|
|
2
2
|
export declare function getViewBootstrapConfigurationResource(viewInfo: ViewInfo, config: ClientBootstrapConfig, runtimeEnvironment: RuntimeEnvironment, runtimeParams: RuntimeParams, warnings?: (Error | string)[]): ResourceDefinition;
|
|
3
3
|
export declare function getViewHmrConfigurationResource(view: View, viewMetadata: RenderedViewMetadata): ResourceDefinition;
|
|
4
4
|
export declare function flattenCustomElements(arr: CustomElementReference[], isSSR?: boolean): CustomElementReference[];
|
|
5
5
|
export declare function getBundleIntegrity(bootstrapModuleGraph: FlattenedModuleGraphs, versionedSpecifier: string): string | undefined;
|
|
6
|
-
export declare function getBundleDefinition(bootstrapModuleGraph: FlattenedModuleGraphs, versionedSpecifier: string): BundleDefinition | undefined;
|
|
7
6
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -126,7 +126,4 @@ export function getBundleIntegrity(bootstrapModuleGraph, versionedSpecifier) {
|
|
|
126
126
|
const integrity = def?.integrity;
|
|
127
127
|
return integrity;
|
|
128
128
|
}
|
|
129
|
-
export function getBundleDefinition(bootstrapModuleGraph, versionedSpecifier) {
|
|
130
|
-
return bootstrapModuleGraph.linkedDefinitions[versionedSpecifier];
|
|
131
|
-
}
|
|
132
129
|
//# sourceMappingURL=utils.js.map
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.20.1",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
"build": "tsc -b"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@lwrjs/app-service": "0.
|
|
37
|
-
"@lwrjs/config": "0.
|
|
38
|
-
"@lwrjs/diagnostics": "0.
|
|
39
|
-
"@lwrjs/instrumentation": "0.
|
|
40
|
-
"@lwrjs/shared-utils": "0.
|
|
36
|
+
"@lwrjs/app-service": "0.20.1",
|
|
37
|
+
"@lwrjs/config": "0.20.1",
|
|
38
|
+
"@lwrjs/diagnostics": "0.20.1",
|
|
39
|
+
"@lwrjs/instrumentation": "0.20.1",
|
|
40
|
+
"@lwrjs/shared-utils": "0.20.1",
|
|
41
41
|
"lru-cache": "^10.4.3"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@lwrjs/types": "0.
|
|
44
|
+
"@lwrjs/types": "0.20.1"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=20.0.0"
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"volta": {
|
|
50
50
|
"extends": "../../../package.json"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "0621a79cb4f645af3500d6ba81ad561cf98ae944"
|
|
53
53
|
}
|