@aws-sdk/core 3.796.0 → 3.799.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/submodules/httpAuthSchemes/index.js +33 -0
- package/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js +16 -0
- package/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js +1 -0
- package/dist-es/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.js +1 -0
- package/dist-types/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.d.ts +5 -0
- package/dist-types/submodules/httpAuthSchemes/aws_sdk/index.d.ts +1 -0
- package/dist-types/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.d.ts +8 -0
- package/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.d.ts +4 -0
- package/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/index.d.ts +1 -0
- package/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.d.ts +1 -0
- package/package.json +3 -3
|
@@ -24,6 +24,7 @@ __export(index_exports, {
|
|
|
24
24
|
AWSSDKSigV4Signer: () => AWSSDKSigV4Signer,
|
|
25
25
|
AwsSdkSigV4ASigner: () => AwsSdkSigV4ASigner,
|
|
26
26
|
AwsSdkSigV4Signer: () => AwsSdkSigV4Signer,
|
|
27
|
+
NODE_AUTH_SCHEME_PREFERENCE_OPTIONS: () => NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,
|
|
27
28
|
NODE_SIGV4A_CONFIG_OPTIONS: () => NODE_SIGV4A_CONFIG_OPTIONS,
|
|
28
29
|
resolveAWSSDKSigV4Config: () => resolveAWSSDKSigV4Config,
|
|
29
30
|
resolveAwsSdkSigV4AConfig: () => resolveAwsSdkSigV4AConfig,
|
|
@@ -159,6 +160,37 @@ var AwsSdkSigV4ASigner = class extends AwsSdkSigV4Signer {
|
|
|
159
160
|
}
|
|
160
161
|
};
|
|
161
162
|
|
|
163
|
+
// src/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.ts
|
|
164
|
+
var getArrayForCommaSeparatedString = /* @__PURE__ */ __name((str) => typeof str === "string" && str.length > 0 ? str.split(",").map((item) => item.trim()) : [], "getArrayForCommaSeparatedString");
|
|
165
|
+
|
|
166
|
+
// src/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.ts
|
|
167
|
+
var NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = "AWS_AUTH_SCHEME_PREFERENCE";
|
|
168
|
+
var NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = "auth_scheme_preference";
|
|
169
|
+
var NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = {
|
|
170
|
+
/**
|
|
171
|
+
* Retrieves auth scheme preference from environment variables
|
|
172
|
+
* @param env - Node process environment object
|
|
173
|
+
* @returns Array of auth scheme strings if preference is set, undefined otherwise
|
|
174
|
+
*/
|
|
175
|
+
environmentVariableSelector: /* @__PURE__ */ __name((env) => {
|
|
176
|
+
if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env)) return void 0;
|
|
177
|
+
return getArrayForCommaSeparatedString(env[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]);
|
|
178
|
+
}, "environmentVariableSelector"),
|
|
179
|
+
/**
|
|
180
|
+
* Retrieves auth scheme preference from config file
|
|
181
|
+
* @param profile - Config profile object
|
|
182
|
+
* @returns Array of auth scheme strings if preference is set, undefined otherwise
|
|
183
|
+
*/
|
|
184
|
+
configFileSelector: /* @__PURE__ */ __name((profile) => {
|
|
185
|
+
if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile)) return void 0;
|
|
186
|
+
return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]);
|
|
187
|
+
}, "configFileSelector"),
|
|
188
|
+
/**
|
|
189
|
+
* Default auth scheme preference if not specified in environment or config
|
|
190
|
+
*/
|
|
191
|
+
default: []
|
|
192
|
+
};
|
|
193
|
+
|
|
162
194
|
// src/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.ts
|
|
163
195
|
var import_core = require("@smithy/core");
|
|
164
196
|
var import_property_provider = require("@smithy/property-provider");
|
|
@@ -341,6 +373,7 @@ __name(bindCallerConfig, "bindCallerConfig");
|
|
|
341
373
|
AWSSDKSigV4Signer,
|
|
342
374
|
AwsSdkSigV4ASigner,
|
|
343
375
|
AwsSdkSigV4Signer,
|
|
376
|
+
NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,
|
|
344
377
|
NODE_SIGV4A_CONFIG_OPTIONS,
|
|
345
378
|
resolveAWSSDKSigV4Config,
|
|
346
379
|
resolveAwsSdkSigV4AConfig,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { getArrayForCommaSeparatedString } from "../utils/getArrayForCommaSeparatedString";
|
|
2
|
+
const NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = "AWS_AUTH_SCHEME_PREFERENCE";
|
|
3
|
+
const NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = "auth_scheme_preference";
|
|
4
|
+
export const NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = {
|
|
5
|
+
environmentVariableSelector: (env) => {
|
|
6
|
+
if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env))
|
|
7
|
+
return undefined;
|
|
8
|
+
return getArrayForCommaSeparatedString(env[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]);
|
|
9
|
+
},
|
|
10
|
+
configFileSelector: (profile) => {
|
|
11
|
+
if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile))
|
|
12
|
+
return undefined;
|
|
13
|
+
return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]);
|
|
14
|
+
},
|
|
15
|
+
default: [],
|
|
16
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { AwsSdkSigV4Signer, AWSSDKSigV4Signer, validateSigningProperties } from "./AwsSdkSigV4Signer";
|
|
2
2
|
export { AwsSdkSigV4ASigner } from "./AwsSdkSigV4ASigner";
|
|
3
|
+
export * from "./NODE_AUTH_SCHEME_PREFERENCE_OPTIONS";
|
|
3
4
|
export * from "./resolveAwsSdkSigV4AConfig";
|
|
4
5
|
export * from "./resolveAwsSdkSigV4Config";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const getArrayForCommaSeparatedString = (str) => typeof str === "string" && str.length > 0 ? str.split(",").map((item) => item.trim()) : [];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { AwsSdkSigV4Signer, AWSSDKSigV4Signer, validateSigningProperties } from "./AwsSdkSigV4Signer";
|
|
2
2
|
export { AwsSdkSigV4ASigner } from "./AwsSdkSigV4ASigner";
|
|
3
|
+
export * from "./NODE_AUTH_SCHEME_PREFERENCE_OPTIONS";
|
|
3
4
|
export * from "./resolveAwsSdkSigV4AConfig";
|
|
4
5
|
export * from "./resolveAwsSdkSigV4Config";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a comma-separated string into an array of trimmed strings
|
|
3
|
+
* @param str The comma-separated input string to split
|
|
4
|
+
* @returns Array of trimmed strings split from the input
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare const getArrayForCommaSeparatedString: (str: string) => string[];
|
|
@@ -4,5 +4,6 @@ export {
|
|
|
4
4
|
validateSigningProperties,
|
|
5
5
|
} from "./AwsSdkSigV4Signer";
|
|
6
6
|
export { AwsSdkSigV4ASigner } from "./AwsSdkSigV4ASigner";
|
|
7
|
+
export * from "./NODE_AUTH_SCHEME_PREFERENCE_OPTIONS";
|
|
7
8
|
export * from "./resolveAwsSdkSigV4AConfig";
|
|
8
9
|
export * from "./resolveAwsSdkSigV4Config";
|
package/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getArrayForCommaSeparatedString: (str: string) => string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.799.0",
|
|
4
4
|
"description": "Core functions & classes shared by multiple AWS SDK clients.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
@@ -82,12 +82,12 @@
|
|
|
82
82
|
"license": "Apache-2.0",
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"@aws-sdk/types": "3.775.0",
|
|
85
|
-
"@smithy/core": "^3.
|
|
85
|
+
"@smithy/core": "^3.3.0",
|
|
86
86
|
"@smithy/node-config-provider": "^4.0.2",
|
|
87
87
|
"@smithy/property-provider": "^4.0.2",
|
|
88
88
|
"@smithy/protocol-http": "^5.1.0",
|
|
89
89
|
"@smithy/signature-v4": "^5.1.0",
|
|
90
|
-
"@smithy/smithy-client": "^4.2.
|
|
90
|
+
"@smithy/smithy-client": "^4.2.1",
|
|
91
91
|
"@smithy/types": "^4.2.0",
|
|
92
92
|
"@smithy/util-middleware": "^4.0.2",
|
|
93
93
|
"fast-xml-parser": "4.4.1",
|