diff --git a/package.json b/package.json index bc5adf2..17cfb27 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,10 @@ } }, "module": "src/index.ts", + "files": [ + "dist", + "src" + ], "scripts": { "build": "tsdown", "lint": "eslint .", diff --git a/src/client.ts b/src/client.ts index 689ce30..e9f5e79 100644 --- a/src/client.ts +++ b/src/client.ts @@ -3,7 +3,17 @@ import { Request } from "./request"; export class Client { public request: Request; - public constructor(public readonly config: ClientConfig) { + public constructor(private config: ClientConfig) { this.request = new Request(config); } + + public updateCredentials(accessKeyID: string, accessKeySecret: string, stsToken?: string) { + this.config = { + ...this.config, + accessKeyID, + accessKeySecret, + stsToken, + }; + this.request = new Request(this.config); + } }