@lwrjs/view-registry 0.13.0-alpha.17 → 0.13.0-alpha.18

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.
@@ -219,6 +219,13 @@ async function getHtmlResources(view, viewParams, resourceContext) {
219
219
  }
220
220
  }));
221
221
  if (viewContainsLiveElements) {
222
+ if ((0, import_shared_utils.isLocalDev)()) {
223
+ const localDevSpecifier = "lwr_local_dev/bootstrap";
224
+ rootComponents.push(localDevSpecifier);
225
+ const localDevMod = await (0, import_utils.getModuleResource)({specifier: localDevSpecifier, version: ""}, runtimeEnvironment, {}, moduleRegistry, runtimeParams);
226
+ if (localDevMod.src)
227
+ imports[localDevSpecifier] = localDevMod.src;
228
+ }
222
229
  configResources.unshift((0, import_utils2.getViewBootstrapConfigurationResource)({
223
230
  id: view.id,
224
231
  url: viewParams?.page?.url,
@@ -1,7 +1,7 @@
1
1
  import { logger } from '@lwrjs/diagnostics';
2
- import { kebabCaseToModuleSpecifier, getModuleGraphs, GraphDepth, getModuleUriPrefix, explodeSpecifier, isBundler, getHydrateDirective, isGroupie, isExternalSpecifier, } from '@lwrjs/shared-utils';
2
+ import { kebabCaseToModuleSpecifier, getModuleGraphs, GraphDepth, getModuleUriPrefix, explodeSpecifier, isBundler, getHydrateDirective, isGroupie, isExternalSpecifier, isLocalDev, } from '@lwrjs/shared-utils';
3
3
  import { AppResourceEnum, getAppSpecifier } from '@lwrjs/app-service/identity';
4
- import { addExternalScriptNonce, generateHtmlTag, getModuleResourceByUri, getViewNonce } from '../utils.js';
4
+ import { addExternalScriptNonce, generateHtmlTag, getModuleResource, getModuleResourceByUri, getViewNonce, } from '../utils.js';
5
5
  import { flattenCustomElements, getBundleIntegrity, getViewBootstrapConfigurationResource, getViewHmrConfigurationResource, } from './utils.js';
6
6
  import { setPreloadModulesMeta, getPreloadModulesMeta } from './preload-utils.js';
7
7
  function includeIdFactory(bundleConfig) {
@@ -248,6 +248,14 @@ export async function getHtmlResources(view, viewParams, resourceContext) {
248
248
  }
249
249
  }));
250
250
  if (viewContainsLiveElements) {
251
+ if (isLocalDev()) {
252
+ // ADD the client-side bootstrap module and mapping for local-dev
253
+ const localDevSpecifier = 'lwr_local_dev/bootstrap';
254
+ rootComponents.push(localDevSpecifier);
255
+ const localDevMod = await getModuleResource({ specifier: localDevSpecifier, version: '' }, runtimeEnvironment, {}, moduleRegistry, runtimeParams);
256
+ if (localDevMod.src)
257
+ imports[localDevSpecifier] = localDevMod.src;
258
+ }
251
259
  // ADD configuration of the bootstrapModule
252
260
  configResources.unshift(getViewBootstrapConfigurationResource({
253
261
  id: view.id,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.13.0-alpha.17",
7
+ "version": "0.13.0-alpha.18",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -33,17 +33,17 @@
33
33
  "build": "tsc -b"
34
34
  },
35
35
  "dependencies": {
36
- "@lwrjs/app-service": "0.13.0-alpha.17",
37
- "@lwrjs/diagnostics": "0.13.0-alpha.17",
38
- "@lwrjs/instrumentation": "0.13.0-alpha.17",
39
- "@lwrjs/shared-utils": "0.13.0-alpha.17",
36
+ "@lwrjs/app-service": "0.13.0-alpha.18",
37
+ "@lwrjs/diagnostics": "0.13.0-alpha.18",
38
+ "@lwrjs/instrumentation": "0.13.0-alpha.18",
39
+ "@lwrjs/shared-utils": "0.13.0-alpha.18",
40
40
  "lru-cache": "^10.2.2"
41
41
  },
42
42
  "devDependencies": {
43
- "@lwrjs/types": "0.13.0-alpha.17"
43
+ "@lwrjs/types": "0.13.0-alpha.18"
44
44
  },
45
45
  "engines": {
46
46
  "node": ">=18.0.0"
47
47
  },
48
- "gitHead": "03f98478f36c91075d244431f91d02be0cd5d4bd"
48
+ "gitHead": "da3c9ea71a70cc4e81d6e8bc8625ba9d00f784bd"
49
49
  }