Download node_modules/@aws-sdk/client-sts/dist-es/defaultRoleAssumers.js from sweet2004/bot: direct link, hf CLI and curl.
- Browser
- Download file 1.22 kB
-
https://huggingface.co/spaces/sweet2004/bot/resolve/main/node_modules/%40aws-sdk/client-sts/dist-es/defaultRoleAssumers.js
- Command line
-
hf download hf://spaces/sweet2004/bot/node_modules/@aws-sdk/client-sts/dist-es/defaultRoleAssumers.js
-
curl -L -o defaultRoleAssumers.js https://huggingface.co/spaces/sweet2004/bot/resolve/main/node_modules/%40aws-sdk/client-sts/dist-es/defaultRoleAssumers.js
1.22 kB
| import { getDefaultRoleAssumer as StsGetDefaultRoleAssumer, getDefaultRoleAssumerWithWebIdentity as StsGetDefaultRoleAssumerWithWebIdentity, } from "./defaultStsRoleAssumers"; | |
| import { STSClient } from "./STSClient"; | |
| const getCustomizableStsClientCtor = (baseCtor, customizations) => { | |
| if (!customizations) | |
| return baseCtor; | |
| else | |
| return class CustomizableSTSClient extends baseCtor { | |
| constructor(config) { | |
| super(config); | |
| for (const customization of customizations) { | |
| this.middlewareStack.use(customization); | |
| } | |
| } | |
| }; | |
| }; | |
| export const getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => StsGetDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins)); | |
| export const getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => StsGetDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins)); | |
| export const decorateDefaultCredentialProvider = (provider) => (input) => provider({ | |
| roleAssumer: getDefaultRoleAssumer(input), | |
| roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(input), | |
| ...input, | |
| }); | |