fix the SaslConfig type to compile with the updated library

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-11-25 14:00:13 +01:00
parent 994d9cd78e
commit 0b54dbaf7d
2 changed files with 21 additions and 5 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-kafka-backend': patch
---
Internal tweak to adapt to `kafkajs` 2.2.3
+16 -5
View File
@@ -25,8 +25,19 @@ export interface ClusterDetails {
export type SslConfig = ConnectionOptions | boolean;
export type SaslConfig = {
mechanism: 'plain' | 'scram-sha-256' | 'scram-sha-512';
username: string;
password: string;
};
export type SaslConfig =
| {
mechanism: 'plain';
username: string;
password: string;
}
| {
mechanism: 'scram-sha-256';
username: string;
password: string;
}
| {
mechanism: 'scram-sha-512';
username: string;
password: string;
};