@aws-sdk/core 3.901.0 → 3.907.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 +1969 -6
- package/dist-cjs/submodules/account-id-endpoint/index.js +48 -88
- package/dist-cjs/submodules/client/index.js +35 -74
- package/dist-cjs/submodules/httpAuthSchemes/index.js +273 -365
- package/dist-cjs/submodules/protocols/index.js +1581 -1863
- package/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +2 -2
- package/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +2 -2
- package/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +4 -4
- package/dist-es/submodules/protocols/json/JsonShapeSerializer.js +4 -4
- package/dist-es/submodules/protocols/query/AwsQueryProtocol.js +3 -3
- package/dist-es/submodules/protocols/query/QueryShapeSerializer.js +4 -4
- package/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +2 -2
- package/dist-es/submodules/protocols/xml/XmlShapeSerializer.js +4 -4
- package/dist-types/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.d.ts +1 -1
- package/dist-types/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.d.ts +1 -1
- package/dist-types/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts +1 -1
- package/dist-types/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.d.ts +1 -1
- package/dist-types/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts +1 -1
- package/dist-types/submodules/protocols/ConfigurableSerdeContext.d.ts +1 -1
- package/dist-types/submodules/protocols/json/JsonCodec.d.ts +1 -1
- package/dist-types/submodules/protocols/json/JsonShapeDeserializer.d.ts +1 -1
- package/dist-types/submodules/protocols/json/JsonShapeSerializer.d.ts +2 -2
- package/dist-types/submodules/protocols/query/QuerySerializerSettings.d.ts +1 -1
- package/dist-types/submodules/protocols/xml/XmlCodec.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,95 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
|
|
21
|
-
// src/submodules/account-id-endpoint/index.ts
|
|
22
|
-
var index_exports = {};
|
|
23
|
-
__export(index_exports, {
|
|
24
|
-
ACCOUNT_ID_ENDPOINT_MODE_VALUES: () => ACCOUNT_ID_ENDPOINT_MODE_VALUES,
|
|
25
|
-
CONFIG_ACCOUNT_ID_ENDPOINT_MODE: () => CONFIG_ACCOUNT_ID_ENDPOINT_MODE,
|
|
26
|
-
DEFAULT_ACCOUNT_ID_ENDPOINT_MODE: () => DEFAULT_ACCOUNT_ID_ENDPOINT_MODE,
|
|
27
|
-
ENV_ACCOUNT_ID_ENDPOINT_MODE: () => ENV_ACCOUNT_ID_ENDPOINT_MODE,
|
|
28
|
-
NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS: () => NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS,
|
|
29
|
-
resolveAccountIdEndpointModeConfig: () => resolveAccountIdEndpointModeConfig,
|
|
30
|
-
validateAccountIdEndpointMode: () => validateAccountIdEndpointMode
|
|
31
|
-
});
|
|
32
|
-
module.exports = __toCommonJS(index_exports);
|
|
1
|
+
'use strict';
|
|
33
2
|
|
|
34
|
-
|
|
35
|
-
var import_util_middleware = require("@smithy/util-middleware");
|
|
3
|
+
var utilMiddleware = require('@smithy/util-middleware');
|
|
36
4
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var ACCOUNT_ID_ENDPOINT_MODE_VALUES = ["disabled", "preferred", "required"];
|
|
5
|
+
const DEFAULT_ACCOUNT_ID_ENDPOINT_MODE = "preferred";
|
|
6
|
+
const ACCOUNT_ID_ENDPOINT_MODE_VALUES = ["disabled", "preferred", "required"];
|
|
40
7
|
function validateAccountIdEndpointMode(value) {
|
|
41
|
-
|
|
8
|
+
return ACCOUNT_ID_ENDPOINT_MODE_VALUES.includes(value);
|
|
42
9
|
}
|
|
43
|
-
__name(validateAccountIdEndpointMode, "validateAccountIdEndpointMode");
|
|
44
10
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}, "accountIdEndpointMode")
|
|
59
|
-
});
|
|
60
|
-
}, "resolveAccountIdEndpointModeConfig");
|
|
11
|
+
const resolveAccountIdEndpointModeConfig = (input) => {
|
|
12
|
+
const { accountIdEndpointMode } = input;
|
|
13
|
+
const accountIdEndpointModeProvider = utilMiddleware.normalizeProvider(accountIdEndpointMode ?? DEFAULT_ACCOUNT_ID_ENDPOINT_MODE);
|
|
14
|
+
return Object.assign(input, {
|
|
15
|
+
accountIdEndpointMode: async () => {
|
|
16
|
+
const accIdMode = await accountIdEndpointModeProvider();
|
|
17
|
+
if (!validateAccountIdEndpointMode(accIdMode)) {
|
|
18
|
+
throw new Error(`Invalid value for accountIdEndpointMode: ${accIdMode}. Valid values are: "required", "preferred", "disabled".`);
|
|
19
|
+
}
|
|
20
|
+
return accIdMode;
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
};
|
|
61
24
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
default: DEFAULT_ACCOUNT_ID_ENDPOINT_MODE
|
|
25
|
+
const err = "Invalid AccountIdEndpointMode value";
|
|
26
|
+
const _throw = (message) => {
|
|
27
|
+
throw new Error(message);
|
|
28
|
+
};
|
|
29
|
+
const ENV_ACCOUNT_ID_ENDPOINT_MODE = "AWS_ACCOUNT_ID_ENDPOINT_MODE";
|
|
30
|
+
const CONFIG_ACCOUNT_ID_ENDPOINT_MODE = "account_id_endpoint_mode";
|
|
31
|
+
const NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS = {
|
|
32
|
+
environmentVariableSelector: (env) => {
|
|
33
|
+
const value = env[ENV_ACCOUNT_ID_ENDPOINT_MODE];
|
|
34
|
+
if (value && !validateAccountIdEndpointMode(value)) {
|
|
35
|
+
_throw(err);
|
|
36
|
+
}
|
|
37
|
+
return value;
|
|
38
|
+
},
|
|
39
|
+
configFileSelector: (profile) => {
|
|
40
|
+
const value = profile[CONFIG_ACCOUNT_ID_ENDPOINT_MODE];
|
|
41
|
+
if (value && !validateAccountIdEndpointMode(value)) {
|
|
42
|
+
_throw(err);
|
|
43
|
+
}
|
|
44
|
+
return value;
|
|
45
|
+
},
|
|
46
|
+
default: DEFAULT_ACCOUNT_ID_ENDPOINT_MODE,
|
|
85
47
|
};
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
validateAccountIdEndpointMode
|
|
95
|
-
});
|
|
48
|
+
|
|
49
|
+
exports.ACCOUNT_ID_ENDPOINT_MODE_VALUES = ACCOUNT_ID_ENDPOINT_MODE_VALUES;
|
|
50
|
+
exports.CONFIG_ACCOUNT_ID_ENDPOINT_MODE = CONFIG_ACCOUNT_ID_ENDPOINT_MODE;
|
|
51
|
+
exports.DEFAULT_ACCOUNT_ID_ENDPOINT_MODE = DEFAULT_ACCOUNT_ID_ENDPOINT_MODE;
|
|
52
|
+
exports.ENV_ACCOUNT_ID_ENDPOINT_MODE = ENV_ACCOUNT_ID_ENDPOINT_MODE;
|
|
53
|
+
exports.NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS = NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS;
|
|
54
|
+
exports.resolveAccountIdEndpointModeConfig = resolveAccountIdEndpointModeConfig;
|
|
55
|
+
exports.validateAccountIdEndpointMode = validateAccountIdEndpointMode;
|
|
@@ -1,90 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
|
|
21
|
-
// src/submodules/client/index.ts
|
|
22
|
-
var index_exports = {};
|
|
23
|
-
__export(index_exports, {
|
|
24
|
-
emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion,
|
|
25
|
-
setCredentialFeature: () => setCredentialFeature,
|
|
26
|
-
setFeature: () => setFeature,
|
|
27
|
-
setTokenFeature: () => setTokenFeature,
|
|
28
|
-
state: () => state
|
|
29
|
-
});
|
|
30
|
-
module.exports = __toCommonJS(index_exports);
|
|
1
|
+
'use strict';
|
|
31
2
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
warningEmitted: false
|
|
3
|
+
const state = {
|
|
4
|
+
warningEmitted: false,
|
|
35
5
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
|
|
6
|
+
const emitWarningIfUnsupportedVersion = (version) => {
|
|
7
|
+
if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 18) {
|
|
8
|
+
state.warningEmitted = true;
|
|
9
|
+
process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
|
|
41
10
|
no longer support Node.js 16.x on January 6, 2025.
|
|
42
11
|
|
|
43
12
|
To continue receiving updates to AWS services, bug fixes, and security
|
|
44
13
|
updates please upgrade to a supported Node.js LTS version.
|
|
45
14
|
|
|
46
|
-
More information can be found at: https://a.co/74kJMmI`
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}, "emitWarningIfUnsupportedVersion");
|
|
15
|
+
More information can be found at: https://a.co/74kJMmI`);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
50
18
|
|
|
51
|
-
// src/submodules/client/setCredentialFeature.ts
|
|
52
19
|
function setCredentialFeature(credentials, feature, value) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
20
|
+
if (!credentials.$source) {
|
|
21
|
+
credentials.$source = {};
|
|
22
|
+
}
|
|
23
|
+
credentials.$source[feature] = value;
|
|
24
|
+
return credentials;
|
|
58
25
|
}
|
|
59
|
-
__name(setCredentialFeature, "setCredentialFeature");
|
|
60
26
|
|
|
61
|
-
// src/submodules/client/setFeature.ts
|
|
62
27
|
function setFeature(context, feature, value) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
context.__aws_sdk_context.features
|
|
69
|
-
|
|
70
|
-
|
|
28
|
+
if (!context.__aws_sdk_context) {
|
|
29
|
+
context.__aws_sdk_context = {
|
|
30
|
+
features: {},
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
else if (!context.__aws_sdk_context.features) {
|
|
34
|
+
context.__aws_sdk_context.features = {};
|
|
35
|
+
}
|
|
36
|
+
context.__aws_sdk_context.features[feature] = value;
|
|
71
37
|
}
|
|
72
|
-
__name(setFeature, "setFeature");
|
|
73
38
|
|
|
74
|
-
// src/submodules/client/setTokenFeature.ts
|
|
75
39
|
function setTokenFeature(token, feature, value) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
40
|
+
if (!token.$source) {
|
|
41
|
+
token.$source = {};
|
|
42
|
+
}
|
|
43
|
+
token.$source[feature] = value;
|
|
44
|
+
return token;
|
|
81
45
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
setTokenFeature,
|
|
89
|
-
state
|
|
90
|
-
});
|
|
46
|
+
|
|
47
|
+
exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion;
|
|
48
|
+
exports.setCredentialFeature = setCredentialFeature;
|
|
49
|
+
exports.setFeature = setFeature;
|
|
50
|
+
exports.setTokenFeature = setTokenFeature;
|
|
51
|
+
exports.state = state;
|