@aws-sdk/credential-provider-process 3.972.34 → 3.972.36

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
@@ -1,7 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var sharedIniFileLoader = require('@smithy/shared-ini-file-loader');
4
- var propertyProvider = require('@smithy/property-provider');
3
+ var config = require('@smithy/core/config');
5
4
  var node_child_process = require('node:child_process');
6
5
  var node_util = require('node:util');
7
6
  var client = require('@aws-sdk/core/client');
@@ -41,7 +40,7 @@ const resolveProcessCredentials = async (profileName, profiles, logger) => {
41
40
  if (profiles[profileName]) {
42
41
  const credentialProcess = profile["credential_process"];
43
42
  if (credentialProcess !== undefined) {
44
- const execPromise = node_util.promisify(sharedIniFileLoader.externalDataInterceptor?.getTokenRecord?.().exec ?? node_child_process.exec);
43
+ const execPromise = node_util.promisify(config.externalDataInterceptor?.getTokenRecord?.().exec ?? node_child_process.exec);
45
44
  try {
46
45
  const { stdout } = await execPromise(credentialProcess);
47
46
  let data;
@@ -54,15 +53,15 @@ const resolveProcessCredentials = async (profileName, profiles, logger) => {
54
53
  return getValidatedProcessCredentials(profileName, data, profiles);
55
54
  }
56
55
  catch (error) {
57
- throw new propertyProvider.CredentialsProviderError(error.message, { logger });
56
+ throw new config.CredentialsProviderError(error.message, { logger });
58
57
  }
59
58
  }
60
59
  else {
61
- throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });
60
+ throw new config.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });
62
61
  }
63
62
  }
64
63
  else {
65
- throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {
64
+ throw new config.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {
66
65
  logger,
67
66
  });
68
67
  }
@@ -70,8 +69,8 @@ const resolveProcessCredentials = async (profileName, profiles, logger) => {
70
69
 
71
70
  const fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => {
72
71
  init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");
73
- const profiles = await sharedIniFileLoader.parseKnownFiles(init);
74
- return resolveProcessCredentials(sharedIniFileLoader.getProfileName({
72
+ const profiles = await config.parseKnownFiles(init);
73
+ return resolveProcessCredentials(config.getProfileName({
75
74
  profile: init.profile ?? callerClientConfig?.profile,
76
75
  }), profiles, init.logger);
77
76
  };
@@ -1,4 +1,4 @@
1
- import { getProfileName, parseKnownFiles } from "@smithy/shared-ini-file-loader";
1
+ import { getProfileName, parseKnownFiles } from "@smithy/core/config";
2
2
  import { resolveProcessCredentials } from "./resolveProcessCredentials";
3
3
  export const fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => {
4
4
  init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");
@@ -1,5 +1,4 @@
1
- import { CredentialsProviderError } from "@smithy/property-provider";
2
- import { externalDataInterceptor } from "@smithy/shared-ini-file-loader";
1
+ import { CredentialsProviderError, externalDataInterceptor } from "@smithy/core/config";
3
2
  import { exec } from "node:child_process";
4
3
  import { promisify } from "node:util";
5
4
  import { getValidatedProcessCredentials } from "./getValidatedProcessCredentials";
@@ -1,5 +1,5 @@
1
1
  import type { CredentialProviderOptions, RuntimeConfigAwsCredentialIdentityProvider } from "@aws-sdk/types";
2
- import type { SourceProfileInit } from "@smithy/shared-ini-file-loader";
2
+ import type { SourceProfileInit } from "@smithy/core/config";
3
3
  /**
4
4
  * @internal
5
5
  */
@@ -2,7 +2,7 @@ import {
2
2
  CredentialProviderOptions,
3
3
  RuntimeConfigAwsCredentialIdentityProvider,
4
4
  } from "@aws-sdk/types";
5
- import { SourceProfileInit } from "@smithy/shared-ini-file-loader";
5
+ import { SourceProfileInit } from "@smithy/core/config";
6
6
  export interface FromProcessInit
7
7
  extends SourceProfileInit,
8
8
  CredentialProviderOptions {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/credential-provider-process",
3
- "version": "3.972.34",
3
+ "version": "3.972.36",
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",
@@ -26,10 +26,9 @@
26
26
  },
27
27
  "license": "Apache-2.0",
28
28
  "dependencies": {
29
- "@aws-sdk/core": "^3.974.8",
29
+ "@aws-sdk/core": "^3.974.10",
30
30
  "@aws-sdk/types": "^3.973.8",
31
- "@smithy/property-provider": "^4.2.14",
32
- "@smithy/shared-ini-file-loader": "^4.4.9",
31
+ "@smithy/core": "^3.24.1",
33
32
  "@smithy/types": "^4.14.1",
34
33
  "tslib": "^2.6.2"
35
34
  },