@aws-sdk/credential-provider-ini 3.224.0 → 3.229.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.
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveProcessCredentials = exports.isProcessProfile = void 0;
4
+ const credential_provider_process_1 = require("@aws-sdk/credential-provider-process");
5
+ const isProcessProfile = (arg) => Boolean(arg) &&
6
+ typeof arg === "object" &&
7
+ typeof arg.credential_process === "string";
8
+ exports.isProcessProfile = isProcessProfile;
9
+ const resolveProcessCredentials = async (options, profile) => (0, credential_provider_process_1.fromProcess)({
10
+ ...options,
11
+ profile,
12
+ })();
13
+ exports.resolveProcessCredentials = resolveProcessCredentials;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.resolveProfileData = void 0;
4
4
  const property_provider_1 = require("@aws-sdk/property-provider");
5
5
  const resolveAssumeRoleCredentials_1 = require("./resolveAssumeRoleCredentials");
6
+ const resolveProcessCredentials_1 = require("./resolveProcessCredentials");
6
7
  const resolveSsoCredentials_1 = require("./resolveSsoCredentials");
7
8
  const resolveStaticCredentials_1 = require("./resolveStaticCredentials");
8
9
  const resolveWebIdentityCredentials_1 = require("./resolveWebIdentityCredentials");
@@ -20,6 +21,9 @@ const resolveProfileData = async (profileName, profiles, options, visitedProfile
20
21
  if ((0, resolveWebIdentityCredentials_1.isWebIdentityProfile)(data)) {
21
22
  return (0, resolveWebIdentityCredentials_1.resolveWebIdentityCredentials)(data, options);
22
23
  }
24
+ if ((0, resolveProcessCredentials_1.isProcessProfile)(data)) {
25
+ return (0, resolveProcessCredentials_1.resolveProcessCredentials)(options, profileName);
26
+ }
23
27
  if ((0, resolveSsoCredentials_1.isSsoProfile)(data)) {
24
28
  return (0, resolveSsoCredentials_1.resolveSsoCredentials)(data);
25
29
  }
@@ -0,0 +1,8 @@
1
+ import { fromProcess } from "@aws-sdk/credential-provider-process";
2
+ export const isProcessProfile = (arg) => Boolean(arg) &&
3
+ typeof arg === "object" &&
4
+ typeof arg.credential_process === "string";
5
+ export const resolveProcessCredentials = async (options, profile) => fromProcess({
6
+ ...options,
7
+ profile,
8
+ })();
@@ -1,5 +1,6 @@
1
1
  import { CredentialsProviderError } from "@aws-sdk/property-provider";
2
2
  import { isAssumeRoleProfile, resolveAssumeRoleCredentials } from "./resolveAssumeRoleCredentials";
3
+ import { isProcessProfile, resolveProcessCredentials } from "./resolveProcessCredentials";
3
4
  import { isSsoProfile, resolveSsoCredentials } from "./resolveSsoCredentials";
4
5
  import { isStaticCredsProfile, resolveStaticCredentials } from "./resolveStaticCredentials";
5
6
  import { isWebIdentityProfile, resolveWebIdentityCredentials } from "./resolveWebIdentityCredentials";
@@ -17,6 +18,9 @@ export const resolveProfileData = async (profileName, profiles, options, visited
17
18
  if (isWebIdentityProfile(data)) {
18
19
  return resolveWebIdentityCredentials(data, options);
19
20
  }
21
+ if (isProcessProfile(data)) {
22
+ return resolveProcessCredentials(options, profileName);
23
+ }
20
24
  if (isSsoProfile(data)) {
21
25
  return resolveSsoCredentials(data);
22
26
  }
@@ -0,0 +1,7 @@
1
+ import { Credentials, Profile } from "@aws-sdk/types";
2
+ import { FromIniInit } from "./fromIni";
3
+ export interface ProcessProfile extends Profile {
4
+ credential_process: string;
5
+ }
6
+ export declare const isProcessProfile: (arg: any) => arg is ProcessProfile;
7
+ export declare const resolveProcessCredentials: (options: FromIniInit, profile: string) => Promise<Credentials>;
@@ -0,0 +1,10 @@
1
+ import { Credentials, Profile } from "@aws-sdk/types";
2
+ import { FromIniInit } from "./fromIni";
3
+ export interface ProcessProfile extends Profile {
4
+ credential_process: string;
5
+ }
6
+ export declare const isProcessProfile: (arg: any) => arg is ProcessProfile;
7
+ export declare const resolveProcessCredentials: (
8
+ options: FromIniInit,
9
+ profile: string
10
+ ) => Promise<Credentials>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/credential-provider-ini",
3
- "version": "3.224.0",
3
+ "version": "3.229.0",
4
4
  "description": "AWS credential provider that sources credentials from ~/.aws/credentials and ~/.aws/config",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -24,13 +24,13 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@aws-sdk/credential-provider-env": "3.224.0",
28
- "@aws-sdk/credential-provider-imds": "3.224.0",
29
- "@aws-sdk/credential-provider-sso": "3.224.0",
30
- "@aws-sdk/credential-provider-web-identity": "3.224.0",
31
- "@aws-sdk/property-provider": "3.224.0",
32
- "@aws-sdk/shared-ini-file-loader": "3.224.0",
33
- "@aws-sdk/types": "3.224.0",
27
+ "@aws-sdk/credential-provider-env": "3.226.0",
28
+ "@aws-sdk/credential-provider-imds": "3.226.0",
29
+ "@aws-sdk/credential-provider-sso": "3.229.0",
30
+ "@aws-sdk/credential-provider-web-identity": "3.226.0",
31
+ "@aws-sdk/property-provider": "3.226.0",
32
+ "@aws-sdk/shared-ini-file-loader": "3.226.0",
33
+ "@aws-sdk/types": "3.226.0",
34
34
  "tslib": "^2.3.1"
35
35
  },
36
36
  "devDependencies": {