@aws-sdk/credential-provider-http 3.422.1 → 3.425.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,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fromHttp = void 0;
4
+ var fromHttp_browser_1 = require("./fromHttp/fromHttp.browser");
5
+ Object.defineProperty(exports, "fromHttp", { enumerable: true, get: function () { return fromHttp_browser_1.fromHttp; } });
package/dist-cjs/index.js CHANGED
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fromHttpForBrowser = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./fromHttp/fromHttp"), exports);
6
- var fromHttp_browser_1 = require("./fromHttp/fromHttp.browser");
7
- Object.defineProperty(exports, "fromHttpForBrowser", { enumerable: true, get: function () { return fromHttp_browser_1.fromHttp; } });
3
+ exports.fromHttp = void 0;
4
+ var fromHttp_1 = require("./fromHttp/fromHttp");
5
+ Object.defineProperty(exports, "fromHttp", { enumerable: true, get: function () { return fromHttp_1.fromHttp; } });
@@ -0,0 +1 @@
1
+ export { fromHttp } from "./fromHttp/fromHttp.browser";
package/dist-es/index.js CHANGED
@@ -1,2 +1 @@
1
- export * from "./fromHttp/fromHttp";
2
- export { fromHttp as fromHttpForBrowser } from "./fromHttp/fromHttp.browser";
1
+ export { fromHttp } from "./fromHttp/fromHttp";
@@ -0,0 +1,2 @@
1
+ export { fromHttp } from "./fromHttp/fromHttp.browser";
2
+ export type { FromHttpOptions, HttpProviderCredentials } from "./fromHttp/fromHttpTypes";
@@ -1,3 +1,2 @@
1
- export * from "./fromHttp/fromHttp";
2
- export { fromHttp as fromHttpForBrowser } from "./fromHttp/fromHttp.browser";
1
+ export { fromHttp } from "./fromHttp/fromHttp";
3
2
  export type { FromHttpOptions, HttpProviderCredentials } from "./fromHttp/fromHttpTypes";
