From 5749e4191dfd9bdde1d00121d842735849553c5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=A8=20Audrey=20=E2=9C=A8?= Date: Mon, 21 Apr 2025 13:05:12 -0400 Subject: [PATCH] document derived exports --- .../generator/core/src/metadata/index.ts | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/libs/tools/generator/core/src/metadata/index.ts b/libs/tools/generator/core/src/metadata/index.ts index 5b5d6c7786e..17c02918705 100644 --- a/libs/tools/generator/core/src/metadata/index.ts +++ b/libs/tools/generator/core/src/metadata/index.ts @@ -10,13 +10,25 @@ import password from "./password/random-password"; import { CredentialType, CredentialAlgorithm } from "./type"; import effWordList from "./username/eff-word-list"; -export const BuiltIn = { +/** Credential generators hosted natively by the credential generator system. + * These are supplemented by generators from the {@link ExtensionService}. + */ +export const BuiltIn = Object.freeze({ + /** Catchall email address generator */ catchall, + + /** plus-addressed email address generator */ plusAddress, + + /** passphrase generator using the EFF word list */ passphrase, + + /** password generator */ password, + + /** username generator using the EFF word list */ effWordList, -}; +}); // `CredentialAlgorithm` is defined in terms of `ABT`; supplying // type information in the barrel file breaks a circular dependency. @@ -25,9 +37,17 @@ export const AlgorithmsByType: Record< CredentialType, ReadonlyArray > = AlgorithmsByTypeData; + +/** A list of all built-in algorithm identifiers + * @remarks this is useful when you need to filter invalid values + */ export const Algorithms: ReadonlyArray = Object.freeze( Object.values(AlgorithmData), ); + +/** A list of all built-in algorithm types + * @remarks this is useful when you need to filter invalid values + */ export const Types: ReadonlyArray = Object.freeze(Object.values(TypeData)); export { Profile, Type, Algorithm } from "./data";