@aws-sdk/credential-provider-process 3.709.0 → 3.714.0

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-cjs/index.js CHANGED
@@ -96,11 +96,17 @@ var resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profi
96
96
  }, "resolveProcessCredentials");
97
97
 
98
98
  // src/fromProcess.ts
99
- var fromProcess = /* @__PURE__ */ __name((init = {}) => async () => {
99
+ var fromProcess = /* @__PURE__ */ __name((init = {}) => async ({ callerClientConfig } = {}) => {
100
100
  var _a;
101
101
  (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-process - fromProcess");
102
102
  const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);
103
- return resolveProcessCredentials((0, import_shared_ini_file_loader.getProfileName)(init), profiles, init.logger);
103
+ return resolveProcessCredentials(
104
+ (0, import_shared_ini_file_loader.getProfileName)({
105
+ profile: init.profile ?? (callerClientConfig == null ? void 0 : callerClientConfig.profile)
106
+ }),
107
+ profiles,
108
+ init.logger
109
+ );
104
110
  }, "fromProcess");
105
111
  // Annotate the CommonJS export names for ESM import in node:
106
112
 
@@ -1,7 +1,9 @@
1
1
  import { getProfileName, parseKnownFiles } from "@smithy/shared-ini-file-loader";
2
2
  import { resolveProcessCredentials } from "./resolveProcessCredentials";
3
- export const fromProcess = (init = {}) => async () => {
3
+ export const fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => {
4
4
  init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");
5
5
  const profiles = await parseKnownFiles(init);
6
- return resolveProcessCredentials(getProfileName(init), profiles, init.logger);
6
+ return resolveProcessCredentials(getProfileName({
7
+ profile: init.profile ?? callerClientConfig?.profile,
8
+ }), profiles, init.logger);
7
9
  };
@@ -1,6 +1,5 @@
1
- import type { CredentialProviderOptions } from "@aws-sdk/types";
1
+ import type { CredentialProviderOptions, RuntimeConfigAwsCredentialIdentityProvider } from "@aws-sdk/types";
2
2
  import { SourceProfileInit } from "@smithy/shared-ini-file-loader";
3
- import { AwsCredentialIdentityProvider } from "@smithy/types";
4
3
  /**
5
4
  * @internal
6
5
  */
@@ -12,4 +11,4 @@ export interface FromProcessInit extends SourceProfileInit, CredentialProviderOp
12
11
  * Creates a credential provider that will read from a credential_process specified
13
12
  * in ini files.
14
13
  */
15
- export declare const fromProcess: (init?: FromProcessInit) => AwsCredentialIdentityProvider;
14
+ export declare const fromProcess: (init?: FromProcessInit) => RuntimeConfigAwsCredentialIdentityProvider;
@@ -1,9 +1,11 @@
1
- import { CredentialProviderOptions } from "@aws-sdk/types";
1
+ import {
2
+ CredentialProviderOptions,
3
+ RuntimeConfigAwsCredentialIdentityProvider,
4
+ } from "@aws-sdk/types";
2
5
  import { SourceProfileInit } from "@smithy/shared-ini-file-loader";
3
- import { AwsCredentialIdentityProvider } from "@smithy/types";
4
6
  export interface FromProcessInit
5
7
  extends SourceProfileInit,
6
8
  CredentialProviderOptions {}
7
9
  export declare const fromProcess: (
8
10
  init?: FromProcessInit
9
- ) => AwsCredentialIdentityProvider;
11
+ ) => RuntimeConfigAwsCredentialIdentityProvider;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/credential-provider-process",
3
- "version": "3.709.0",
3
+ "version": "3.714.0",
4
4
  "description": "AWS credential provider that sources credential_process from ~/.aws/credentials and ~/.aws/config",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -25,8 +25,8 @@
25
25
  },
26
26
  "license": "Apache-2.0",
27
27
  "dependencies": {
28
- "@aws-sdk/core": "3.709.0",
29
- "@aws-sdk/types": "3.709.0",
28
+ "@aws-sdk/core": "3.714.0",
29
+ "@aws-sdk/types": "3.714.0",
30
30
  "@smithy/property-provider": "^3.1.11",
31
31
  "@smithy/shared-ini-file-loader": "^3.1.12",
32
32
  "@smithy/types": "^3.7.2",