@stacksjs/ts-cloud 0.5.28 → 0.5.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -47257,7 +47257,6 @@ class AWSClient {
47257
47257
  cache;
47258
47258
  xmlParser;
47259
47259
  constructor(credentials, config6) {
47260
- this.credentials = credentials || this.loadCredentials();
47261
47260
  this.config = {
47262
47261
  maxRetries: 3,
47263
47262
  retryDelay: 1000,
@@ -47265,6 +47264,7 @@ class AWSClient {
47265
47264
  defaultCacheTTL: 60000,
47266
47265
  ...config6
47267
47266
  };
47267
+ this.credentials = credentials || this.loadCredentials();
47268
47268
  this.cache = new Map;
47269
47269
  this.xmlParser = new XMLParser({
47270
47270
  ignoreAttributes: false,
@@ -47295,7 +47295,7 @@ class AWSClient {
47295
47295
  };
47296
47296
  }
47297
47297
  loadCredentialsFromFile() {
47298
- const profile = process.env.AWS_PROFILE || "default";
47298
+ const profile = this.config?.profile || process.env.AWS_PROFILE || "default";
47299
47299
  const credentialsPath = process.env.AWS_SHARED_CREDENTIALS_FILE || join11(homedir6(), ".aws", "credentials");
47300
47300
  if (!existsSync16(credentialsPath)) {
47301
47301
  return null;
@@ -47914,7 +47914,7 @@ class S3Client2 {
47914
47914
  this.endpoint = options?.endpoint;
47915
47915
  this.forcePathStyle = options?.forcePathStyle;
47916
47916
  this.explicitCredentials = options?.credentials;
47917
- this.client = new AWSClient(options?.credentials ?? resolveCredentials2(profile), { endpoint: options?.endpoint, forcePathStyle: options?.forcePathStyle });
47917
+ this.client = new AWSClient(options?.credentials, { profile, endpoint: options?.endpoint, forcePathStyle: options?.forcePathStyle });
47918
47918
  }
47919
47919
  getCredentials() {
47920
47920
  if (this.explicitCredentials?.accessKeyId && this.explicitCredentials.secretAccessKey) {