mirror of
https://github.com/bitwarden/browser
synced 2026-02-17 09:59:41 +00:00
The first pass of the integration logic mixed names between "integration" and "extension". For example, the remote service has an "IntegrationId" whereas the part of the password manager it extended has an "ExtensionPointId". The new types have a more consistent approach. The remote service now distinguishes the integrated product from the vendor providing it, and the logic within the password manager is now all the "extension". The specific location being extended is now called the "site" or "extension site". The main reason "extension" was chosen over "integration" is simply so that the new and old types remain distinct in the folder hierarchy.
21 lines
602 B
TypeScript
21 lines
602 B
TypeScript
import { deepFreeze } from "../util";
|
|
|
|
import { ExtensionMetadata, SiteMetadata, VendorId } from "./metadata/type";
|
|
|
|
/** Describes the capabilities of an extension site.
|
|
* This type is immutable.
|
|
*/
|
|
export class ExtensionSite {
|
|
/** instantiate the extension site
|
|
* @param site describes the extension site
|
|
* @param vendors describes the available vendors
|
|
* @param extensions describes the available extensions
|
|
*/
|
|
constructor(
|
|
readonly site: Readonly<SiteMetadata>,
|
|
readonly extensions: ReadonlyMap<VendorId, Readonly<ExtensionMetadata>>,
|
|
) {
|
|
deepFreeze(this);
|
|
}
|
|
}
|