sdk-typescript
sdk-typescript copied to clipboard
[Feature Request] Allow strings to be passed for `tls.clientCertPair.crt/key`
Is your feature request related to a problem? Please describe.
So that I don't have to use Buffer.from with env vars:

Not sure. If we expect a string, people are likely to believe that they can give a file path. This might actually be more problematic than the status quo.
@lorensr What do you think?
I see your point. I'd prioritize convenience here, and change doc to clarify:
crt Buffer | string The cert itself (not a file path).

I'd consider adding support for strings but warning if the string looks like a path.
Another option is to support:
Buffer | { content: string | Buffer } | { path: string }
That could help direct users in the right direction and remove some friction but I don't love it.
Another option is to support:
Buffer | { content: string | Buffer } | { path: string }That could help direct users in the right direction and remove some friction but I don't love it.
Don't really love it either, but I'd say this is the "least worst" option, and is quite easy to implement anyway.
Will do.
I’m on the fence… let’s think about it some more