chore: Update dist

This commit is contained in:
GitHub Actions
2025-11-04 23:26:32 +00:00
parent d020ce65bb
commit 2475ef7675
10 changed files with 568 additions and 400 deletions

432
dist/cleanup/index.js generated vendored
View File

@@ -3441,7 +3441,7 @@ util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunct
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ruleSet = void 0;
const F = "required", G = "type", H = "fn", I = "argv", J = "ref";
const a = false, b = true, c = "booleanEquals", d = "stringEquals", e = "sigv4", f = "sts", g = "us-east-1", h = "endpoint", i = "https://sts.{Region}.{PartitionResult#dnsSuffix}", j = "tree", k = "error", l = "getAttr", m = { [F]: false, [G]: "String" }, n = { [F]: true, "default": false, [G]: "Boolean" }, o = { [J]: "Endpoint" }, p = { [H]: "isSet", [I]: [{ [J]: "Region" }] }, q = { [J]: "Region" }, r = { [H]: "aws.partition", [I]: [q], "assign": "PartitionResult" }, s = { [J]: "UseFIPS" }, t = { [J]: "UseDualStack" }, u = { "url": "https://sts.amazonaws.com", "properties": { "authSchemes": [{ "name": e, "signingName": f, "signingRegion": g }] }, "headers": {} }, v = {}, w = { "conditions": [{ [H]: d, [I]: [q, "aws-global"] }], [h]: u, [G]: h }, x = { [H]: c, [I]: [s, true] }, y = { [H]: c, [I]: [t, true] }, z = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] }, A = { [J]: "PartitionResult" }, B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, "supportsDualStack"] }] }, C = [{ [H]: "isSet", [I]: [o] }], D = [x], E = [y];
const a = false, b = true, c = "booleanEquals", d = "stringEquals", e = "sigv4", f = "sts", g = "us-east-1", h = "endpoint", i = "https://sts.{Region}.{PartitionResult#dnsSuffix}", j = "tree", k = "error", l = "getAttr", m = { [F]: false, [G]: "string" }, n = { [F]: true, "default": false, [G]: "boolean" }, o = { [J]: "Endpoint" }, p = { [H]: "isSet", [I]: [{ [J]: "Region" }] }, q = { [J]: "Region" }, r = { [H]: "aws.partition", [I]: [q], "assign": "PartitionResult" }, s = { [J]: "UseFIPS" }, t = { [J]: "UseDualStack" }, u = { "url": "https://sts.amazonaws.com", "properties": { "authSchemes": [{ "name": e, "signingName": f, "signingRegion": g }] }, "headers": {} }, v = {}, w = { "conditions": [{ [H]: d, [I]: [q, "aws-global"] }], [h]: u, [G]: h }, x = { [H]: c, [I]: [s, true] }, y = { [H]: c, [I]: [t, true] }, z = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] }, A = { [J]: "PartitionResult" }, B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, "supportsDualStack"] }] }, C = [{ [H]: "isSet", [I]: [o] }], D = [x], E = [y];
const _data = { version: "1.0", parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b] }, { [H]: "not", [I]: C }, p, r, { [H]: c, [I]: [s, a] }, { [H]: c, [I]: [t, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: h }, w, { conditions: [{ [H]: d, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-east-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-2"] }], endpoint: u, [G]: h }, { endpoint: { url: i, properties: { authSchemes: [{ name: e, signingName: f, signingRegion: "{Region}" }] }, headers: v }, [G]: h }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k }, { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h }], [G]: j }, { conditions: [p], rules: [{ conditions: [r], rules: [{ conditions: [x, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z] }, B], rules: [{ endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v, headers: v }, [G]: h }, { endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS is enabled but this partition does not support FIPS", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "DualStack is enabled but this partition does not support DualStack", [G]: k }], [G]: j }, w, { endpoint: { url: i, properties: v, headers: v }, [G]: h }], [G]: j }], [G]: j }, { error: "Invalid Configuration: Missing Region", [G]: k }] };
exports.ruleSet = _data;
@@ -3462,6 +3462,7 @@ var EndpointParameters = __nccwpck_require__(2912);
var core = __nccwpck_require__(8704);
var protocolHttp = __nccwpck_require__(2356);
var client = __nccwpck_require__(5152);
var regionConfigResolver = __nccwpck_require__(6463);
class STSServiceException extends smithyClient.ServiceException {
constructor(options) {
@@ -4701,7 +4702,6 @@ class STS extends STSClient.STSClient {
}
smithyClient.createAggregatedClient(commands, STS);
const ASSUME_ROLE_DEFAULT_REGION = "us-east-1";
const getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
if (typeof assumedRoleUser?.Arn === "string") {
const arnComponents = assumedRoleUser.Arn.split(":");
@@ -4711,11 +4711,12 @@ const getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
}
return undefined;
};
const resolveRegion = async (_region, _parentRegion, credentialProviderLogger) => {
const resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => {
const region = typeof _region === "function" ? await _region() : _region;
const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (provider)`, `${parentRegion} (parent client)`, `${ASSUME_ROLE_DEFAULT_REGION} (STS default)`);
return region ?? parentRegion ?? ASSUME_ROLE_DEFAULT_REGION;
const stsDefaultRegion = await regionConfigResolver.stsRegionDefaultResolver(loaderConfig)();
credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`);
return region ?? parentRegion ?? stsDefaultRegion;
};
const getDefaultRoleAssumer$1 = (stsOptions, STSClient) => {
let stsClient;
@@ -4723,11 +4724,16 @@ const getDefaultRoleAssumer$1 = (stsOptions, STSClient) => {
return async (sourceCreds, params) => {
closureSourceCreds = sourceCreds;
if (!stsClient) {
const { logger = stsOptions?.parentClientConfig?.logger, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, } = stsOptions;
const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger);
const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId, } = stsOptions;
const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
logger,
profile,
});
const isCompatibleRequestHandler = !isH2(requestHandler);
stsClient = new STSClient({
profile: stsOptions?.parentClientConfig?.profile,
...stsOptions,
userAgentAppId,
profile,
credentialDefaultProvider: () => async () => closureSourceCreds,
region: resolvedRegion,
requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,
@@ -4755,11 +4761,16 @@ const getDefaultRoleAssumerWithWebIdentity$1 = (stsOptions, STSClient) => {
let stsClient;
return async (params) => {
if (!stsClient) {
const { logger = stsOptions?.parentClientConfig?.logger, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, } = stsOptions;
const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger);
const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId, } = stsOptions;
const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
logger,
profile,
});
const isCompatibleRequestHandler = !isH2(requestHandler);
stsClient = new STSClient({
profile: stsOptions?.parentClientConfig?.profile,
...stsOptions,
userAgentAppId,
profile,
region: resolvedRegion,
requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,
logger: logger,
@@ -7114,17 +7125,73 @@ const remoteProvider = async (init) => {
return fromInstanceMetadata(init);
};
function memoizeChain(providers, treatAsExpired) {
const chain = internalCreateChain(providers);
let activeLock;
let passiveLock;
let credentials;
const provider = async (options) => {
if (options?.forceRefresh) {
return await chain(options);
}
if (credentials?.expiration) {
if (credentials?.expiration?.getTime() < Date.now()) {
credentials = undefined;
}
}
if (activeLock) {
await activeLock;
}
else if (!credentials || treatAsExpired?.(credentials)) {
if (credentials) {
if (!passiveLock) {
passiveLock = chain(options).then((c) => {
credentials = c;
passiveLock = undefined;
});
}
}
else {
activeLock = chain(options).then((c) => {
credentials = c;
activeLock = undefined;
});
return provider(options);
}
}
return credentials;
};
return provider;
}
const internalCreateChain = (providers) => async (awsIdentityProperties) => {
let lastProviderError;
for (const provider of providers) {
try {
return await provider(awsIdentityProperties);
}
catch (err) {
lastProviderError = err;
if (err?.tryNextLink) {
continue;
}
throw err;
}
}
throw lastProviderError;
};
let multipleCredentialSourceWarningEmitted = false;
const defaultProvider = (init = {}) => propertyProvider.memoize(propertyProvider.chain(async () => {
const profile = init.profile ?? process.env[sharedIniFileLoader.ENV_PROFILE];
if (profile) {
const envStaticCredentialsAreSet = process.env[credentialProviderEnv.ENV_KEY] && process.env[credentialProviderEnv.ENV_SECRET];
if (envStaticCredentialsAreSet) {
if (!multipleCredentialSourceWarningEmitted) {
const warnFn = init.logger?.warn && init.logger?.constructor?.name !== "NoOpLogger"
? init.logger.warn.bind(init.logger)
: console.warn;
warnFn(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
const defaultProvider = (init = {}) => memoizeChain([
async () => {
const profile = init.profile ?? process.env[sharedIniFileLoader.ENV_PROFILE];
if (profile) {
const envStaticCredentialsAreSet = process.env[credentialProviderEnv.ENV_KEY] && process.env[credentialProviderEnv.ENV_SECRET];
if (envStaticCredentialsAreSet) {
if (!multipleCredentialSourceWarningEmitted) {
const warnFn = init.logger?.warn && init.logger?.constructor?.name !== "NoOpLogger"
? init.logger.warn.bind(init.logger)
: console.warn;
warnFn(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
Multiple credential sources detected:
Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
This SDK will proceed with the AWS_PROFILE value.
@@ -7133,45 +7200,52 @@ const defaultProvider = (init = {}) => propertyProvider.memoize(propertyProvider
Please ensure that your environment only sets either the AWS_PROFILE or the
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
`);
multipleCredentialSourceWarningEmitted = true;
multipleCredentialSourceWarningEmitted = true;
}
}
throw new propertyProvider.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", {
logger: init.logger,
tryNextLink: true,
});
}
throw new propertyProvider.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", {
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv");
return credentialProviderEnv.fromEnv(init)();
},
async (awsIdentityProperties) => {
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");
const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
throw new propertyProvider.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).", { logger: init.logger });
}
const { fromSSO } = await __nccwpck_require__.e(/* import() */ 998).then(__nccwpck_require__.t.bind(__nccwpck_require__, 998, 19));
return fromSSO(init)(awsIdentityProperties);
},
async (awsIdentityProperties) => {
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");
const { fromIni } = await __nccwpck_require__.e(/* import() */ 869).then(__nccwpck_require__.t.bind(__nccwpck_require__, 5869, 19));
return fromIni(init)(awsIdentityProperties);
},
async (awsIdentityProperties) => {
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");
const { fromProcess } = await __nccwpck_require__.e(/* import() */ 360).then(__nccwpck_require__.t.bind(__nccwpck_require__, 5360, 19));
return fromProcess(init)(awsIdentityProperties);
},
async (awsIdentityProperties) => {
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");
const { fromTokenFile } = await Promise.all(/* import() */[__nccwpck_require__.e(136), __nccwpck_require__.e(956)]).then(__nccwpck_require__.t.bind(__nccwpck_require__, 9956, 23));
return fromTokenFile(init)(awsIdentityProperties);
},
async () => {
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider");
return (await remoteProvider(init))();
},
async () => {
throw new propertyProvider.CredentialsProviderError("Could not load credentials from any providers", {
tryNextLink: false,
logger: init.logger,
tryNextLink: true,
});
}
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv");
return credentialProviderEnv.fromEnv(init)();
}, async () => {
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");
const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
throw new propertyProvider.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).", { logger: init.logger });
}
const { fromSSO } = await __nccwpck_require__.e(/* import() */ 998).then(__nccwpck_require__.t.bind(__nccwpck_require__, 998, 19));
return fromSSO(init)();
}, async () => {
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");
const { fromIni } = await __nccwpck_require__.e(/* import() */ 869).then(__nccwpck_require__.t.bind(__nccwpck_require__, 5869, 19));
return fromIni(init)();
}, async () => {
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");
const { fromProcess } = await __nccwpck_require__.e(/* import() */ 360).then(__nccwpck_require__.t.bind(__nccwpck_require__, 5360, 19));
return fromProcess(init)();
}, async () => {
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");
const { fromTokenFile } = await Promise.all(/* import() */[__nccwpck_require__.e(136), __nccwpck_require__.e(956)]).then(__nccwpck_require__.t.bind(__nccwpck_require__, 9956, 23));
return fromTokenFile(init)();
}, async () => {
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider");
return (await remoteProvider(init))();
}, async () => {
throw new propertyProvider.CredentialsProviderError("Could not load credentials from any providers", {
tryNextLink: false,
logger: init.logger,
});
}), credentialsTreatedAsExpired, credentialsWillNeedRefresh);
},
], credentialsTreatedAsExpired);
const credentialsWillNeedRefresh = (credentials) => credentials?.expiration !== undefined;
const credentialsTreatedAsExpired = (credentials) => credentials?.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000;
@@ -7327,7 +7401,7 @@ Object.keys(recursionDetectionMiddleware).forEach(function (k) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.recursionDetectionMiddleware = void 0;
const lambda_invoke_store_1 = __nccwpck_require__(7453);
const lambda_invoke_store_1 = __nccwpck_require__(9320);
const protocol_http_1 = __nccwpck_require__(2356);
const TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id";
const ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME";
@@ -7452,8 +7526,8 @@ const USER_AGENT = "user-agent";
const X_AMZ_USER_AGENT = "x-amz-user-agent";
const SPACE = " ";
const UA_NAME_SEPARATOR = "/";
const UA_NAME_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g;
const UA_VALUE_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;
const UA_NAME_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w]/g;
const UA_VALUE_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w#]/g;
const UA_ESCAPE_CHAR = "-";
const BYTE_LIMIT = 1024;
@@ -7489,7 +7563,7 @@ const userAgentMiddleware = (options) => (next, context) => async (args) => {
const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];
const appId = await options.userAgentAppId();
if (appId) {
defaultUserAgent.push(escapeUserAgent([`app/${appId}`]));
defaultUserAgent.push(escapeUserAgent([`app`, `${appId}`]));
}
const prefix = utilEndpoints.getUserAgentPrefix();
const sdkUserAgentValue = (prefix ? [prefix] : [])
@@ -7563,11 +7637,14 @@ exports.userAgentMiddleware = userAgentMiddleware;
/***/ }),
/***/ 6463:
/***/ ((__unused_webpack_module, exports) => {
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
var configResolver = __nccwpck_require__(9316);
var stsRegionDefaultResolver = __nccwpck_require__(5779);
const getAwsRegionExtensionConfiguration = (runtimeConfig) => {
return {
setRegion(region) {
@@ -7584,57 +7661,62 @@ const resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration)
};
};
const REGION_ENV_NAME = "AWS_REGION";
const REGION_INI_NAME = "region";
const NODE_REGION_CONFIG_OPTIONS = {
environmentVariableSelector: (env) => env[REGION_ENV_NAME],
configFileSelector: (profile) => profile[REGION_INI_NAME],
default: () => {
throw new Error("Region is missing");
},
};
const NODE_REGION_CONFIG_FILE_OPTIONS = {
preferredFile: "credentials",
};
const isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips"));
const getRealRegion = (region) => isFipsRegion(region)
? ["fips-aws-global", "aws-fips"].includes(region)
? "us-east-1"
: region.replace(/fips-(dkr-|prod-)?|-fips/, "")
: region;
const resolveRegionConfig = (input) => {
const { region, useFipsEndpoint } = input;
if (!region) {
throw new Error("Region is missing");
}
return Object.assign(input, {
region: async () => {
if (typeof region === "string") {
return getRealRegion(region);
}
const providedRegion = await region();
return getRealRegion(providedRegion);
},
useFipsEndpoint: async () => {
const providedRegion = typeof region === "string" ? region : await region();
if (isFipsRegion(providedRegion)) {
return true;
}
return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();
},
});
};
exports.NODE_REGION_CONFIG_FILE_OPTIONS = NODE_REGION_CONFIG_FILE_OPTIONS;
exports.NODE_REGION_CONFIG_OPTIONS = NODE_REGION_CONFIG_OPTIONS;
exports.REGION_ENV_NAME = REGION_ENV_NAME;
exports.REGION_INI_NAME = REGION_INI_NAME;
Object.defineProperty(exports, "NODE_REGION_CONFIG_FILE_OPTIONS", ({
enumerable: true,
get: function () { return configResolver.NODE_REGION_CONFIG_FILE_OPTIONS; }
}));
Object.defineProperty(exports, "NODE_REGION_CONFIG_OPTIONS", ({
enumerable: true,
get: function () { return configResolver.NODE_REGION_CONFIG_OPTIONS; }
}));
Object.defineProperty(exports, "REGION_ENV_NAME", ({
enumerable: true,
get: function () { return configResolver.REGION_ENV_NAME; }
}));
Object.defineProperty(exports, "REGION_INI_NAME", ({
enumerable: true,
get: function () { return configResolver.REGION_INI_NAME; }
}));
Object.defineProperty(exports, "resolveRegionConfig", ({
enumerable: true,
get: function () { return configResolver.resolveRegionConfig; }
}));
exports.getAwsRegionExtensionConfiguration = getAwsRegionExtensionConfiguration;
exports.resolveAwsRegionExtensionConfiguration = resolveAwsRegionExtensionConfiguration;
exports.resolveRegionConfig = resolveRegionConfig;
Object.keys(stsRegionDefaultResolver).forEach(function (k) {
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
enumerable: true,
get: function () { return stsRegionDefaultResolver[k]; }
});
});
/***/ }),
/***/ 5779:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.warning = void 0;
exports.stsRegionDefaultResolver = stsRegionDefaultResolver;
const config_resolver_1 = __nccwpck_require__(9316);
const node_config_provider_1 = __nccwpck_require__(5704);
function stsRegionDefaultResolver(loaderConfig = {}) {
return (0, node_config_provider_1.loadConfig)({
...config_resolver_1.NODE_REGION_CONFIG_OPTIONS,
async default() {
if (!exports.warning.silence) {
console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly.");
}
return "us-east-1";
},
}, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig });
}
exports.warning = {
silence: false,
};
/***/ }),
@@ -7891,6 +7973,9 @@ var partitions = [
},
"us-isob-east-1": {
description: "US ISOB East (Ohio)"
},
"us-isob-west-1": {
description: "US ISOB West"
}
}
},
@@ -8283,15 +8368,14 @@ function parseXML(xmlString) {
/***/ }),
/***/ 7453:
/***/ 9320:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.InvokeStore = void 0;
const async_hooks_1 = __nccwpck_require__(290);
// AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA provides an escape hatch since we're modifying the global object which may not be expected to a customer's handler.
var async_hooks = __nccwpck_require__(290);
const noGlobalAwsLambda = process.env["AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA"] === "1" ||
process.env["AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA"] === "true";
if (!noGlobalAwsLambda) {
@@ -8300,37 +8384,21 @@ if (!noGlobalAwsLambda) {
const PROTECTED_KEYS = {
REQUEST_ID: Symbol("_AWS_LAMBDA_REQUEST_ID"),
X_RAY_TRACE_ID: Symbol("_AWS_LAMBDA_X_RAY_TRACE_ID"),
TENANT_ID: Symbol("_AWS_LAMBDA_TENANT_ID"),
};
/**
* InvokeStore implementation class
*/
class InvokeStoreImpl {
static storage = new async_hooks_1.AsyncLocalStorage();
// Protected keys for Lambda context fields
static storage = new async_hooks.AsyncLocalStorage();
static PROTECTED_KEYS = PROTECTED_KEYS;
/**
* Initialize and run code within an invoke context
*/
static run(context, fn) {
return this.storage.run({ ...context }, fn);
}
/**
* Get the complete current context
*/
static getContext() {
return this.storage.getStore();
}
/**
* Get a specific value from the context by key
*/
static get(key) {
const context = this.storage.getStore();
return context?.[key];
}
/**
* Set a custom value in the current context
* Protected Lambda context fields cannot be overwritten
*/
static set(key, value) {
if (this.isProtectedKey(key)) {
throw new Error(`Cannot modify protected Lambda context field`);
@@ -8340,27 +8408,18 @@ class InvokeStoreImpl {
context[key] = value;
}
}
/**
* Get the current request ID
*/
static getRequestId() {
return this.get(this.PROTECTED_KEYS.REQUEST_ID) ?? "-";
}
/**
* Get the current X-ray trace ID
*/
static getXRayTraceId() {
return this.get(this.PROTECTED_KEYS.X_RAY_TRACE_ID);
}
/**
* Check if we're currently within an invoke context
*/
static getTenantId() {
return this.get(this.PROTECTED_KEYS.TENANT_ID);
}
static hasContext() {
return this.storage.getStore() !== undefined;
}
/**
* Check if a key is protected (readonly Lambda context field)
*/
static isProtectedKey(key) {
return (key === this.PROTECTED_KEYS.REQUEST_ID ||
key === this.PROTECTED_KEYS.X_RAY_TRACE_ID);
@@ -8376,7 +8435,9 @@ else {
globalThis.awslambda.InvokeStore = instance;
}
}
exports.InvokeStore = instance;
const InvokeStore = instance;
exports.InvokeStore = InvokeStore;
/***/ }),
@@ -8389,6 +8450,7 @@ exports.InvokeStore = instance;
var utilConfigProvider = __nccwpck_require__(6716);
var utilMiddleware = __nccwpck_require__(6324);
var utilEndpoints = __nccwpck_require__(9674);
const ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT";
const CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint";
@@ -8460,6 +8522,16 @@ const NODE_REGION_CONFIG_FILE_OPTIONS = {
preferredFile: "credentials",
};
const validRegions = new Set();
const checkRegion = (region, check = utilEndpoints.isValidHostLabel) => {
if (!validRegions.has(region) && !check(region)) {
throw new Error(`Region not accepted: region="${region}" is not a valid hostname component.`);
}
else {
validRegions.add(region);
}
};
const isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips"));
const getRealRegion = (region) => isFipsRegion(region)
@@ -8475,11 +8547,10 @@ const resolveRegionConfig = (input) => {
}
return Object.assign(input, {
region: async () => {
if (typeof region === "string") {
return getRealRegion(region);
}
const providedRegion = await region();
return getRealRegion(providedRegion);
const providedRegion = typeof region === "function" ? await region() : region;
const realRegion = getRealRegion(providedRegion);
checkRegion(realRegion);
return realRegion;
},
useFipsEndpoint: async () => {
const providedRegion = typeof region === "string" ? region : await region();
@@ -11946,12 +12017,8 @@ const _parseRfc3339DateTimeWithOffset = (value) => {
range(hours, 0, 23);
range(minutes, 0, 59);
range(seconds, 0, 60);
const date = new Date();
date.setUTCFullYear(Number(yearStr), Number(monthStr) - 1, Number(dayStr));
date.setUTCHours(Number(hours));
date.setUTCMinutes(Number(minutes));
date.setUTCSeconds(Number(seconds));
date.setUTCMilliseconds(Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1000) : 0);
const date = new Date(Date.UTC(Number(yearStr), Number(monthStr) - 1, Number(dayStr), Number(hours), Number(minutes), Number(seconds), Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1000) : 0));
date.setUTCFullYear(Number(yearStr));
if (offsetStr.toUpperCase() != "Z") {
const [, sign, offsetH, offsetM] = /([+-])(\d\d):(\d\d)/.exec(offsetStr) || [void 0, "+", 0, 0];
const scalar = sign === "-" ? 1 : -1;
@@ -11985,18 +12052,13 @@ const _parseRfc7231DateTime = (value) => {
[, month, day, hour, minute, second, fraction, year] = matches;
}
if (year && second) {
const date = new Date();
date.setUTCFullYear(Number(year));
date.setUTCMonth(months.indexOf(month));
const timestamp = Date.UTC(Number(year), months.indexOf(month), Number(day), Number(hour), Number(minute), Number(second), fraction ? Math.round(parseFloat(`0.${fraction}`) * 1000) : 0);
range(day, 1, 31);
date.setUTCDate(Number(day));
range(hour, 0, 23);
date.setUTCHours(Number(hour));
range(minute, 0, 59);
date.setUTCMinutes(Number(minute));
range(second, 0, 60);
date.setUTCSeconds(Number(second));
date.setUTCMilliseconds(fraction ? Math.round(parseFloat(`0.${fraction}`) * 1000) : 0);
const date = new Date(timestamp);
date.setUTCFullYear(Number(year));
return date;
}
throw new TypeError(`Invalid RFC7231 date-time value ${value}.`);
@@ -13780,12 +13842,12 @@ const setSocketTimeout = (request, reject, timeoutInMs = 0) => {
};
const MIN_WAIT_TIME = 6_000;
async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME) {
async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) {
const headers = request.headers ?? {};
const expect = headers["Expect"] || headers["expect"];
const expect = headers.Expect || headers.expect;
let timeoutId = -1;
let sendBody = true;
if (expect === "100-continue") {
if (!externalAgent && expect === "100-continue") {
sendBody = await Promise.race([
new Promise((resolve) => {
timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));
@@ -13839,6 +13901,7 @@ class NodeHttpHandler {
config;
configProvider;
socketWarningTimestamp = 0;
externalAgent = false;
metadata = { handlerProtocol: "http/1.1" };
static create(instanceOrOptions) {
if (typeof instanceOrOptions?.handle === "function") {
@@ -13895,12 +13958,14 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
throwOnRequestTimeout,
httpAgent: (() => {
if (httpAgent instanceof http.Agent || typeof httpAgent?.destroy === "function") {
this.externalAgent = true;
return httpAgent;
}
return new http.Agent({ keepAlive, maxSockets, ...httpAgent });
})(),
httpsAgent: (() => {
if (httpsAgent instanceof https.Agent || typeof httpsAgent?.destroy === "function") {
this.externalAgent = true;
return httpsAgent;
}
return new https.Agent({ keepAlive, maxSockets, ...httpsAgent });
@@ -13917,6 +13982,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
this.config = await this.configProvider;
}
return new Promise((_resolve, _reject) => {
const config = this.config;
let writeRequestBodyPromise = undefined;
const timeouts = [];
const resolve = async (arg) => {
@@ -13929,9 +13995,6 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
timeouts.forEach(timing.clearTimeout);
_reject(arg);
};
if (!this.config) {
throw new Error("Node HTTP request handler config is not resolved");
}
if (abortSignal?.aborted) {
const abortError = new Error("Request aborted");
abortError.name = "AbortError";
@@ -13939,11 +14002,18 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
return;
}
const isSSL = request.protocol === "https:";
const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent;
const headers = request.headers ?? {};
const expectContinue = (headers.Expect ?? headers.expect) === "100-continue";
let agent = isSSL ? config.httpsAgent : config.httpAgent;
if (expectContinue && !this.externalAgent) {
agent = new (isSSL ? https.Agent : http.Agent)({
keepAlive: false,
maxSockets: Infinity,
});
}
timeouts.push(timing.setTimeout(() => {
this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, this.config.logger);
}, this.config.socketAcquisitionWarningTimeout ??
(this.config.requestTimeout ?? 2000) + (this.config.connectionTimeout ?? 1000)));
this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, config.logger);
}, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2000) + (config.connectionTimeout ?? 1000)));
const queryString = querystringBuilder.buildQueryString(request.query || {});
let auth = undefined;
if (request.username != null || request.password != null) {
@@ -14008,10 +14078,10 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
abortSignal.onabort = onAbort;
}
}
const effectiveRequestTimeout = requestTimeout ?? this.config.requestTimeout;
timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout));
timeouts.push(setRequestTimeout(req, reject, effectiveRequestTimeout, this.config.throwOnRequestTimeout, this.config.logger ?? console));
timeouts.push(setSocketTimeout(req, reject, this.config.socketTimeout));
const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout;
timeouts.push(setConnectionTimeout(req, reject, config.connectionTimeout));
timeouts.push(setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, config.logger ?? console));
timeouts.push(setSocketTimeout(req, reject, config.socketTimeout));
const httpAgent = nodeHttpsOptions.agent;
if (typeof httpAgent === "object" && "keepAlive" in httpAgent) {
timeouts.push(setSocketKeepAlive(req, {
@@ -14019,7 +14089,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
keepAliveMsecs: httpAgent.keepAliveMsecs,
}));
}
writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout).catch((e) => {
writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout, this.externalAgent).catch((e) => {
timeouts.forEach(timing.clearTimeout);
return _reject(e);
});
@@ -43656,7 +43726,7 @@ module.exports = parseParams
/***/ ((module) => {
"use strict";
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sts","description":"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native","version":"3.913.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.911.0","@aws-sdk/credential-provider-node":"3.913.0","@aws-sdk/middleware-host-header":"3.910.0","@aws-sdk/middleware-logger":"3.910.0","@aws-sdk/middleware-recursion-detection":"3.910.0","@aws-sdk/middleware-user-agent":"3.911.0","@aws-sdk/region-config-resolver":"3.910.0","@aws-sdk/types":"3.910.0","@aws-sdk/util-endpoints":"3.910.0","@aws-sdk/util-user-agent-browser":"3.910.0","@aws-sdk/util-user-agent-node":"3.911.0","@smithy/config-resolver":"^4.3.2","@smithy/core":"^3.16.1","@smithy/fetch-http-handler":"^5.3.3","@smithy/hash-node":"^4.2.2","@smithy/invalid-dependency":"^4.2.2","@smithy/middleware-content-length":"^4.2.2","@smithy/middleware-endpoint":"^4.3.3","@smithy/middleware-retry":"^4.4.3","@smithy/middleware-serde":"^4.2.2","@smithy/middleware-stack":"^4.2.2","@smithy/node-config-provider":"^4.3.2","@smithy/node-http-handler":"^4.4.1","@smithy/protocol-http":"^5.3.2","@smithy/smithy-client":"^4.8.1","@smithy/types":"^4.7.1","@smithy/url-parser":"^4.2.2","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.2","@smithy/util-defaults-mode-node":"^4.2.3","@smithy/util-endpoints":"^3.2.2","@smithy/util-middleware":"^4.2.2","@smithy/util-retry":"^4.2.2","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sts"}}');
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sts","description":"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native","version":"3.922.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.922.0","@aws-sdk/credential-provider-node":"3.922.0","@aws-sdk/middleware-host-header":"3.922.0","@aws-sdk/middleware-logger":"3.922.0","@aws-sdk/middleware-recursion-detection":"3.922.0","@aws-sdk/middleware-user-agent":"3.922.0","@aws-sdk/region-config-resolver":"3.922.0","@aws-sdk/types":"3.922.0","@aws-sdk/util-endpoints":"3.922.0","@aws-sdk/util-user-agent-browser":"3.922.0","@aws-sdk/util-user-agent-node":"3.922.0","@smithy/config-resolver":"^4.4.1","@smithy/core":"^3.17.2","@smithy/fetch-http-handler":"^5.3.5","@smithy/hash-node":"^4.2.4","@smithy/invalid-dependency":"^4.2.4","@smithy/middleware-content-length":"^4.2.4","@smithy/middleware-endpoint":"^4.3.6","@smithy/middleware-retry":"^4.4.6","@smithy/middleware-serde":"^4.2.4","@smithy/middleware-stack":"^4.2.4","@smithy/node-config-provider":"^4.3.4","@smithy/node-http-handler":"^4.4.4","@smithy/protocol-http":"^5.3.4","@smithy/smithy-client":"^4.9.2","@smithy/types":"^4.8.1","@smithy/url-parser":"^4.2.4","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.5","@smithy/util-defaults-mode-node":"^4.2.7","@smithy/util-endpoints":"^3.2.4","@smithy/util-middleware":"^4.2.4","@smithy/util-retry":"^4.2.4","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sts"}}');
/***/ })