@aws-sdk/credential-provider-process 3.664.0 → 3.677.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
@@ -34,6 +34,7 @@ var import_child_process = require("child_process");
34
34
  var import_util = require("util");
35
35
 
36
36
  // src/getValidatedProcessCredentials.ts
37
+ var import_client = require("@aws-sdk/core/client");
37
38
  var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data, profiles) => {
38
39
  var _a;
39
40
  if (data.Version !== 1) {
@@ -53,7 +54,7 @@ var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data,
53
54
  if (!accountId && ((_a = profiles == null ? void 0 : profiles[profileName]) == null ? void 0 : _a.aws_account_id)) {
54
55
  accountId = profiles[profileName].aws_account_id;
55
56
  }
56
- return {
57
+ const credentials = {
57
58
  accessKeyId: data.AccessKeyId,
58
59
  secretAccessKey: data.SecretAccessKey,
59
60
  ...data.SessionToken && { sessionToken: data.SessionToken },
@@ -61,6 +62,8 @@ var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data,
61
62
  ...data.CredentialScope && { credentialScope: data.CredentialScope },
62
63
  ...accountId && { accountId }
63
64
  };
65
+ (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_PROCESS", "w");
66
+ return credentials;
64
67
  }, "getValidatedProcessCredentials");
65
68
 
66
69
  // src/resolveProcessCredentials.ts
@@ -1,3 +1,4 @@
1
+ import { setCredentialFeature } from "@aws-sdk/core/client";
1
2
  export const getValidatedProcessCredentials = (profileName, data, profiles) => {
2
3
  if (data.Version !== 1) {
3
4
  throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
@@ -16,7 +17,7 @@ export const getValidatedProcessCredentials = (profileName, data, profiles) => {
16
17
  if (!accountId && profiles?.[profileName]?.aws_account_id) {
17
18
  accountId = profiles[profileName].aws_account_id;
18
19
  }
19
- return {
20
+ const credentials = {
20
21
  accessKeyId: data.AccessKeyId,
21
22
  secretAccessKey: data.SecretAccessKey,
22
23
  ...(data.SessionToken && { sessionToken: data.SessionToken }),
@@ -24,4 +25,6 @@ export const getValidatedProcessCredentials = (profileName, data, profiles) => {
24
25
  ...(data.CredentialScope && { credentialScope: data.CredentialScope }),
25
26
  ...(accountId && { accountId }),
26
27
  };
28
+ setCredentialFeature(credentials, "CREDENTIALS_PROCESS", "w");
29
+ return credentials;
27
30
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/credential-provider-process",
3
- "version": "3.664.0",
3
+ "version": "3.677.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",
@@ -24,7 +24,8 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@aws-sdk/types": "3.664.0",
27
+ "@aws-sdk/core": "3.677.0",
28
+ "@aws-sdk/types": "3.667.0",
28
29
  "@smithy/property-provider": "^3.1.7",
29
30
  "@smithy/shared-ini-file-loader": "^3.1.8",
30
31
  "@smithy/types": "^3.5.0",