@aws-sdk/credential-provider-process 3.577.0 → 3.587.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
|
@@ -58,7 +58,7 @@ var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data)
|
|
|
58
58
|
}, "getValidatedProcessCredentials");
|
|
59
59
|
|
|
60
60
|
// src/resolveProcessCredentials.ts
|
|
61
|
-
var resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profiles) => {
|
|
61
|
+
var resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profiles, logger) => {
|
|
62
62
|
const profile = profiles[profileName];
|
|
63
63
|
if (profiles[profileName]) {
|
|
64
64
|
const credentialProcess = profile["credential_process"];
|
|
@@ -74,22 +74,24 @@ var resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profi
|
|
|
74
74
|
}
|
|
75
75
|
return getValidatedProcessCredentials(profileName, data);
|
|
76
76
|
} catch (error) {
|
|
77
|
-
throw new import_property_provider.CredentialsProviderError(error.message);
|
|
77
|
+
throw new import_property_provider.CredentialsProviderError(error.message, { logger });
|
|
78
78
|
}
|
|
79
79
|
} else {
|
|
80
|
-
throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process
|
|
80
|
+
throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });
|
|
81
81
|
}
|
|
82
82
|
} else {
|
|
83
|
-
throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file
|
|
83
|
+
throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {
|
|
84
|
+
logger
|
|
85
|
+
});
|
|
84
86
|
}
|
|
85
87
|
}, "resolveProcessCredentials");
|
|
86
88
|
|
|
87
89
|
// src/fromProcess.ts
|
|
88
90
|
var fromProcess = /* @__PURE__ */ __name((init = {}) => async () => {
|
|
89
91
|
var _a;
|
|
90
|
-
(_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-process
|
|
92
|
+
(_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-process - fromProcess");
|
|
91
93
|
const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);
|
|
92
|
-
return resolveProcessCredentials((0, import_shared_ini_file_loader.getProfileName)(init), profiles);
|
|
94
|
+
return resolveProcessCredentials((0, import_shared_ini_file_loader.getProfileName)(init), profiles, init.logger);
|
|
93
95
|
}, "fromProcess");
|
|
94
96
|
// Annotate the CommonJS export names for ESM import in node:
|
|
95
97
|
|
package/dist-es/fromProcess.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getProfileName, parseKnownFiles } from "@smithy/shared-ini-file-loader";
|
|
2
2
|
import { resolveProcessCredentials } from "./resolveProcessCredentials";
|
|
3
3
|
export const fromProcess = (init = {}) => async () => {
|
|
4
|
-
init.logger?.debug("@aws-sdk/credential-provider-process
|
|
4
|
+
init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");
|
|
5
5
|
const profiles = await parseKnownFiles(init);
|
|
6
|
-
return resolveProcessCredentials(getProfileName(init), profiles);
|
|
6
|
+
return resolveProcessCredentials(getProfileName(init), profiles, init.logger);
|
|
7
7
|
};
|
|
@@ -2,7 +2,7 @@ import { CredentialsProviderError } from "@smithy/property-provider";
|
|
|
2
2
|
import { exec } from "child_process";
|
|
3
3
|
import { promisify } from "util";
|
|
4
4
|
import { getValidatedProcessCredentials } from "./getValidatedProcessCredentials";
|
|
5
|
-
export const resolveProcessCredentials = async (profileName, profiles) => {
|
|
5
|
+
export const resolveProcessCredentials = async (profileName, profiles, logger) => {
|
|
6
6
|
const profile = profiles[profileName];
|
|
7
7
|
if (profiles[profileName]) {
|
|
8
8
|
const credentialProcess = profile["credential_process"];
|
|
@@ -20,14 +20,16 @@ export const resolveProcessCredentials = async (profileName, profiles) => {
|
|
|
20
20
|
return getValidatedProcessCredentials(profileName, data);
|
|
21
21
|
}
|
|
22
22
|
catch (error) {
|
|
23
|
-
throw new CredentialsProviderError(error.message);
|
|
23
|
+
throw new CredentialsProviderError(error.message, { logger });
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
else {
|
|
27
|
-
throw new CredentialsProviderError(`Profile ${profileName} did not contain credential_process
|
|
27
|
+
throw new CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
else {
|
|
31
|
-
throw new CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file
|
|
31
|
+
throw new CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {
|
|
32
|
+
logger,
|
|
33
|
+
});
|
|
32
34
|
}
|
|
33
35
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AwsCredentialIdentity, ParsedIniData } from "@smithy/types";
|
|
1
|
+
import { AwsCredentialIdentity, Logger, ParsedIniData } from "@smithy/types";
|
|
2
2
|
/**
|
|
3
3
|
* @internal
|
|
4
4
|
*/
|
|
5
|
-
export declare const resolveProcessCredentials: (profileName: string, profiles: ParsedIniData) => Promise<AwsCredentialIdentity>;
|
|
5
|
+
export declare const resolveProcessCredentials: (profileName: string, profiles: ParsedIniData, logger?: Logger) => Promise<AwsCredentialIdentity>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { AwsCredentialIdentity, ParsedIniData } from "@smithy/types";
|
|
1
|
+
import { AwsCredentialIdentity, Logger, ParsedIniData } from "@smithy/types";
|
|
2
2
|
export declare const resolveProcessCredentials: (
|
|
3
3
|
profileName: string,
|
|
4
|
-
profiles: ParsedIniData
|
|
4
|
+
profiles: ParsedIniData,
|
|
5
|
+
logger?: Logger
|
|
5
6
|
) => Promise<AwsCredentialIdentity>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-process",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.587.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
|
"license": "Apache-2.0",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@aws-sdk/types": "3.577.0",
|
|
28
|
-
"@smithy/property-provider": "^3.
|
|
29
|
-
"@smithy/shared-ini-file-loader": "^3.
|
|
28
|
+
"@smithy/property-provider": "^3.1.0",
|
|
29
|
+
"@smithy/shared-ini-file-loader": "^3.1.0",
|
|
30
30
|
"@smithy/types": "^3.0.0",
|
|
31
31
|
"tslib": "^2.6.2"
|
|
32
32
|
},
|