@lwrjs/view-registry 0.12.0-alpha.27 → 0.12.0-alpha.29
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/index.cjs
CHANGED
|
@@ -80,6 +80,10 @@ var LwrViewRegistry = class {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
async onViewSourceChange(compiledView) {
|
|
83
|
+
if (process.env.MRT_HMR === "true") {
|
|
84
|
+
this.viewDefinitions.clear();
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
83
87
|
const {contentTemplate, rootComponent} = compiledView.viewId;
|
|
84
88
|
const compiledViewCacheKey = (0, import_shared_utils.getCacheKeyFromJson)({contentTemplate, rootComponent});
|
|
85
89
|
this.compiledViews.set(compiledViewCacheKey, compiledView);
|
|
@@ -63,7 +63,7 @@ function getViewBootstrapConfigurationResource(viewInfo, config, runtimeEnvironm
|
|
|
63
63
|
`globalThis.LWR = {...globalThis.LWR, env: ${JSON.stringify(lwrEnv)}};`,
|
|
64
64
|
`globalThis.process={...globalThis.process,env:{...globalThis.process?.env,...${JSON.stringify(nodeEnv)}}};`,
|
|
65
65
|
`globalThis.lwcRuntimeFlags = { ENABLE_MIXED_SHADOW_MODE: ${viewInfo.mixedMode} };`,
|
|
66
|
-
debug && debugMessage && `console.
|
|
66
|
+
debug && debugMessage && `console.error(${JSON.stringify(debugMessage)});`
|
|
67
67
|
].filter(Boolean).join("\n");
|
|
68
68
|
if (viewInfo.configAsSrc) {
|
|
69
69
|
const viewUrl = viewInfo.url || "/";
|
package/build/es/index.js
CHANGED
|
@@ -62,6 +62,11 @@ export class LwrViewRegistry {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
async onViewSourceChange(compiledView) {
|
|
65
|
+
// TODO we will make this more robust in the future w/ full MRT HMR
|
|
66
|
+
if (process.env.MRT_HMR === 'true') {
|
|
67
|
+
this.viewDefinitions.clear();
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
65
70
|
// invalidate compiledViews and viewDefinition cache entries with references to the CompiledView template id.
|
|
66
71
|
const { contentTemplate, rootComponent } = compiledView.viewId;
|
|
67
72
|
const compiledViewCacheKey = getCacheKeyFromJson({ contentTemplate, rootComponent });
|
|
@@ -38,7 +38,7 @@ export function getViewBootstrapConfigurationResource(viewInfo, config, runtimeE
|
|
|
38
38
|
`globalThis.LWR = {...globalThis.LWR, env: ${JSON.stringify(lwrEnv)}};`,
|
|
39
39
|
`globalThis.process={...globalThis.process,env:{...globalThis.process?.env,...${JSON.stringify(nodeEnv)}}};`,
|
|
40
40
|
`globalThis.lwcRuntimeFlags = { ENABLE_MIXED_SHADOW_MODE: ${viewInfo.mixedMode} };`,
|
|
41
|
-
debug && debugMessage && `console.
|
|
41
|
+
debug && debugMessage && `console.error(${JSON.stringify(debugMessage)});`,
|
|
42
42
|
]
|
|
43
43
|
.filter(Boolean)
|
|
44
44
|
.join('\n');
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.12.0-alpha.
|
|
7
|
+
"version": "0.12.0-alpha.29",
|
|
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.12.0-alpha.
|
|
34
|
-
"@lwrjs/diagnostics": "0.12.0-alpha.
|
|
35
|
-
"@lwrjs/instrumentation": "0.12.0-alpha.
|
|
36
|
-
"@lwrjs/shared-utils": "0.12.0-alpha.
|
|
33
|
+
"@lwrjs/app-service": "0.12.0-alpha.29",
|
|
34
|
+
"@lwrjs/diagnostics": "0.12.0-alpha.29",
|
|
35
|
+
"@lwrjs/instrumentation": "0.12.0-alpha.29",
|
|
36
|
+
"@lwrjs/shared-utils": "0.12.0-alpha.29",
|
|
37
37
|
"lru-cache": "^10.2.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@lwrjs/types": "0.12.0-alpha.
|
|
40
|
+
"@lwrjs/types": "0.12.0-alpha.29"
|
|
41
41
|
},
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": ">=18.0.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "452c6d4343b2139e03147100eec8aed7d17d7c51"
|
|
46
46
|
}
|