(
marketplaceName: string,
entry: { autoUpdate?: boolean },
)
| 46 | * @returns Whether auto-update is enabled for this marketplace |
| 47 | */ |
| 48 | export function isMarketplaceAutoUpdate( |
| 49 | marketplaceName: string, |
| 50 | entry: { autoUpdate?: boolean }, |
| 51 | ): boolean { |
| 52 | const normalizedName = marketplaceName.toLowerCase() |
| 53 | return ( |
| 54 | entry.autoUpdate ?? |
| 55 | (ALLOWED_OFFICIAL_MARKETPLACE_NAMES.has(normalizedName) && |
| 56 | !NO_AUTO_UPDATE_OFFICIAL_MARKETPLACES.has(normalizedName)) |
| 57 | ) |
| 58 | } |
| 59 | |
| 60 | /** |
| 61 | * Pattern to detect names that impersonate official Anthropic/Claude marketplaces. |
no test coverage detected