@lwrjs/static 0.15.0-alpha.36 → 0.15.0-alpha.38
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.
|
@@ -48,7 +48,11 @@ var StaticBundleProvider = class {
|
|
|
48
48
|
this.codeCache = new import_lru_cache.LRUCache({
|
|
49
49
|
max: this.bundleCacheSize,
|
|
50
50
|
dispose: (_value, key) => {
|
|
51
|
-
|
|
51
|
+
if ((0, import_shared_utils.isLambdaEnv)()) {
|
|
52
|
+
import_diagnostics.logger.warn(`Bundle Code evicted from cache ${key}`);
|
|
53
|
+
} else {
|
|
54
|
+
import_diagnostics.logger.verbose(`Bundle Code evicted from cache ${key}`);
|
|
55
|
+
}
|
|
52
56
|
}
|
|
53
57
|
});
|
|
54
58
|
}
|
|
@@ -125,7 +125,7 @@ var DecisionTreeImpl = class {
|
|
|
125
125
|
const versions = versionChoice === CHOICE_EMPTY ? [...new Set([CHOICE_EMPTY, CHOICE_WILDCARD])] : [...new Set([versionChoice, CHOICE_EMPTY])];
|
|
126
126
|
const envChoice = debug ? [CHOICE_DEBUG] : [CHOICE_PROD];
|
|
127
127
|
const ssrChoice = match.variants[import_shared_utils.SSR_SIGIL] || CHOICE_EMPTY;
|
|
128
|
-
const ssr = ssrChoice ? [ssrChoice, CHOICE_WILDCARD] : [CHOICE_WILDCARD];
|
|
128
|
+
const ssr = (0, import_shared_utils.getFeatureFlags)().SSR_COMPILER_ENABLED ? [ssrChoice] : ssrChoice ? [ssrChoice, CHOICE_WILDCARD] : [CHOICE_WILDCARD];
|
|
129
129
|
const localeChoice = match.variants[import_shared_utils.LOCALE_SIGIL];
|
|
130
130
|
const localeId = localeFallbacks?.[localeChoice] ?? [CHOICE_WILDCARD];
|
|
131
131
|
return this.getOrderedChoices([specifier], envChoice, ssr, versions, localeId);
|
|
@@ -20,7 +20,12 @@ export default class StaticBundleProvider {
|
|
|
20
20
|
this.codeCache = new LRUCache({
|
|
21
21
|
max: this.bundleCacheSize,
|
|
22
22
|
dispose: (_value, key) => {
|
|
23
|
-
|
|
23
|
+
if (isLambdaEnv()) {
|
|
24
|
+
logger.warn(`Bundle Code evicted from cache ${key}`);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
logger.verbose(`Bundle Code evicted from cache ${key}`);
|
|
28
|
+
}
|
|
24
29
|
},
|
|
25
30
|
});
|
|
26
31
|
}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* tree.find('bundle/foo', isDebug, forSsr, 'en-US')
|
|
19
19
|
*/
|
|
20
20
|
import { logger } from '@lwrjs/diagnostics';
|
|
21
|
-
import { LOCALE_SIGIL, SSR_SIGIL, VERSION_NOT_PROVIDED, VERSION_SIGIL, normalizeVersionToUri, } from '@lwrjs/shared-utils';
|
|
21
|
+
import { LOCALE_SIGIL, SSR_SIGIL, VERSION_NOT_PROVIDED, VERSION_SIGIL, getFeatureFlags, normalizeVersionToUri, } from '@lwrjs/shared-utils';
|
|
22
22
|
import { parseSiteId } from '../site-metadata.js';
|
|
23
23
|
// Choice wildcard means I want to match anything
|
|
24
24
|
// Examples are any locale and match the default locale
|
|
@@ -162,10 +162,11 @@ export default class DecisionTreeImpl {
|
|
|
162
162
|
const envChoice = debug ? [CHOICE_DEBUG] : [CHOICE_PROD];
|
|
163
163
|
// If there is an ssr sigil always prefer it during SSR
|
|
164
164
|
const ssrChoice = match.variants[SSR_SIGIL] || CHOICE_EMPTY;
|
|
165
|
-
const ssr =
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
165
|
+
const ssr = getFeatureFlags().SSR_COMPILER_ENABLED
|
|
166
|
+
? [ssrChoice]
|
|
167
|
+
: ssrChoice
|
|
168
|
+
? [ssrChoice, CHOICE_WILDCARD]
|
|
169
|
+
: [CHOICE_WILDCARD];
|
|
169
170
|
const localeChoice = match.variants[LOCALE_SIGIL];
|
|
170
171
|
// If there are no fallbacks, or localeChoice is not in fallbacks use the ['*'] wildcard choice
|
|
171
172
|
const localeId = localeFallbacks?.[localeChoice] ?? [CHOICE_WILDCARD];
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.15.0-alpha.
|
|
7
|
+
"version": "0.15.0-alpha.38",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"build/**/*.d.ts"
|
|
53
53
|
],
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@lwrjs/diagnostics": "0.15.0-alpha.
|
|
56
|
-
"@lwrjs/shared-utils": "0.15.0-alpha.
|
|
55
|
+
"@lwrjs/diagnostics": "0.15.0-alpha.38",
|
|
56
|
+
"@lwrjs/shared-utils": "0.15.0-alpha.38",
|
|
57
57
|
"lru-cache": "^10.4.3"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@lwrjs/types": "0.15.0-alpha.
|
|
60
|
+
"@lwrjs/types": "0.15.0-alpha.38",
|
|
61
61
|
"@types/express": "^4.17.21",
|
|
62
62
|
"jest": "^26.6.3",
|
|
63
63
|
"jest-express": "^1.12.0",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"volta": {
|
|
72
72
|
"extends": "../../../package.json"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "9dbc44e168d9926f80db6022643efc3aa16b0782"
|
|
75
75
|
}
|