





















@@ -44,7 +44,12 @@ const BUILT_IN_PLUGIN_ALIAS_LOOKUP = new Map<string, string>([
4444 ...BUILT_IN_PLUGIN_ALIAS_FALLBACKS.map(([, pluginId]) => [pluginId, pluginId] as const),
4545]);
464647+let bundledPluginAliasLookup: ReadonlyMap<string, string> | undefined;
48+4749function getBundledPluginAliasLookup(): ReadonlyMap<string, string> {
50+if (bundledPluginAliasLookup) {
51+return bundledPluginAliasLookup;
52+}
4853const lookup = new Map<string, string>();
4954for (const plugin of listBundledPluginMetadata({ includeChannelConfigs: false })) {
5055const pluginId = normalizeOptionalLowercaseString(plugin.manifest.id);
@@ -67,7 +72,8 @@ function getBundledPluginAliasLookup(): ReadonlyMap<string, string> {
6772for (const [alias, pluginId] of BUILT_IN_PLUGIN_ALIAS_FALLBACKS) {
6873lookup.set(alias, pluginId);
6974}
70-return lookup;
75+bundledPluginAliasLookup = lookup;
76+return bundledPluginAliasLookup;
7177}
72787379export function normalizePluginId(id: string): string {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。