@aws-sdk/core 3.974.29 → 3.975.1
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/client/index.js +55 -141
- package/dist-es/submodules/account-id-endpoint/index.js +3 -3
- package/dist-es/submodules/client/middleware-recursion-detection/configuration.js +1 -1
- package/dist-es/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.js +48 -19
- package/dist-es/submodules/client/util-user-agent-browser/defaultUserAgent.browser.js +1 -1
- package/dist-es/submodules/client/util-user-agent-node/defaultUserAgent.js +0 -5
- package/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js +3 -3
- package/dist-es/submodules/httpAuthSchemes/index.js +2 -2
- package/dist-es/submodules/httpAuthSchemes/utils/index.js +3 -3
- package/dist-es/submodules/protocols/index.js +19 -20
- package/dist-types/submodules/account-id-endpoint/index.d.ts +5 -3
- package/dist-types/submodules/client/index.browser.d.ts +5 -5
- package/dist-types/submodules/client/index.d.ts +5 -5
- package/dist-types/submodules/client/index.native.d.ts +5 -5
- package/dist-types/submodules/client/middleware-recursion-detection/configuration.d.ts +1 -0
- package/dist-types/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.d.ts +5 -1
- package/dist-types/submodules/client/util-endpoints/types/EndpointRuleObject.d.ts +1 -1
- package/dist-types/submodules/client/util-endpoints/types/ErrorRuleObject.d.ts +1 -1
- package/dist-types/submodules/client/util-endpoints/types/RuleSetObject.d.ts +1 -1
- package/dist-types/submodules/client/util-endpoints/types/TreeRuleObject.d.ts +1 -1
- package/dist-types/submodules/client/util-endpoints/types/shared.d.ts +1 -1
- package/dist-types/submodules/client/util-user-agent-browser/defaultUserAgent.browser.d.ts +2 -1
- package/dist-types/submodules/httpAuthSchemes/aws_sdk/index.d.ts +5 -3
- package/dist-types/submodules/httpAuthSchemes/index.d.ts +3 -2
- package/dist-types/submodules/httpAuthSchemes/utils/index.d.ts +3 -3
- package/dist-types/submodules/protocols/index.d.ts +22 -20
- package/dist-types/submodules/util/index.d.ts +2 -1
- package/dist-types/ts3.4/submodules/account-id-endpoint/index.d.ts +16 -3
- package/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.browser.d.ts +7 -1
- package/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/index.d.ts +23 -3
- package/dist-types/ts3.4/submodules/httpAuthSchemes/index.d.ts +24 -2
- package/dist-types/ts3.4/submodules/httpAuthSchemes/utils/index.d.ts +3 -3
- package/dist-types/ts3.4/submodules/protocols/index.d.ts +31 -20
- package/dist-types/ts3.4/submodules/util/index.d.ts +2 -1
- package/package.json +6 -6
- package/dist-es/submodules/client/util-user-agent-node/getNodeModulesParentDirs.js +0 -15
- package/dist-es/submodules/client/util-user-agent-node/getSanitizedDevTypeScriptVersion.js +0 -14
- package/dist-es/submodules/client/util-user-agent-node/getSanitizedTypeScriptVersion.js +0 -9
- package/dist-es/submodules/client/util-user-agent-node/getTypeScriptUserAgentPair.js +0 -75
- package/dist-types/submodules/client/util-user-agent-node/getNodeModulesParentDirs.d.ts +0 -10
- package/dist-types/submodules/client/util-user-agent-node/getSanitizedDevTypeScriptVersion.d.ts +0 -8
- package/dist-types/submodules/client/util-user-agent-node/getSanitizedTypeScriptVersion.d.ts +0 -8
- package/dist-types/submodules/client/util-user-agent-node/getTypeScriptUserAgentPair.d.ts +0 -6
- package/dist-types/ts3.4/submodules/client/util-user-agent-node/getNodeModulesParentDirs.d.ts +0 -1
- package/dist-types/ts3.4/submodules/client/util-user-agent-node/getSanitizedDevTypeScriptVersion.d.ts +0 -3
- package/dist-types/ts3.4/submodules/client/util-user-agent-node/getSanitizedTypeScriptVersion.d.ts +0 -3
- package/dist-types/ts3.4/submodules/client/util-user-agent-node/getTypeScriptUserAgentPair.d.ts +0 -4
|
@@ -4,20 +4,18 @@ const { InvokeStore } = require("@aws/lambda-invoke-store");
|
|
|
4
4
|
const { normalizeProvider } = require("@smithy/core");
|
|
5
5
|
const { platform, release } = require("node:os");
|
|
6
6
|
const { versions, env } = require("node:process");
|
|
7
|
-
const {
|
|
7
|
+
const { isValidHostLabel, isIpAddress, customEndpointFunctions } = require("@smithy/core/endpoints");
|
|
8
|
+
const { EndpointError, resolveEndpoint } = require("@smithy/core/endpoints");
|
|
9
|
+
exports.EndpointError = EndpointError;
|
|
10
|
+
exports.isIpAddress = isIpAddress;
|
|
11
|
+
exports.resolveEndpoint = resolveEndpoint;
|
|
12
|
+
const { loadConfig, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS } = require("@smithy/core/config");
|
|
8
13
|
const { REGION_ENV_NAME, REGION_INI_NAME, resolveRegionConfig } = require("@smithy/core/config");
|
|
9
14
|
exports.NODE_REGION_CONFIG_FILE_OPTIONS = NODE_REGION_CONFIG_FILE_OPTIONS;
|
|
10
15
|
exports.NODE_REGION_CONFIG_OPTIONS = NODE_REGION_CONFIG_OPTIONS;
|
|
11
16
|
exports.REGION_ENV_NAME = REGION_ENV_NAME;
|
|
12
17
|
exports.REGION_INI_NAME = REGION_INI_NAME;
|
|
13
18
|
exports.resolveRegionConfig = resolveRegionConfig;
|
|
14
|
-
const { readFile } = require("node:fs/promises");
|
|
15
|
-
const { normalize, sep, join } = require("node:path");
|
|
16
|
-
const { isValidHostLabel, isIpAddress, customEndpointFunctions } = require("@smithy/core/endpoints");
|
|
17
|
-
const { EndpointError, resolveEndpoint } = require("@smithy/core/endpoints");
|
|
18
|
-
exports.EndpointError = EndpointError;
|
|
19
|
-
exports.isIpAddress = isIpAddress;
|
|
20
|
-
exports.resolveEndpoint = resolveEndpoint;
|
|
21
19
|
|
|
22
20
|
const state = {
|
|
23
21
|
warningEmitted: false,
|
|
@@ -167,39 +165,68 @@ const getLoggerPlugin = (options) => ({
|
|
|
167
165
|
|
|
168
166
|
const recursionDetectionMiddlewareOptions = {
|
|
169
167
|
step: "build",
|
|
170
|
-
tags: ["RECURSION_DETECTION"],
|
|
168
|
+
tags: ["RECURSION_DETECTION", "TRACE_CONTEXT_PROPAGATION"],
|
|
171
169
|
name: "recursionDetectionMiddleware",
|
|
172
170
|
override: true,
|
|
173
171
|
priority: "low",
|
|
174
172
|
};
|
|
175
173
|
|
|
176
|
-
const
|
|
177
|
-
const
|
|
178
|
-
const
|
|
174
|
+
const AWS_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME";
|
|
175
|
+
const _X_AMZN_TRACE_ID = "_X_AMZN_TRACE_ID";
|
|
176
|
+
const X_AMZN_TRACE_ID = "X-Amzn-Trace-Id";
|
|
177
|
+
const TRACEPARENT = "traceparent";
|
|
178
|
+
const TRACESTATE = "tracestate";
|
|
179
|
+
const BAGGAGE = "baggage";
|
|
179
180
|
const recursionDetectionMiddleware = () => (next) => async (args) => {
|
|
180
181
|
const { request } = args;
|
|
181
182
|
if (!HttpRequest.isInstance(request)) {
|
|
182
183
|
return next(args);
|
|
183
184
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
185
|
+
let invokeStore;
|
|
186
|
+
{
|
|
187
|
+
const traceIdHeader = Object.keys(request.headers ?? {}).find((h) => h.toLowerCase() === X_AMZN_TRACE_ID.toLowerCase()) ??
|
|
188
|
+
X_AMZN_TRACE_ID;
|
|
189
|
+
if (!request.headers.hasOwnProperty(traceIdHeader)) {
|
|
190
|
+
const functionName = process.env[AWS_LAMBDA_FUNCTION_NAME];
|
|
191
|
+
const traceIdFromEnv = process.env[_X_AMZN_TRACE_ID];
|
|
192
|
+
invokeStore ??= await InvokeStore.getInstanceAsync();
|
|
193
|
+
const traceIdFromInvokeStore = invokeStore?.getXRayTraceId();
|
|
194
|
+
const traceId = traceIdFromInvokeStore ?? traceIdFromEnv;
|
|
195
|
+
const nonEmptyString = (str) => typeof str === "string" && str.length > 0;
|
|
196
|
+
if (nonEmptyString(functionName) && nonEmptyString(traceId)) {
|
|
197
|
+
request.headers[X_AMZN_TRACE_ID] = traceId;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
188
200
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
201
|
+
{
|
|
202
|
+
sanitizeTraceHeaders(request.headers);
|
|
203
|
+
const existingTraceparent = request.headers[TRACEPARENT];
|
|
204
|
+
if (!existingTraceparent) {
|
|
205
|
+
const traceparent = (invokeStore ??= await InvokeStore.getInstanceAsync())?.getTraceparent?.();
|
|
206
|
+
if (traceparent) {
|
|
207
|
+
request.headers[TRACEPARENT] = traceparent;
|
|
208
|
+
const tracestate = invokeStore?.getTracestate?.();
|
|
209
|
+
if (tracestate) {
|
|
210
|
+
request.headers[TRACESTATE] = tracestate;
|
|
211
|
+
}
|
|
212
|
+
const baggage = invokeStore?.getBaggage?.();
|
|
213
|
+
if (baggage) {
|
|
214
|
+
request.headers[BAGGAGE] = baggage;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
197
218
|
}
|
|
198
|
-
return next(
|
|
199
|
-
...args,
|
|
200
|
-
request,
|
|
201
|
-
});
|
|
219
|
+
return next(args);
|
|
202
220
|
};
|
|
221
|
+
function sanitizeTraceHeaders(headers) {
|
|
222
|
+
for (const header of Object.keys(headers)) {
|
|
223
|
+
const lower = header.toLowerCase();
|
|
224
|
+
if (header !== lower && (lower === TRACEPARENT || lower === TRACESTATE || lower === BAGGAGE)) {
|
|
225
|
+
headers[lower] = headers[header];
|
|
226
|
+
delete headers[header];
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
203
230
|
|
|
204
231
|
const getRecursionDetectionPlugin = (options) => ({
|
|
205
232
|
applyToStack: (clientStack) => {
|
|
@@ -716,115 +743,6 @@ const getRuntimeUserAgentPair = () => {
|
|
|
716
743
|
return ["md/nodejs", versions.node];
|
|
717
744
|
};
|
|
718
745
|
|
|
719
|
-
const getNodeModulesParentDirs = (dirname) => {
|
|
720
|
-
const cwd = process.cwd();
|
|
721
|
-
if (!dirname) {
|
|
722
|
-
return [cwd];
|
|
723
|
-
}
|
|
724
|
-
const normalizedPath = normalize(dirname);
|
|
725
|
-
const parts = normalizedPath.split(sep);
|
|
726
|
-
const nodeModulesIndex = parts.indexOf("node_modules");
|
|
727
|
-
const parentDir = nodeModulesIndex !== -1 ? parts.slice(0, nodeModulesIndex).join(sep) : normalizedPath;
|
|
728
|
-
if (cwd === parentDir) {
|
|
729
|
-
return [cwd];
|
|
730
|
-
}
|
|
731
|
-
return [parentDir, cwd];
|
|
732
|
-
};
|
|
733
|
-
|
|
734
|
-
const SEMVER_REGEX = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/;
|
|
735
|
-
const getSanitizedTypeScriptVersion = (version = "") => {
|
|
736
|
-
const match = version.match(SEMVER_REGEX);
|
|
737
|
-
if (!match) {
|
|
738
|
-
return undefined;
|
|
739
|
-
}
|
|
740
|
-
const [major, minor, patch, prerelease] = [match[1], match[2], match[3], match[4]];
|
|
741
|
-
return prerelease ? `${major}.${minor}.${patch}-${prerelease}` : `${major}.${minor}.${patch}`;
|
|
742
|
-
};
|
|
743
|
-
|
|
744
|
-
const ALLOWED_PREFIXES = ["^", "~", ">=", "<=", ">", "<"];
|
|
745
|
-
const ALLOWED_DIST_TAGS = ["latest", "beta", "dev", "rc", "insiders", "next"];
|
|
746
|
-
const getSanitizedDevTypeScriptVersion = (version = "") => {
|
|
747
|
-
if (ALLOWED_DIST_TAGS.includes(version)) {
|
|
748
|
-
return version;
|
|
749
|
-
}
|
|
750
|
-
const prefix = ALLOWED_PREFIXES.find((p) => version.startsWith(p)) ?? "";
|
|
751
|
-
const sanitizedTypeScriptVersion = getSanitizedTypeScriptVersion(version.slice(prefix.length));
|
|
752
|
-
if (!sanitizedTypeScriptVersion) {
|
|
753
|
-
return undefined;
|
|
754
|
-
}
|
|
755
|
-
return `${prefix}${sanitizedTypeScriptVersion}`;
|
|
756
|
-
};
|
|
757
|
-
|
|
758
|
-
let tscVersion;
|
|
759
|
-
const TS_PACKAGE_JSON = join("node_modules", "typescript", "package.json");
|
|
760
|
-
const getTypeScriptUserAgentPair = async () => {
|
|
761
|
-
if (tscVersion === null) {
|
|
762
|
-
return undefined;
|
|
763
|
-
}
|
|
764
|
-
else if (typeof tscVersion === "string") {
|
|
765
|
-
return ["md/tsc", tscVersion];
|
|
766
|
-
}
|
|
767
|
-
let isTypeScriptDetectionDisabled = false;
|
|
768
|
-
try {
|
|
769
|
-
isTypeScriptDetectionDisabled =
|
|
770
|
-
booleanSelector(process.env, "AWS_SDK_JS_TYPESCRIPT_DETECTION_DISABLED", SelectorType.ENV) || false;
|
|
771
|
-
}
|
|
772
|
-
catch { }
|
|
773
|
-
if (isTypeScriptDetectionDisabled) {
|
|
774
|
-
tscVersion = null;
|
|
775
|
-
return undefined;
|
|
776
|
-
}
|
|
777
|
-
const dirname = typeof __dirname !== "undefined" ? __dirname : undefined;
|
|
778
|
-
const nodeModulesParentDirs = getNodeModulesParentDirs(dirname);
|
|
779
|
-
let versionFromApp;
|
|
780
|
-
for (const nodeModulesParentDir of nodeModulesParentDirs) {
|
|
781
|
-
try {
|
|
782
|
-
const appPackageJsonPath = join(nodeModulesParentDir, "package.json");
|
|
783
|
-
const packageJson = await readFile(appPackageJsonPath, "utf-8");
|
|
784
|
-
const { dependencies, devDependencies } = JSON.parse(packageJson);
|
|
785
|
-
const version = devDependencies?.typescript ?? dependencies?.typescript;
|
|
786
|
-
if (typeof version !== "string") {
|
|
787
|
-
continue;
|
|
788
|
-
}
|
|
789
|
-
versionFromApp = version;
|
|
790
|
-
break;
|
|
791
|
-
}
|
|
792
|
-
catch {
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
if (!versionFromApp) {
|
|
796
|
-
tscVersion = null;
|
|
797
|
-
return undefined;
|
|
798
|
-
}
|
|
799
|
-
let versionFromNodeModules;
|
|
800
|
-
for (const nodeModulesParentDir of nodeModulesParentDirs) {
|
|
801
|
-
try {
|
|
802
|
-
const tsPackageJsonPath = join(nodeModulesParentDir, TS_PACKAGE_JSON);
|
|
803
|
-
const packageJson = await readFile(tsPackageJsonPath, "utf-8");
|
|
804
|
-
const { version } = JSON.parse(packageJson);
|
|
805
|
-
const sanitizedVersion = getSanitizedTypeScriptVersion(version);
|
|
806
|
-
if (typeof sanitizedVersion !== "string") {
|
|
807
|
-
continue;
|
|
808
|
-
}
|
|
809
|
-
versionFromNodeModules = sanitizedVersion;
|
|
810
|
-
break;
|
|
811
|
-
}
|
|
812
|
-
catch {
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
if (versionFromNodeModules) {
|
|
816
|
-
tscVersion = versionFromNodeModules;
|
|
817
|
-
return ["md/tsc", tscVersion];
|
|
818
|
-
}
|
|
819
|
-
const sanitizedVersion = getSanitizedDevTypeScriptVersion(versionFromApp);
|
|
820
|
-
if (typeof sanitizedVersion !== "string") {
|
|
821
|
-
tscVersion = null;
|
|
822
|
-
return undefined;
|
|
823
|
-
}
|
|
824
|
-
tscVersion = `dev_${sanitizedVersion}`;
|
|
825
|
-
return ["md/tsc", tscVersion];
|
|
826
|
-
};
|
|
827
|
-
|
|
828
746
|
const crtAvailability = {
|
|
829
747
|
isCrtAvailable: false,
|
|
830
748
|
};
|
|
@@ -846,10 +764,6 @@ const createDefaultUserAgentProvider = ({ serviceId, clientVersion }) => {
|
|
|
846
764
|
["lang/js"],
|
|
847
765
|
runtimeUserAgentPair,
|
|
848
766
|
];
|
|
849
|
-
const typescriptUserAgentPair = await getTypeScriptUserAgentPair();
|
|
850
|
-
if (typescriptUserAgentPair) {
|
|
851
|
-
sections.push(typescriptUserAgentPair);
|
|
852
|
-
}
|
|
853
767
|
const crtAvailable = isCrtAvailable();
|
|
854
768
|
if (crtAvailable) {
|
|
855
769
|
sections.push(crtAvailable);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export { resolveAccountIdEndpointModeConfig } from "./AccountIdEndpointModeConfigResolver";
|
|
2
|
+
export { DEFAULT_ACCOUNT_ID_ENDPOINT_MODE, ACCOUNT_ID_ENDPOINT_MODE_VALUES, validateAccountIdEndpointMode, } from "./AccountIdEndpointModeConstants";
|
|
3
|
+
export { ENV_ACCOUNT_ID_ENDPOINT_MODE, CONFIG_ACCOUNT_ID_ENDPOINT_MODE, NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS, } from "./NodeAccountIdEndpointModeConfigOptions";
|
package/dist-es/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.js
CHANGED
|
@@ -1,29 +1,58 @@
|
|
|
1
1
|
import { InvokeStore } from "@aws/lambda-invoke-store";
|
|
2
2
|
import { HttpRequest } from "@smithy/core/protocols";
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
3
|
+
const AWS_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME";
|
|
4
|
+
const _X_AMZN_TRACE_ID = "_X_AMZN_TRACE_ID";
|
|
5
|
+
const X_AMZN_TRACE_ID = "X-Amzn-Trace-Id";
|
|
6
|
+
const TRACEPARENT = "traceparent";
|
|
7
|
+
const TRACESTATE = "tracestate";
|
|
8
|
+
const BAGGAGE = "baggage";
|
|
6
9
|
export const recursionDetectionMiddleware = () => (next) => async (args) => {
|
|
7
10
|
const { request } = args;
|
|
8
11
|
if (!HttpRequest.isInstance(request)) {
|
|
9
12
|
return next(args);
|
|
10
13
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
let invokeStore;
|
|
15
|
+
{
|
|
16
|
+
const traceIdHeader = Object.keys(request.headers ?? {}).find((h) => h.toLowerCase() === X_AMZN_TRACE_ID.toLowerCase()) ??
|
|
17
|
+
X_AMZN_TRACE_ID;
|
|
18
|
+
if (!request.headers.hasOwnProperty(traceIdHeader)) {
|
|
19
|
+
const functionName = process.env[AWS_LAMBDA_FUNCTION_NAME];
|
|
20
|
+
const traceIdFromEnv = process.env[_X_AMZN_TRACE_ID];
|
|
21
|
+
invokeStore ??= await InvokeStore.getInstanceAsync();
|
|
22
|
+
const traceIdFromInvokeStore = invokeStore?.getXRayTraceId();
|
|
23
|
+
const traceId = traceIdFromInvokeStore ?? traceIdFromEnv;
|
|
24
|
+
const nonEmptyString = (str) => typeof str === "string" && str.length > 0;
|
|
25
|
+
if (nonEmptyString(functionName) && nonEmptyString(traceId)) {
|
|
26
|
+
request.headers[X_AMZN_TRACE_ID] = traceId;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
15
29
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
30
|
+
{
|
|
31
|
+
sanitizeTraceHeaders(request.headers);
|
|
32
|
+
const existingTraceparent = request.headers[TRACEPARENT];
|
|
33
|
+
if (!existingTraceparent) {
|
|
34
|
+
const traceparent = (invokeStore ??= await InvokeStore.getInstanceAsync())?.getTraceparent?.();
|
|
35
|
+
if (traceparent) {
|
|
36
|
+
request.headers[TRACEPARENT] = traceparent;
|
|
37
|
+
const tracestate = invokeStore?.getTracestate?.();
|
|
38
|
+
if (tracestate) {
|
|
39
|
+
request.headers[TRACESTATE] = tracestate;
|
|
40
|
+
}
|
|
41
|
+
const baggage = invokeStore?.getBaggage?.();
|
|
42
|
+
if (baggage) {
|
|
43
|
+
request.headers[BAGGAGE] = baggage;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
24
47
|
}
|
|
25
|
-
return next(
|
|
26
|
-
...args,
|
|
27
|
-
request,
|
|
28
|
-
});
|
|
48
|
+
return next(args);
|
|
29
49
|
};
|
|
50
|
+
function sanitizeTraceHeaders(headers) {
|
|
51
|
+
for (const header of Object.keys(headers)) {
|
|
52
|
+
const lower = header.toLowerCase();
|
|
53
|
+
if (header !== lower && (lower === TRACEPARENT || lower === TRACESTATE || lower === BAGGAGE)) {
|
|
54
|
+
headers[lower] = headers[header];
|
|
55
|
+
delete headers[header];
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { createUserAgentStringParsingProvider, createDefaultUserAgentProvider, fallback, defaultUserAgent, } from "./defaultUserAgent";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { platform, release } from "node:os";
|
|
2
2
|
import { env } from "node:process";
|
|
3
3
|
import { getRuntimeUserAgentPair } from "./getRuntimeUserAgentPair";
|
|
4
|
-
import { getTypeScriptUserAgentPair } from "./getTypeScriptUserAgentPair";
|
|
5
4
|
import { isCrtAvailable } from "./is-crt-available";
|
|
6
5
|
export { crtAvailability } from "./crt-availability";
|
|
7
6
|
export const createDefaultUserAgentProvider = ({ serviceId, clientVersion }) => {
|
|
@@ -14,10 +13,6 @@ export const createDefaultUserAgentProvider = ({ serviceId, clientVersion }) =>
|
|
|
14
13
|
["lang/js"],
|
|
15
14
|
runtimeUserAgentPair,
|
|
16
15
|
];
|
|
17
|
-
const typescriptUserAgentPair = await getTypeScriptUserAgentPair();
|
|
18
|
-
if (typescriptUserAgentPair) {
|
|
19
|
-
sections.push(typescriptUserAgentPair);
|
|
20
|
-
}
|
|
21
16
|
const crtAvailable = isCrtAvailable();
|
|
22
17
|
if (crtAvailable) {
|
|
23
18
|
sections.push(crtAvailable);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { AwsSdkSigV4Signer, AWSSDKSigV4Signer, validateSigningProperties } from "./AwsSdkSigV4Signer";
|
|
2
2
|
export { AwsSdkSigV4ASigner } from "./AwsSdkSigV4ASigner";
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
3
|
+
export { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } from "./NODE_AUTH_SCHEME_PREFERENCE_OPTIONS";
|
|
4
|
+
export { resolveAwsSdkSigV4AConfig, NODE_SIGV4A_CONFIG_OPTIONS } from "./resolveAwsSdkSigV4AConfig";
|
|
5
|
+
export { resolveAwsSdkSigV4Config, resolveAWSSDKSigV4Config } from "./resolveAwsSdkSigV4Config";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { AwsSdkSigV4Signer, AWSSDKSigV4Signer, validateSigningProperties, AwsSdkSigV4ASigner, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, resolveAwsSdkSigV4AConfig, NODE_SIGV4A_CONFIG_OPTIONS, resolveAwsSdkSigV4Config, resolveAWSSDKSigV4Config, } from "./aws_sdk";
|
|
2
|
+
export { getBearerTokenEnvKey } from "./utils/getBearerTokenEnvKey";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export { getDateHeader } from "./getDateHeader";
|
|
2
|
+
export { getSkewCorrectedDate } from "./getSkewCorrectedDate";
|
|
3
|
+
export { getUpdatedSystemClockOffset } from "./getUpdatedSystemClockOffset";
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export * from "./xml/parseXmlBody";
|
|
1
|
+
export { AwsSmithyRpcV2CborProtocol } from "./cbor/AwsSmithyRpcV2CborProtocol";
|
|
2
|
+
export { _toStr, _toBool, _toNum } from "./coercing-serializers";
|
|
3
|
+
export { AwsJson1_0Protocol } from "./json/AwsJson1_0Protocol";
|
|
4
|
+
export { AwsJson1_1Protocol } from "./json/AwsJson1_1Protocol";
|
|
5
|
+
export { AwsJsonRpcProtocol } from "./json/AwsJsonRpcProtocol";
|
|
6
|
+
export { AwsRestJsonProtocol } from "./json/AwsRestJsonProtocol";
|
|
7
|
+
export { JsonCodec } from "./json/JsonCodec";
|
|
8
|
+
export { JsonShapeDeserializer } from "./json/JsonShapeDeserializer";
|
|
9
|
+
export { JsonShapeSerializer } from "./json/JsonShapeSerializer";
|
|
10
|
+
export { awsExpectUnion } from "./json/awsExpectUnion";
|
|
11
|
+
export { parseJsonBody, parseJsonErrorBody, loadRestJsonErrorCode, loadJsonRpcErrorCode } from "./json/parseJsonBody";
|
|
12
|
+
export { AwsEc2QueryProtocol } from "./query/AwsEc2QueryProtocol";
|
|
13
|
+
export { AwsQueryProtocol } from "./query/AwsQueryProtocol";
|
|
14
|
+
export { QueryShapeSerializer } from "./query/QueryShapeSerializer";
|
|
15
|
+
export { AwsRestXmlProtocol } from "./xml/AwsRestXmlProtocol";
|
|
16
|
+
export { XmlCodec } from "./xml/XmlCodec";
|
|
17
|
+
export { XmlShapeDeserializer } from "./xml/XmlShapeDeserializer";
|
|
18
|
+
export { XmlShapeSerializer } from "./xml/XmlShapeSerializer";
|
|
19
|
+
export { parseXmlBody, parseXmlErrorBody, loadRestXmlErrorCode } from "./xml/parseXmlBody";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export { resolveAccountIdEndpointModeConfig } from "./AccountIdEndpointModeConfigResolver";
|
|
2
|
+
export type { AccountIdEndpointModeInputConfig, AccountIdEndpointModeResolvedConfig, } from "./AccountIdEndpointModeConfigResolver";
|
|
3
|
+
export { DEFAULT_ACCOUNT_ID_ENDPOINT_MODE, ACCOUNT_ID_ENDPOINT_MODE_VALUES, validateAccountIdEndpointMode, } from "./AccountIdEndpointModeConstants";
|
|
4
|
+
export type { AccountIdEndpointMode } from "./AccountIdEndpointModeConstants";
|
|
5
|
+
export { ENV_ACCOUNT_ID_ENDPOINT_MODE, CONFIG_ACCOUNT_ID_ENDPOINT_MODE, NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS, } from "./NodeAccountIdEndpointModeConfigOptions";
|
|
@@ -30,11 +30,11 @@ export { parseArn } from "./util-endpoints/lib/aws/parseArn";
|
|
|
30
30
|
export { partition, setPartitionInfo, useDefaultPartitionInfo, getUserAgentPrefix, } from "./util-endpoints/lib/aws/partition";
|
|
31
31
|
export type { PartitionsInfo } from "./util-endpoints/lib/aws/partition";
|
|
32
32
|
export { EndpointError } from "./util-endpoints/types/EndpointError";
|
|
33
|
-
export { EndpointObjectProperties, EndpointObjectHeaders, EndpointObject, EndpointRuleObject, } from "./util-endpoints/types/EndpointRuleObject";
|
|
34
|
-
export { ErrorRuleObject } from "./util-endpoints/types/ErrorRuleObject";
|
|
35
|
-
export { RuleSetRules, TreeRuleObject } from "./util-endpoints/types/TreeRuleObject";
|
|
36
|
-
export { DeprecatedObject, ParameterObject, RuleSetObject } from "./util-endpoints/types/RuleSetObject";
|
|
37
|
-
export { ReferenceObject, FunctionObject, FunctionArgv, FunctionReturn, ConditionObject, Expression, EndpointParams, EndpointResolverOptions, ReferenceRecord, EvaluateOptions, } from "./util-endpoints/types/shared";
|
|
33
|
+
export type { EndpointObjectProperties, EndpointObjectHeaders, EndpointObject, EndpointRuleObject, } from "./util-endpoints/types/EndpointRuleObject";
|
|
34
|
+
export type { ErrorRuleObject } from "./util-endpoints/types/ErrorRuleObject";
|
|
35
|
+
export type { RuleSetRules, TreeRuleObject } from "./util-endpoints/types/TreeRuleObject";
|
|
36
|
+
export type { DeprecatedObject, ParameterObject, RuleSetObject } from "./util-endpoints/types/RuleSetObject";
|
|
37
|
+
export type { ReferenceObject, FunctionObject, FunctionArgv, FunctionReturn, ConditionObject, Expression, EndpointParams, EndpointResolverOptions, ReferenceRecord, EvaluateOptions, } from "./util-endpoints/types/shared";
|
|
38
38
|
export declare const REGION_ENV_NAME: symbol;
|
|
39
39
|
export declare const REGION_INI_NAME: symbol;
|
|
40
40
|
export declare const NODE_REGION_CONFIG_OPTIONS: symbol;
|
|
@@ -27,11 +27,11 @@ export { parseArn } from "./util-endpoints/lib/aws/parseArn";
|
|
|
27
27
|
export { partition, setPartitionInfo, useDefaultPartitionInfo, getUserAgentPrefix, } from "./util-endpoints/lib/aws/partition";
|
|
28
28
|
export type { PartitionsInfo } from "./util-endpoints/lib/aws/partition";
|
|
29
29
|
export { EndpointError } from "./util-endpoints/types/EndpointError";
|
|
30
|
-
export { EndpointObjectProperties, EndpointObjectHeaders, EndpointObject, EndpointRuleObject, } from "./util-endpoints/types/EndpointRuleObject";
|
|
31
|
-
export { ErrorRuleObject } from "./util-endpoints/types/ErrorRuleObject";
|
|
32
|
-
export { RuleSetRules, TreeRuleObject } from "./util-endpoints/types/TreeRuleObject";
|
|
33
|
-
export { DeprecatedObject, ParameterObject, RuleSetObject } from "./util-endpoints/types/RuleSetObject";
|
|
34
|
-
export { ReferenceObject, FunctionObject, FunctionArgv, FunctionReturn, ConditionObject, Expression, EndpointParams, EndpointResolverOptions, ReferenceRecord, EvaluateOptions, } from "./util-endpoints/types/shared";
|
|
30
|
+
export type { EndpointObjectProperties, EndpointObjectHeaders, EndpointObject, EndpointRuleObject, } from "./util-endpoints/types/EndpointRuleObject";
|
|
31
|
+
export type { ErrorRuleObject } from "./util-endpoints/types/ErrorRuleObject";
|
|
32
|
+
export type { RuleSetRules, TreeRuleObject } from "./util-endpoints/types/TreeRuleObject";
|
|
33
|
+
export type { DeprecatedObject, ParameterObject, RuleSetObject } from "./util-endpoints/types/RuleSetObject";
|
|
34
|
+
export type { ReferenceObject, FunctionObject, FunctionArgv, FunctionReturn, ConditionObject, Expression, EndpointParams, EndpointResolverOptions, ReferenceRecord, EvaluateOptions, } from "./util-endpoints/types/shared";
|
|
35
35
|
export { REGION_ENV_NAME, REGION_INI_NAME, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig, } from "./region-config-resolver/awsRegionConfig";
|
|
36
36
|
export type { RegionInputConfig, RegionResolvedConfig } from "./region-config-resolver/awsRegionConfig";
|
|
37
37
|
export { stsRegionDefaultResolver, warning as stsRegionWarning, } from "./region-config-resolver/stsRegionDefaultResolver";
|
|
@@ -31,11 +31,11 @@ export { parseArn } from "./util-endpoints/lib/aws/parseArn";
|
|
|
31
31
|
export { partition, setPartitionInfo, useDefaultPartitionInfo, getUserAgentPrefix, } from "./util-endpoints/lib/aws/partition";
|
|
32
32
|
export type { PartitionsInfo } from "./util-endpoints/lib/aws/partition";
|
|
33
33
|
export { EndpointError } from "./util-endpoints/types/EndpointError";
|
|
34
|
-
export { EndpointObjectProperties, EndpointObjectHeaders, EndpointObject, EndpointRuleObject, } from "./util-endpoints/types/EndpointRuleObject";
|
|
35
|
-
export { ErrorRuleObject } from "./util-endpoints/types/ErrorRuleObject";
|
|
36
|
-
export { RuleSetRules, TreeRuleObject } from "./util-endpoints/types/TreeRuleObject";
|
|
37
|
-
export { DeprecatedObject, ParameterObject, RuleSetObject } from "./util-endpoints/types/RuleSetObject";
|
|
38
|
-
export { ReferenceObject, FunctionObject, FunctionArgv, FunctionReturn, ConditionObject, Expression, EndpointParams, EndpointResolverOptions, ReferenceRecord, EvaluateOptions, } from "./util-endpoints/types/shared";
|
|
34
|
+
export type { EndpointObjectProperties, EndpointObjectHeaders, EndpointObject, EndpointRuleObject, } from "./util-endpoints/types/EndpointRuleObject";
|
|
35
|
+
export type { ErrorRuleObject } from "./util-endpoints/types/ErrorRuleObject";
|
|
36
|
+
export type { RuleSetRules, TreeRuleObject } from "./util-endpoints/types/TreeRuleObject";
|
|
37
|
+
export type { DeprecatedObject, ParameterObject, RuleSetObject } from "./util-endpoints/types/RuleSetObject";
|
|
38
|
+
export type { ReferenceObject, FunctionObject, FunctionArgv, FunctionReturn, ConditionObject, Expression, EndpointParams, EndpointResolverOptions, ReferenceRecord, EvaluateOptions, } from "./util-endpoints/types/shared";
|
|
39
39
|
export declare const REGION_ENV_NAME: symbol;
|
|
40
40
|
export declare const REGION_INI_NAME: symbol;
|
|
41
41
|
export declare const NODE_REGION_CONFIG_OPTIONS: symbol;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { BuildMiddleware } from "@smithy/types";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Used for two Lambda-related responsibilities:
|
|
4
|
+
* - Inject to trace ID to request header to detect recursion invocation in Lambda.
|
|
5
|
+
* - Propagate W3C trace context headers from
|
|
6
|
+
* the Lambda InvokeStore onto outbound requests, enabling distributed trace
|
|
7
|
+
* context to flow to downstream calls without creating any spans.
|
|
4
8
|
* @internal
|
|
5
9
|
*/
|
|
6
10
|
export declare const recursionDetectionMiddleware: () => BuildMiddleware<any, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { EndpointObjectProperties, EndpointObjectHeaders, EndpointObject, EndpointRuleObject, } from "@smithy/core/endpoints";
|
|
1
|
+
export type { EndpointObjectProperties, EndpointObjectHeaders, EndpointObject, EndpointRuleObject, } from "@smithy/core/endpoints";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ErrorRuleObject } from "@smithy/core/endpoints";
|
|
1
|
+
export type { ErrorRuleObject } from "@smithy/core/endpoints";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DeprecatedObject, ParameterObject, RuleSetObject } from "@smithy/core/endpoints";
|
|
1
|
+
export type { DeprecatedObject, ParameterObject, RuleSetObject } from "@smithy/core/endpoints";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { RuleSetRules, TreeRuleObject } from "@smithy/core/endpoints";
|
|
1
|
+
export type { RuleSetRules, TreeRuleObject } from "@smithy/core/endpoints";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ReferenceObject, FunctionObject, FunctionArgv, FunctionReturn, ConditionObject, Expression, EndpointParams, EndpointResolverOptions, ReferenceRecord, EvaluateOptions, } from "@smithy/core/endpoints";
|
|
1
|
+
export type { ReferenceObject, FunctionObject, FunctionArgv, FunctionReturn, ConditionObject, Expression, EndpointParams, EndpointResolverOptions, ReferenceRecord, EvaluateOptions, } from "@smithy/core/endpoints";
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { createUserAgentStringParsingProvider, createDefaultUserAgentProvider, fallback, defaultUserAgent, } from "./defaultUserAgent";
|
|
2
|
+
export type { PreviouslyResolved } from "./defaultUserAgent";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { AwsSdkSigV4Signer, AWSSDKSigV4Signer, validateSigningProperties } from "./AwsSdkSigV4Signer";
|
|
2
2
|
export { AwsSdkSigV4ASigner } from "./AwsSdkSigV4ASigner";
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
3
|
+
export { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } from "./NODE_AUTH_SCHEME_PREFERENCE_OPTIONS";
|
|
4
|
+
export { resolveAwsSdkSigV4AConfig, NODE_SIGV4A_CONFIG_OPTIONS } from "./resolveAwsSdkSigV4AConfig";
|
|
5
|
+
export type { AwsSdkSigV4AAuthInputConfig, AwsSdkSigV4APreviouslyResolved, AwsSdkSigV4AAuthResolvedConfig, } from "./resolveAwsSdkSigV4AConfig";
|
|
6
|
+
export { resolveAwsSdkSigV4Config, resolveAWSSDKSigV4Config } from "./resolveAwsSdkSigV4Config";
|
|
7
|
+
export type { AwsSdkSigV4AuthInputConfig, AwsSdkSigV4Memoized, AwsSdkSigV4PreviouslyResolved, AwsSdkSigV4AuthResolvedConfig, AWSSDKSigV4AuthInputConfig, AWSSDKSigV4PreviouslyResolved, AWSSDKSigV4AuthResolvedConfig, } from "./resolveAwsSdkSigV4Config";
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { AwsSdkSigV4Signer, AWSSDKSigV4Signer, validateSigningProperties, AwsSdkSigV4ASigner, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, resolveAwsSdkSigV4AConfig, NODE_SIGV4A_CONFIG_OPTIONS, resolveAwsSdkSigV4Config, resolveAWSSDKSigV4Config, } from "./aws_sdk";
|
|
2
|
+
export type { AwsSdkSigV4AAuthInputConfig, AwsSdkSigV4APreviouslyResolved, AwsSdkSigV4AAuthResolvedConfig, AwsSdkSigV4AuthInputConfig, AwsSdkSigV4Memoized, AwsSdkSigV4PreviouslyResolved, AwsSdkSigV4AuthResolvedConfig, AWSSDKSigV4AuthInputConfig, AWSSDKSigV4PreviouslyResolved, AWSSDKSigV4AuthResolvedConfig, } from "./aws_sdk";
|
|
3
|
+
export { getBearerTokenEnvKey } from "./utils/getBearerTokenEnvKey";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export { getDateHeader } from "./getDateHeader";
|
|
2
|
+
export { getSkewCorrectedDate } from "./getSkewCorrectedDate";
|
|
3
|
+
export { getUpdatedSystemClockOffset } from "./getUpdatedSystemClockOffset";
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
1
|
+
export { AwsSmithyRpcV2CborProtocol } from "./cbor/AwsSmithyRpcV2CborProtocol";
|
|
2
|
+
export { _toStr, _toBool, _toNum } from "./coercing-serializers";
|
|
3
|
+
export { AwsJson1_0Protocol } from "./json/AwsJson1_0Protocol";
|
|
4
|
+
export { AwsJson1_1Protocol } from "./json/AwsJson1_1Protocol";
|
|
5
|
+
export { AwsJsonRpcProtocol } from "./json/AwsJsonRpcProtocol";
|
|
6
|
+
export { AwsRestJsonProtocol } from "./json/AwsRestJsonProtocol";
|
|
7
|
+
export { JsonCodec } from "./json/JsonCodec";
|
|
8
|
+
export type { JsonSettings } from "./json/JsonCodec";
|
|
9
|
+
export { JsonShapeDeserializer } from "./json/JsonShapeDeserializer";
|
|
10
|
+
export { JsonShapeSerializer } from "./json/JsonShapeSerializer";
|
|
11
|
+
export { awsExpectUnion } from "./json/awsExpectUnion";
|
|
12
|
+
export { parseJsonBody, parseJsonErrorBody, loadRestJsonErrorCode, loadJsonRpcErrorCode } from "./json/parseJsonBody";
|
|
13
|
+
export { AwsEc2QueryProtocol } from "./query/AwsEc2QueryProtocol";
|
|
14
|
+
export { AwsQueryProtocol } from "./query/AwsQueryProtocol";
|
|
15
|
+
export type { QuerySerializerSettings } from "./query/QuerySerializerSettings";
|
|
16
|
+
export { QueryShapeSerializer } from "./query/QueryShapeSerializer";
|
|
17
|
+
export { AwsRestXmlProtocol } from "./xml/AwsRestXmlProtocol";
|
|
18
|
+
export { XmlCodec } from "./xml/XmlCodec";
|
|
19
|
+
export type { XmlSettings } from "./xml/XmlCodec";
|
|
20
|
+
export { XmlShapeDeserializer } from "./xml/XmlShapeDeserializer";
|
|
21
|
+
export { XmlShapeSerializer } from "./xml/XmlShapeSerializer";
|
|
22
|
+
export { parseXmlBody, parseXmlErrorBody, loadRestXmlErrorCode } from "./xml/parseXmlBody";
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
|
|
1
|
+
export { resolveAccountIdEndpointModeConfig } from "./AccountIdEndpointModeConfigResolver";
|
|
2
|
+
export {
|
|
3
|
+
AccountIdEndpointModeInputConfig,
|
|
4
|
+
AccountIdEndpointModeResolvedConfig,
|
|
5
|
+
} from "./AccountIdEndpointModeConfigResolver";
|
|
6
|
+
export {
|
|
7
|
+
DEFAULT_ACCOUNT_ID_ENDPOINT_MODE,
|
|
8
|
+
ACCOUNT_ID_ENDPOINT_MODE_VALUES,
|
|
9
|
+
validateAccountIdEndpointMode,
|
|
10
|
+
} from "./AccountIdEndpointModeConstants";
|
|
11
|
+
export { AccountIdEndpointMode } from "./AccountIdEndpointModeConstants";
|
|
12
|
+
export {
|
|
13
|
+
ENV_ACCOUNT_ID_ENDPOINT_MODE,
|
|
14
|
+
CONFIG_ACCOUNT_ID_ENDPOINT_MODE,
|
|
15
|
+
NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS,
|
|
16
|
+
} from "./NodeAccountIdEndpointModeConfigOptions";
|
|
@@ -4,6 +4,26 @@ export {
|
|
|
4
4
|
validateSigningProperties,
|
|
5
5
|
} from "./AwsSdkSigV4Signer";
|
|
6
6
|
export { AwsSdkSigV4ASigner } from "./AwsSdkSigV4ASigner";
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
|
|
7
|
+
export { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } from "./NODE_AUTH_SCHEME_PREFERENCE_OPTIONS";
|
|
8
|
+
export {
|
|
9
|
+
resolveAwsSdkSigV4AConfig,
|
|
10
|
+
NODE_SIGV4A_CONFIG_OPTIONS,
|
|
11
|
+
} from "./resolveAwsSdkSigV4AConfig";
|
|
12
|
+
export {
|
|
13
|
+
AwsSdkSigV4AAuthInputConfig,
|
|
14
|
+
AwsSdkSigV4APreviouslyResolved,
|
|
15
|
+
AwsSdkSigV4AAuthResolvedConfig,
|
|
16
|
+
} from "./resolveAwsSdkSigV4AConfig";
|
|
17
|
+
export {
|
|
18
|
+
resolveAwsSdkSigV4Config,
|
|
19
|
+
resolveAWSSDKSigV4Config,
|
|
20
|
+
} from "./resolveAwsSdkSigV4Config";
|
|
21
|
+
export {
|
|
22
|
+
AwsSdkSigV4AuthInputConfig,
|
|
23
|
+
AwsSdkSigV4Memoized,
|
|
24
|
+
AwsSdkSigV4PreviouslyResolved,
|
|
25
|
+
AwsSdkSigV4AuthResolvedConfig,
|
|
26
|
+
AWSSDKSigV4AuthInputConfig,
|
|
27
|
+
AWSSDKSigV4PreviouslyResolved,
|
|
28
|
+
AWSSDKSigV4AuthResolvedConfig,
|
|
29
|
+
} from "./resolveAwsSdkSigV4Config";
|
|
@@ -1,2 +1,24 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
1
|
+
export {
|
|
2
|
+
AwsSdkSigV4Signer,
|
|
3
|
+
AWSSDKSigV4Signer,
|
|
4
|
+
validateSigningProperties,
|
|
5
|
+
AwsSdkSigV4ASigner,
|
|
6
|
+
NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,
|
|
7
|
+
resolveAwsSdkSigV4AConfig,
|
|
8
|
+
NODE_SIGV4A_CONFIG_OPTIONS,
|
|
9
|
+
resolveAwsSdkSigV4Config,
|
|
10
|
+
resolveAWSSDKSigV4Config,
|
|
11
|
+
} from "./aws_sdk";
|
|
12
|
+
export {
|
|
13
|
+
AwsSdkSigV4AAuthInputConfig,
|
|
14
|
+
AwsSdkSigV4APreviouslyResolved,
|
|
15
|
+
AwsSdkSigV4AAuthResolvedConfig,
|
|
16
|
+
AwsSdkSigV4AuthInputConfig,
|
|
17
|
+
AwsSdkSigV4Memoized,
|
|
18
|
+
AwsSdkSigV4PreviouslyResolved,
|
|
19
|
+
AwsSdkSigV4AuthResolvedConfig,
|
|
20
|
+
AWSSDKSigV4AuthInputConfig,
|
|
21
|
+
AWSSDKSigV4PreviouslyResolved,
|
|
22
|
+
AWSSDKSigV4AuthResolvedConfig,
|
|
23
|
+
} from "./aws_sdk";
|
|
24
|
+
export { getBearerTokenEnvKey } from "./utils/getBearerTokenEnvKey";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export { getDateHeader } from "./getDateHeader";
|
|
2
|
+
export { getSkewCorrectedDate } from "./getSkewCorrectedDate";
|
|
3
|
+
export { getUpdatedSystemClockOffset } from "./getUpdatedSystemClockOffset";
|
|
@@ -1,20 +1,31 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
1
|
+
export { AwsSmithyRpcV2CborProtocol } from "./cbor/AwsSmithyRpcV2CborProtocol";
|
|
2
|
+
export { _toStr, _toBool, _toNum } from "./coercing-serializers";
|
|
3
|
+
export { AwsJson1_0Protocol } from "./json/AwsJson1_0Protocol";
|
|
4
|
+
export { AwsJson1_1Protocol } from "./json/AwsJson1_1Protocol";
|
|
5
|
+
export { AwsJsonRpcProtocol } from "./json/AwsJsonRpcProtocol";
|
|
6
|
+
export { AwsRestJsonProtocol } from "./json/AwsRestJsonProtocol";
|
|
7
|
+
export { JsonCodec } from "./json/JsonCodec";
|
|
8
|
+
export { JsonSettings } from "./json/JsonCodec";
|
|
9
|
+
export { JsonShapeDeserializer } from "./json/JsonShapeDeserializer";
|
|
10
|
+
export { JsonShapeSerializer } from "./json/JsonShapeSerializer";
|
|
11
|
+
export { awsExpectUnion } from "./json/awsExpectUnion";
|
|
12
|
+
export {
|
|
13
|
+
parseJsonBody,
|
|
14
|
+
parseJsonErrorBody,
|
|
15
|
+
loadRestJsonErrorCode,
|
|
16
|
+
loadJsonRpcErrorCode,
|
|
17
|
+
} from "./json/parseJsonBody";
|
|
18
|
+
export { AwsEc2QueryProtocol } from "./query/AwsEc2QueryProtocol";
|
|
19
|
+
export { AwsQueryProtocol } from "./query/AwsQueryProtocol";
|
|
20
|
+
export { QuerySerializerSettings } from "./query/QuerySerializerSettings";
|
|
21
|
+
export { QueryShapeSerializer } from "./query/QueryShapeSerializer";
|
|
22
|
+
export { AwsRestXmlProtocol } from "./xml/AwsRestXmlProtocol";
|
|
23
|
+
export { XmlCodec } from "./xml/XmlCodec";
|
|
24
|
+
export { XmlSettings } from "./xml/XmlCodec";
|
|
25
|
+
export { XmlShapeDeserializer } from "./xml/XmlShapeDeserializer";
|
|
26
|
+
export { XmlShapeSerializer } from "./xml/XmlShapeSerializer";
|
|
27
|
+
export {
|
|
28
|
+
parseXmlBody,
|
|
29
|
+
parseXmlErrorBody,
|
|
30
|
+
loadRestXmlErrorCode,
|
|
31
|
+
} from "./xml/parseXmlBody";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.975.1",
|
|
4
4
|
"description": "Core functions & classes shared by multiple AWS SDK clients.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
@@ -103,12 +103,12 @@
|
|
|
103
103
|
},
|
|
104
104
|
"license": "Apache-2.0",
|
|
105
105
|
"dependencies": {
|
|
106
|
-
"@aws-sdk/types": "^3.
|
|
107
|
-
"@aws-sdk/xml-builder": "^3.972.
|
|
106
|
+
"@aws-sdk/types": "^3.974.0",
|
|
107
|
+
"@aws-sdk/xml-builder": "^3.972.34",
|
|
108
108
|
"@aws/lambda-invoke-store": "^0.3.0",
|
|
109
|
-
"@smithy/core": "^3.29.
|
|
110
|
-
"@smithy/signature-v4": "^5.6.
|
|
111
|
-
"@smithy/types": "^4.
|
|
109
|
+
"@smithy/core": "^3.29.2",
|
|
110
|
+
"@smithy/signature-v4": "^5.6.3",
|
|
111
|
+
"@smithy/types": "^4.16.0",
|
|
112
112
|
"bowser": "^2.11.0",
|
|
113
113
|
"tslib": "^2.6.2"
|
|
114
114
|
},
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { normalize, sep } from "node:path";
|
|
2
|
-
export const getNodeModulesParentDirs = (dirname) => {
|
|
3
|
-
const cwd = process.cwd();
|
|
4
|
-
if (!dirname) {
|
|
5
|
-
return [cwd];
|
|
6
|
-
}
|
|
7
|
-
const normalizedPath = normalize(dirname);
|
|
8
|
-
const parts = normalizedPath.split(sep);
|
|
9
|
-
const nodeModulesIndex = parts.indexOf("node_modules");
|
|
10
|
-
const parentDir = nodeModulesIndex !== -1 ? parts.slice(0, nodeModulesIndex).join(sep) : normalizedPath;
|
|
11
|
-
if (cwd === parentDir) {
|
|
12
|
-
return [cwd];
|
|
13
|
-
}
|
|
14
|
-
return [parentDir, cwd];
|
|
15
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { getSanitizedTypeScriptVersion } from "./getSanitizedTypeScriptVersion";
|
|
2
|
-
const ALLOWED_PREFIXES = ["^", "~", ">=", "<=", ">", "<"];
|
|
3
|
-
const ALLOWED_DIST_TAGS = ["latest", "beta", "dev", "rc", "insiders", "next"];
|
|
4
|
-
export const getSanitizedDevTypeScriptVersion = (version = "") => {
|
|
5
|
-
if (ALLOWED_DIST_TAGS.includes(version)) {
|
|
6
|
-
return version;
|
|
7
|
-
}
|
|
8
|
-
const prefix = ALLOWED_PREFIXES.find((p) => version.startsWith(p)) ?? "";
|
|
9
|
-
const sanitizedTypeScriptVersion = getSanitizedTypeScriptVersion(version.slice(prefix.length));
|
|
10
|
-
if (!sanitizedTypeScriptVersion) {
|
|
11
|
-
return undefined;
|
|
12
|
-
}
|
|
13
|
-
return `${prefix}${sanitizedTypeScriptVersion}`;
|
|
14
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const SEMVER_REGEX = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/;
|
|
2
|
-
export const getSanitizedTypeScriptVersion = (version = "") => {
|
|
3
|
-
const match = version.match(SEMVER_REGEX);
|
|
4
|
-
if (!match) {
|
|
5
|
-
return undefined;
|
|
6
|
-
}
|
|
7
|
-
const [major, minor, patch, prerelease] = [match[1], match[2], match[3], match[4]];
|
|
8
|
-
return prerelease ? `${major}.${minor}.${patch}-${prerelease}` : `${major}.${minor}.${patch}`;
|
|
9
|
-
};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { booleanSelector, SelectorType } from "@smithy/core/config";
|
|
2
|
-
import { readFile } from "node:fs/promises";
|
|
3
|
-
import { join } from "node:path";
|
|
4
|
-
import { getNodeModulesParentDirs } from "./getNodeModulesParentDirs";
|
|
5
|
-
import { getSanitizedDevTypeScriptVersion } from "./getSanitizedDevTypeScriptVersion";
|
|
6
|
-
import { getSanitizedTypeScriptVersion } from "./getSanitizedTypeScriptVersion";
|
|
7
|
-
let tscVersion;
|
|
8
|
-
const TS_PACKAGE_JSON = join("node_modules", "typescript", "package.json");
|
|
9
|
-
export const getTypeScriptUserAgentPair = async () => {
|
|
10
|
-
if (tscVersion === null) {
|
|
11
|
-
return undefined;
|
|
12
|
-
}
|
|
13
|
-
else if (typeof tscVersion === "string") {
|
|
14
|
-
return ["md/tsc", tscVersion];
|
|
15
|
-
}
|
|
16
|
-
let isTypeScriptDetectionDisabled = false;
|
|
17
|
-
try {
|
|
18
|
-
isTypeScriptDetectionDisabled =
|
|
19
|
-
booleanSelector(process.env, "AWS_SDK_JS_TYPESCRIPT_DETECTION_DISABLED", SelectorType.ENV) || false;
|
|
20
|
-
}
|
|
21
|
-
catch { }
|
|
22
|
-
if (isTypeScriptDetectionDisabled) {
|
|
23
|
-
tscVersion = null;
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
26
|
-
const dirname = typeof __dirname !== "undefined" ? __dirname : undefined;
|
|
27
|
-
const nodeModulesParentDirs = getNodeModulesParentDirs(dirname);
|
|
28
|
-
let versionFromApp;
|
|
29
|
-
for (const nodeModulesParentDir of nodeModulesParentDirs) {
|
|
30
|
-
try {
|
|
31
|
-
const appPackageJsonPath = join(nodeModulesParentDir, "package.json");
|
|
32
|
-
const packageJson = await readFile(appPackageJsonPath, "utf-8");
|
|
33
|
-
const { dependencies, devDependencies } = JSON.parse(packageJson);
|
|
34
|
-
const version = devDependencies?.typescript ?? dependencies?.typescript;
|
|
35
|
-
if (typeof version !== "string") {
|
|
36
|
-
continue;
|
|
37
|
-
}
|
|
38
|
-
versionFromApp = version;
|
|
39
|
-
break;
|
|
40
|
-
}
|
|
41
|
-
catch {
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
if (!versionFromApp) {
|
|
45
|
-
tscVersion = null;
|
|
46
|
-
return undefined;
|
|
47
|
-
}
|
|
48
|
-
let versionFromNodeModules;
|
|
49
|
-
for (const nodeModulesParentDir of nodeModulesParentDirs) {
|
|
50
|
-
try {
|
|
51
|
-
const tsPackageJsonPath = join(nodeModulesParentDir, TS_PACKAGE_JSON);
|
|
52
|
-
const packageJson = await readFile(tsPackageJsonPath, "utf-8");
|
|
53
|
-
const { version } = JSON.parse(packageJson);
|
|
54
|
-
const sanitizedVersion = getSanitizedTypeScriptVersion(version);
|
|
55
|
-
if (typeof sanitizedVersion !== "string") {
|
|
56
|
-
continue;
|
|
57
|
-
}
|
|
58
|
-
versionFromNodeModules = sanitizedVersion;
|
|
59
|
-
break;
|
|
60
|
-
}
|
|
61
|
-
catch {
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
if (versionFromNodeModules) {
|
|
65
|
-
tscVersion = versionFromNodeModules;
|
|
66
|
-
return ["md/tsc", tscVersion];
|
|
67
|
-
}
|
|
68
|
-
const sanitizedVersion = getSanitizedDevTypeScriptVersion(versionFromApp);
|
|
69
|
-
if (typeof sanitizedVersion !== "string") {
|
|
70
|
-
tscVersion = null;
|
|
71
|
-
return undefined;
|
|
72
|
-
}
|
|
73
|
-
tscVersion = `dev_${sanitizedVersion}`;
|
|
74
|
-
return ["md/tsc", tscVersion];
|
|
75
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns candidate paths to the node_modules parent directories based on current
|
|
3
|
-
* working directory and, if provided, from the given directory.
|
|
4
|
-
*
|
|
5
|
-
* @param dirname - Optional directory path to derive an additional candidate path from.
|
|
6
|
-
* @returns An array of unique candidate paths to the TypeScript package.json file.
|
|
7
|
-
*
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
export declare const getNodeModulesParentDirs: (dirname?: string) => string[];
|
package/dist-types/submodules/client/util-user-agent-node/getSanitizedDevTypeScriptVersion.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sanitizes a TypeScript version string for user-agent reporting.
|
|
3
|
-
* Handles dist tags (e.g., "latest", "beta"), version prefixes (e.g., "^", "~"),
|
|
4
|
-
* and semver strings. Returns undefined if the version is invalid.
|
|
5
|
-
*
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
export declare const getSanitizedDevTypeScriptVersion: (version?: string) => string | undefined;
|
package/dist-types/submodules/client/util-user-agent-node/getSanitizedTypeScriptVersion.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Validates a semver string (with optional pre-release and/or build metadata).
|
|
3
|
-
* If valid, returns the version string with build metadata stripped.
|
|
4
|
-
* Returns undefined if the string is not a valid semver.
|
|
5
|
-
*
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
export declare const getSanitizedTypeScriptVersion: (version?: string) => string | undefined;
|
package/dist-types/ts3.4/submodules/client/util-user-agent-node/getNodeModulesParentDirs.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getNodeModulesParentDirs: (dirname?: string) => string[];
|