@lwrjs/view-registry 0.17.2-alpha.19 → 0.17.2-alpha.20
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 +6 -1
- package/build/es/index.js +6 -1
- package/package.json +7 -7
package/build/cjs/index.cjs
CHANGED
|
@@ -41,7 +41,6 @@ var LwrViewRegistry = class {
|
|
|
41
41
|
this.compiledViews = new Map();
|
|
42
42
|
this.immutableAssets = new Map();
|
|
43
43
|
this.pendingViewDefinitions = new import_shared_utils.InflightTasks();
|
|
44
|
-
this.metadataCache = new Map();
|
|
45
44
|
this.name = "lwr-view-registry";
|
|
46
45
|
this.resourceRegistry = context.resourceRegistry;
|
|
47
46
|
this.runtimeEnvironment = context.runtimeEnvironment;
|
|
@@ -59,6 +58,12 @@ var LwrViewRegistry = class {
|
|
|
59
58
|
import_diagnostics.logger.verbose(`View evicted from cache ${key}`);
|
|
60
59
|
}
|
|
61
60
|
});
|
|
61
|
+
this.metadataCache = new import_lru_cache.LRUCache({
|
|
62
|
+
max: parseInt(process.env.VIEW_METADATA_CACHE_SIZE ?? "500", 10),
|
|
63
|
+
dispose: (_value, key) => {
|
|
64
|
+
import_diagnostics.logger.verbose(`Metadata evicted from cache ${key}`);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
62
67
|
observer.onViewSourceChange(({payload}) => this.onViewSourceChange(payload));
|
|
63
68
|
observer.onModuleDefinitionChange(({payload}) => this.onModuleDefinitionChange(payload));
|
|
64
69
|
observer.onAssetSourceChange(({payload}) => this.onAssetSourceChange(payload));
|
package/build/es/index.js
CHANGED
|
@@ -20,7 +20,6 @@ export class LwrViewRegistry {
|
|
|
20
20
|
// Pending view definitions are tracked to prevent concurrent resolution of the same view.
|
|
21
21
|
// Subsequent requests for the same view will await the original promise.
|
|
22
22
|
this.pendingViewDefinitions = new InflightTasks();
|
|
23
|
-
this.metadataCache = new Map();
|
|
24
23
|
this.name = 'lwr-view-registry';
|
|
25
24
|
this.resourceRegistry = context.resourceRegistry;
|
|
26
25
|
this.runtimeEnvironment = context.runtimeEnvironment;
|
|
@@ -39,6 +38,12 @@ export class LwrViewRegistry {
|
|
|
39
38
|
logger.verbose(`View evicted from cache ${key}`);
|
|
40
39
|
},
|
|
41
40
|
});
|
|
41
|
+
this.metadataCache = new LRUCache({
|
|
42
|
+
max: parseInt(process.env.VIEW_METADATA_CACHE_SIZE ?? '500', 10),
|
|
43
|
+
dispose: (_value, key) => {
|
|
44
|
+
logger.verbose(`Metadata evicted from cache ${key}`);
|
|
45
|
+
},
|
|
46
|
+
});
|
|
42
47
|
// Observers for cached entries external dependencies -- view templates, modules, and assets
|
|
43
48
|
observer.onViewSourceChange(({ payload }) => this.onViewSourceChange(payload));
|
|
44
49
|
observer.onModuleDefinitionChange(({ payload }) => this.onModuleDefinitionChange(payload));
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.17.2-alpha.
|
|
7
|
+
"version": "0.17.2-alpha.20",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"build": "tsc -b"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@lwrjs/app-service": "0.17.2-alpha.
|
|
37
|
-
"@lwrjs/diagnostics": "0.17.2-alpha.
|
|
38
|
-
"@lwrjs/instrumentation": "0.17.2-alpha.
|
|
39
|
-
"@lwrjs/shared-utils": "0.17.2-alpha.
|
|
36
|
+
"@lwrjs/app-service": "0.17.2-alpha.20",
|
|
37
|
+
"@lwrjs/diagnostics": "0.17.2-alpha.20",
|
|
38
|
+
"@lwrjs/instrumentation": "0.17.2-alpha.20",
|
|
39
|
+
"@lwrjs/shared-utils": "0.17.2-alpha.20",
|
|
40
40
|
"lru-cache": "^10.4.3"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@lwrjs/types": "0.17.2-alpha.
|
|
43
|
+
"@lwrjs/types": "0.17.2-alpha.20"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=20.0.0"
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"volta": {
|
|
49
49
|
"extends": "../../../package.json"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "871213620dec8ff886be421339f1e90e86dbee96"
|
|
52
52
|
}
|