(name: string, marketplace?: string)
| 46 | * is preserved in both branches (enabledPlugins keys are case-sensitive). |
| 47 | */ |
| 48 | export function hashPluginId(name: string, marketplace?: string): string { |
| 49 | const key = marketplace ? `${name}@${marketplace.toLowerCase()}` : name |
| 50 | return createHash('sha256') |
| 51 | .update(key + PLUGIN_ID_HASH_SALT) |
| 52 | .digest('hex') |
| 53 | .slice(0, 16) |
| 54 | } |
| 55 | |
| 56 | /** |
| 57 | * 4-value scope enum for plugin origin. Distinct from PluginScope |
no test coverage detected