@aws-sdk/credential-provider-env 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 +4 -1
- package/dist-es/fromEnv.js +4 -1
- package/package.json +3 -2
package/dist-cjs/index.js
CHANGED
|
@@ -32,6 +32,7 @@ __export(src_exports, {
|
|
|
32
32
|
module.exports = __toCommonJS(src_exports);
|
|
33
33
|
|
|
34
34
|
// src/fromEnv.ts
|
|
35
|
+
var import_client = require("@aws-sdk/core/client");
|
|
35
36
|
var import_property_provider = require("@smithy/property-provider");
|
|
36
37
|
var ENV_KEY = "AWS_ACCESS_KEY_ID";
|
|
37
38
|
var ENV_SECRET = "AWS_SECRET_ACCESS_KEY";
|
|
@@ -49,7 +50,7 @@ var fromEnv = /* @__PURE__ */ __name((init) => async () => {
|
|
|
49
50
|
const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];
|
|
50
51
|
const accountId = process.env[ENV_ACCOUNT_ID];
|
|
51
52
|
if (accessKeyId && secretAccessKey) {
|
|
52
|
-
|
|
53
|
+
const credentials = {
|
|
53
54
|
accessKeyId,
|
|
54
55
|
secretAccessKey,
|
|
55
56
|
...sessionToken && { sessionToken },
|
|
@@ -57,6 +58,8 @@ var fromEnv = /* @__PURE__ */ __name((init) => async () => {
|
|
|
57
58
|
...credentialScope && { credentialScope },
|
|
58
59
|
...accountId && { accountId }
|
|
59
60
|
};
|
|
61
|
+
(0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS", "g");
|
|
62
|
+
return credentials;
|
|
60
63
|
}
|
|
61
64
|
throw new import_property_provider.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init == null ? void 0 : init.logger });
|
|
62
65
|
}, "fromEnv");
|
package/dist-es/fromEnv.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { setCredentialFeature } from "@aws-sdk/core/client";
|
|
1
2
|
import { CredentialsProviderError } from "@smithy/property-provider";
|
|
2
3
|
export const ENV_KEY = "AWS_ACCESS_KEY_ID";
|
|
3
4
|
export const ENV_SECRET = "AWS_SECRET_ACCESS_KEY";
|
|
@@ -14,7 +15,7 @@ export const fromEnv = (init) => async () => {
|
|
|
14
15
|
const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];
|
|
15
16
|
const accountId = process.env[ENV_ACCOUNT_ID];
|
|
16
17
|
if (accessKeyId && secretAccessKey) {
|
|
17
|
-
|
|
18
|
+
const credentials = {
|
|
18
19
|
accessKeyId,
|
|
19
20
|
secretAccessKey,
|
|
20
21
|
...(sessionToken && { sessionToken }),
|
|
@@ -22,6 +23,8 @@ export const fromEnv = (init) => async () => {
|
|
|
22
23
|
...(credentialScope && { credentialScope }),
|
|
23
24
|
...(accountId && { accountId }),
|
|
24
25
|
};
|
|
26
|
+
setCredentialFeature(credentials, "CREDENTIALS_ENV_VARS", "g");
|
|
27
|
+
return credentials;
|
|
25
28
|
}
|
|
26
29
|
throw new CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger });
|
|
27
30
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-env",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.677.0",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from known environment variables",
|
|
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/
|
|
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/types": "^3.5.0",
|
|
30
31
|
"tslib": "^2.6.2"
|