diff --git a/.changeset/empty-actors-relax.md b/.changeset/empty-actors-relax.md new file mode 100644 index 0000000000..e0390dbd80 --- /dev/null +++ b/.changeset/empty-actors-relax.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend-module-ldap': patch +--- + +Export LDAP vendor types and instances for testing custom transformers diff --git a/plugins/catalog-backend-module-ldap/report.api.md b/plugins/catalog-backend-module-ldap/report.api.md index 16546cb773..b39b93ea30 100644 --- a/plugins/catalog-backend-module-ldap/report.api.md +++ b/plugins/catalog-backend-module-ldap/report.api.md @@ -275,4 +275,14 @@ export type VendorConfig = { dnAttributeName?: string; uuidAttributeName?: string; }; + +// @public +export const vendors: { + readonly activeDirectory: LdapVendor; + readonly aeDir: LdapVendor; + readonly freeIpa: LdapVendor; + readonly googleLdap: LdapVendor; + readonly lldap: LdapVendor; + readonly default: LdapVendor; +}; ``` diff --git a/plugins/catalog-backend-module-ldap/src/ldap/index.ts b/plugins/catalog-backend-module-ldap/src/ldap/index.ts index 6d8fbd06d6..800ebec316 100644 --- a/plugins/catalog-backend-module-ldap/src/ldap/index.ts +++ b/plugins/catalog-backend-module-ldap/src/ldap/index.ts @@ -13,6 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { + ActiveDirectoryVendor, + AEDirVendor, + DefaultLdapVendor, + FreeIpaVendor, + GoogleLdapVendor, + LdapVendor, + LLDAPVendor, +} from './vendors'; export { LdapClient } from './client'; export { mapStringAttr } from './util'; @@ -37,3 +46,16 @@ export { readLdapOrg, } from './read'; export type { GroupTransformer, UserTransformer } from './types'; +/** + * An LDAP Vendor types. + * + * @public + */ +export const vendors = { + activeDirectory: ActiveDirectoryVendor as LdapVendor, + aeDir: AEDirVendor as LdapVendor, + freeIpa: FreeIpaVendor as LdapVendor, + googleLdap: GoogleLdapVendor as LdapVendor, + lldap: LLDAPVendor as LdapVendor, + default: DefaultLdapVendor as LdapVendor, +} as const;