@@ -1,7 +1 @@
1
- /**
2
- * @internal
3
- *
4
- * @param url - to be validated.
5
- * @throws if not acceptable to this provider.
6
- */
7
- export declare const checkUrl: (url: URL) => void;
1
+ export declare const checkUrl: (url: URL) => void;
@@ -1,6 +1,5 @@
1
- import { AwsCredentialIdentityProvider } from "@smithy/types";
2
- import { FromHttpOptions } from "./fromHttpTypes";
3
- /**
4
- * Creates a provider that gets credentials via HTTP request.
5
- */
6
- export declare const fromHttp: (options: FromHttpOptions) => AwsCredentialIdentityProvider;
1
+ import { AwsCredentialIdentityProvider } from "@smithy/types";
2
+ import { FromHttpOptions } from "./fromHttpTypes";
3
+ export declare const fromHttp: (
4
+ options: FromHttpOptions
5
+ ) => AwsCredentialIdentityProvider;
@@ -1,6 +1,5 @@
1
- import { AwsCredentialIdentityProvider } from "@smithy/types";
2
- import { FromHttpOptions } from "./fromHttpTypes";
3
- /**
4
- * Creates a provider that gets credentials via HTTP request.
5
- */
6
- export declare const fromHttp: (options: FromHttpOptions) => AwsCredentialIdentityProvider;
1
+ import { AwsCredentialIdentityProvider } from "@smithy/types";
2
+ import { FromHttpOptions } from "./fromHttpTypes";
3
+ export declare const fromHttp: (
4
+ options: FromHttpOptions
5
+ ) => AwsCredentialIdentityProvider;
@@ -1,68 +1,17 @@
1
- /**
2
- * @public
3
- *
4
- * Input for the fromHttp function in the HTTP Credentials Provider for Node.js.
5
- */
6
- export interface FromHttpOptions {
7
- /**
8
- * If this value is provided, it will be used as-is.
9
- *
10
- * For browser environments, use instead {@link credentialsFullUri}.
11
- */
12
- awsContainerCredentialsFullUri?: string;
13
- /**
14
- * If this value is provided instead of the full URI, it
15
- * will be appended to the default link local host of 169.254.170.2.
16
- *
17
- * Not supported in browsers.
18
- */
19
- awsContainerCredentialsRelativeUri?: string;
20
- /**
21
- * Will be read on each credentials request to
22
- * add an Authorization request header value.
23
- *
24
- * Not supported in browsers.
25
- */
26
- awsContainerAuthorizationTokenFile?: string;
27
- /**
28
- * An alternative to awsContainerAuthorizationTokenFile,
29
- * this is the token value itself.
30
- *
31
- * For browser environments, use instead {@link authorizationToken}.
32
- */
33
- awsContainerAuthorizationToken?: string;
34
- /**
35
- * BROWSER ONLY.
36
- *
37
- * In browsers, a relative URI is not allowed, and a full URI must be provided.
38
- * HTTPS is required.
39
- *
40
- * This value is required for the browser environment.
41
- */
42
- credentialsFullUri?: string;
43
- /**
44
- * BROWSER ONLY.
45
- *
46
- * Providing this value will set an "Authorization" request
47
- * header value on the GET request.
48
- */
49
- authorizationToken?: string;
50
- /**
51
- * Default is 3 retry attempts or 4 total attempts.
52
- */
53
- maxRetries?: number;
54
- /**
55
- * Default is 1000ms. Time in milliseconds to spend waiting between retry attempts.
56
- */
57
- timeout?: number;
58
- }
59
- /**
60
- * @public
61
- */
62
- export type HttpProviderCredentials = {
63
- AccessKeyId: string;
64
- SecretAccessKey: string;
65
- Token: string;
66
- AccountId?: string;
67
- Expiration: string;
68
- };
1
+ export interface FromHttpOptions {
2
+ awsContainerCredentialsFullUri?: string;
3
+ awsContainerCredentialsRelativeUri?: string;
4
+ awsContainerAuthorizationTokenFile?: string;
5
+ awsContainerAuthorizationToken?: string;
6
+ credentialsFullUri?: string;
7
+ authorizationToken?: string;
8
+ maxRetries?: number;
9
+ timeout?: number;
10
+ }
11
+ export type HttpProviderCredentials = {
12
+ AccessKeyId: string;
13
+ SecretAccessKey: string;
14
+ Token: string;
15
+ AccountId?: string;
16
+ Expiration: string;
17
+ };
@@ -1,11 +1,7 @@
1
- import { AwsCredentialIdentity } from "@aws-sdk/types";
2
- import { HttpRequest } from "@smithy/protocol-http";
3
- import { HttpResponse } from "@smithy/types";
4
- /**
5
- * @internal
6
- */
7
- export declare function createGetRequest(url: URL): HttpRequest;
8
- /**
9
- * @internal
10
- */
11
- export declare function getCredentials(response: HttpResponse): Promise<AwsCredentialIdentity>;
1
+ import { AwsCredentialIdentity } from "@aws-sdk/types";
2
+ import { HttpRequest } from "@smithy/protocol-http";
3
+ import { HttpResponse } from "@smithy/types";
4
+ export declare function createGetRequest(url: URL): HttpRequest;
5
+ export declare function getCredentials(
6
+ response: HttpResponse
7
+ ): Promise<AwsCredentialIdentity>;
@@ -1,10 +1,8 @@
1
- /**
2
- * @internal
3
- */
4
- export interface RetryableProvider<T> {
5
- (): Promise<T>;
6
- }
7
- /**
8
- * @internal
9
- */
10
- export declare const retryWrapper: <T>(toRetry: RetryableProvider<T>, maxRetries: number, delayMs: number) => RetryableProvider<T>;
1
+ export interface RetryableProvider<T> {
2
+ (): Promise<T>;
3
+ }
4
+ export declare const retryWrapper: <T>(
5
+ toRetry: RetryableProvider<T>,
6
+ maxRetries: number,
7
+ delayMs: number
8
+ ) => RetryableProvider<T>;
@@ -0,0 +1,5 @@
1
+ export { fromHttp } from "./fromHttp/fromHttp.browser";
2
+ export {
3
+ FromHttpOptions,
4
+ HttpProviderCredentials,
5
+ } from "./fromHttp/fromHttpTypes";
@@ -1,3 +1,5 @@
1
- export * from "./fromHttp/fromHttp";
2
- export { fromHttp as fromHttpForBrowser } from "./fromHttp/fromHttp.browser";
3
- export { FromHttpOptions, HttpProviderCredentials } from "./fromHttp/fromHttpTypes";
1
+ export { fromHttp } from "./fromHttp/fromHttp";
2
+ export {
3
+ FromHttpOptions,
4
+ HttpProviderCredentials,
5
+ } from "./fromHttp/fromHttpTypes";
package/package.json CHANGED
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "name": "@aws-sdk/credential-provider-http",
3
- "version": "3.422.1",
3
+ "version": "3.425.0",
4
4
  "description": "AWS credential provider for containers and HTTP sources",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
7
+ "browser": "./dist-es/index.browser.js",
8
+ "react-native": "./dist-es/index.browser.js",
7
9
  "scripts": {
8
10
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
9
11
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -24,12 +26,12 @@
24
26
  },
25
27
  "license": "Apache-2.0",
26
28
  "dependencies": {
27
- "@aws-sdk/types": "3.418.0",
28
- "@smithy/fetch-http-handler": "^2.1.5",
29
- "@smithy/node-http-handler": "^2.1.5",
29
+ "@aws-sdk/types": "3.425.0",
30
+ "@smithy/fetch-http-handler": "^2.2.1",
31
+ "@smithy/node-http-handler": "^2.1.6",
30
32
  "@smithy/property-provider": "^2.0.0",
31
- "@smithy/protocol-http": "^3.0.5",
32
- "@smithy/types": "^2.3.3",
33
+ "@smithy/protocol-http": "^3.0.6",
34
+ "@smithy/types": "^2.3.4",
33
35
  "tslib": "^2.5.0"
34
36
  },
35
37
  "devDependencies": {