@aws-sdk/token-providers 3.714.0 → 3.723.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
@@ -47,12 +47,11 @@ var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the
47
47
 
48
48
  // src/getSsoOidcClient.ts
49
49
  var getSsoOidcClient = /* @__PURE__ */ __name(async (ssoRegion, init = {}) => {
50
- var _a, _b, _c;
51
50
  const { SSOOIDCClient } = await Promise.resolve().then(() => __toESM(require("@aws-sdk/client-sso-oidc")));
52
51
  const ssoOidcClient = new SSOOIDCClient(
53
52
  Object.assign({}, init.clientConfig ?? {}, {
54
- region: ssoRegion ?? ((_a = init.clientConfig) == null ? void 0 : _a.region),
55
- logger: ((_b = init.clientConfig) == null ? void 0 : _b.logger) ?? ((_c = init.parentClientConfig) == null ? void 0 : _c.logger)
53
+ region: ssoRegion ?? init.clientConfig?.region,
54
+ logger: init.clientConfig?.logger ?? init.parentClientConfig?.logger
56
55
  })
57
56
  );
58
57
  return ssoOidcClient;
@@ -104,7 +103,6 @@ var writeSSOTokenToFile = /* @__PURE__ */ __name((id, ssoToken) => {
104
103
  // src/fromSso.ts
105
104
  var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0);
106
105
  var fromSso = /* @__PURE__ */ __name((_init = {}) => async ({ callerClientConfig } = {}) => {
107
- var _a;
108
106
  const init = {
109
107
  ..._init,
110
108
  parentClientConfig: {
@@ -112,10 +110,10 @@ var fromSso = /* @__PURE__ */ __name((_init = {}) => async ({ callerClientConfig
112
110
  ..._init.parentClientConfig
113
111
  }
114
112
  };
115
- (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/token-providers - fromSso");
113
+ init.logger?.debug("@aws-sdk/token-providers - fromSso");
116
114
  const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);
117
115
  const profileName = (0, import_shared_ini_file_loader.getProfileName)({
118
- profile: init.profile ?? (callerClientConfig == null ? void 0 : callerClientConfig.profile)
116
+ profile: init.profile ?? callerClientConfig?.profile
119
117
  });
120
118
  const profile = profiles[profileName];
121
119
  if (!profile) {
@@ -193,7 +191,7 @@ var fromSso = /* @__PURE__ */ __name((_init = {}) => async ({ callerClientConfig
193
191
  // src/fromStatic.ts
194
192
 
195
193
  var fromStatic = /* @__PURE__ */ __name(({ token, logger }) => async () => {
196
- logger == null ? void 0 : logger.debug("@aws-sdk/token-providers - fromStatic");
194
+ logger?.debug("@aws-sdk/token-providers - fromStatic");
197
195
  if (!token || !token.token) {
198
196
  throw new import_property_provider.TokenProviderError(`Please pass a valid token to fromStatic`, false);
199
197
  }
@@ -4,5 +4,6 @@ export interface FromStaticInit extends CredentialProviderOptions {
4
4
  }
5
5
  /**
6
6
  * Creates a token provider that will read from static token.
7
+ * @public
7
8
  */
8
9
  export declare const fromStatic: ({ token, logger }: FromStaticInit) => TokenIdentityProvider;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/token-providers",
3
- "version": "3.714.0",
3
+ "version": "3.723.0",
4
4
  "description": "A collection of token providers",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -27,26 +27,26 @@
27
27
  },
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
- "@aws-sdk/types": "3.714.0",
31
- "@smithy/property-provider": "^3.1.11",
32
- "@smithy/shared-ini-file-loader": "^3.1.12",
33
- "@smithy/types": "^3.7.2",
30
+ "@aws-sdk/types": "3.723.0",
31
+ "@smithy/property-provider": "^4.0.0",
32
+ "@smithy/shared-ini-file-loader": "^4.0.0",
33
+ "@smithy/types": "^4.0.0",
34
34
  "tslib": "^2.6.2"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@tsconfig/recommended": "1.0.1",
38
- "@types/node": "^16.18.96",
38
+ "@types/node": "^18.19.69",
39
39
  "concurrently": "7.0.0",
40
40
  "downlevel-dts": "0.10.1",
41
41
  "rimraf": "3.0.2",
42
- "typescript": "~4.9.5"
42
+ "typescript": "~5.2.2"
43
43
  },
44
44
  "peerDependencies": {
45
- "@aws-sdk/client-sso-oidc": "^3.714.0"
45
+ "@aws-sdk/client-sso-oidc": "^3.723.0"
46
46
  },
47
47
  "types": "./dist-types/index.d.ts",
48
48
  "engines": {
49
- "node": ">=16.0.0"
49
+ "node": ">=18.0.0"
50
50
  },
51
51
  "typesVersions": {
52
52
  "<4.0": {