@lwrjs/view-registry 0.9.0-alpha.35 → 0.9.0-alpha.37
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.
|
@@ -73,9 +73,19 @@ async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
73
73
|
const isSSR = view.bootstrap?.ssr;
|
|
74
74
|
if (isAMD) {
|
|
75
75
|
const shimBundle = debug || minify === false ? "lwr-loader-shim-legacy.bundle.js" : "lwr-loader-shim-legacy.bundle.min.js";
|
|
76
|
-
|
|
76
|
+
let def = await resourceRegistry.getResource({specifier: shimBundle, version}, runtimeEnvironment, runtimeParams);
|
|
77
77
|
if (!def) {
|
|
78
|
-
|
|
78
|
+
let fallbackShimBundle;
|
|
79
|
+
if (shimBundle === "lwr-loader-shim-legacy.bundle.js") {
|
|
80
|
+
fallbackShimBundle = "lwr-loader-shim-legacy.bundle.min.js";
|
|
81
|
+
def = await resourceRegistry.getResource({specifier: fallbackShimBundle, version}, runtimeEnvironment, runtimeParams);
|
|
82
|
+
} else {
|
|
83
|
+
fallbackShimBundle = "lwr-loader-shim-legacy.bundle.js";
|
|
84
|
+
def = await resourceRegistry.getResource({specifier: fallbackShimBundle, version}, runtimeEnvironment, runtimeParams);
|
|
85
|
+
}
|
|
86
|
+
if (!def) {
|
|
87
|
+
throw Error("Failed to find definition of resource: " + shimBundle);
|
|
88
|
+
}
|
|
79
89
|
}
|
|
80
90
|
requiredResources.push(def);
|
|
81
91
|
const errorShimDef = await resourceRegistry.getResource({specifier: "lwr-error-shim.js", version}, runtimeEnvironment, runtimeParams);
|
|
@@ -59,9 +59,23 @@ export async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
59
59
|
const shimBundle = debug || minify === false
|
|
60
60
|
? 'lwr-loader-shim-legacy.bundle.js'
|
|
61
61
|
: 'lwr-loader-shim-legacy.bundle.min.js';
|
|
62
|
-
|
|
62
|
+
let def = (await resourceRegistry.getResource({ specifier: shimBundle, version }, runtimeEnvironment, runtimeParams));
|
|
63
63
|
if (!def) {
|
|
64
|
-
|
|
64
|
+
// HACK: fallback to looking for the other shim.
|
|
65
|
+
// TODO: remove this once we solve debug mode in MRT
|
|
66
|
+
let fallbackShimBundle;
|
|
67
|
+
if (shimBundle === 'lwr-loader-shim-legacy.bundle.js') {
|
|
68
|
+
fallbackShimBundle = 'lwr-loader-shim-legacy.bundle.min.js';
|
|
69
|
+
def = (await resourceRegistry.getResource({ specifier: fallbackShimBundle, version }, runtimeEnvironment, runtimeParams));
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
fallbackShimBundle = 'lwr-loader-shim-legacy.bundle.js';
|
|
73
|
+
def = (await resourceRegistry.getResource({ specifier: fallbackShimBundle, version }, runtimeEnvironment, runtimeParams));
|
|
74
|
+
}
|
|
75
|
+
// throw if we still can't find it
|
|
76
|
+
if (!def) {
|
|
77
|
+
throw Error('Failed to find definition of resource: ' + shimBundle);
|
|
78
|
+
}
|
|
65
79
|
}
|
|
66
80
|
requiredResources.push(def);
|
|
67
81
|
// Always inline the error shim script after the shim
|
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.37",
|
|
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.37",
|
|
34
|
+
"@lwrjs/diagnostics": "0.9.0-alpha.37",
|
|
35
|
+
"@lwrjs/shared-utils": "0.9.0-alpha.37"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@lwrjs/types": "0.9.0-alpha.
|
|
38
|
+
"@lwrjs/types": "0.9.0-alpha.37"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": ">=16.0.0 <20"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "3e2fdc8beb6e6f9a108a674a8ebaaa30e2b498cb"
|
|
44
44
|
}
|