[X] I can reproduce this issue when running this plugin on its own.
[X] I am running this plugin on .d.ts files generated by TypeScript.
[X] This issue is not related to rolling up @types.
Code Snipped
import { SecretsManagerClient, GetSecretValueCommand } from "@aws-sdk/client-secrets-manager";
export const getAwsSecrets = async (region: string, secretName: string) => {
const client = new SecretsManagerClient({ region });
const command = new GetSecretValueCommand({ SecretId: secretName });
const response = await client.send(command);
const secrets = JSON.parse(response.SecretString);
for (const key in secrets){
if(!process.env[key]){
let val = secrets[key].trim()
if(val === 'false') val = false
if(val === 'true') val = true
process.env[key] = val
console.log(`env ${key} loaded from AWS Secrets Manager`)
}else{
console.log(`env ${key} loaded from AWS but not used because it is already set`)
}
}
}
Error Message
error TS2339: Property 'send' does not exist on type 'SecretsManagerClient'.
Checklist
.d.ts
files generated by TypeScript.@types
.Code Snipped
Error Message
my rollup config